Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -22601,6 +22601,7 @@ package android.media { method public void sendEvent(int, int, @Nullable byte[]) throws android.media.MediaCasException; method public void setEventListener(@Nullable android.media.MediaCas.EventListener, @Nullable android.os.Handler); method public void setPrivateData(@NonNull byte[]) throws android.media.MediaCasException; method @FlaggedApi("com.android.media.flags.update_client_profile_priority") public boolean updateResourcePriority(int, int); field public static final int PLUGIN_STATUS_PHYSICAL_MODULE_CHANGED = 0; // 0x0 field public static final int PLUGIN_STATUS_SESSION_NUMBER_CHANGED = 1; // 0x1 field public static final int SCRAMBLING_MODE_AES128 = 9; // 0x9 media/java/android/media/MediaCas.java +24 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,9 @@ package android.media; import static com.android.media.flags.Flags.FLAG_UPDATE_CLIENT_PROFILE_PRIORITY; import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; Loading Loading @@ -970,6 +973,27 @@ public final class MediaCas implements AutoCloseable { registerClient(context, tvInputServiceSessionId, priorityHint); } /** * Updates client priority with an arbitrary value along with a nice value. * * <p>Tuner resource manager (TRM) uses the client priority value to decide whether it is able * to reclaim insufficient resources from another client. * * <p>The nice value represents how much the client intends to give up the resource when an * insufficient resource situation happens. * * @see <a * href="https://source.android.com/docs/devices/tv/tuner-framework#priority-nice-value"> * Priority value and nice value</a> * @param priority the new priority. Any negative value would cause no-op on priority setting * and the API would only process nice value setting in that case. * @param niceValue the nice value. */ @FlaggedApi(FLAG_UPDATE_CLIENT_PROFILE_PRIORITY) public boolean updateResourcePriority(int priority, int niceValue) { return mTunerResourceManager.updateClientPriority(mClientId, priority, niceValue); } IHwBinder getBinder() { if (mICas != null) { return null; // Return IHwBinder only for HIDL Loading media/java/android/media/flags/media_better_together.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,13 @@ flag { bug: "314324170" } flag { name: "update_client_profile_priority" namespace: "media" description : "Feature flag to add updateResourcePriority api to MediaCas" bug: "300565729" } flag { name: "enable_built_in_speaker_route_suitability_statuses" is_exported: true Loading Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -22601,6 +22601,7 @@ package android.media { method public void sendEvent(int, int, @Nullable byte[]) throws android.media.MediaCasException; method public void setEventListener(@Nullable android.media.MediaCas.EventListener, @Nullable android.os.Handler); method public void setPrivateData(@NonNull byte[]) throws android.media.MediaCasException; method @FlaggedApi("com.android.media.flags.update_client_profile_priority") public boolean updateResourcePriority(int, int); field public static final int PLUGIN_STATUS_PHYSICAL_MODULE_CHANGED = 0; // 0x0 field public static final int PLUGIN_STATUS_SESSION_NUMBER_CHANGED = 1; // 0x1 field public static final int SCRAMBLING_MODE_AES128 = 9; // 0x9
media/java/android/media/MediaCas.java +24 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,9 @@ package android.media; import static com.android.media.flags.Flags.FLAG_UPDATE_CLIENT_PROFILE_PRIORITY; import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; Loading Loading @@ -970,6 +973,27 @@ public final class MediaCas implements AutoCloseable { registerClient(context, tvInputServiceSessionId, priorityHint); } /** * Updates client priority with an arbitrary value along with a nice value. * * <p>Tuner resource manager (TRM) uses the client priority value to decide whether it is able * to reclaim insufficient resources from another client. * * <p>The nice value represents how much the client intends to give up the resource when an * insufficient resource situation happens. * * @see <a * href="https://source.android.com/docs/devices/tv/tuner-framework#priority-nice-value"> * Priority value and nice value</a> * @param priority the new priority. Any negative value would cause no-op on priority setting * and the API would only process nice value setting in that case. * @param niceValue the nice value. */ @FlaggedApi(FLAG_UPDATE_CLIENT_PROFILE_PRIORITY) public boolean updateResourcePriority(int priority, int niceValue) { return mTunerResourceManager.updateClientPriority(mClientId, priority, niceValue); } IHwBinder getBinder() { if (mICas != null) { return null; // Return IHwBinder only for HIDL Loading
media/java/android/media/flags/media_better_together.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,13 @@ flag { bug: "314324170" } flag { name: "update_client_profile_priority" namespace: "media" description : "Feature flag to add updateResourcePriority api to MediaCas" bug: "300565729" } flag { name: "enable_built_in_speaker_route_suitability_statuses" is_exported: true Loading