Loading media/java/android/media/quality/IMediaQualityManager.aidl +3 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.media.quality.ISoundProfileCallback; import android.media.quality.ParamCapability; import android.media.quality.PictureProfileHandle; import android.media.quality.PictureProfile; import android.media.quality.SoundProfileHandle; import android.media.quality.SoundProfile; /** Loading @@ -40,7 +41,7 @@ interface IMediaQualityManager { List<String> getPictureProfilePackageNames(int userId); List<String> getPictureProfileAllowList(int userId); void setPictureProfileAllowList(in List<String> packages, int userId); PictureProfileHandle getPictureProfileHandle(in String id, int userId); List<PictureProfileHandle> getPictureProfileHandle(in String[] id, int userId); SoundProfile createSoundProfile(in SoundProfile pp, int userId); void updateSoundProfile(in String id, in SoundProfile pp, int userId); Loading @@ -52,6 +53,7 @@ interface IMediaQualityManager { List<String> getSoundProfilePackageNames(int userId); List<String> getSoundProfileAllowList(int userId); void setSoundProfileAllowList(in List<String> packages, int userId); List<SoundProfileHandle> getSoundProfileHandle(in String[] id, int userId); void registerPictureProfileCallback(in IPictureProfileCallback cb); void registerSoundProfileCallback(in ISoundProfileCallback cb); Loading media/java/android/media/quality/MediaQualityManager.java +13 −1 Original line number Diff line number Diff line Loading @@ -295,7 +295,7 @@ public final class MediaQualityManager { * Gets picture profile handle by profile ID. * @hide */ public PictureProfileHandle getPictureProfileHandle(String id) { public List<PictureProfileHandle> getPictureProfileHandle(String[] id) { try { return mService.getPictureProfileHandle(id, mUserId); } catch (RemoteException e) { Loading @@ -303,6 +303,18 @@ public final class MediaQualityManager { } } /** * Gets sound profile handle by profile ID. * @hide */ public List<SoundProfileHandle> getSoundProfileHandle(String[] id) { try { return mService.getSoundProfileHandle(id, mUserId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Creates a picture profile and store it in the system. * Loading media/java/android/media/quality/PictureProfile.java +29 −2 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ public final class PictureProfile implements Parcelable { private final String mPackageName; @NonNull private final PersistableBundle mParams; private final PictureProfileHandle mHandle; /** @hide */ @Retention(RetentionPolicy.SOURCE) Loading Loading @@ -121,6 +122,7 @@ public final class PictureProfile implements Parcelable { mInputId = in.readString(); mPackageName = in.readString(); mParams = in.readPersistableBundle(); mHandle = in.readParcelable(PictureProfileHandle.class.getClassLoader()); } @Override Loading @@ -131,6 +133,7 @@ public final class PictureProfile implements Parcelable { dest.writeString(mInputId); dest.writeString(mPackageName); dest.writePersistableBundle(mParams); dest.writeParcelable(mHandle, flags); } @Override Loading Loading @@ -163,13 +166,15 @@ public final class PictureProfile implements Parcelable { @NonNull String name, @Nullable String inputId, @NonNull String packageName, @NonNull PersistableBundle params) { @NonNull PersistableBundle params, @NonNull PictureProfileHandle handle) { this.mId = id; this.mType = type; this.mName = name; this.mInputId = inputId; this.mPackageName = packageName; this.mParams = params; this.mHandle = handle; } /** Loading Loading @@ -250,6 +255,15 @@ public final class PictureProfile implements Parcelable { return new PersistableBundle(mParams); } /** * Gets profile handle * @hide */ @NonNull public PictureProfileHandle getHandle() { return mHandle; } /** * A builder for {@link PictureProfile}. */ Loading @@ -265,6 +279,7 @@ public final class PictureProfile implements Parcelable { private String mPackageName; @NonNull private PersistableBundle mParams; private PictureProfileHandle mHandle; /** * Creates a new Builder. Loading @@ -283,6 +298,7 @@ public final class PictureProfile implements Parcelable { mPackageName = p.getPackageName(); mInputId = p.getInputId(); mParams = p.getParameters(); mHandle = p.getHandle(); } /** Loading Loading @@ -349,6 +365,16 @@ public final class PictureProfile implements Parcelable { return this; } /** * Sets profile handle. * @hide */ @NonNull public Builder setHandle(@NonNull PictureProfileHandle handle) { mHandle = handle; return this; } /** * Builds the instance. */ Loading @@ -361,7 +387,8 @@ public final class PictureProfile implements Parcelable { mName, mInputId, mPackageName, mParams); mParams, mHandle); return o; } } Loading media/java/android/media/quality/SoundProfile.java +29 −2 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ public final class SoundProfile implements Parcelable { private final String mPackageName; @NonNull private final PersistableBundle mParams; private final SoundProfileHandle mHandle; /** @hide */ @Retention(RetentionPolicy.SOURCE) Loading Loading @@ -120,6 +121,7 @@ public final class SoundProfile implements Parcelable { mInputId = in.readString(); mPackageName = in.readString(); mParams = in.readPersistableBundle(); mHandle = in.readParcelable(SoundProfileHandle.class.getClassLoader()); } @Override Loading @@ -130,6 +132,7 @@ public final class SoundProfile implements Parcelable { dest.writeString(mInputId); dest.writeString(mPackageName); dest.writePersistableBundle(mParams); dest.writeParcelable(mHandle, flags); } @Override Loading Loading @@ -162,13 +165,15 @@ public final class SoundProfile implements Parcelable { @NonNull String name, @Nullable String inputId, @NonNull String packageName, @NonNull PersistableBundle params) { @NonNull PersistableBundle params, @NonNull SoundProfileHandle handle) { this.mId = id; this.mType = type; this.mName = name; this.mInputId = inputId; this.mPackageName = packageName; this.mParams = params; this.mHandle = handle; } /** Loading Loading @@ -249,6 +254,15 @@ public final class SoundProfile implements Parcelable { return new PersistableBundle(mParams); } /** * Gets profile handle * @hide */ @NonNull public SoundProfileHandle getHandle() { return mHandle; } /** * A builder for {@link SoundProfile} */ Loading @@ -264,6 +278,7 @@ public final class SoundProfile implements Parcelable { private String mPackageName; @NonNull private PersistableBundle mParams; private SoundProfileHandle mHandle; /** * Creates a new Builder. Loading @@ -282,6 +297,7 @@ public final class SoundProfile implements Parcelable { mPackageName = p.getPackageName(); mInputId = p.getInputId(); mParams = p.getParameters(); mHandle = p.getHandle(); } /** Loading Loading @@ -348,6 +364,16 @@ public final class SoundProfile implements Parcelable { return this; } /** * Sets profile handle. * @hide */ @NonNull public Builder setHandle(@NonNull SoundProfileHandle handle) { mHandle = handle; return this; } /** * Builds the instance. */ Loading @@ -360,7 +386,8 @@ public final class SoundProfile implements Parcelable { mName, mInputId, mPackageName, mParams); mParams, mHandle); return o; } } Loading media/java/android/media/quality/SoundProfileHandle.aidl 0 → 100644 +19 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.media.quality; parcelable SoundProfileHandle; Loading
media/java/android/media/quality/IMediaQualityManager.aidl +3 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.media.quality.ISoundProfileCallback; import android.media.quality.ParamCapability; import android.media.quality.PictureProfileHandle; import android.media.quality.PictureProfile; import android.media.quality.SoundProfileHandle; import android.media.quality.SoundProfile; /** Loading @@ -40,7 +41,7 @@ interface IMediaQualityManager { List<String> getPictureProfilePackageNames(int userId); List<String> getPictureProfileAllowList(int userId); void setPictureProfileAllowList(in List<String> packages, int userId); PictureProfileHandle getPictureProfileHandle(in String id, int userId); List<PictureProfileHandle> getPictureProfileHandle(in String[] id, int userId); SoundProfile createSoundProfile(in SoundProfile pp, int userId); void updateSoundProfile(in String id, in SoundProfile pp, int userId); Loading @@ -52,6 +53,7 @@ interface IMediaQualityManager { List<String> getSoundProfilePackageNames(int userId); List<String> getSoundProfileAllowList(int userId); void setSoundProfileAllowList(in List<String> packages, int userId); List<SoundProfileHandle> getSoundProfileHandle(in String[] id, int userId); void registerPictureProfileCallback(in IPictureProfileCallback cb); void registerSoundProfileCallback(in ISoundProfileCallback cb); Loading
media/java/android/media/quality/MediaQualityManager.java +13 −1 Original line number Diff line number Diff line Loading @@ -295,7 +295,7 @@ public final class MediaQualityManager { * Gets picture profile handle by profile ID. * @hide */ public PictureProfileHandle getPictureProfileHandle(String id) { public List<PictureProfileHandle> getPictureProfileHandle(String[] id) { try { return mService.getPictureProfileHandle(id, mUserId); } catch (RemoteException e) { Loading @@ -303,6 +303,18 @@ public final class MediaQualityManager { } } /** * Gets sound profile handle by profile ID. * @hide */ public List<SoundProfileHandle> getSoundProfileHandle(String[] id) { try { return mService.getSoundProfileHandle(id, mUserId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Creates a picture profile and store it in the system. * Loading
media/java/android/media/quality/PictureProfile.java +29 −2 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ public final class PictureProfile implements Parcelable { private final String mPackageName; @NonNull private final PersistableBundle mParams; private final PictureProfileHandle mHandle; /** @hide */ @Retention(RetentionPolicy.SOURCE) Loading Loading @@ -121,6 +122,7 @@ public final class PictureProfile implements Parcelable { mInputId = in.readString(); mPackageName = in.readString(); mParams = in.readPersistableBundle(); mHandle = in.readParcelable(PictureProfileHandle.class.getClassLoader()); } @Override Loading @@ -131,6 +133,7 @@ public final class PictureProfile implements Parcelable { dest.writeString(mInputId); dest.writeString(mPackageName); dest.writePersistableBundle(mParams); dest.writeParcelable(mHandle, flags); } @Override Loading Loading @@ -163,13 +166,15 @@ public final class PictureProfile implements Parcelable { @NonNull String name, @Nullable String inputId, @NonNull String packageName, @NonNull PersistableBundle params) { @NonNull PersistableBundle params, @NonNull PictureProfileHandle handle) { this.mId = id; this.mType = type; this.mName = name; this.mInputId = inputId; this.mPackageName = packageName; this.mParams = params; this.mHandle = handle; } /** Loading Loading @@ -250,6 +255,15 @@ public final class PictureProfile implements Parcelable { return new PersistableBundle(mParams); } /** * Gets profile handle * @hide */ @NonNull public PictureProfileHandle getHandle() { return mHandle; } /** * A builder for {@link PictureProfile}. */ Loading @@ -265,6 +279,7 @@ public final class PictureProfile implements Parcelable { private String mPackageName; @NonNull private PersistableBundle mParams; private PictureProfileHandle mHandle; /** * Creates a new Builder. Loading @@ -283,6 +298,7 @@ public final class PictureProfile implements Parcelable { mPackageName = p.getPackageName(); mInputId = p.getInputId(); mParams = p.getParameters(); mHandle = p.getHandle(); } /** Loading Loading @@ -349,6 +365,16 @@ public final class PictureProfile implements Parcelable { return this; } /** * Sets profile handle. * @hide */ @NonNull public Builder setHandle(@NonNull PictureProfileHandle handle) { mHandle = handle; return this; } /** * Builds the instance. */ Loading @@ -361,7 +387,8 @@ public final class PictureProfile implements Parcelable { mName, mInputId, mPackageName, mParams); mParams, mHandle); return o; } } Loading
media/java/android/media/quality/SoundProfile.java +29 −2 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ public final class SoundProfile implements Parcelable { private final String mPackageName; @NonNull private final PersistableBundle mParams; private final SoundProfileHandle mHandle; /** @hide */ @Retention(RetentionPolicy.SOURCE) Loading Loading @@ -120,6 +121,7 @@ public final class SoundProfile implements Parcelable { mInputId = in.readString(); mPackageName = in.readString(); mParams = in.readPersistableBundle(); mHandle = in.readParcelable(SoundProfileHandle.class.getClassLoader()); } @Override Loading @@ -130,6 +132,7 @@ public final class SoundProfile implements Parcelable { dest.writeString(mInputId); dest.writeString(mPackageName); dest.writePersistableBundle(mParams); dest.writeParcelable(mHandle, flags); } @Override Loading Loading @@ -162,13 +165,15 @@ public final class SoundProfile implements Parcelable { @NonNull String name, @Nullable String inputId, @NonNull String packageName, @NonNull PersistableBundle params) { @NonNull PersistableBundle params, @NonNull SoundProfileHandle handle) { this.mId = id; this.mType = type; this.mName = name; this.mInputId = inputId; this.mPackageName = packageName; this.mParams = params; this.mHandle = handle; } /** Loading Loading @@ -249,6 +254,15 @@ public final class SoundProfile implements Parcelable { return new PersistableBundle(mParams); } /** * Gets profile handle * @hide */ @NonNull public SoundProfileHandle getHandle() { return mHandle; } /** * A builder for {@link SoundProfile} */ Loading @@ -264,6 +278,7 @@ public final class SoundProfile implements Parcelable { private String mPackageName; @NonNull private PersistableBundle mParams; private SoundProfileHandle mHandle; /** * Creates a new Builder. Loading @@ -282,6 +297,7 @@ public final class SoundProfile implements Parcelable { mPackageName = p.getPackageName(); mInputId = p.getInputId(); mParams = p.getParameters(); mHandle = p.getHandle(); } /** Loading Loading @@ -348,6 +364,16 @@ public final class SoundProfile implements Parcelable { return this; } /** * Sets profile handle. * @hide */ @NonNull public Builder setHandle(@NonNull SoundProfileHandle handle) { mHandle = handle; return this; } /** * Builds the instance. */ Loading @@ -360,7 +386,8 @@ public final class SoundProfile implements Parcelable { mName, mInputId, mPackageName, mParams); mParams, mHandle); return o; } } Loading
media/java/android/media/quality/SoundProfileHandle.aidl 0 → 100644 +19 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.media.quality; parcelable SoundProfileHandle;