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

Commit 05601f8b authored by Sienna Liu's avatar Sienna Liu
Browse files

Fix getPictureProfile to only return profiles whose inputId=null....

Fix getPictureProfile to only return profiles whose inputId=null. getAllPictureProfilesForTvInput will be responsible for returning profile whose inputId != null.

Flag: EXEMPT bug fix
Bug: 417633049

Change-Id: I24c97044c6bd1b689bf4d3af199cfd15e89866e4
parent 092bb913
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -414,7 +414,8 @@ public class MediaQualityService extends SystemService {
            int callingUid = Binder.getCallingUid();
            String selection = BaseParameters.PARAMETER_TYPE + " = ? AND "
                    + BaseParameters.PARAMETER_NAME + " = ? AND "
                    + BaseParameters.PARAMETER_PACKAGE + " = ?";
                    + BaseParameters.PARAMETER_PACKAGE + " = ? AND "
                    + BaseParameters.PARAMETER_INPUT_ID + " IS NULL";
            String[] selectionArguments = {
                    Integer.toString(type), name, getPackageOfUid(callingUid)};

@@ -430,9 +431,10 @@ public class MediaQualityService extends SystemService {
                        return null;
                    }
                    if (count > 1) {
                        Log.wtf(TAG, TextUtils.formatSimple(String.valueOf(Locale.US), "%d "
                                        + "entries found for type=%d and name=%s in %s. Should"
                                        + " only ever be 0 or 1.", count, type, name,
                        Log.wtf(TAG,
                                TextUtils.formatSimple("%d entries found for type=%d and name=%s "
                                                       + "in %s. Should only ever be 0 or 1.",
                                        count, type, name,
                                        mMediaQualityDbHelper.PICTURE_QUALITY_TABLE_NAME));
                        return null;
                    }