diff options
author | 2019-10-21 19:34:34 +0000 | |
---|---|---|
committer | 2019-10-21 19:34:34 +0000 | |
commit | 6edbd58d14d487ba7a06bafc566a6213d5db2945 (patch) | |
tree | fe92cbcd9637ffd2039068566a482d6fe6e4894f | |
parent | 223ebb0e595947c080fa183b3ce9a77437e8c94b (diff) | |
parent | a3129fbfc3f4f31e1760442b786adcbfdea37578 (diff) |
Merge "SurfaceFlinger: lock mStateLock when modifying allowed configs"
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 0e33f10ab6..ef9a598b84 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -5452,7 +5452,7 @@ status_t SurfaceFlinger::setAllowedDisplayConfigs(const sp<IBinder>& displayToke return NO_ERROR; } - postMessageSync(new LambdaMessage([&]() NO_THREAD_SAFETY_ANALYSIS { + postMessageSync(new LambdaMessage([&]() { const auto display = getDisplayDeviceLocked(displayToken); if (!display) { ALOGE("Attempt to set allowed display configs for invalid display token %p", @@ -5460,6 +5460,7 @@ status_t SurfaceFlinger::setAllowedDisplayConfigs(const sp<IBinder>& displayToke } else if (display->isVirtual()) { ALOGW("Attempt to set allowed display configs for virtual display"); } else { + Mutex::Autolock lock(mStateLock); setAllowedDisplayConfigsInternal(display, allowedConfigs); } })); |