Loading media/java/android/media/quality/AmbientBacklightEvent.java +4 −3 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ public final class AmbientBacklightEvent implements Parcelable { @IntDef({AMBIENT_BACKLIGHT_EVENT_ENABLED, AMBIENT_BACKLIGHT_EVENT_DISABLED, AMBIENT_BACKLIGHT_EVENT_METADATA, AMBIENT_BACKLIGHT_EVENT_INTERRUPTED}) public @interface AmbientBacklightEventTypes {} public @interface Type {} /** * Event type for ambient backlight events. The ambient backlight is enabled. Loading Loading @@ -69,9 +69,9 @@ public final class AmbientBacklightEvent implements Parcelable { private final AmbientBacklightMetadata mMetadata; /** * Constructor of AmbientBacklightEvent. * Constructs AmbientBacklightEvent. */ public AmbientBacklightEvent(int eventType, public AmbientBacklightEvent(@Type int eventType, @Nullable AmbientBacklightMetadata metadata) { mEventType = eventType; mMetadata = metadata; Loading @@ -85,6 +85,7 @@ public final class AmbientBacklightEvent implements Parcelable { /** * Gets event type. */ @Type public int getEventType() { return mEventType; } Loading media/java/android/media/quality/AmbientBacklightMetadata.java +20 −7 Original line number Diff line number Diff line Loading @@ -29,6 +29,9 @@ import java.util.Arrays; /** * Metadata of ambient backlight. * * <p>A metadata instance is sent from ambient backlight hardware in a {@link AmbientBacklightEvent} * with {@link AmbientBacklightEvent#AMBIENT_BACKLIGHT_EVENT_METADATA}. * @hide */ @FlaggedApi(Flags.FLAG_MEDIA_QUALITY_FW) Loading @@ -44,10 +47,15 @@ public final class AmbientBacklightMetadata implements Parcelable { private final int[] mZonesColors; /** * Constructor of AmbientBacklightMetadata. * Constructs AmbientBacklightMetadata. */ public AmbientBacklightMetadata(@NonNull String packageName, int compressAlgorithm, int source, int colorFormat, int horizontalZonesNumber, int verticalZonesNumber, public AmbientBacklightMetadata( @NonNull String packageName, @AmbientBacklightSettings.CompressAlgorithm int compressAlgorithm, @AmbientBacklightSettings.Source int source, @PixelFormat.Format int colorFormat, int horizontalZonesNumber, int verticalZonesNumber, @NonNull int[] zonesColors) { mPackageName = packageName; mCompressAlgorithm = compressAlgorithm; Loading @@ -69,7 +77,7 @@ public final class AmbientBacklightMetadata implements Parcelable { } /** * Gets package name. * Gets package name of the metadata. * @hide */ @NonNull Loading Loading @@ -102,7 +110,9 @@ public final class AmbientBacklightMetadata implements Parcelable { } /** * Gets the number of lights in each horizontal zone. * Gets the number of horizontal color zones. * * <p>A color zone is a group of lights that always display the same color. */ @IntRange(from = 0) public int getHorizontalZonesNumber() { Loading @@ -110,7 +120,9 @@ public final class AmbientBacklightMetadata implements Parcelable { } /** * Gets the number of lights in each vertical zone. * Gets the number of vertical color zones. * * <p>A color zone is a group of lights that always display the same color. */ @IntRange(from = 0) public int getVerticalZonesNumber() { Loading @@ -118,10 +130,11 @@ public final class AmbientBacklightMetadata implements Parcelable { } /** * Gets color data of vertical color zones. * @hide */ @NonNull public int[] getZonesColors() { public int[] getVerticalZonesColors() { return mZonesColors; } Loading media/java/android/media/quality/AmbientBacklightSettings.java +23 −6 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** * Settings for ambient backlight. * Settings to configure ambient backlight hardware. * @hide */ @FlaggedApi(Flags.FLAG_MEDIA_QUALITY_FW) Loading Loading @@ -124,8 +124,13 @@ public final class AmbientBacklightSettings implements Parcelable { /** * Constructs AmbientBacklightSettings. */ public AmbientBacklightSettings(int source, int maxFps, int colorFormat, int horizontalZonesNumber, int verticalZonesNumber, boolean isLetterboxOmitted, public AmbientBacklightSettings( @Source int source, int maxFps, @PixelFormat.Format int colorFormat, int horizontalZonesNumber, int verticalZonesNumber, boolean isLetterboxOmitted, int threshold) { mSource = source; mMaxFps = maxFps; Loading Loading @@ -171,7 +176,9 @@ public final class AmbientBacklightSettings implements Parcelable { } /** * Gets the number of lights in each horizontal zone. * Gets the number of horizontal color zones. * * <p>A color zone is a group of lights that always display the same color. */ @IntRange(from = 0) public int getHorizontalZonesNumber() { Loading @@ -179,7 +186,9 @@ public final class AmbientBacklightSettings implements Parcelable { } /** * Gets the number of lights in each vertical zone. * Gets the number of vertical color zones. * * <p>A color zone is a group of lights that always display the same color. */ @IntRange(from = 0) public int getVerticalZonesNumber() { Loading @@ -187,7 +196,11 @@ public final class AmbientBacklightSettings implements Parcelable { } /** * Returns {@code true} if letter box is omitted; {@code false} otherwise. * Returns {@code true} if the black portion of the screen in letter box mode is omitted; * {@code false} otherwise. * * <p>Letter-box is a technique to keep the original aspect ratio when displayed on a screen * with different aspect ratio. Black bars are added to the top and bottom. * @hide */ public boolean isLetterboxOmitted() { Loading @@ -195,6 +208,10 @@ public final class AmbientBacklightSettings implements Parcelable { } /** * Gets the detection threshold of the ambient light. * * <p>If the color of a color zone is changed by the difference is smaller than the threshold, * the change is ignored. * @hide */ public int getThreshold() { Loading media/java/android/media/quality/IMediaQualityManager.aidl +3 −1 Original line number Diff line number Diff line Loading @@ -42,10 +42,12 @@ interface IMediaQualityManager { SoundProfile createSoundProfile(in SoundProfile pp); void updateSoundProfile(in String id, in SoundProfile pp); void removeSoundProfile(in String id); SoundProfile getSoundProfileById(in String id); SoundProfile getSoundProfile(in int type, in String name); List<SoundProfile> getSoundProfilesByPackage(in String packageName); List<SoundProfile> getAvailableSoundProfiles(); List<String> getSoundProfilePackageNames(); List<String> getSoundProfileAllowList(); void setSoundProfileAllowList(in List<String> packages); void registerPictureProfileCallback(in IPictureProfileCallback cb); void registerSoundProfileCallback(in ISoundProfileCallback cb); Loading media/java/android/media/quality/ISoundProfileCallback.aidl +6 −3 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.media.quality; import android.media.quality.ParamCapability; import android.media.quality.SoundProfile; /** Loading @@ -24,7 +25,9 @@ import android.media.quality.SoundProfile; * @hide */ oneway interface ISoundProfileCallback { void onSoundProfileAdded(in long id, in SoundProfile p); void onSoundProfileUpdated(in long id, in SoundProfile p); void onSoundProfileRemoved(in long id, in SoundProfile p); void onSoundProfileAdded(in String id, in SoundProfile p); void onSoundProfileUpdated(in String id, in SoundProfile p); void onSoundProfileRemoved(in String id, in SoundProfile p); void onParamCapabilitiesChanged(in String id, in List<ParamCapability> caps); void onError(in int err); } Loading
media/java/android/media/quality/AmbientBacklightEvent.java +4 −3 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ public final class AmbientBacklightEvent implements Parcelable { @IntDef({AMBIENT_BACKLIGHT_EVENT_ENABLED, AMBIENT_BACKLIGHT_EVENT_DISABLED, AMBIENT_BACKLIGHT_EVENT_METADATA, AMBIENT_BACKLIGHT_EVENT_INTERRUPTED}) public @interface AmbientBacklightEventTypes {} public @interface Type {} /** * Event type for ambient backlight events. The ambient backlight is enabled. Loading Loading @@ -69,9 +69,9 @@ public final class AmbientBacklightEvent implements Parcelable { private final AmbientBacklightMetadata mMetadata; /** * Constructor of AmbientBacklightEvent. * Constructs AmbientBacklightEvent. */ public AmbientBacklightEvent(int eventType, public AmbientBacklightEvent(@Type int eventType, @Nullable AmbientBacklightMetadata metadata) { mEventType = eventType; mMetadata = metadata; Loading @@ -85,6 +85,7 @@ public final class AmbientBacklightEvent implements Parcelable { /** * Gets event type. */ @Type public int getEventType() { return mEventType; } Loading
media/java/android/media/quality/AmbientBacklightMetadata.java +20 −7 Original line number Diff line number Diff line Loading @@ -29,6 +29,9 @@ import java.util.Arrays; /** * Metadata of ambient backlight. * * <p>A metadata instance is sent from ambient backlight hardware in a {@link AmbientBacklightEvent} * with {@link AmbientBacklightEvent#AMBIENT_BACKLIGHT_EVENT_METADATA}. * @hide */ @FlaggedApi(Flags.FLAG_MEDIA_QUALITY_FW) Loading @@ -44,10 +47,15 @@ public final class AmbientBacklightMetadata implements Parcelable { private final int[] mZonesColors; /** * Constructor of AmbientBacklightMetadata. * Constructs AmbientBacklightMetadata. */ public AmbientBacklightMetadata(@NonNull String packageName, int compressAlgorithm, int source, int colorFormat, int horizontalZonesNumber, int verticalZonesNumber, public AmbientBacklightMetadata( @NonNull String packageName, @AmbientBacklightSettings.CompressAlgorithm int compressAlgorithm, @AmbientBacklightSettings.Source int source, @PixelFormat.Format int colorFormat, int horizontalZonesNumber, int verticalZonesNumber, @NonNull int[] zonesColors) { mPackageName = packageName; mCompressAlgorithm = compressAlgorithm; Loading @@ -69,7 +77,7 @@ public final class AmbientBacklightMetadata implements Parcelable { } /** * Gets package name. * Gets package name of the metadata. * @hide */ @NonNull Loading Loading @@ -102,7 +110,9 @@ public final class AmbientBacklightMetadata implements Parcelable { } /** * Gets the number of lights in each horizontal zone. * Gets the number of horizontal color zones. * * <p>A color zone is a group of lights that always display the same color. */ @IntRange(from = 0) public int getHorizontalZonesNumber() { Loading @@ -110,7 +120,9 @@ public final class AmbientBacklightMetadata implements Parcelable { } /** * Gets the number of lights in each vertical zone. * Gets the number of vertical color zones. * * <p>A color zone is a group of lights that always display the same color. */ @IntRange(from = 0) public int getVerticalZonesNumber() { Loading @@ -118,10 +130,11 @@ public final class AmbientBacklightMetadata implements Parcelable { } /** * Gets color data of vertical color zones. * @hide */ @NonNull public int[] getZonesColors() { public int[] getVerticalZonesColors() { return mZonesColors; } Loading
media/java/android/media/quality/AmbientBacklightSettings.java +23 −6 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** * Settings for ambient backlight. * Settings to configure ambient backlight hardware. * @hide */ @FlaggedApi(Flags.FLAG_MEDIA_QUALITY_FW) Loading Loading @@ -124,8 +124,13 @@ public final class AmbientBacklightSettings implements Parcelable { /** * Constructs AmbientBacklightSettings. */ public AmbientBacklightSettings(int source, int maxFps, int colorFormat, int horizontalZonesNumber, int verticalZonesNumber, boolean isLetterboxOmitted, public AmbientBacklightSettings( @Source int source, int maxFps, @PixelFormat.Format int colorFormat, int horizontalZonesNumber, int verticalZonesNumber, boolean isLetterboxOmitted, int threshold) { mSource = source; mMaxFps = maxFps; Loading Loading @@ -171,7 +176,9 @@ public final class AmbientBacklightSettings implements Parcelable { } /** * Gets the number of lights in each horizontal zone. * Gets the number of horizontal color zones. * * <p>A color zone is a group of lights that always display the same color. */ @IntRange(from = 0) public int getHorizontalZonesNumber() { Loading @@ -179,7 +186,9 @@ public final class AmbientBacklightSettings implements Parcelable { } /** * Gets the number of lights in each vertical zone. * Gets the number of vertical color zones. * * <p>A color zone is a group of lights that always display the same color. */ @IntRange(from = 0) public int getVerticalZonesNumber() { Loading @@ -187,7 +196,11 @@ public final class AmbientBacklightSettings implements Parcelable { } /** * Returns {@code true} if letter box is omitted; {@code false} otherwise. * Returns {@code true} if the black portion of the screen in letter box mode is omitted; * {@code false} otherwise. * * <p>Letter-box is a technique to keep the original aspect ratio when displayed on a screen * with different aspect ratio. Black bars are added to the top and bottom. * @hide */ public boolean isLetterboxOmitted() { Loading @@ -195,6 +208,10 @@ public final class AmbientBacklightSettings implements Parcelable { } /** * Gets the detection threshold of the ambient light. * * <p>If the color of a color zone is changed by the difference is smaller than the threshold, * the change is ignored. * @hide */ public int getThreshold() { Loading
media/java/android/media/quality/IMediaQualityManager.aidl +3 −1 Original line number Diff line number Diff line Loading @@ -42,10 +42,12 @@ interface IMediaQualityManager { SoundProfile createSoundProfile(in SoundProfile pp); void updateSoundProfile(in String id, in SoundProfile pp); void removeSoundProfile(in String id); SoundProfile getSoundProfileById(in String id); SoundProfile getSoundProfile(in int type, in String name); List<SoundProfile> getSoundProfilesByPackage(in String packageName); List<SoundProfile> getAvailableSoundProfiles(); List<String> getSoundProfilePackageNames(); List<String> getSoundProfileAllowList(); void setSoundProfileAllowList(in List<String> packages); void registerPictureProfileCallback(in IPictureProfileCallback cb); void registerSoundProfileCallback(in ISoundProfileCallback cb); Loading
media/java/android/media/quality/ISoundProfileCallback.aidl +6 −3 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.media.quality; import android.media.quality.ParamCapability; import android.media.quality.SoundProfile; /** Loading @@ -24,7 +25,9 @@ import android.media.quality.SoundProfile; * @hide */ oneway interface ISoundProfileCallback { void onSoundProfileAdded(in long id, in SoundProfile p); void onSoundProfileUpdated(in long id, in SoundProfile p); void onSoundProfileRemoved(in long id, in SoundProfile p); void onSoundProfileAdded(in String id, in SoundProfile p); void onSoundProfileUpdated(in String id, in SoundProfile p); void onSoundProfileRemoved(in String id, in SoundProfile p); void onParamCapabilitiesChanged(in String id, in List<ParamCapability> caps); void onError(in int err); }