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

Commit fc49d00a 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: 3fc2af6d

Change-Id: If931ac9416e01a4d014b142c9796e66c3b56e8a9
parents 65605d62 3fc2af6d
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.