From d0c2bbfb775fbdd16d7c81e82c828c3134e633e0 Mon Sep 17 00:00:00 2001 From: Yvonne Wong Date: Mon, 7 Dec 2015 17:41:38 -0800 Subject: Reimplement CM Settings Overview Panel Part 4 - Enable protected apps and update workspace/app drawer/widgets view when protected apps change - Change reload launcher to happen after each setting toggle to reduce UI lag Change-Id: I0a4a4a077c3cb94eaccfb4e8c4213135cb99d57e --- src/com/android/launcher3/allapps/AlphabeticalAppsList.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/com/android/launcher3/allapps') diff --git a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java index dac0df12a..98d747936 100644 --- a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java +++ b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java @@ -15,16 +15,19 @@ */ package com.android.launcher3.allapps; +import android.content.ComponentName; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.util.Log; import com.android.launcher3.AppInfo; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherAppState; +import com.android.launcher3.ProtectedComponentsHelper; import com.android.launcher3.compat.AlphabeticIndexCompat; import com.android.launcher3.compat.UserHandleCompat; import com.android.launcher3.model.AppNameComparator; import com.android.launcher3.util.ComponentKey; +import cyanogenmod.providers.CMSettings; import java.util.ArrayList; import java.util.Collections; @@ -452,9 +455,15 @@ public class AlphabeticalAppsList { } } + ProtectedComponentsHelper.updateProtectedComponentsLists(mLauncher); + // Recreate the filtered and sectioned apps (for convenience for the grid layout) from the // ordered set of sections for (AppInfo info : getFiltersAppInfos()) { + if (ProtectedComponentsHelper.isProtectedApp(info.flags, info.componentName)) { + continue; + } + String sectionName = getAndUpdateCachedSectionName(info.title); // Create a new section if the section names do not match -- cgit v1.2.3