summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Utilities.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2017-06-08 14:00:43 -0700
committerSunny Goyal <sunnygoyal@google.com>2017-06-08 14:00:54 -0700
commit9d887a2c452f652624f0d28950c1b69cb37a8e23 (patch)
tree635a49f9f9b818f49ee4c69d0c02e9d1addfb3c7 /src/com/android/launcher3/Utilities.java
parent54ba601a99cd8cecc2750e305275c40ac2bfba8b (diff)
downloadandroid_packages_apps_Trebuchet-9d887a2c452f652624f0d28950c1b69cb37a8e23.tar.gz
android_packages_apps_Trebuchet-9d887a2c452f652624f0d28950c1b69cb37a8e23.tar.bz2
android_packages_apps_Trebuchet-9d887a2c452f652624f0d28950c1b69cb37a8e23.zip
Adding a utility method for getting device prefs
Change-Id: I1e3c7df0a3f4e847b40d722d44890e441cc73509
Diffstat (limited to 'src/com/android/launcher3/Utilities.java')
-rw-r--r--src/com/android/launcher3/Utilities.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java
index ffda67c38..d48b9ab2c 100644
--- a/src/com/android/launcher3/Utilities.java
+++ b/src/com/android/launcher3/Utilities.java
@@ -551,6 +551,11 @@ public final class Utilities {
LauncherFiles.SHARED_PREFERENCES_KEY, Context.MODE_PRIVATE);
}
+ public static SharedPreferences getDevicePrefs(Context context) {
+ return context.getSharedPreferences(
+ LauncherFiles.DEVICE_PREFERENCES_KEY, Context.MODE_PRIVATE);
+ }
+
public static boolean isPowerSaverOn(Context context) {
PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
return powerManager.isPowerSaveMode();