diff options
author | Nilesh Agrawal <nileshagrawal@google.com> | 2014-01-09 17:14:01 -0800 |
---|---|---|
committer | Nilesh Agrawal <nileshagrawal@google.com> | 2014-01-09 17:21:09 -0800 |
commit | 16f3ea870aac47292cd6cbe1a4b4343173097aa9 (patch) | |
tree | e647ae9f22957071d53b2a482a515fa5f2b97593 /src/com/android/launcher3/AppsCustomizePagedView.java | |
parent | 0259c629cb5b280d0d9c821f8b1685707d7ba589 (diff) | |
download | android_packages_apps_Trebuchet-16f3ea870aac47292cd6cbe1a4b4343173097aa9.tar.gz android_packages_apps_Trebuchet-16f3ea870aac47292cd6cbe1a4b4343173097aa9.tar.bz2 android_packages_apps_Trebuchet-16f3ea870aac47292cd6cbe1a4b4343173097aa9.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 | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/com/android/launcher3/AppsCustomizePagedView.java b/src/com/android/launcher3/AppsCustomizePagedView.java index 2865bc5d5..37cdb9e13 100644 --- a/src/com/android/launcher3/AppsCustomizePagedView.java +++ b/src/com/android/launcher3/AppsCustomizePagedView.java @@ -199,8 +199,6 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen private AccelerateInterpolator mAlphaInterpolator = new AccelerateInterpolator(0.9f); private DecelerateInterpolator mLeftScreenAlphaInterpolator = new DecelerateInterpolator(4); - public static boolean DISABLE_ALL_APPS = false; - // Previews & outlines ArrayList<AppsCustomizeAsyncTask> mRunningTasks; private static final int sPageSleepDelay = 200; @@ -427,7 +425,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen int width = MeasureSpec.getSize(widthMeasureSpec); int height = MeasureSpec.getSize(heightMeasureSpec); if (!isDataReady()) { - if ((DISABLE_ALL_APPS || !mApps.isEmpty()) && !mWidgets.isEmpty()) { + if ((LauncherAppState.isDisableAllApps() || !mApps.isEmpty()) && !mWidgets.isEmpty()) { setDataIsReady(); setMeasuredDimension(width, height); onDataReady(width, height); @@ -1558,7 +1556,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen } public void setApps(ArrayList<AppInfo> list) { - if (!DISABLE_ALL_APPS) { + if (!LauncherAppState.isDisableAllApps()) { mApps = list; Collections.sort(mApps, LauncherModel.getAppNameComparator()); updatePageCountsAndInvalidateData(); @@ -1576,7 +1574,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen } } public void addApps(ArrayList<AppInfo> list) { - if (!DISABLE_ALL_APPS) { + if (!LauncherAppState.isDisableAllApps()) { addAppsWithoutInvalidate(list); updatePageCountsAndInvalidateData(); } @@ -1604,7 +1602,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen } } public void removeApps(ArrayList<AppInfo> appInfos) { - if (!DISABLE_ALL_APPS) { + if (!LauncherAppState.isDisableAllApps()) { removeAppsWithoutInvalidate(appInfos); updatePageCountsAndInvalidateData(); } @@ -1613,7 +1611,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); updatePageCountsAndInvalidateData(); @@ -1727,4 +1725,4 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen return String.format(getContext().getString(stringId), page + 1, count); } -} +}
\ No newline at end of file |