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

Commit 345d68d1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "WindowProcessController: optimize locking" into rvc-dev

parents 19f6945f c944f1e4
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -1315,15 +1315,18 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio
     *
     * @param isCached whether or not the process is cached.
     */
    @HotPath(caller = HotPath.OOM_ADJUSTMENT)
    public void onProcCachedStateChanged(boolean isCached) {
        synchronized (mAtm.mGlobalLock) {
            if (!isCached && mPendingConfiguration != null) {
        if (!isCached) {
            synchronized (mAtm.mGlobalLockWithoutBoost) {
                if (mPendingConfiguration != null) {
                    final Configuration config = mPendingConfiguration;
                    mPendingConfiguration = null;
                    dispatchConfigurationChange(config);
                }
            }
        }
    }

    /**
     * Called to notify {@link WindowProcessController} of a started service.