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

Commit 38b67a48 authored by Fyodor Kupolov's avatar Fyodor Kupolov Committed by android-build-merger
Browse files

Merge "Call ActivityManager to request activity relaunch" into oc-dev am: 748405a0

am: f9c94dde

Change-Id: I85cde24fb6a40a61d2a38c915599d1716d88c0b8
parents 230fc75e f9c94dde
Loading
Loading
Loading
Loading
+14 −11
Original line number Original line Diff line number Diff line
@@ -4275,9 +4275,19 @@ public final class ActivityThread {
            View.mDebugViewAttributes = debugViewAttributes;
            View.mDebugViewAttributes = debugViewAttributes;


            // request all activities to relaunch for the changes to take place
            // request all activities to relaunch for the changes to take place
            requestRelaunchAllActivities();
        }
    }

    private void requestRelaunchAllActivities() {
        for (Map.Entry<IBinder, ActivityClientRecord> entry : mActivities.entrySet()) {
        for (Map.Entry<IBinder, ActivityClientRecord> entry : mActivities.entrySet()) {
                requestRelaunchActivity(entry.getKey(), null, null, 0, false, null, null, false,
            final Activity activity = entry.getValue().activity;
                        false /* preserveWindow */);
            if (!activity.mFinished) {
                try {
                    ActivityManager.getService().requestActivityRelaunch(entry.getKey());
                } catch (RemoteException e) {
                    throw e.rethrowFromSystemServer();
                }
            }
            }
        }
        }
    }
    }
@@ -5116,14 +5126,7 @@ public final class ActivityThread {
        newConfig.assetsSeq = (mConfiguration != null ? mConfiguration.assetsSeq : 0) + 1;
        newConfig.assetsSeq = (mConfiguration != null ? mConfiguration.assetsSeq : 0) + 1;
        handleConfigurationChanged(newConfig, null);
        handleConfigurationChanged(newConfig, null);


        // Schedule all activities to reload
        requestRelaunchAllActivities();
        for (final Map.Entry<IBinder, ActivityClientRecord> entry : mActivities.entrySet()) {
            final Activity activity = entry.getValue().activity;
            if (!activity.mFinished) {
                requestRelaunchActivity(entry.getKey(), null, null, 0, false, null, null, false,
                        false);
            }
        }
    }
    }


    static void freeTextLayoutCachesIfNeeded(int configDiff) {
    static void freeTextLayoutCachesIfNeeded(int configDiff) {