Loading bliss/src/foundation/e/bliss/multimode/MultiModeController.kt +5 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ package foundation.e.bliss.multimode import android.content.Context import com.android.launcher3.InvariantDeviceProfile import com.android.launcher3.LauncherPrefs import com.android.launcher3.model.ItemInstallQueue import com.android.launcher3.model.data.AppInfo import com.android.launcher3.util.Executors.MODEL_EXECUTOR import foundation.e.bliss.BaseController Loading Loading @@ -60,6 +61,8 @@ class MultiModeController(val context: Context, val monitor: LauncherAppMonitor) onLoadAllAppsEnd(it) cachedApps = null } ItemInstallQueue.INSTANCE.get(context) .resumeModelPush(ItemInstallQueue.FLAG_LOADER_RUNNING) } override fun onAppSharedPreferenceChanged(key: String?) { Loading Loading @@ -90,6 +93,8 @@ class MultiModeController(val context: Context, val monitor: LauncherAppMonitor) } init { ItemInstallQueue.INSTANCE.get(context).pauseModelPush(ItemInstallQueue.FLAG_LOADER_RUNNING) prefs = LauncherPrefs.get(context) monitor.registerCallback(mAppMonitorCallback) } Loading src/com/android/launcher3/LauncherModel.kt +1 −3 Original line number Diff line number Diff line Loading @@ -133,8 +133,7 @@ class LauncherModel( /** Adds the provided items to the workspace. */ fun addAndBindAddedWorkspaceItems(itemList: List<Pair<ItemInfo?, Any?>?>) { callbacks.forEach { it.preAddApps() } enqueueModelUpdateTask(AddWorkspaceItemsTask(itemList)) addAndBindAddedWorkspaceItems(itemList, animated = true, ignoreLoaded = false) } /** Loading @@ -152,7 +151,6 @@ class LauncherModel( } else { itemList } enqueueModelUpdateTask(AddWorkspaceItemsTask(sortedItemList)) val addWorkspaceItemsTask = AddWorkspaceItemsTask(sortedItemList, ignoreLoaded) addWorkspaceItemsTask.setEnableAnimated(animated) Loading src/com/android/launcher3/model/AddWorkspaceItemsTask.java +0 −7 Original line number Diff line number Diff line Loading @@ -114,13 +114,6 @@ public class AddWorkspaceItemsTask implements ModelUpdateTask { for (Pair<ItemInfo, Object> entry : mItemList) { ItemInfo item = entry.first; if (item.itemType == LauncherSettings.Favorites.ITEM_TYPE_APPLICATION) { // Don't add webapk before we load system app icons if (!isIgnoreLoaded() && dataModel.getAllWorkspaceItems().size() < 5 && Objects.requireNonNull(item.getTargetPackage()).startsWith( "foundation.e.webapk")) { continue; } // Short-circuit this logic if the icon exists somewhere on the workspace if (shortcutExists(dataModel, item.getIntent(), item.user)) { continue; Loading src/com/android/launcher3/model/BaseLauncherBinder.java +7 −3 Original line number Diff line number Diff line Loading @@ -57,6 +57,8 @@ import com.android.launcher3.util.RunnableList; import com.android.launcher3.widget.model.WidgetsListBaseEntriesBuilder; import com.android.launcher3.widget.model.WidgetsListBaseEntry; import foundation.e.bliss.multimode.MultiModeController; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; Loading Loading @@ -369,9 +371,11 @@ public class BaseLauncherBinder { executeCallbacksTask(c -> c.finishBindingItems(currentScreenIds), pendingExecutor); pendingExecutor.execute( () -> { if (!MultiModeController.isSingleLayerMode()) { MODEL_EXECUTOR.setThreadPriority(Process.THREAD_PRIORITY_DEFAULT); ItemInstallQueue.INSTANCE.get(mApp.getContext()) .resumeModelPush(FLAG_LOADER_RUNNING); } }); } Loading Loading
bliss/src/foundation/e/bliss/multimode/MultiModeController.kt +5 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ package foundation.e.bliss.multimode import android.content.Context import com.android.launcher3.InvariantDeviceProfile import com.android.launcher3.LauncherPrefs import com.android.launcher3.model.ItemInstallQueue import com.android.launcher3.model.data.AppInfo import com.android.launcher3.util.Executors.MODEL_EXECUTOR import foundation.e.bliss.BaseController Loading Loading @@ -60,6 +61,8 @@ class MultiModeController(val context: Context, val monitor: LauncherAppMonitor) onLoadAllAppsEnd(it) cachedApps = null } ItemInstallQueue.INSTANCE.get(context) .resumeModelPush(ItemInstallQueue.FLAG_LOADER_RUNNING) } override fun onAppSharedPreferenceChanged(key: String?) { Loading Loading @@ -90,6 +93,8 @@ class MultiModeController(val context: Context, val monitor: LauncherAppMonitor) } init { ItemInstallQueue.INSTANCE.get(context).pauseModelPush(ItemInstallQueue.FLAG_LOADER_RUNNING) prefs = LauncherPrefs.get(context) monitor.registerCallback(mAppMonitorCallback) } Loading
src/com/android/launcher3/LauncherModel.kt +1 −3 Original line number Diff line number Diff line Loading @@ -133,8 +133,7 @@ class LauncherModel( /** Adds the provided items to the workspace. */ fun addAndBindAddedWorkspaceItems(itemList: List<Pair<ItemInfo?, Any?>?>) { callbacks.forEach { it.preAddApps() } enqueueModelUpdateTask(AddWorkspaceItemsTask(itemList)) addAndBindAddedWorkspaceItems(itemList, animated = true, ignoreLoaded = false) } /** Loading @@ -152,7 +151,6 @@ class LauncherModel( } else { itemList } enqueueModelUpdateTask(AddWorkspaceItemsTask(sortedItemList)) val addWorkspaceItemsTask = AddWorkspaceItemsTask(sortedItemList, ignoreLoaded) addWorkspaceItemsTask.setEnableAnimated(animated) Loading
src/com/android/launcher3/model/AddWorkspaceItemsTask.java +0 −7 Original line number Diff line number Diff line Loading @@ -114,13 +114,6 @@ public class AddWorkspaceItemsTask implements ModelUpdateTask { for (Pair<ItemInfo, Object> entry : mItemList) { ItemInfo item = entry.first; if (item.itemType == LauncherSettings.Favorites.ITEM_TYPE_APPLICATION) { // Don't add webapk before we load system app icons if (!isIgnoreLoaded() && dataModel.getAllWorkspaceItems().size() < 5 && Objects.requireNonNull(item.getTargetPackage()).startsWith( "foundation.e.webapk")) { continue; } // Short-circuit this logic if the icon exists somewhere on the workspace if (shortcutExists(dataModel, item.getIntent(), item.user)) { continue; Loading
src/com/android/launcher3/model/BaseLauncherBinder.java +7 −3 Original line number Diff line number Diff line Loading @@ -57,6 +57,8 @@ import com.android.launcher3.util.RunnableList; import com.android.launcher3.widget.model.WidgetsListBaseEntriesBuilder; import com.android.launcher3.widget.model.WidgetsListBaseEntry; import foundation.e.bliss.multimode.MultiModeController; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; Loading Loading @@ -369,9 +371,11 @@ public class BaseLauncherBinder { executeCallbacksTask(c -> c.finishBindingItems(currentScreenIds), pendingExecutor); pendingExecutor.execute( () -> { if (!MultiModeController.isSingleLayerMode()) { MODEL_EXECUTOR.setThreadPriority(Process.THREAD_PRIORITY_DEFAULT); ItemInstallQueue.INSTANCE.get(mApp.getContext()) .resumeModelPush(FLAG_LOADER_RUNNING); } }); } Loading