Merge "WindowProcessController: optimize locking" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
345d68d164
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user