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

Commit 18bb6fbe authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "WindowProcessController: optimize locking" into rvc-dev am: 345d68d1 am: 8e2cd356

Change-Id: I786f8292b5bb94807db2309cbe0e594bd4d26156
parents 65605d62 8e2cd356
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.