Loading core/api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -8136,6 +8136,8 @@ package android.media.quality { method @NonNull public java.util.List<android.media.quality.SoundProfile> getSoundProfilesByPackage(@NonNull String); method public void setAutoPictureQualityEnabled(boolean); method public void setAutoSoundQualityEnabled(boolean); method public boolean setDefaultPictureProfile(@Nullable String); method public boolean setDefaultSoundProfile(@Nullable String); method public void setPictureProfileAllowList(@NonNull java.util.List<java.lang.String>); method public void setSoundProfileAllowList(@NonNull java.util.List<java.lang.String>); method public void setSuperResolutionEnabled(boolean); media/java/android/media/quality/IMediaQualityManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ interface IMediaQualityManager { PictureProfile getPictureProfile(in int type, in String name, int userId); List<PictureProfile> getPictureProfilesByPackage(in String packageName, int userId); List<PictureProfile> getAvailablePictureProfiles(int userId); boolean setDefaultPictureProfile(in String id, int userId); List<String> getPictureProfilePackageNames(int userId); List<String> getPictureProfileAllowList(int userId); void setPictureProfileAllowList(in List<String> packages, int userId); Loading @@ -47,6 +48,7 @@ interface IMediaQualityManager { SoundProfile getSoundProfile(in int type, in String name, int userId); List<SoundProfile> getSoundProfilesByPackage(in String packageName, int userId); List<SoundProfile> getAvailableSoundProfiles(int userId); boolean setDefaultSoundProfile(in String id, int userId); List<String> getSoundProfilePackageNames(int userId); List<String> getSoundProfileAllowList(int userId); void setSoundProfileAllowList(in List<String> packages, int userId); Loading media/java/android/media/quality/MediaQualityManager.java +36 −0 Original line number Diff line number Diff line Loading @@ -256,6 +256,24 @@ public final class MediaQualityManager { } } /** * Sets preferred default picture profile. * * @param id the ID of the default profile. {@code null} to unset the default profile. * @return {@code true} if it's set successfully; {@code false} otherwise. * * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.MANAGE_GLOBAL_PICTURE_QUALITY_SERVICE) public boolean setDefaultPictureProfile(@Nullable String id) { try { return mService.setDefaultPictureProfile(id, mUserId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Gets all package names whose picture profiles are available. * Loading Loading @@ -399,6 +417,24 @@ public final class MediaQualityManager { } } /** * Sets preferred default sound profile. * * @param id the ID of the default profile. {@code null} to unset the default profile. * @return {@code true} if it's set successfully; {@code false} otherwise. * * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.MANAGE_GLOBAL_SOUND_QUALITY_SERVICE) public boolean setDefaultSoundProfile(@Nullable String id) { try { return mService.setDefaultSoundProfile(id, mUserId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Gets all package names whose sound profiles are available. * Loading services/core/java/com/android/server/media/quality/MediaQualityService.java +12 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,12 @@ public class MediaQualityService extends SystemService { return new ArrayList<>(); } @Override public boolean setDefaultPictureProfile(String profileId, int userId) { // TODO: pass the profile ID to MediaQuality HAL when ready. return false; } @Override public List<String> getPictureProfilePackageNames(int userId) { String [] column = {BaseParameters.PARAMETER_PACKAGE}; Loading Loading @@ -247,6 +253,12 @@ public class MediaQualityService extends SystemService { return new ArrayList<>(); } @Override public boolean setDefaultSoundProfile(String profileId, int userId) { // TODO: pass the profile ID to MediaQuality HAL when ready. return false; } @Override public List<String> getSoundProfilePackageNames(int userId) { String [] column = {BaseParameters.PARAMETER_NAME}; Loading Loading
core/api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -8136,6 +8136,8 @@ package android.media.quality { method @NonNull public java.util.List<android.media.quality.SoundProfile> getSoundProfilesByPackage(@NonNull String); method public void setAutoPictureQualityEnabled(boolean); method public void setAutoSoundQualityEnabled(boolean); method public boolean setDefaultPictureProfile(@Nullable String); method public boolean setDefaultSoundProfile(@Nullable String); method public void setPictureProfileAllowList(@NonNull java.util.List<java.lang.String>); method public void setSoundProfileAllowList(@NonNull java.util.List<java.lang.String>); method public void setSuperResolutionEnabled(boolean);
media/java/android/media/quality/IMediaQualityManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ interface IMediaQualityManager { PictureProfile getPictureProfile(in int type, in String name, int userId); List<PictureProfile> getPictureProfilesByPackage(in String packageName, int userId); List<PictureProfile> getAvailablePictureProfiles(int userId); boolean setDefaultPictureProfile(in String id, int userId); List<String> getPictureProfilePackageNames(int userId); List<String> getPictureProfileAllowList(int userId); void setPictureProfileAllowList(in List<String> packages, int userId); Loading @@ -47,6 +48,7 @@ interface IMediaQualityManager { SoundProfile getSoundProfile(in int type, in String name, int userId); List<SoundProfile> getSoundProfilesByPackage(in String packageName, int userId); List<SoundProfile> getAvailableSoundProfiles(int userId); boolean setDefaultSoundProfile(in String id, int userId); List<String> getSoundProfilePackageNames(int userId); List<String> getSoundProfileAllowList(int userId); void setSoundProfileAllowList(in List<String> packages, int userId); Loading
media/java/android/media/quality/MediaQualityManager.java +36 −0 Original line number Diff line number Diff line Loading @@ -256,6 +256,24 @@ public final class MediaQualityManager { } } /** * Sets preferred default picture profile. * * @param id the ID of the default profile. {@code null} to unset the default profile. * @return {@code true} if it's set successfully; {@code false} otherwise. * * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.MANAGE_GLOBAL_PICTURE_QUALITY_SERVICE) public boolean setDefaultPictureProfile(@Nullable String id) { try { return mService.setDefaultPictureProfile(id, mUserId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Gets all package names whose picture profiles are available. * Loading Loading @@ -399,6 +417,24 @@ public final class MediaQualityManager { } } /** * Sets preferred default sound profile. * * @param id the ID of the default profile. {@code null} to unset the default profile. * @return {@code true} if it's set successfully; {@code false} otherwise. * * @hide */ @SystemApi @RequiresPermission(android.Manifest.permission.MANAGE_GLOBAL_SOUND_QUALITY_SERVICE) public boolean setDefaultSoundProfile(@Nullable String id) { try { return mService.setDefaultSoundProfile(id, mUserId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Gets all package names whose sound profiles are available. * Loading
services/core/java/com/android/server/media/quality/MediaQualityService.java +12 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,12 @@ public class MediaQualityService extends SystemService { return new ArrayList<>(); } @Override public boolean setDefaultPictureProfile(String profileId, int userId) { // TODO: pass the profile ID to MediaQuality HAL when ready. return false; } @Override public List<String> getPictureProfilePackageNames(int userId) { String [] column = {BaseParameters.PARAMETER_PACKAGE}; Loading Loading @@ -247,6 +253,12 @@ public class MediaQualityService extends SystemService { return new ArrayList<>(); } @Override public boolean setDefaultSoundProfile(String profileId, int userId) { // TODO: pass the profile ID to MediaQuality HAL when ready. return false; } @Override public List<String> getSoundProfilePackageNames(int userId) { String [] column = {BaseParameters.PARAMETER_NAME}; Loading