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

Commit c2d4ae7b authored by Shubang Lu's avatar Shubang Lu
Browse files

[MQ] Add profile params setter

Params of profile objects needs to be updated in some cases
Used by system only

Test: mmm
Bug: 425486793
Flag: EXEMPT bugfix
Change-Id: I188d04650e6c10a96ed7197b4d8e4b6e95248183
parent f924ab65
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);