Make hidden constructor of PlaybackInfo as @SystemApi

When the android build setting is configured to a rule which moves
MediaSession1 related codes to mainline module, the non-public and
non-system APIs in the module cannot be used by the framework.

This CL makes the hidden constructor of PlaybackInfo as
system API, so that it can be used by the framework.

Bug: 123500940
Test: make update-api -j; make -j;
Change-Id: I8583d6f79c70f8bbbbedfa0a75676218aeec58e6
This commit is contained in:
Hyundo Moon
2019-01-28 20:24:37 +09:00
parent 0def48bd5d
commit 1dfec66d30
2 changed files with 6 additions and 0 deletions

View File

@@ -3618,6 +3618,10 @@ package android.media.session {
method public void unregisterCallback(@NonNull android.media.session.ControllerCallbackLink);
}
public static final class MediaController.PlaybackInfo implements android.os.Parcelable {
ctor public MediaController.PlaybackInfo(int, int, int, int, android.media.AudioAttributes);
}
public abstract static class MediaSession.Callback {
method public void onSetMediaButtonEventDelegate(@NonNull android.media.session.MediaSessionEngine.MediaButtonEventDelegate);
}

View File

@@ -18,6 +18,7 @@ package android.media.session;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
import android.app.PendingIntent;
import android.content.Context;
@@ -1011,6 +1012,7 @@ public final class MediaController {
/**
* @hide
*/
@SystemApi
public PlaybackInfo(int type, int control, int max, int current, AudioAttributes attrs) {
mVolumeType = type;
mVolumeControl = control;