summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Utilities.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-10-20 10:37:15 -0700
committerSunny Goyal <sunnygoyal@google.com>2015-10-20 10:37:15 -0700
commitf912beb2ee4b75af1fe8c710d6948b9737fed531 (patch)
treea8e5ae80d822105c36ff218b739b735a4d5ba9f6 /src/com/android/launcher3/Utilities.java
parent38ac73a095c99c18ca31b8d9cd14959a762928b7 (diff)
parentfe3db428abc07d253b816bf70d6820a8339becbc (diff)
downloadandroid_packages_apps_Trebuchet-f912beb2ee4b75af1fe8c710d6948b9737fed531.tar.gz
android_packages_apps_Trebuchet-f912beb2ee4b75af1fe8c710d6948b9737fed531.tar.bz2
android_packages_apps_Trebuchet-f912beb2ee4b75af1fe8c710d6948b9737fed531.zip
resolve merge conflicts of fe3db428ab to ub-launcher3-master.
Change-Id: Icc60a61f621fefe9db67b178921e62f7d72d7e5a
Diffstat (limited to 'src/com/android/launcher3/Utilities.java')
-rw-r--r--src/com/android/launcher3/Utilities.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java
index 24975ac1a..9c8128488 100644
--- a/src/com/android/launcher3/Utilities.java
+++ b/src/com/android/launcher3/Utilities.java
@@ -140,9 +140,8 @@ public final class Utilities {
}
public static boolean isAllowRotationPrefEnabled(Context context) {
- SharedPreferences sharedPrefs = context.getSharedPreferences(
- LauncherAppState.getSharedPreferencesKey(), Context.MODE_PRIVATE);
- boolean allowRotationPref = sharedPrefs.getBoolean(ALLOW_ROTATION_PREFERENCE_KEY, false);
+ boolean allowRotationPref = getPrefs(context)
+ .getBoolean(ALLOW_ROTATION_PREFERENCE_KEY, false);
return sForceEnableRotation || allowRotationPref;
}
@@ -801,4 +800,9 @@ public final class Utilities {
public static int longCompare(long lhs, long rhs) {
return lhs < rhs ? -1 : (lhs == rhs ? 0 : 1);
}
+
+ public static SharedPreferences getPrefs(Context context) {
+ return context.getSharedPreferences(
+ LauncherFiles.SHARED_PREFERENCES_KEY, Context.MODE_PRIVATE);
+ }
}