summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Launcher.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2014-11-11 22:55:05 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-11-11 22:55:06 +0000
commitbdc2b5f963a93bddade98daaf2a329c976b199e0 (patch)
treeac44fdaf0e579483a9ea2bde88c502ba564a7341 /src/com/android/launcher3/Launcher.java
parentbe7939c960c20697e8a731b354fd2d3d4757137c (diff)
parent4bbf419bf98c00decc74b429320258c2a16faeec (diff)
downloadandroid_packages_apps_Trebuchet-bdc2b5f963a93bddade98daaf2a329c976b199e0.tar.gz
android_packages_apps_Trebuchet-bdc2b5f963a93bddade98daaf2a329c976b199e0.tar.bz2
android_packages_apps_Trebuchet-bdc2b5f963a93bddade98daaf2a329c976b199e0.zip
Merge "Removing some duplicate methods" into ub-now-queens
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 8b3b2a1e3..c632f1c2e 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -168,7 +168,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";
@@ -371,8 +370,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;
@@ -387,10 +384,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) {
@@ -2494,7 +2487,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;
}
@@ -5113,19 +5106,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 {