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

Commit 9944e235 authored by Sienna Liu's avatar Sienna Liu Committed by Android (Google) Code Review
Browse files

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

Merge "Fix getPictureProfile to only return profiles whose inputId=null. getAllPictureProfilesForTvInput will be responsible for returning profile whose inputId != null." into main
parents b6b7bf6f 05601f8b
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -417,7 +417,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)};

@@ -433,9 +434,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;
                    }