Removing support for adding legacy shortcuts.
All existing legacy shortcuts will be migrated one-time to deep shortcuts This shortcuts are pinned under the Launcher package, with custom badging Bug: 275875209 Test: Updated unit tests Flag: N/A Change-Id: I7da001f724776ad8d6c807517b7e4e259de626c2
This commit is contained in:
@@ -151,8 +151,6 @@ public abstract class ShortcutConfigActivityInfo implements ComponentWithLabelAn
|
||||
public static List<ShortcutConfigActivityInfo> queryList(
|
||||
Context context, @Nullable PackageUserKey packageUser) {
|
||||
List<ShortcutConfigActivityInfo> result = new ArrayList<>();
|
||||
UserHandle myUser = Process.myUserHandle();
|
||||
|
||||
final List<UserHandle> users;
|
||||
final String packageName;
|
||||
if (packageUser == null) {
|
||||
@@ -164,11 +162,9 @@ public abstract class ShortcutConfigActivityInfo implements ComponentWithLabelAn
|
||||
}
|
||||
LauncherApps launcherApps = context.getSystemService(LauncherApps.class);
|
||||
for (UserHandle user : users) {
|
||||
boolean ignoreTargetSdk = myUser.equals(user);
|
||||
for (LauncherActivityInfo activityInfo :
|
||||
launcherApps.getShortcutConfigActivityList(packageName, user)) {
|
||||
if (ignoreTargetSdk || activityInfo.getApplicationInfo().targetSdkVersion
|
||||
>= Build.VERSION_CODES.O) {
|
||||
if (activityInfo.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.O) {
|
||||
result.add(new ShortcutConfigActivityInfoVO(activityInfo));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user