fix(model): resolve unnecessary model reload (#6420)
Co-authored-by: strngr <st@ThinkTank.place.boo>
This commit is contained in:
1 parent
de2aa44e70
commit
75e842464b
1 file changed
+6
-2
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.android.launcher3.model;
|
||||
|
||||
import static android.os.Process.myUserHandle;
|
||||
import static com.android.launcher3.BuildConfigs.WIDGET_ON_FIRST_SCREEN;
|
||||
import static com.android.launcher3.Flags.enableLauncherBrMetricsFixed;
|
||||
import static com.android.launcher3.LauncherPrefs.IS_FIRST_LOAD_AFTER_RESTORE;
|
||||
@@ -616,9 +617,12 @@ public class LoaderTask implements Runnable {
|
||||
// Query for the set of apps
|
||||
final List<LauncherActivityInfo> apps = mLauncherApps.getActivityList(null, user);
|
||||
// Fail if we don't have any apps
|
||||
// TODO: Fix this. Only fail for the current user.
|
||||
if (apps == null || apps.isEmpty()) {
|
||||
return allActivityList;
|
||||
if (myUserHandle().equals(user)) {
|
||||
return allActivityList;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// Query UserManager directly for current quiet mode state to avoid stale cached values
|
||||
boolean quietMode = mUserManager.isQuietModeEnabled(user);
|
||||
|
||||
Reference in new issue
Block a user