mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Bugfix: In case of unarchival, do not add an installer task to add workspace item.
* In case install queue is cleared (which happens when launcher comes back to foregorund from background) when app has successfully unarchived, since app is not archived anymore, `AddWorkspaceItemTask` successfully manages to add item to the workspace. * We should avoid adding pending task for adding workspace item in the queue at all for unarchival to prevent this. Test: verified bugfixes locally. Bug: 326495267 Flag: ACONFIG com.android.launcher3.enable_support_for_archiving DEVELOPMENT Change-Id: Iae6d6390d8e2d9b270f7aef0dce1fa32d9899f28
This commit is contained in:
@@ -215,11 +215,15 @@ public class InstallSessionHelper {
|
||||
&& SessionCommitReceiver.isEnabled(mAppContext, getUserHandle(sessionInfo))
|
||||
&& verifySessionInfo(sessionInfo)
|
||||
&& !promiseIconAddedForId(sessionInfo.getSessionId())) {
|
||||
FileLog.d(LOG, "Adding package name to install queue: "
|
||||
+ sessionInfo.getAppPackageName());
|
||||
// In case of unarchival, we do not want to add a workspace promise icon if one is
|
||||
// not already present. For general app installations however, we do support it.
|
||||
if (!Utilities.enableSupportForArchiving() || !sessionInfo.isUnarchival()) {
|
||||
FileLog.d(LOG, "Adding package name to install queue: "
|
||||
+ sessionInfo.getAppPackageName());
|
||||
|
||||
ItemInstallQueue.INSTANCE.get(mAppContext)
|
||||
.queueItem(sessionInfo.getAppPackageName(), getUserHandle(sessionInfo));
|
||||
ItemInstallQueue.INSTANCE.get(mAppContext)
|
||||
.queueItem(sessionInfo.getAppPackageName(), getUserHandle(sessionInfo));
|
||||
}
|
||||
|
||||
getPromiseIconIds().add(sessionInfo.getSessionId());
|
||||
updatePromiseIconPrefs();
|
||||
|
||||
Reference in New Issue
Block a user