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

Commit c11bacbc authored by Haofan Wang's avatar Haofan Wang
Browse files

Add mapping in requestPictureParameter

When TV input screnn is showing (non-SDR), going back to home and switch
back to the same TV input. The screen will show SDR profile instead of
current profile. Because the HAL request the picture profile with the
original handle (default/SDR). Add mapping in requestPictureProfile, so
MQ will give original handle with current picture profile.

Bug: 420934125
Test: Gambit
Flag: EXEMPT bugfix
Change-Id: Iba35858b98ba727b9e427656989129c8ceb48b34
parent 0138ce60
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -2358,7 +2358,14 @@ public class MediaQualityService extends SystemService {

        @Override
        public void requestPictureParameters(long pictureProfileId) throws RemoteException {
            PictureProfile profile = mMqDatabaseUtils.getPictureProfile(pictureProfileId, true);
            if (DEBUG) {
                Log.d(TAG, "requestPictureParameters for picture profile id "
                        + pictureProfileId);
            }
            PictureProfile profile = mOriginalHandleToCurrentPictureProfile.get(pictureProfileId);
            if (profile == null) {
                profile = mMqDatabaseUtils.getPictureProfile(pictureProfileId, true);
            }
            if (profile != null) {
                mHalNotifier.notifyHalOnPictureProfileChange(pictureProfileId,
                        profile.getParameters());