Loading bliss/src/foundation/e/bliss/multimode/MultiModeController.kt +25 −5 Original line number Diff line number Diff line Loading @@ -34,12 +34,32 @@ class MultiModeController(val context: Context, val monitor: LauncherAppMonitor) private val idp by lazy { InvariantDeviceProfile.INSTANCE.get(context) } private val mAppMonitorCallback: LauncherAppMonitorCallback = object : LauncherAppMonitorCallback { private var cachedApps: ArrayList<AppInfo?>? = null override fun onLoadAllAppsEnd(apps: ArrayList<AppInfo?>?) { val launcher = monitor.launcher ?: return val model = launcher.model ?: return val launcherModel = monitor.launcher?.model if (launcherModel != null) { MODEL_EXECUTOR.submit( VerifyIdleAppTask(context, apps, null, null, false, model.mBgDataModel) VerifyIdleAppTask( context, apps, null, null, false, launcherModel.mBgDataModel, ) ) } else { cachedApps = apps } } override fun onLauncherCreated() { super.onLauncherCreated() cachedApps?.let { onLoadAllAppsEnd(it) cachedApps = null } } override fun onAppSharedPreferenceChanged(key: String?) { Loading Loading
bliss/src/foundation/e/bliss/multimode/MultiModeController.kt +25 −5 Original line number Diff line number Diff line Loading @@ -34,12 +34,32 @@ class MultiModeController(val context: Context, val monitor: LauncherAppMonitor) private val idp by lazy { InvariantDeviceProfile.INSTANCE.get(context) } private val mAppMonitorCallback: LauncherAppMonitorCallback = object : LauncherAppMonitorCallback { private var cachedApps: ArrayList<AppInfo?>? = null override fun onLoadAllAppsEnd(apps: ArrayList<AppInfo?>?) { val launcher = monitor.launcher ?: return val model = launcher.model ?: return val launcherModel = monitor.launcher?.model if (launcherModel != null) { MODEL_EXECUTOR.submit( VerifyIdleAppTask(context, apps, null, null, false, model.mBgDataModel) VerifyIdleAppTask( context, apps, null, null, false, launcherModel.mBgDataModel, ) ) } else { cachedApps = apps } } override fun onLauncherCreated() { super.onLauncherCreated() cachedApps?.let { onLoadAllAppsEnd(it) cachedApps = null } } override fun onAppSharedPreferenceChanged(key: String?) { Loading