// In case we are on a device with locked rotation, we should look at preferences to check
// if the user has specifically allowed rotation.
if (!mRotationEnabled) {
- mRotationEnabled = Utilities.isAllowRotationPrefEnabled(getApplicationContext());
+ mRotationEnabled = Utilities.isAllowRotationPrefEnabled(getApplicationContext(), false);
}
// On large interfaces, or on devices that a user has specifically enabled screen rotation,
return Log.isLoggable(propertyName, Log.VERBOSE);
}
- public static boolean isAllowRotationPrefEnabled(Context context) {
+ public static boolean isAllowRotationPrefEnabled(Context context, boolean multiProcess) {
SharedPreferences sharedPrefs = context.getSharedPreferences(
- LauncherAppState.getSharedPreferencesKey(), Context.MODE_PRIVATE);
+ LauncherAppState.getSharedPreferencesKey(), Context.MODE_PRIVATE | (multiProcess ?
+ Context.MODE_MULTI_PROCESS : 0));
boolean allowRotationPref = sharedPrefs.getBoolean(ALLOW_ROTATION_PREFERENCE_KEY, false);
return sForceEnableRotation || allowRotationPref;
}