summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherAppState.java
diff options
context:
space:
mode:
authorNilesh Agrawal <nileshagrawal@google.com>2014-01-09 17:14:01 -0800
committerDanesh M <daneshm90@gmail.com>2014-06-06 22:54:24 -0700
commitff307f908514c635a4e35c051014ad815a5fa965 (patch)
tree0afdf72979317e300a61c23c8ddc7c937e099b18 /src/com/android/launcher3/LauncherAppState.java
parentf13fc619f41827beae0adf7cea8c8288dcbfa085 (diff)
downloadandroid_packages_apps_Trebuchet-ff307f908514c635a4e35c051014ad815a5fa965.tar.gz
android_packages_apps_Trebuchet-ff307f908514c635a4e35c051014ad815a5fa965.tar.bz2
android_packages_apps_Trebuchet-ff307f908514c635a4e35c051014ad815a5fa965.zip
Allow DISABLE_ALL_APPS to be set using a system property.
- Moving the property to LauncherAppState - The property is only read on dogfood builds. The property can be set using setprop or /data/local.prop Change-Id: I14c7354efb12edb93f97e81687a6f920cc634e9a
Diffstat (limited to 'src/com/android/launcher3/LauncherAppState.java')
-rw-r--r--src/com/android/launcher3/LauncherAppState.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/launcher3/LauncherAppState.java b/src/com/android/launcher3/LauncherAppState.java
index 52399da47..c0da25e89 100644
--- a/src/com/android/launcher3/LauncherAppState.java
+++ b/src/com/android/launcher3/LauncherAppState.java
@@ -32,9 +32,10 @@ public class LauncherAppState implements DeviceProfile.DeviceProfileCallbacks {
private static final String TAG = "LauncherAppState";
private static final String SHARED_PREFERENCES_KEY = "com.android.launcher3.prefs";
+ private final AppFilter mAppFilter;
+ private final BuildInfo mBuildInfo;
private LauncherModel mModel;
private IconCache mIconCache;
- private AppFilter mAppFilter;
private WidgetPreviewLoader.CacheDb mWidgetPreviewCacheDb;
private boolean mIsScreenLarge;
private float mScreenDensity;
@@ -89,6 +90,7 @@ public class LauncherAppState implements DeviceProfile.DeviceProfileCallbacks {
mIconCache = new IconCache(sContext);
mAppFilter = AppFilter.loadByName(sContext.getString(R.string.app_filter_class));
+ mBuildInfo = BuildInfo.loadByName(sContext.getString(R.string.build_info_class));
mModel = new LauncherModel(this, mIconCache, mAppFilter);
// Register intent receivers
@@ -251,4 +253,10 @@ public class LauncherAppState implements DeviceProfile.DeviceProfileCallbacks {
public void onAvailableSizeChanged(DeviceProfile grid) {
Utilities.setIconSize(grid.iconSizePx);
}
+
+ public static boolean isDisableAllApps() {
+ // Returns false on non-dogfood builds.
+ return getInstance().mBuildInfo.isDogfoodBuild() &&
+ Launcher.isPropertyEnabled(Launcher.DISABLE_ALL_APPS_PROPERTY);
+ }
}