List of usage examples for android.os StrictMode noteSlowCall
public static void noteSlowCall(String name)
From source file:org.sleepydragon.rgbclient.Settings.java
/** * Opens the SharedPreferences in which the settings outlined in this class are stored. * * @param context the Context object to use to open the SharedPreferences. * @return the SharedPreferences; never returns null. */// w w w.j a v a 2s . c om @NonNull public static SharedPreferences getSharedPreferences(@NonNull Context context) { StrictMode.noteSlowCall("opening SharedPreferences potentially performs blocking I/O"); final Context appContext = context.getApplicationContext(); return appContext.getSharedPreferences(SHARED_PREFS_NAME, Context.MODE_PRIVATE); }