summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Launcher.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2014-11-11 12:23:59 -0800
committerDanesh M <daneshm90@gmail.com>2015-09-27 20:48:59 -0700
commitad5c6a5a9749e8da11487a96c330255aa0f670d6 (patch)
tree116e12c453bfe125e2c1aff3c6971e12fb091353 /src/com/android/launcher3/Launcher.java
parent5b54994fc56c9d00d415f161457c2c7449af912d (diff)
downloadandroid_packages_apps_Trebuchet-ad5c6a5a9749e8da11487a96c330255aa0f670d6.tar.gz
android_packages_apps_Trebuchet-ad5c6a5a9749e8da11487a96c330255aa0f670d6.tar.bz2
android_packages_apps_Trebuchet-ad5c6a5a9749e8da11487a96c330255aa0f670d6.zip
Removing some duplicate methods
Change-Id: I8a1295ab74890984e8d8508aaa18fd79ac2a032d
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 {