Update device info on Display.getDeviceProductInfo()

Each getter of the Display class should first
call updateDisplayInfoLocked().

Test: presubmit
Bug: 179775994
Change-Id: I4df9945cd030296da0e170411af8c66c89f57adf
This commit is contained in:
Marin Shalamanov
2021-03-08 19:27:53 +01:00
parent 427b32900e
commit 254351a6a7

View File

@@ -1203,7 +1203,10 @@ public final class Display {
*/
@Nullable
public DeviceProductInfo getDeviceProductInfo() {
return mDisplayInfo.deviceProductInfo;
synchronized (mLock) {
updateDisplayInfoLocked();
return mDisplayInfo.deviceProductInfo;
}
}
/**