Add launcher support for restoring work profile items onto workspace.

Bug: 111301511
Change-Id: I40decf4c763401c97afcc2bfa7954a1f3a03f536
This commit is contained in:
Jon Miranda
2019-03-07 15:24:46 -08:00
parent b2b6fbbe66
commit 2bc6b934ac
4 changed files with 138 additions and 25 deletions

View File

@@ -366,13 +366,13 @@ public class LoaderTask implements Runnable {
ComponentName cn = intent.getComponent();
targetPkg = cn == null ? intent.getPackage() : cn.getPackageName();
if (!Process.myUserHandle().equals(c.user)) {
if (allUsers.indexOfValue(c.user) < 0) {
if (c.itemType == LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT) {
c.markDeleted("Legacy shortcuts are only allowed for default user");
c.markDeleted("Legacy shortcuts are only allowed for current users");
continue;
} else if (c.restoreFlag != 0) {
// Don't restore items for other profiles.
c.markDeleted("Restore from managed profile not supported");
c.markDeleted("Restore from other profiles not supported");
continue;
}
}