diff options
Diffstat (limited to 'src/com/android/launcher3/Launcher.java')
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index ffbb87352..f5e3bc65c 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -166,7 +166,6 @@ public class Launcher extends Activity // To turn on these properties, type // adb shell setprop log.tag.PROPERTY_NAME [VERBOSE | SUPPRESS] - static final String FORCE_ENABLE_ROTATION_PROPERTY = "launcher_force_rotate"; static final String DUMP_STATE_PROPERTY = "launcher_dump_state"; static final String DISABLE_ALL_APPS_PROPERTY = "launcher_noallapps"; @@ -362,8 +361,6 @@ public class Launcher extends Activity private static PendingAddArguments sPendingAddItem; - public static boolean sForceEnableRotation = isPropertyEnabled(FORCE_ENABLE_ROTATION_PROPERTY); - private static class PendingAddArguments { int requestCode; Intent intent; @@ -378,10 +375,6 @@ public class Launcher extends Activity FocusIndicatorView mFocusHandler; - static boolean isPropertyEnabled(String propertyName) { - return Log.isLoggable(propertyName, Log.VERBOSE); - } - @Override protected void onCreate(Bundle savedInstanceState) { if (DEBUG_STRICT_MODE) { @@ -2456,7 +2449,7 @@ public class Launcher extends Activity case KeyEvent.KEYCODE_HOME: return true; case KeyEvent.KEYCODE_VOLUME_DOWN: - if (isPropertyEnabled(DUMP_STATE_PROPERTY)) { + if (Utilities.isPropertyEnabled(DUMP_STATE_PROPERTY)) { dumpState(); return true; } @@ -4813,19 +4806,14 @@ public class Launcher extends Activity return oriMap[(d.getRotation() + indexOffset) % 4]; } - public boolean isRotationEnabled() { - boolean enableRotation = sForceEnableRotation || - getResources().getBoolean(R.bool.allow_rotation); - return enableRotation; - } public void lockScreenOrientation() { - if (isRotationEnabled()) { + if (Utilities.isRotationEnabled(this)) { setRequestedOrientation(mapConfigurationOriActivityInfoOri(getResources() .getConfiguration().orientation)); } } public void unlockScreenOrientation(boolean immediate) { - if (isRotationEnabled()) { + if (Utilities.isRotationEnabled(this)) { if (immediate) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); } else { |