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

Commit fcd2b2f2 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix unknown id send into the HAL" into main

parents e453a478 1a8e3654
Loading
Loading
Loading
Loading
+8 −12
Original line number Diff line number Diff line
@@ -699,12 +699,6 @@ public class MediaQualityService extends SystemService {

        public long getPictureProfileForTvInput(String inputId, int userId) {
            // TODO: cache profiles
            int callingUid = Binder.getCallingUid();
            int callingPid = Binder.getCallingPid();
            if (!hasGlobalPictureQualityServicePermission(callingUid, callingPid)) {
                mMqManagerNotifier.notifyOnPictureProfileError(
                        null, PictureProfile.ERROR_NO_PERMISSION, callingUid, callingPid);
            }
            String[] columns = {BaseParameters.PARAMETER_ID};
            String selection = BaseParameters.PARAMETER_TYPE + " = ? AND ("
                    + BaseParameters.PARAMETER_NAME + " = ? OR "
@@ -734,12 +728,14 @@ public class MediaQualityService extends SystemService {
                    handle = p.getHandle().getId();
                    PictureProfile current = getCurrentPictureProfile(handle);
                    if (current != null) {
                        long currentHandle = current.getHandle().getId();
                        mHalNotifier.notifyHalOnPictureProfileChange(
                                currentHandle, current.getParameters());
                        return currentHandle;
                        if (DEBUG) {
                            Slog.d(TAG, "handle returned is " + current.getHandle().getId());
                        }
                        return current.getHandle().getId();
                    }
                    if (DEBUG) {
                        Slog.d(TAG, "handle returned is " + handle);
                    }
                    mHalNotifier.notifyHalOnPictureProfileChange(handle, p.getParameters());
                    return handle;
                }
            }
@@ -2669,7 +2665,7 @@ public class MediaQualityService extends SystemService {

    private void putCurrentPictureProfile(Long originalHandle, Long currentHandle) {
        mOriginalToCurrent.put(originalHandle, currentHandle);
        mCurrentPictureHandleToOriginal.removeValue(currentHandle);
        mCurrentPictureHandleToOriginal.removeValue(originalHandle);
        mCurrentPictureHandleToOriginal.put(currentHandle, originalHandle);
    }
}