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

Commit 64fccbba authored by Alex Buynytskyy's avatar Alex Buynytskyy Committed by Android (Google) Code Review
Browse files

Merge "Don't crash in case of race condition." into main

parents e60cddee c91fd211
Loading
Loading
Loading
Loading
+13 −12
Original line number Diff line number Diff line
@@ -6834,6 +6834,7 @@ public final class ActivityThread extends ClientTransactionHandler
                                                PackageManager.GET_SHARED_LIBRARY_FILES,
                                                UserHandle.myUserId());

                                if (aInfo != null) {
                                    if (mActivities.size() > 0) {
                                        for (ActivityClientRecord ar : mActivities.values()) {
                                            if (ar.activityInfo.applicationInfo.packageName
@@ -6847,10 +6848,10 @@ public final class ActivityThread extends ClientTransactionHandler
                                    final String[] oldResDirs = {pkgInfo.getResDir()};

                                    final ArrayList<String> oldPaths = new ArrayList<>();
                                LoadedApk.makePaths(this, pkgInfo.getApplicationInfo(), oldPaths);
                                    LoadedApk.makePaths(
                                            this, pkgInfo.getApplicationInfo(), oldPaths);
                                    pkgInfo.updateApplicationInfo(aInfo, oldPaths);

                                synchronized (mResourcesManager) {
                                    // Update affected Resources objects to use new ResourcesImpl
                                    mResourcesManager.appendPendingAppInfoUpdate(oldResDirs,
                                            aInfo);