diff options
author | Nilesh Agrawal <nileshagrawal@google.com> | 2014-01-09 17:14:01 -0800 |
---|---|---|
committer | Danesh M <daneshm90@gmail.com> | 2014-06-06 22:54:24 -0700 |
commit | ff307f908514c635a4e35c051014ad815a5fa965 (patch) | |
tree | 0afdf72979317e300a61c23c8ddc7c937e099b18 /src/com/android/launcher3/AppsCustomizePagedView.java | |
parent | f13fc619f41827beae0adf7cea8c8288dcbfa085 (diff) | |
download | android_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/AppsCustomizePagedView.java')
-rw-r--r-- | src/com/android/launcher3/AppsCustomizePagedView.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/com/android/launcher3/AppsCustomizePagedView.java b/src/com/android/launcher3/AppsCustomizePagedView.java index 39f5a2184..92ba5eda7 100644 --- a/src/com/android/launcher3/AppsCustomizePagedView.java +++ b/src/com/android/launcher3/AppsCustomizePagedView.java @@ -237,8 +237,6 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen private boolean mOverscrollTransformsSet; private float mLastOverscrollPivotX; - public static boolean DISABLE_ALL_APPS = false; - // Previews & outlines ArrayList<AppsCustomizeAsyncTask> mRunningTasks; private static final int sPageSleepDelay = 200; @@ -495,7 +493,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen int width = MeasureSpec.getSize(widthMeasureSpec); int height = MeasureSpec.getSize(heightMeasureSpec); if (!isDataReady()) { - if ((DISABLE_ALL_APPS || !mFilteredApps.isEmpty()) && !mFilteredWidgets.isEmpty()) { + if (((LauncherAppState.isDisableAllApps() || !mFilteredApps.isEmpty()) && !mFilteredWidgets.isEmpty())) { setDataIsReady(); setMeasuredDimension(width, height); onDataReady(width, height); @@ -1991,7 +1989,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen } public void setApps(ArrayList<AppInfo> list) { - if (!DISABLE_ALL_APPS) { + if (!LauncherAppState.isDisableAllApps()) { mApps = list; filterAppsWithoutInvalidate(); updatePageCountsAndInvalidateData(); @@ -2011,7 +2009,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen } public void addApps(ArrayList<AppInfo> list) { - if (!DISABLE_ALL_APPS) { + if (!LauncherAppState.isDisableAllApps()) { addAppsWithoutInvalidate(list); filterAppsWithoutInvalidate(); updatePageCountsAndInvalidateData(); @@ -2043,7 +2041,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen } public void removeApps(ArrayList<AppInfo> appInfos) { - if (!DISABLE_ALL_APPS) { + if (!LauncherAppState.isDisableAllApps()) { removeAppsWithoutInvalidate(appInfos); filterAppsWithoutInvalidate(); updatePageCountsAndInvalidateData(); @@ -2054,7 +2052,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen // We remove and re-add the updated applications list because it's properties may have // changed (ie. the title), and this will ensure that the items will be in their proper // place in the list. - if (!DISABLE_ALL_APPS) { + if (!LauncherAppState.isDisableAllApps()) { removeAppsWithoutInvalidate(list); addAppsWithoutInvalidate(list); filterAppsWithoutInvalidate(); |