Loading services/core/java/com/android/server/am/ProcessList.java +13 −2 Original line number Diff line number Diff line Loading @@ -4907,6 +4907,18 @@ public final class ProcessList { @GuardedBy(anyOf = {"mService", "mProcLock"}) void updateApplicationInfoLOSP(List<String> packagesToUpdate, int userId, boolean updateFrameworkRes) { final ArrayMap<String, ApplicationInfo> applicationInfoByPackage = new ArrayMap<>(); for (int i = packagesToUpdate.size() - 1; i >= 0; i--) { final String packageName = packagesToUpdate.get(i); final ApplicationInfo ai = mService.getPackageManagerInternal().getApplicationInfo( packageName, STOCK_PM_FLAGS, Process.SYSTEM_UID, userId); if (ai != null) { applicationInfoByPackage.put(packageName, ai); } } mService.mActivityTaskManager.updateActivityApplicationInfo(userId, applicationInfoByPackage); final ArrayList<WindowProcessController> targetProcesses = new ArrayList<>(); for (int i = mLruProcesses.size() - 1; i >= 0; i--) { final ProcessRecord app = mLruProcesses.get(i); Loading @@ -4921,8 +4933,7 @@ public final class ProcessList { app.getPkgList().forEachPackage(packageName -> { if (updateFrameworkRes || packagesToUpdate.contains(packageName)) { try { final ApplicationInfo ai = AppGlobals.getPackageManager() .getApplicationInfo(packageName, STOCK_PM_FLAGS, app.userId); final ApplicationInfo ai = applicationInfoByPackage.get(packageName); if (ai != null) { if (ai.packageName.equals(app.info.packageName)) { app.info = ai; Loading services/core/java/com/android/server/wm/ActivityTaskManagerService.java +14 −0 Original line number Diff line number Diff line Loading @@ -4587,6 +4587,20 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { return mGlobalAssetsSeq; } /** * Updates the {@link ApplicationInfo}s of the package activities th that are attached in the * WM hierarchy. */ public void updateActivityApplicationInfo(int userId, ArrayMap<String, ApplicationInfo> applicationInfoByPackage) { synchronized (mGlobalLock) { if (mRootWindowContainer != null) { mRootWindowContainer.updateActivityApplicationInfo(userId, applicationInfoByPackage); } } } /** * Update the asset configuration and increase the assets sequence number. * @param processes the processes that needs to update the asset configuration Loading services/core/java/com/android/server/wm/RootWindowContainer.java +14 −0 Original line number Diff line number Diff line Loading @@ -3172,6 +3172,20 @@ class RootWindowContainer extends WindowContainer<DisplayContent> }); } void updateActivityApplicationInfo(int userId, ArrayMap<String, ApplicationInfo> applicationInfoByPackage) { forAllActivities(r -> { if (r.mUserId != userId) { return; } final ApplicationInfo aInfo = applicationInfoByPackage.get(r.packageName); if (aInfo != null) { r.updateApplicationInfo(aInfo); } }); } void finishVoiceTask(IVoiceInteractionSession session) { final IBinder binder = session.asBinder(); forAllLeafTasks(t -> t.finishIfVoiceTask(binder), true /* traverseTopToBottom */); Loading Loading
services/core/java/com/android/server/am/ProcessList.java +13 −2 Original line number Diff line number Diff line Loading @@ -4907,6 +4907,18 @@ public final class ProcessList { @GuardedBy(anyOf = {"mService", "mProcLock"}) void updateApplicationInfoLOSP(List<String> packagesToUpdate, int userId, boolean updateFrameworkRes) { final ArrayMap<String, ApplicationInfo> applicationInfoByPackage = new ArrayMap<>(); for (int i = packagesToUpdate.size() - 1; i >= 0; i--) { final String packageName = packagesToUpdate.get(i); final ApplicationInfo ai = mService.getPackageManagerInternal().getApplicationInfo( packageName, STOCK_PM_FLAGS, Process.SYSTEM_UID, userId); if (ai != null) { applicationInfoByPackage.put(packageName, ai); } } mService.mActivityTaskManager.updateActivityApplicationInfo(userId, applicationInfoByPackage); final ArrayList<WindowProcessController> targetProcesses = new ArrayList<>(); for (int i = mLruProcesses.size() - 1; i >= 0; i--) { final ProcessRecord app = mLruProcesses.get(i); Loading @@ -4921,8 +4933,7 @@ public final class ProcessList { app.getPkgList().forEachPackage(packageName -> { if (updateFrameworkRes || packagesToUpdate.contains(packageName)) { try { final ApplicationInfo ai = AppGlobals.getPackageManager() .getApplicationInfo(packageName, STOCK_PM_FLAGS, app.userId); final ApplicationInfo ai = applicationInfoByPackage.get(packageName); if (ai != null) { if (ai.packageName.equals(app.info.packageName)) { app.info = ai; Loading
services/core/java/com/android/server/wm/ActivityTaskManagerService.java +14 −0 Original line number Diff line number Diff line Loading @@ -4587,6 +4587,20 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { return mGlobalAssetsSeq; } /** * Updates the {@link ApplicationInfo}s of the package activities th that are attached in the * WM hierarchy. */ public void updateActivityApplicationInfo(int userId, ArrayMap<String, ApplicationInfo> applicationInfoByPackage) { synchronized (mGlobalLock) { if (mRootWindowContainer != null) { mRootWindowContainer.updateActivityApplicationInfo(userId, applicationInfoByPackage); } } } /** * Update the asset configuration and increase the assets sequence number. * @param processes the processes that needs to update the asset configuration Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +14 −0 Original line number Diff line number Diff line Loading @@ -3172,6 +3172,20 @@ class RootWindowContainer extends WindowContainer<DisplayContent> }); } void updateActivityApplicationInfo(int userId, ArrayMap<String, ApplicationInfo> applicationInfoByPackage) { forAllActivities(r -> { if (r.mUserId != userId) { return; } final ApplicationInfo aInfo = applicationInfoByPackage.get(r.packageName); if (aInfo != null) { r.updateApplicationInfo(aInfo); } }); } void finishVoiceTask(IVoiceInteractionSession session) { final IBinder binder = session.asBinder(); forAllLeafTasks(t -> t.finishIfVoiceTask(binder), true /* traverseTopToBottom */); Loading