Fixing model thread priority getting set to background while loading
Bug: 396250724 Flag: EXEMPT bugfix Test: Manual Change-Id: I587d6c64f75a4fd2b68c4e98c3b1cab30864879c
This commit is contained in:
1 parent
7a38a45ca3
commit
362fa9e96a
4 files changed
+40
-25
No files matched your search
@@ -36,6 +36,7 @@ import static com.android.launcher3.model.ModelUtils.WIDGET_FILTER;
|
||||
import static com.android.launcher3.model.ModelUtils.currentScreenContentFilter;
|
||||
import static com.android.launcher3.model.data.ItemInfoWithIcon.FLAG_INSTALL_SESSION_ACTIVE;
|
||||
import static com.android.launcher3.util.Executors.MODEL_EXECUTOR;
|
||||
import static com.android.launcher3.util.LooperExecutor.CALLER_LOADER_TASK;
|
||||
import static com.android.launcher3.util.PackageManagerHelper.hasShortcutsPermission;
|
||||
|
||||
import android.appwidget.AppWidgetProviderInfo;
|
||||
@@ -251,6 +252,7 @@ public class LoaderTask implements Runnable {
|
||||
}
|
||||
|
||||
TraceHelper.INSTANCE.beginSection(TAG);
|
||||
MODEL_EXECUTOR.elevatePriority(CALLER_LOADER_TASK);
|
||||
LoaderMemoryLogger memoryLogger = new LoaderMemoryLogger();
|
||||
mIsRestoreFromBackup =
|
||||
LauncherPrefs.get(mApp.getContext()).get(IS_FIRST_LOAD_AFTER_RESTORE);
|
||||
@@ -403,6 +405,7 @@ public class LoaderTask implements Runnable {
|
||||
memoryLogger.printLogs();
|
||||
throw e;
|
||||
}
|
||||
MODEL_EXECUTOR.restorePriority(CALLER_LOADER_TASK);
|
||||
TraceHelper.INSTANCE.endSection();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user