mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Resolve Test flakes
-> Synchronize calls in LoaderTask.java issue 156041043 -> Remove non system users on setup If a work test crashes before getting to run its teardown - we might end up with a user profile that could throw off subsequent tests. issue 156022161 Test: Manual Change-Id: Ife708a3de01572f7cb2187078d592d8d570dd951
This commit is contained in:
@@ -851,20 +851,23 @@ public class LoaderTask implements Runnable {
|
||||
}
|
||||
|
||||
private List<AppInfo> loadCachedPredictions() {
|
||||
List<ComponentKey> componentKeys = mApp.getPredictionModel().getPredictionComponentKeys();
|
||||
List<AppInfo> results = new ArrayList<>();
|
||||
if (componentKeys == null) return results;
|
||||
List<LauncherActivityInfo> l;
|
||||
mBgDataModel.cachedPredictedItems.clear();
|
||||
for (ComponentKey key : componentKeys) {
|
||||
l = mLauncherApps.getActivityList(key.componentName.getPackageName(), key.user);
|
||||
if (l.size() == 0) continue;
|
||||
boolean quietMode = mUserManager.isQuietModeEnabled(key.user);
|
||||
AppInfo info = new AppInfo(l.get(0), key.user, quietMode);
|
||||
mBgDataModel.cachedPredictedItems.add(info);
|
||||
mIconCache.getTitleAndIcon(info, false);
|
||||
synchronized (mBgDataModel) {
|
||||
List<ComponentKey> componentKeys =
|
||||
mApp.getPredictionModel().getPredictionComponentKeys();
|
||||
List<AppInfo> results = new ArrayList<>();
|
||||
if (componentKeys == null) return results;
|
||||
List<LauncherActivityInfo> l;
|
||||
mBgDataModel.cachedPredictedItems.clear();
|
||||
for (ComponentKey key : componentKeys) {
|
||||
l = mLauncherApps.getActivityList(key.componentName.getPackageName(), key.user);
|
||||
if (l.size() == 0) continue;
|
||||
boolean quietMode = mUserManager.isQuietModeEnabled(key.user);
|
||||
AppInfo info = new AppInfo(l.get(0), key.user, quietMode);
|
||||
mBgDataModel.cachedPredictedItems.add(info);
|
||||
mIconCache.getTitleAndIcon(info, false);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
private List<LauncherActivityInfo> loadAllApps() {
|
||||
|
||||
Reference in New Issue
Block a user