mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Refactoring getPreferenceKey method
This method was returnning a constant and getting inlined by proguard. Change-Id: I87348e25b21483adc1b27d16f99dec4b73205701
This commit is contained in:
@@ -137,7 +137,7 @@ public final class Utilities {
|
||||
|
||||
public static boolean isAllowRotationPrefEnabled(Context context, boolean multiProcess) {
|
||||
SharedPreferences sharedPrefs = context.getSharedPreferences(
|
||||
LauncherAppState.getSharedPreferencesKey(), Context.MODE_PRIVATE | (multiProcess ?
|
||||
LauncherFiles.SHARED_PREFERENCES_KEY, Context.MODE_PRIVATE | (multiProcess ?
|
||||
Context.MODE_MULTI_PROCESS : 0));
|
||||
boolean allowRotationPref = sharedPrefs.getBoolean(ALLOW_ROTATION_PREFERENCE_KEY, false);
|
||||
return sForceEnableRotation || allowRotationPref;
|
||||
@@ -754,4 +754,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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user