Fix crash issue when gallery app with Ultra HDR photo is moved to the virtual display.
Bug:319498513
When gallery app opens Ultra HDR photo on default display, ViewRootImpl#updateColorModeIfNeeded is executed and mHdrSdrRatioChangedListener is not null. At this point, we move the gallery app to the virtual display, ViewRootImpl#updateInternalDisplay is executed and mDisplay is updated as the virtual display. The virtual display is ready to register hdr/sdr ratio listener due to non-null mHdrSdrRatioChangedListener and mDisplay. However, the virtual display is not available for hdr/sdr ratio, the gallery app in the virtual display will crash.
Change-Id: I34f03dfe5a00841131784dc3abbe1c11fd07d4b2
Merged-In: Ic69b633d6042145a537c7d39e713f804faff6600
Signed-off-by: linkai <linkai@xiaomi.com>
Loading
Please register or sign in to comment