summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Launcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/Launcher.java')
-rw-r--r--src/com/android/launcher3/Launcher.java18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index a5c80a430..c2ae5a1cb 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -197,7 +197,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";
@@ -423,8 +422,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;
@@ -454,10 +451,6 @@ public class Launcher extends Activity
public void onAnimationCancel(Animator arg0) {}
};
- public static boolean isPropertyEnabled(String propertyName) {
- return Log.isLoggable(propertyName, Log.VERBOSE);
- }
-
Runnable mUpdateDynamicGridRunnable = new Runnable() {
@Override
public void run() {
@@ -2851,7 +2844,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;
}
@@ -5488,19 +5481,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 {