Example usage for android.content Context MODE_MULTI_PROCESS

List of usage examples for android.content Context MODE_MULTI_PROCESS

Introduction

In this page you can find the example usage for android.content Context MODE_MULTI_PROCESS.

Prototype

int MODE_MULTI_PROCESS

To view the source code for android.content Context MODE_MULTI_PROCESS.

Click Source Link

Document

SharedPreference loading flag: when set, the file on disk will be checked for modification even if the shared preferences instance is already loaded in this process.

Usage

From source file:com.android.launcher3.Workspace.java

protected void setWallpaperDimension() {
    new AsyncTask<Void, Void, Void>() {
        public Void doInBackground(Void... args) {
            String spKey = WallpaperCropActivity.getSharedPreferencesKey();
            SharedPreferences sp = mLauncher.getSharedPreferences(spKey, Context.MODE_MULTI_PROCESS);
            LauncherWallpaperPickerActivity.suggestWallpaperDimension(mLauncher.getResources(), sp,
                    mLauncher.getWindowManager(), mWallpaperManager, mLauncher.overrideWallpaperDimensions());
            return null;
        }/*from   w w  w  . ja  va2s  .co  m*/
    }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Void) null);
}

From source file:xyz.klinker.blur.launcher3.Workspace.java

protected void setWallpaperDimension() {
    new AsyncTask<Void, Void, Void>() {
        public Void doInBackground(Void... args) {
            String spKey = LauncherFiles.WALLPAPER_CROP_PREFERENCES_KEY;
            SharedPreferences sp = mLauncher.getSharedPreferences(spKey, Context.MODE_MULTI_PROCESS);
            WallpaperUtils.suggestWallpaperDimension(mLauncher.getResources(), sp, mLauncher.getWindowManager(),
                    mWallpaperManager, mLauncher.overrideWallpaperDimensions());
            return null;
        }//from w  ww.j a  v  a 2 s  .c  o m
    }.executeOnExecutor(Utilities.THREAD_POOL_EXECUTOR);
}

From source file:com.android.mms.ui.MessageUtils.java

public static float getPreferenceValueFloat(Context context, String key, float defaultValue) {
    SharedPreferences sp = context.getSharedPreferences("com.android.mms_preferences",
            Context.MODE_PRIVATE | Context.MODE_MULTI_PROCESS);
    return sp.getFloat(key, defaultValue);
}