Bugfix: Remove widgets and deep shortcuts of app which gets archived.
* Once app is archived, remove widgets and deep shortcuts corresponding to the app from the home screen. * However during backup & restore, widgets should not be removed if they are being restored. Test: verified bugfix locally. Bug: 326567866 Flag: ACONFIG com.android.launcher3.enable_support_for_archiving DEVELOPMENT Change-Id: Ib3a112aadc7bd901fd6a0ba86f472ec6acf8d626
This commit is contained in:
@@ -78,10 +78,12 @@ public class ShortcutsChangedTask extends BaseModelUpdateTask {
|
||||
|
||||
if (!matchingWorkspaceItems.isEmpty()) {
|
||||
if (mShortcuts.isEmpty()) {
|
||||
PackageManagerHelper packageManagerHelper = new PackageManagerHelper(
|
||||
app.getContext());
|
||||
// Verify that the app is indeed installed.
|
||||
if (!new PackageManagerHelper(app.getContext())
|
||||
.isAppInstalled(mPackageName, mUser)) {
|
||||
// App is not installed, ignoring package events
|
||||
if (!packageManagerHelper.isAppInstalled(mPackageName, mUser)
|
||||
&& !packageManagerHelper.isAppArchivedForUser(mPackageName, mUser)) {
|
||||
// App is not installed or archived, ignoring package events
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user