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

Commit 373b5e65 authored by Haofan Wang's avatar Haofan Wang
Browse files

Exclude profiles with tvInputId from the package default

Bug: 428115856
Flag: EXEMPT bugfix
Test: m
Change-Id: I3e23549c7258f9f3c31f8271752650866d5f179b
parent 37a4e048
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -222,10 +222,12 @@ public class MediaQualityService extends SystemService {
                                .getMediaProfileColumns(false), selection, selectionArguments);
                    mPackageDefaultPictureProfileHandleMap.clear();
                    for (PictureProfile profile : packageDefaultPictureProfiles) {
                        if (isPackageDefaultPictureProfile(profile)) {
                            mPackageDefaultPictureProfileHandleMap.put(
                                    profile.getPackageName(), profile.getHandle().getId());
                        }
                    }
                }
            } catch (RemoteException e) {
                Slog.e(TAG, "Failed to set ambient backlight detector callback", e);
            }
@@ -2605,7 +2607,8 @@ public class MediaQualityService extends SystemService {
    }

    private boolean isPackageDefaultPictureProfile(PictureProfile pp) {
        if (pp == null || pp.getProfileType() != PictureProfile.TYPE_SYSTEM) {
        if (pp == null || pp.getProfileType() != PictureProfile.TYPE_SYSTEM
                || pp.getInputId() != null) {
            return false;
        }
        String pictureProfileName = pp.getName();
+2 −1
Original line number Diff line number Diff line
shubang@google.com
haofanw@google.com
pkandhalu@google.com
yixiaoluo@google.com
 No newline at end of file