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

Commit 13bbb5f9 authored by Haofan Wang's avatar Haofan Wang Committed by Android (Google) Code Review
Browse files

Merge "[MQ] Add profile params setter" into main

parents bd195919 c2d4ae7b
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -387,6 +387,15 @@ public final class PictureProfile implements Parcelable {
        return new PersistableBundle(mParams);
    }

    /**
     * Add a string parameter
     * Used by system only.
     * @hide
     */
    public void addStringParameter(String key, String value) {
        mParams.putString(key, value);
    }

    /**
     * Gets profile handle
     * @hide
+6 −0
Original line number Diff line number Diff line
@@ -2182,7 +2182,10 @@ public class MediaQualityService extends SystemService {
                        // Add previous stream status information so that application can use this
                        // flag to indicate that there is a onStreamStatusChange.
                        currentProfileParameters.putString(PREVIOUS_STREAM_STATUS, profileStatus);
                        current.addStringParameter(STREAM_STATUS, newStatus);
                        current.addStringParameter(PREVIOUS_STREAM_STATUS, profileStatus);
                        mStreamStatusMapping.setCurrent(profileHandle, current);
                        // TODO: use package name to notify
                        mMqManagerNotifier.notifyOnPictureProfileUpdated(
                                current.getProfileId(), current, Process.INVALID_UID,
                                Process.INVALID_PID);
@@ -2209,7 +2212,10 @@ public class MediaQualityService extends SystemService {
                        // Add previous stream status information so that application can use this
                        // flag to indicate that there is a onStreamStatusChange.
                        currentProfileParameters.putString(PREVIOUS_STREAM_STATUS, profileStatus);
                        current.addStringParameter(STREAM_STATUS, PictureProfile.STATUS_SDR);
                        current.addStringParameter(PREVIOUS_STREAM_STATUS, profileStatus);
                        mStreamStatusMapping.setCurrent(profileHandle, current);
                        // TODO: use package name to notify
                        mMqManagerNotifier.notifyOnPictureProfileUpdated(
                                current.getProfileId(), current, Process.INVALID_UID,
                                Process.INVALID_PID);