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

Commit 6ae860dd authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8599125 from d837d55a to tm-qpr1-release

Change-Id: I2e8e5c74e9a097ff46c1795c3b9d4e52b56cd872
parents 296ee51a d837d55a
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -98,6 +98,15 @@ public class ActivityClient {
        }
    }

    /** Reports the activity starts local relaunch. */
    public void activityLocalRelaunch(IBinder token) {
        try {
            getActivityClientController().activityLocalRelaunch(token);
        } catch (RemoteException e) {
            e.rethrowFromSystemServer();
        }
    }

    /** Reports the activity has completed relaunched. */
    public void activityRelaunched(IBinder token) {
        try {
+0 −1
Original line number Diff line number Diff line
@@ -2210,7 +2210,6 @@ public class ActivityManager {
            pw.print(((baseIntent.getFlags() & FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS) != 0));
            pw.print(" activityType="); pw.print(activityTypeToString(getActivityType()));
            pw.print(" windowingMode="); pw.print(windowingModeToString(getWindowingMode()));
            pw.print(" supportsSplitScreenMultiWindow="); pw.print(supportsSplitScreenMultiWindow);
            pw.print(" supportsMultiWindow=");
            pw.println(supportsMultiWindow);
            if (taskDescription != null) {
+1 −30
Original line number Diff line number Diff line
@@ -3410,26 +3410,12 @@ public final class ActivityThread extends ClientTransactionHandler
        }
    }

    /**
     * Returns {@code true} if the {@link android.app.ActivityManager.ProcessState} of the current
     * process is cached.
     */
    @Override
    @VisibleForTesting
    public boolean isCachedProcessState() {
        synchronized (mAppThread) {
            return mLastProcessState >= ActivityManager.PROCESS_STATE_CACHED_ACTIVITY;
        }
    }

    @Override
    public void updateProcessState(int processState, boolean fromIpc) {
        final boolean wasCached;
        synchronized (mAppThread) {
            if (mLastProcessState == processState) {
                return;
            }
            wasCached = isCachedProcessState();
            mLastProcessState = processState;
            // Defer the top state for VM to avoid aggressive JIT compilation affecting activity
            // launch time.
@@ -3446,22 +3432,6 @@ public final class ActivityThread extends ClientTransactionHandler
                        + (fromIpc ? " (from ipc" : ""));
            }
        }

        // Handle the pending configuration if the process state is changed from cached to
        // non-cached. Except the case where there is a launching activity because the
        // LaunchActivityItem will handle it.
        if (wasCached && !isCachedProcessState() && mNumLaunchingActivities.get() == 0) {
            final Configuration pendingConfig =
                    mConfigurationController.getPendingConfiguration(false /* clearPending */);
            if (pendingConfig == null) {
                return;
            }
            if (Looper.myLooper() == mH.getLooper()) {
                handleConfigurationChanged(pendingConfig);
            } else {
                sendMessage(H.CONFIGURATION_CHANGED, pendingConfig);
            }
        }
    }

    /** Update VM state based on ActivityManager.PROCESS_STATE_* constants. */
@@ -5728,6 +5698,7 @@ public final class ActivityThread extends ClientTransactionHandler
            return;
        }

        ActivityClient.getInstance().activityLocalRelaunch(r.token);
        // Initialize a relaunch request.
        final MergedConfiguration mergedConfiguration = new MergedConfiguration(
                r.createdConfig != null
+0 −2
Original line number Diff line number Diff line
@@ -32,8 +32,6 @@ interface ActivityThreadInternal {

    boolean isInDensityCompatMode();

    boolean isCachedProcessState();

    Application getApplication();

    ArrayList<ComponentCallbacks2> collectComponentCallbacks(boolean includeUiContexts);
+0 −6
Original line number Diff line number Diff line
@@ -124,12 +124,6 @@ class ConfigurationController {
     * @param config The new configuration.
     */
    void handleConfigurationChanged(@NonNull Configuration config) {
        if (mActivityThread.isCachedProcessState()) {
            updatePendingConfiguration(config);
            // If the process is in a cached state, delay the handling until the process is no
            // longer cached.
            return;
        }
        Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "configChanged");
        handleConfigurationChanged(config, null /* compat */);
        Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
Loading