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

Commit 3fc2af6d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

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

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


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