Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f76e505 authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Fixing invalid check to get component enabled state. (Bug 17679693)" into lmp-dev

parents 4e0ad44f dcf21d15
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -2031,7 +2031,7 @@ public final class ActivityManagerService extends ActivityManagerNative
        @Override
        public void onPackageModified(String packageName) {
            final int eventUserId = getChangingUserId();
            final PackageManager pm = mContext.getPackageManager();
            final IPackageManager pm = AppGlobals.getPackageManager();
            final ArrayList<Pair<Intent, Integer>> recentTaskIntents =
                    new ArrayList<Pair<Intent, Integer>>();
            final HashSet<ComponentName> componentsKnownToExist = new HashSet<ComponentName>();
@@ -2056,13 +2056,15 @@ public final class ActivityManagerService extends ActivityManagerNative
                        continue;
                    }
                    try {
                        ActivityInfo info = pm.getActivityInfo(cn, eventUserId);
                        if (info != null && info.isEnabled()) {
                        ActivityInfo info = pm.getActivityInfo(cn, 0, eventUserId);
                        if (info != null) {
                            componentsKnownToExist.add(cn);
                        } else {
                            tasksToRemove.add(p.second);
                        }
                    } catch (Exception e) {}
                    } catch (RemoteException e) {
                        Log.e(TAG, "Failed to query activity info for component: " + cn, e);
                    }
                }
            }
            // Prune all the tasks with removed components from the list of recent tasks
+1 −1
Original line number Diff line number Diff line
@@ -254,7 +254,7 @@ public class LauncherAppsService extends SystemService {
            try {
                IPackageManager pm = AppGlobals.getPackageManager();
                ActivityInfo info = pm.getActivityInfo(component, 0, user.getIdentifier());
                return info != null && info.isEnabled();
                return info != null;
            } finally {
                Binder.restoreCallingIdentity(ident);
            }