Loading WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java +5 −6 Original line number Diff line number Diff line Loading @@ -1159,11 +1159,10 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { @Override public boolean enableRotation() { // Check if rotation is enabled for this device. if (Utilities.isRotationAllowedForDevice(getContext())) return true; // Check if the user has specifically enabled rotation via preferences. return Utilities.isAllowRotationPrefEnabled(getApplicationContext(), true); return super.enableRotation() || getContentResolver().call(LauncherSettings.Settings.CONTENT_URI, LauncherSettings.Settings.METHOD_GET_BOOLEAN, Utilities.ALLOW_ROTATION_PREFERENCE_KEY, new Bundle()) .getBoolean(LauncherSettings.Settings.EXTRA_VALUE); } } src/com/android/launcher3/Launcher.java +1 −1 Original line number Diff line number Diff line Loading @@ -479,7 +479,7 @@ public class Launcher extends Activity // 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(), false); mRotationEnabled = Utilities.isAllowRotationPrefEnabled(getApplicationContext()); } // On large interfaces, or on devices that a user has specifically enabled screen rotation, Loading src/com/android/launcher3/Utilities.java +2 −3 Original line number Diff line number Diff line Loading @@ -119,10 +119,9 @@ public final class Utilities { return Log.isLoggable(propertyName, Log.VERBOSE); } public static boolean isAllowRotationPrefEnabled(Context context, boolean multiProcess) { public static boolean isAllowRotationPrefEnabled(Context context) { SharedPreferences sharedPrefs = context.getSharedPreferences( LauncherAppState.getSharedPreferencesKey(), Context.MODE_PRIVATE | (multiProcess ? Context.MODE_MULTI_PROCESS : 0)); LauncherAppState.getSharedPreferencesKey(), Context.MODE_PRIVATE); boolean allowRotationPref = sharedPrefs.getBoolean(ALLOW_ROTATION_PREFERENCE_KEY, false); return sForceEnableRotation || allowRotationPref; } Loading Loading
WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java +5 −6 Original line number Diff line number Diff line Loading @@ -1159,11 +1159,10 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { @Override public boolean enableRotation() { // Check if rotation is enabled for this device. if (Utilities.isRotationAllowedForDevice(getContext())) return true; // Check if the user has specifically enabled rotation via preferences. return Utilities.isAllowRotationPrefEnabled(getApplicationContext(), true); return super.enableRotation() || getContentResolver().call(LauncherSettings.Settings.CONTENT_URI, LauncherSettings.Settings.METHOD_GET_BOOLEAN, Utilities.ALLOW_ROTATION_PREFERENCE_KEY, new Bundle()) .getBoolean(LauncherSettings.Settings.EXTRA_VALUE); } }
src/com/android/launcher3/Launcher.java +1 −1 Original line number Diff line number Diff line Loading @@ -479,7 +479,7 @@ public class Launcher extends Activity // 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(), false); mRotationEnabled = Utilities.isAllowRotationPrefEnabled(getApplicationContext()); } // On large interfaces, or on devices that a user has specifically enabled screen rotation, Loading
src/com/android/launcher3/Utilities.java +2 −3 Original line number Diff line number Diff line Loading @@ -119,10 +119,9 @@ public final class Utilities { return Log.isLoggable(propertyName, Log.VERBOSE); } public static boolean isAllowRotationPrefEnabled(Context context, boolean multiProcess) { public static boolean isAllowRotationPrefEnabled(Context context) { SharedPreferences sharedPrefs = context.getSharedPreferences( LauncherAppState.getSharedPreferencesKey(), Context.MODE_PRIVATE | (multiProcess ? Context.MODE_MULTI_PROCESS : 0)); LauncherAppState.getSharedPreferencesKey(), Context.MODE_PRIVATE); boolean allowRotationPref = sharedPrefs.getBoolean(ALLOW_ROTATION_PREFERENCE_KEY, false); return sForceEnableRotation || allowRotationPref; } Loading