Merge "MediaPlayer2: unhide MediaPlayer2 and related classes."
This commit is contained in:
committed by
Android (Google) Code Review
commit
eb8464dc0a
226
api/current.txt
226
api/current.txt
@@ -23437,6 +23437,17 @@ package android.media {
|
||||
method public void onTearDown(android.media.AudioTrack);
|
||||
}
|
||||
|
||||
public class CallbackDataSourceDesc extends android.media.DataSourceDesc {
|
||||
method public android.media.DataSourceCallback getDataSourceCallback();
|
||||
}
|
||||
|
||||
public static class CallbackDataSourceDesc.Builder extends android.media.DataSourceDesc.BuilderBase {
|
||||
ctor public CallbackDataSourceDesc.Builder();
|
||||
ctor public CallbackDataSourceDesc.Builder(android.media.CallbackDataSourceDesc);
|
||||
method public android.media.CallbackDataSourceDesc build();
|
||||
method public android.media.CallbackDataSourceDesc.Builder setDataSource(android.media.DataSourceCallback);
|
||||
}
|
||||
|
||||
public class CamcorderProfile {
|
||||
method public static android.media.CamcorderProfile get(int);
|
||||
method public static android.media.CamcorderProfile get(int, int);
|
||||
@@ -23489,6 +23500,26 @@ package android.media {
|
||||
field public static final int QUALITY_MEDIUM = 1; // 0x1
|
||||
}
|
||||
|
||||
public abstract class DataSourceCallback implements java.io.Closeable {
|
||||
ctor public DataSourceCallback();
|
||||
method public abstract long getSize() throws java.io.IOException;
|
||||
method public abstract int readAt(long, byte[], int, int) throws java.io.IOException;
|
||||
}
|
||||
|
||||
public class DataSourceDesc {
|
||||
method public long getEndPosition();
|
||||
method public java.lang.String getMediaId();
|
||||
method public long getStartPosition();
|
||||
field public static final long LONG_MAX_TIME_MS = 576460752303423L; // 0x20c49ba5e353fL
|
||||
field public static final long POSITION_UNKNOWN = 576460752303423L; // 0x20c49ba5e353fL
|
||||
}
|
||||
|
||||
protected static class DataSourceDesc.BuilderBase<T extends android.media.DataSourceDesc.BuilderBase> {
|
||||
method public T setEndPosition(long);
|
||||
method public T setMediaId(java.lang.String);
|
||||
method public T setStartPosition(long);
|
||||
}
|
||||
|
||||
public final class DeniedByServerException extends android.media.MediaDrmException {
|
||||
ctor public DeniedByServerException(java.lang.String);
|
||||
}
|
||||
@@ -23689,6 +23720,21 @@ package android.media {
|
||||
field public static final int EULER_Z = 2; // 0x2
|
||||
}
|
||||
|
||||
public class FileDataSourceDesc extends android.media.DataSourceDesc {
|
||||
method public long getLength();
|
||||
method public long getOffset();
|
||||
method public android.os.ParcelFileDescriptor getParcelFileDescriptor();
|
||||
field public static final long FD_LENGTH_UNKNOWN = 576460752303423487L; // 0x7ffffffffffffffL
|
||||
}
|
||||
|
||||
public static class FileDataSourceDesc.Builder extends android.media.DataSourceDesc.BuilderBase {
|
||||
ctor public FileDataSourceDesc.Builder();
|
||||
ctor public FileDataSourceDesc.Builder(android.media.FileDataSourceDesc);
|
||||
method public android.media.FileDataSourceDesc build();
|
||||
method public android.media.FileDataSourceDesc.Builder setDataSource(android.os.ParcelFileDescriptor);
|
||||
method public android.media.FileDataSourceDesc.Builder setDataSource(android.os.ParcelFileDescriptor, long, long);
|
||||
}
|
||||
|
||||
public abstract class Image implements java.lang.AutoCloseable {
|
||||
method public abstract void close();
|
||||
method public android.graphics.Rect getCropRect();
|
||||
@@ -25076,6 +25122,166 @@ package android.media {
|
||||
field public static final int MEDIA_TRACK_TYPE_VIDEO = 1; // 0x1
|
||||
}
|
||||
|
||||
public class MediaPlayer2 implements android.media.AudioRouting java.lang.AutoCloseable {
|
||||
ctor public MediaPlayer2(android.content.Context);
|
||||
method public void addOnRoutingChangedListener(android.media.AudioRouting.OnRoutingChangedListener, android.os.Handler);
|
||||
method public java.lang.Object attachAuxEffect(int);
|
||||
method public boolean cancelCommand(java.lang.Object);
|
||||
method public java.lang.Object clearNextDataSources();
|
||||
method public void clearPendingCommands();
|
||||
method public void close();
|
||||
method public java.lang.Object deselectTrack(int);
|
||||
method public android.media.AudioAttributes getAudioAttributes();
|
||||
method public int getAudioSessionId();
|
||||
method public long getBufferedPosition();
|
||||
method public android.media.DataSourceDesc getCurrentDataSource();
|
||||
method public long getCurrentPosition();
|
||||
method public long getDuration();
|
||||
method public float getMaxPlayerVolume();
|
||||
method public android.os.PersistableBundle getMetrics();
|
||||
method public android.media.PlaybackParams getPlaybackParams();
|
||||
method public float getPlayerVolume();
|
||||
method public android.media.AudioDeviceInfo getPreferredDevice();
|
||||
method public android.media.AudioDeviceInfo getRoutedDevice();
|
||||
method public int getSelectedTrack(int);
|
||||
method public int getState();
|
||||
method public android.media.SyncParams getSyncParams();
|
||||
method public android.media.MediaTimestamp getTimestamp();
|
||||
method public java.util.List<android.media.MediaPlayer2.TrackInfo> getTrackInfo();
|
||||
method public android.media.VideoSize getVideoSize();
|
||||
method public boolean isLooping();
|
||||
method public java.lang.Object loopCurrent(boolean);
|
||||
method public java.lang.Object notifyWhenCommandLabelReached(java.lang.Object);
|
||||
method public java.lang.Object pause();
|
||||
method public java.lang.Object play();
|
||||
method public java.lang.Object prepare();
|
||||
method public void registerEventCallback(java.util.concurrent.Executor, android.media.MediaPlayer2.EventCallback);
|
||||
method public void removeOnRoutingChangedListener(android.media.AudioRouting.OnRoutingChangedListener);
|
||||
method public void reset();
|
||||
method public java.lang.Object seekTo(long);
|
||||
method public java.lang.Object seekTo(long, int);
|
||||
method public java.lang.Object selectTrack(int);
|
||||
method public java.lang.Object setAudioAttributes(android.media.AudioAttributes);
|
||||
method public java.lang.Object setAudioSessionId(int);
|
||||
method public java.lang.Object setAuxEffectSendLevel(float);
|
||||
method public java.lang.Object setDataSource(android.media.DataSourceDesc);
|
||||
method public java.lang.Object setDisplay(android.view.SurfaceHolder);
|
||||
method public java.lang.Object setNextDataSource(android.media.DataSourceDesc);
|
||||
method public java.lang.Object setNextDataSources(java.util.List<android.media.DataSourceDesc>);
|
||||
method public java.lang.Object setPlaybackParams(android.media.PlaybackParams);
|
||||
method public java.lang.Object setPlayerVolume(float);
|
||||
method public boolean setPreferredDevice(android.media.AudioDeviceInfo);
|
||||
method public java.lang.Object setScreenOnWhilePlaying(boolean);
|
||||
method public java.lang.Object setSurface(android.view.Surface);
|
||||
method public java.lang.Object setSyncParams(android.media.SyncParams);
|
||||
method public java.lang.Object setWakeLock(android.os.PowerManager.WakeLock);
|
||||
method public java.lang.Object skipToNext();
|
||||
method public void unregisterEventCallback(android.media.MediaPlayer2.EventCallback);
|
||||
field public static final int CALL_COMPLETED_ATTACH_AUX_EFFECT = 1; // 0x1
|
||||
field public static final int CALL_COMPLETED_CLEAR_NEXT_DATA_SOURCES = 30; // 0x1e
|
||||
field public static final int CALL_COMPLETED_DESELECT_TRACK = 2; // 0x2
|
||||
field public static final int CALL_COMPLETED_LOOP_CURRENT = 3; // 0x3
|
||||
field public static final int CALL_COMPLETED_PAUSE = 4; // 0x4
|
||||
field public static final int CALL_COMPLETED_PLAY = 5; // 0x5
|
||||
field public static final int CALL_COMPLETED_PREPARE = 6; // 0x6
|
||||
field public static final int CALL_COMPLETED_SEEK_TO = 14; // 0xe
|
||||
field public static final int CALL_COMPLETED_SELECT_TRACK = 15; // 0xf
|
||||
field public static final int CALL_COMPLETED_SET_AUDIO_ATTRIBUTES = 16; // 0x10
|
||||
field public static final int CALL_COMPLETED_SET_AUDIO_SESSION_ID = 17; // 0x11
|
||||
field public static final int CALL_COMPLETED_SET_AUX_EFFECT_SEND_LEVEL = 18; // 0x12
|
||||
field public static final int CALL_COMPLETED_SET_DATA_SOURCE = 19; // 0x13
|
||||
field public static final int CALL_COMPLETED_SET_DISPLAY = 33; // 0x21
|
||||
field public static final int CALL_COMPLETED_SET_NEXT_DATA_SOURCE = 22; // 0x16
|
||||
field public static final int CALL_COMPLETED_SET_NEXT_DATA_SOURCES = 23; // 0x17
|
||||
field public static final int CALL_COMPLETED_SET_PLAYBACK_PARAMS = 24; // 0x18
|
||||
field public static final int CALL_COMPLETED_SET_PLAYER_VOLUME = 26; // 0x1a
|
||||
field public static final int CALL_COMPLETED_SET_SCREEN_ON_WHILE_PLAYING = 35; // 0x23
|
||||
field public static final int CALL_COMPLETED_SET_SURFACE = 27; // 0x1b
|
||||
field public static final int CALL_COMPLETED_SET_SYNC_PARAMS = 28; // 0x1c
|
||||
field public static final int CALL_COMPLETED_SET_WAKE_LOCK = 34; // 0x22
|
||||
field public static final int CALL_COMPLETED_SKIP_TO_NEXT = 29; // 0x1d
|
||||
field public static final int CALL_STATUS_BAD_VALUE = 2; // 0x2
|
||||
field public static final int CALL_STATUS_ERROR_IO = 4; // 0x4
|
||||
field public static final int CALL_STATUS_ERROR_UNKNOWN = -2147483648; // 0x80000000
|
||||
field public static final int CALL_STATUS_INVALID_OPERATION = 1; // 0x1
|
||||
field public static final int CALL_STATUS_NO_DRM_SCHEME = 6; // 0x6
|
||||
field public static final int CALL_STATUS_NO_ERROR = 0; // 0x0
|
||||
field public static final int CALL_STATUS_PERMISSION_DENIED = 3; // 0x3
|
||||
field public static final int CALL_STATUS_SKIPPED = 5; // 0x5
|
||||
field public static final int MEDIA_ERROR_IO = -1004; // 0xfffffc14
|
||||
field public static final int MEDIA_ERROR_MALFORMED = -1007; // 0xfffffc11
|
||||
field public static final int MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK = 200; // 0xc8
|
||||
field public static final int MEDIA_ERROR_TIMED_OUT = -110; // 0xffffff92
|
||||
field public static final int MEDIA_ERROR_UNKNOWN = 1; // 0x1
|
||||
field public static final int MEDIA_ERROR_UNSUPPORTED = -1010; // 0xfffffc0e
|
||||
field public static final int MEDIA_INFO_AUDIO_NOT_PLAYING = 804; // 0x324
|
||||
field public static final int MEDIA_INFO_AUDIO_RENDERING_START = 4; // 0x4
|
||||
field public static final int MEDIA_INFO_BAD_INTERLEAVING = 800; // 0x320
|
||||
field public static final int MEDIA_INFO_BUFFERING_END = 702; // 0x2be
|
||||
field public static final int MEDIA_INFO_BUFFERING_START = 701; // 0x2bd
|
||||
field public static final int MEDIA_INFO_BUFFERING_UPDATE = 704; // 0x2c0
|
||||
field public static final int MEDIA_INFO_DATA_SOURCE_END = 5; // 0x5
|
||||
field public static final int MEDIA_INFO_DATA_SOURCE_LIST_END = 6; // 0x6
|
||||
field public static final int MEDIA_INFO_DATA_SOURCE_REPEAT = 7; // 0x7
|
||||
field public static final int MEDIA_INFO_DATA_SOURCE_START = 2; // 0x2
|
||||
field public static final int MEDIA_INFO_METADATA_UPDATE = 802; // 0x322
|
||||
field public static final int MEDIA_INFO_NOT_SEEKABLE = 801; // 0x321
|
||||
field public static final int MEDIA_INFO_PREPARED = 100; // 0x64
|
||||
field public static final int MEDIA_INFO_SUBTITLE_TIMED_OUT = 902; // 0x386
|
||||
field public static final int MEDIA_INFO_UNKNOWN = 1; // 0x1
|
||||
field public static final int MEDIA_INFO_UNSUPPORTED_SUBTITLE = 901; // 0x385
|
||||
field public static final int MEDIA_INFO_VIDEO_NOT_PLAYING = 805; // 0x325
|
||||
field public static final int MEDIA_INFO_VIDEO_RENDERING_START = 3; // 0x3
|
||||
field public static final int MEDIA_INFO_VIDEO_TRACK_LAGGING = 700; // 0x2bc
|
||||
field public static final int PLAYER_STATE_ERROR = 1005; // 0x3ed
|
||||
field public static final int PLAYER_STATE_IDLE = 1001; // 0x3e9
|
||||
field public static final int PLAYER_STATE_PAUSED = 1003; // 0x3eb
|
||||
field public static final int PLAYER_STATE_PLAYING = 1004; // 0x3ec
|
||||
field public static final int PLAYER_STATE_PREPARED = 1002; // 0x3ea
|
||||
field public static final int SEEK_CLOSEST = 3; // 0x3
|
||||
field public static final int SEEK_CLOSEST_SYNC = 2; // 0x2
|
||||
field public static final int SEEK_NEXT_SYNC = 1; // 0x1
|
||||
field public static final int SEEK_PREVIOUS_SYNC = 0; // 0x0
|
||||
}
|
||||
|
||||
public static class MediaPlayer2.EventCallback {
|
||||
ctor public MediaPlayer2.EventCallback();
|
||||
method public void onCallCompleted(android.media.MediaPlayer2, android.media.DataSourceDesc, int, int);
|
||||
method public void onCommandLabelReached(android.media.MediaPlayer2, java.lang.Object);
|
||||
method public void onError(android.media.MediaPlayer2, android.media.DataSourceDesc, int, int);
|
||||
method public void onInfo(android.media.MediaPlayer2, android.media.DataSourceDesc, int, int);
|
||||
method public void onMediaTimeDiscontinuity(android.media.MediaPlayer2, android.media.DataSourceDesc, android.media.MediaTimestamp);
|
||||
method public void onSubtitleData(android.media.MediaPlayer2, android.media.DataSourceDesc, android.media.SubtitleData);
|
||||
method public void onTimedMetaDataAvailable(android.media.MediaPlayer2, android.media.DataSourceDesc, android.media.TimedMetaData);
|
||||
method public void onVideoSizeChanged(android.media.MediaPlayer2, android.media.DataSourceDesc, android.media.VideoSize);
|
||||
}
|
||||
|
||||
public static final class MediaPlayer2.MetricsConstants {
|
||||
field public static final java.lang.String CODEC_AUDIO = "android.media.mediaplayer.audio.codec";
|
||||
field public static final java.lang.String CODEC_VIDEO = "android.media.mediaplayer.video.codec";
|
||||
field public static final java.lang.String DURATION = "android.media.mediaplayer.durationMs";
|
||||
field public static final java.lang.String ERRORS = "android.media.mediaplayer.err";
|
||||
field public static final java.lang.String ERROR_CODE = "android.media.mediaplayer.errcode";
|
||||
field public static final java.lang.String FRAMES = "android.media.mediaplayer.frames";
|
||||
field public static final java.lang.String FRAMES_DROPPED = "android.media.mediaplayer.dropped";
|
||||
field public static final java.lang.String HEIGHT = "android.media.mediaplayer.height";
|
||||
field public static final java.lang.String MIME_TYPE_AUDIO = "android.media.mediaplayer.audio.mime";
|
||||
field public static final java.lang.String MIME_TYPE_VIDEO = "android.media.mediaplayer.video.mime";
|
||||
field public static final java.lang.String PLAYING = "android.media.mediaplayer.playingMs";
|
||||
field public static final java.lang.String WIDTH = "android.media.mediaplayer.width";
|
||||
}
|
||||
|
||||
public static class MediaPlayer2.TrackInfo {
|
||||
method public android.media.MediaFormat getFormat();
|
||||
method public java.lang.String getLanguage();
|
||||
method public int getTrackType();
|
||||
field public static final int MEDIA_TRACK_TYPE_AUDIO = 2; // 0x2
|
||||
field public static final int MEDIA_TRACK_TYPE_METADATA = 5; // 0x5
|
||||
field public static final int MEDIA_TRACK_TYPE_SUBTITLE = 4; // 0x4
|
||||
field public static final int MEDIA_TRACK_TYPE_UNKNOWN = 0; // 0x0
|
||||
field public static final int MEDIA_TRACK_TYPE_VIDEO = 1; // 0x1
|
||||
}
|
||||
|
||||
public class MediaRecorder implements android.media.AudioRouting {
|
||||
ctor public MediaRecorder();
|
||||
method public void addOnRoutingChangedListener(android.media.AudioRouting.OnRoutingChangedListener, android.os.Handler);
|
||||
@@ -25818,6 +26024,26 @@ package android.media {
|
||||
ctor public UnsupportedSchemeException(java.lang.String);
|
||||
}
|
||||
|
||||
public class UriDataSourceDesc extends android.media.DataSourceDesc {
|
||||
method public android.content.Context getContext();
|
||||
method public java.util.List<java.net.HttpCookie> getCookies();
|
||||
method public java.util.Map<java.lang.String, java.lang.String> getHeaders();
|
||||
method public android.net.Uri getUri();
|
||||
}
|
||||
|
||||
public static class UriDataSourceDesc.Builder extends android.media.DataSourceDesc.BuilderBase {
|
||||
ctor public UriDataSourceDesc.Builder();
|
||||
ctor public UriDataSourceDesc.Builder(android.media.UriDataSourceDesc);
|
||||
method public android.media.UriDataSourceDesc build();
|
||||
method public android.media.UriDataSourceDesc.Builder setDataSource(android.content.Context, android.net.Uri);
|
||||
method public android.media.UriDataSourceDesc.Builder setDataSource(android.content.Context, android.net.Uri, java.util.Map<java.lang.String, java.lang.String>, java.util.List<java.net.HttpCookie>);
|
||||
}
|
||||
|
||||
public final class VideoSize {
|
||||
method public int getHeight();
|
||||
method public int getWidth();
|
||||
}
|
||||
|
||||
public abstract interface VolumeAutomation {
|
||||
method public abstract android.media.VolumeShaper createVolumeShaper(android.media.VolumeShaper.Configuration);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ package android.media;
|
||||
import android.annotation.NonNull;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
* Structure of data source descriptor for sources using callback.
|
||||
*
|
||||
* Used by {@link MediaPlayer2#setDataSource(DataSourceDesc)},
|
||||
|
||||
@@ -21,7 +21,6 @@ import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
* For supplying media data to the framework. Implement this if your app has
|
||||
* special requirements for the way media data is obtained.
|
||||
*
|
||||
|
||||
@@ -19,7 +19,6 @@ package android.media;
|
||||
import android.annotation.NonNull;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
* Base class of data source descriptor.
|
||||
*
|
||||
* Used by {@link MediaPlayer2#setDataSource(DataSourceDesc)},
|
||||
@@ -36,6 +35,9 @@ public class DataSourceDesc {
|
||||
|
||||
// keep consistent with native code
|
||||
public static final long LONG_MAX_TIME_MS = LONG_MAX / 1000;
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public static final long LONG_MAX_TIME_US = LONG_MAX_TIME_MS * 1000;
|
||||
|
||||
public static final long POSITION_UNKNOWN = LONG_MAX_TIME_MS;
|
||||
@@ -172,7 +174,8 @@ public class DataSourceDesc {
|
||||
|
||||
/**
|
||||
* Sets the end position in milliseconds at which the playback will end.
|
||||
* Any negative number is treated as maximum length of the data source.
|
||||
* Any negative number is treated as maximum duration {@link #LONG_MAX_TIME_MS}
|
||||
* of the data source
|
||||
*
|
||||
* @param position the end position in milliseconds at which the playback will end
|
||||
* @return the same Builder instance.
|
||||
|
||||
@@ -23,7 +23,6 @@ import android.util.Log;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
* Structure of data source descriptor for sources using file descriptor.
|
||||
*
|
||||
* Used by {@link MediaPlayer2#setDataSource(DataSourceDesc)},
|
||||
|
||||
@@ -21,9 +21,6 @@ import android.annotation.IntDef;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.annotation.StringDef;
|
||||
import android.annotation.UnsupportedAppUsage;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.ActivityManager.RunningAppProcessInfo;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.res.AssetFileDescriptor;
|
||||
@@ -81,8 +78,6 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*
|
||||
* MediaPlayer2 class can be used to control playback of audio/video files and streams.
|
||||
*
|
||||
* <p>Topics covered here are:
|
||||
@@ -776,7 +771,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
*
|
||||
* @return the current DataSourceDesc
|
||||
*/
|
||||
public DataSourceDesc getCurrentDataSource() {
|
||||
public @Nullable DataSourceDesc getCurrentDataSource() {
|
||||
synchronized (mSrcLock) {
|
||||
return mCurrentSourceInfo == null ? null : mCurrentSourceInfo.mDSD;
|
||||
}
|
||||
@@ -1252,19 +1247,18 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
*
|
||||
* <p>This function has the MediaPlayer2 access the low-level power manager
|
||||
* service to control the device's power usage while playing is occurring.
|
||||
* The parameter is a combination of {@link android.os.PowerManager} wake flags.
|
||||
* The parameter is a {@link android.os.PowerManager.WakeLock}.
|
||||
* Use of this method requires {@link android.Manifest.permission#WAKE_LOCK}
|
||||
* permission.
|
||||
* By default, no attempt is made to keep the device awake during playback.
|
||||
*
|
||||
* @param context the Context to use
|
||||
* @param mode the power/wake mode to set
|
||||
* @param wakeLock the power wake lock used during playback.
|
||||
* @return a token which can be used to cancel the operation later with {@link #cancelCommand}.
|
||||
* @see android.os.PowerManager
|
||||
*/
|
||||
// This is an asynchronous call.
|
||||
public Object setWakeMode(Context context, int mode) {
|
||||
return addTask(new Task(CALL_COMPLETED_SET_WAKE_MODE, false) {
|
||||
public Object setWakeLock(@NonNull PowerManager.WakeLock wakeLock) {
|
||||
return addTask(new Task(CALL_COMPLETED_SET_WAKE_LOCK, false) {
|
||||
@Override
|
||||
void process() {
|
||||
boolean washeld = false;
|
||||
@@ -1274,28 +1268,15 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
washeld = true;
|
||||
mWakeLock.release();
|
||||
}
|
||||
mWakeLock = null;
|
||||
}
|
||||
|
||||
PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
|
||||
ActivityManager am =
|
||||
(ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
|
||||
List<RunningAppProcessInfo> runningAppsProcInfo = am.getRunningAppProcesses();
|
||||
int pid = android.os.Process.myPid();
|
||||
String name = "pid " + String.valueOf(pid);
|
||||
if (runningAppsProcInfo != null) {
|
||||
for (RunningAppProcessInfo procInfo : runningAppsProcInfo) {
|
||||
if (procInfo.pid == pid) {
|
||||
name = procInfo.processName;
|
||||
break;
|
||||
}
|
||||
mWakeLock = wakeLock;
|
||||
if (mWakeLock != null) {
|
||||
mWakeLock.setReferenceCounted(false);
|
||||
if (washeld) {
|
||||
mWakeLock.acquire();
|
||||
}
|
||||
}
|
||||
mWakeLock = pm.newWakeLock(mode | PowerManager.ON_AFTER_RELEASE, name);
|
||||
mWakeLock.setReferenceCounted(false);
|
||||
if (washeld) {
|
||||
mWakeLock.acquire();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1303,7 +1284,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
/**
|
||||
* Control whether we should use the attached SurfaceHolder to keep the
|
||||
* screen on while video playback is occurring. This is the preferred
|
||||
* method over {@link #setWakeMode} where possible, since it doesn't
|
||||
* method over {@link #setWakeLock} where possible, since it doesn't
|
||||
* require that the application have permission for low-level wake lock
|
||||
* access.
|
||||
*
|
||||
@@ -1350,9 +1331,13 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
*
|
||||
* @param token the command to be canceled. This is the returned Object when command is issued.
|
||||
* @return {@code false} if the task could not be cancelled; {@code true} otherwise.
|
||||
* @throws IllegalArgumentException if argument token is null.
|
||||
*/
|
||||
// This is a synchronous call.
|
||||
public boolean cancelCommand(Object token) {
|
||||
public boolean cancelCommand(@NonNull Object token) {
|
||||
if (token == null) {
|
||||
throw new IllegalArgumentException("command token should not be null");
|
||||
}
|
||||
synchronized (mTaskLock) {
|
||||
return mPendingTasks.remove(token);
|
||||
}
|
||||
@@ -1891,7 +1876,6 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* Gets the track type.
|
||||
* @return TrackType which indicates if the track is video, audio, timed text.
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
public int getTrackType() {
|
||||
return mTrackType;
|
||||
}
|
||||
@@ -1902,7 +1886,6 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* When the language is unknown or could not be determined,
|
||||
* ISO-639-2 language code, "und", is returned.
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
public String getLanguage() {
|
||||
String language = mFormat.getString(MediaFormat.KEY_LANGUAGE);
|
||||
return language == null ? "und" : language;
|
||||
@@ -1933,19 +1916,20 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
final int mTrackType;
|
||||
final MediaFormat mFormat;
|
||||
|
||||
TrackInfo(Iterator<Value> in) {
|
||||
mTrackType = in.next().getInt32Value();
|
||||
static TrackInfo create(Iterator<Value> in) {
|
||||
int trackType = in.next().getInt32Value();
|
||||
// TODO: build the full MediaFormat; currently we are using createSubtitleFormat
|
||||
// even for audio/video tracks, meaning we only set the mime and language.
|
||||
String mime = in.next().getStringValue();
|
||||
String language = in.next().getStringValue();
|
||||
mFormat = MediaFormat.createSubtitleFormat(mime, language);
|
||||
MediaFormat format = MediaFormat.createSubtitleFormat(mime, language);
|
||||
|
||||
if (mTrackType == MEDIA_TRACK_TYPE_SUBTITLE) {
|
||||
mFormat.setInteger(MediaFormat.KEY_IS_AUTOSELECT, in.next().getInt32Value());
|
||||
mFormat.setInteger(MediaFormat.KEY_IS_DEFAULT, in.next().getInt32Value());
|
||||
mFormat.setInteger(MediaFormat.KEY_IS_FORCED_SUBTITLE, in.next().getInt32Value());
|
||||
if (trackType == MEDIA_TRACK_TYPE_SUBTITLE) {
|
||||
format.setInteger(MediaFormat.KEY_IS_AUTOSELECT, in.next().getInt32Value());
|
||||
format.setInteger(MediaFormat.KEY_IS_DEFAULT, in.next().getInt32Value());
|
||||
format.setInteger(MediaFormat.KEY_IS_FORCED_SUBTITLE, in.next().getInt32Value());
|
||||
}
|
||||
return new TrackInfo(trackType, format);
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@@ -1990,9 +1974,9 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* addTimedTextSource method is called.
|
||||
* @throws IllegalStateException if it is called in an invalid state.
|
||||
*/
|
||||
public List<TrackInfo> getTrackInfo() {
|
||||
public @NonNull List<TrackInfo> getTrackInfo() {
|
||||
TrackInfo[] trackInfo = getInbandTrackInfo();
|
||||
return Arrays.asList(trackInfo);
|
||||
return (trackInfo != null ? Arrays.asList(trackInfo) : new ArrayList<TrackInfo>(0));
|
||||
}
|
||||
|
||||
private TrackInfo[] getInbandTrackInfo() throws IllegalStateException {
|
||||
@@ -2010,7 +1994,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
}
|
||||
TrackInfo[] trackInfo = new TrackInfo[size];
|
||||
for (int i = 0; i < size; ++i) {
|
||||
trackInfo[i] = new TrackInfo(in);
|
||||
trackInfo[i] = TrackInfo.create(in);
|
||||
}
|
||||
return trackInfo;
|
||||
}
|
||||
@@ -2505,7 +2489,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
Log.w(TAG, "MEDIA_DRM_INFO failed to parse msg.obj " + obj);
|
||||
break;
|
||||
}
|
||||
DrmInfo drmInfo = new DrmInfo(playerMsg);
|
||||
DrmInfo drmInfo = DrmInfo.create(playerMsg);
|
||||
synchronized (sourceInfo) {
|
||||
sourceInfo.mDrmInfo = drmInfo;
|
||||
}
|
||||
@@ -2556,7 +2540,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* @param size the size of the video
|
||||
*/
|
||||
public void onVideoSizeChanged(
|
||||
MediaPlayer2 mp, DataSourceDesc dsd, VideoSize size) { }
|
||||
@NonNull MediaPlayer2 mp, @NonNull DataSourceDesc dsd, @NonNull VideoSize size) { }
|
||||
|
||||
/**
|
||||
* Called to indicate an avaliable timed text
|
||||
@@ -2567,7 +2551,8 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* needed to be displayed and the display format.
|
||||
* @hide
|
||||
*/
|
||||
public void onTimedText(MediaPlayer2 mp, DataSourceDesc dsd, TimedText text) { }
|
||||
public void onTimedText(
|
||||
@NonNull MediaPlayer2 mp, @NonNull DataSourceDesc dsd, @NonNull TimedText text) { }
|
||||
|
||||
/**
|
||||
* Called to indicate avaliable timed metadata
|
||||
@@ -2588,7 +2573,8 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* @param data the timed metadata sample associated with this event
|
||||
*/
|
||||
public void onTimedMetaDataAvailable(
|
||||
MediaPlayer2 mp, DataSourceDesc dsd, TimedMetaData data) { }
|
||||
@NonNull MediaPlayer2 mp, @NonNull DataSourceDesc dsd,
|
||||
@NonNull TimedMetaData data) { }
|
||||
|
||||
/**
|
||||
* Called to indicate an error.
|
||||
@@ -2600,7 +2586,8 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* implementation dependent.
|
||||
*/
|
||||
public void onError(
|
||||
MediaPlayer2 mp, DataSourceDesc dsd, @MediaError int what, int extra) { }
|
||||
@NonNull MediaPlayer2 mp, @NonNull DataSourceDesc dsd,
|
||||
@MediaError int what, int extra) { }
|
||||
|
||||
/**
|
||||
* Called to indicate an info or a warning.
|
||||
@@ -2611,7 +2598,9 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* @param extra an extra code, specific to the info. Typically
|
||||
* implementation dependent.
|
||||
*/
|
||||
public void onInfo(MediaPlayer2 mp, DataSourceDesc dsd, @MediaInfo int what, int extra) { }
|
||||
public void onInfo(
|
||||
@NonNull MediaPlayer2 mp, @NonNull DataSourceDesc dsd,
|
||||
@MediaInfo int what, int extra) { }
|
||||
|
||||
/**
|
||||
* Called to acknowledge an API call.
|
||||
@@ -2622,7 +2611,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* @param status the returned status code for the call.
|
||||
*/
|
||||
public void onCallCompleted(
|
||||
MediaPlayer2 mp, DataSourceDesc dsd, @CallCompleted int what,
|
||||
@NonNull MediaPlayer2 mp, @NonNull DataSourceDesc dsd, @CallCompleted int what,
|
||||
@CallStatus int status) { }
|
||||
|
||||
/**
|
||||
@@ -2633,7 +2622,8 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* @param timestamp the new media clock.
|
||||
*/
|
||||
public void onMediaTimeDiscontinuity(
|
||||
MediaPlayer2 mp, DataSourceDesc dsd, MediaTimestamp timestamp) { }
|
||||
@NonNull MediaPlayer2 mp, @NonNull DataSourceDesc dsd,
|
||||
@NonNull MediaTimestamp timestamp) { }
|
||||
|
||||
/**
|
||||
* Called to indicate {@link #notifyWhenCommandLabelReached(Object)} has been processed.
|
||||
@@ -2642,7 +2632,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* @param label the application specific Object given by
|
||||
* {@link #notifyWhenCommandLabelReached(Object)}.
|
||||
*/
|
||||
public void onCommandLabelReached(MediaPlayer2 mp, @NonNull Object label) { }
|
||||
public void onCommandLabelReached(@NonNull MediaPlayer2 mp, @NonNull Object label) { }
|
||||
|
||||
/**
|
||||
* Called when when a player subtitle track has new subtitle data available.
|
||||
@@ -2651,7 +2641,8 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* @param data the subtitle data
|
||||
*/
|
||||
public void onSubtitleData(
|
||||
MediaPlayer2 mp, DataSourceDesc dsd, @NonNull SubtitleData data) { }
|
||||
@NonNull MediaPlayer2 mp, @NonNull DataSourceDesc dsd,
|
||||
@NonNull SubtitleData data) { }
|
||||
}
|
||||
|
||||
private final Object mEventCbLock = new Object();
|
||||
@@ -3046,10 +3037,10 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
*/
|
||||
public static final int CALL_COMPLETED_SET_DISPLAY = 33;
|
||||
|
||||
/** The player just completed a call {@link #setWakeMode}.
|
||||
/** The player just completed a call {@link #setWakeLock}.
|
||||
* @see EventCallback#onCallCompleted
|
||||
*/
|
||||
public static final int CALL_COMPLETED_SET_WAKE_MODE = 34;
|
||||
public static final int CALL_COMPLETED_SET_WAKE_LOCK = 34;
|
||||
|
||||
/** The player just completed a call {@link #setScreenOnWhilePlaying}.
|
||||
* @see EventCallback#onCallCompleted
|
||||
@@ -3102,7 +3093,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
CALL_COMPLETED_CLEAR_NEXT_DATA_SOURCES,
|
||||
CALL_COMPLETED_SET_BUFFERING_PARAMS,
|
||||
CALL_COMPLETED_SET_DISPLAY,
|
||||
CALL_COMPLETED_SET_WAKE_MODE,
|
||||
CALL_COMPLETED_SET_WAKE_LOCK,
|
||||
CALL_COMPLETED_SET_SCREEN_ON_WHILE_PLAYING,
|
||||
CALL_COMPLETED_NOTIFY_WHEN_COMMAND_LABEL_REACHED,
|
||||
CALL_COMPLETED_PREPARE_DRM,
|
||||
@@ -3179,6 +3170,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* The only allowed DRM calls in this listener are
|
||||
* {@link MediaPlayer2#getDrmPropertyString(DataSourceDesc, String)}
|
||||
* and {@link MediaPlayer2#setDrmPropertyString(DataSourceDesc, String, String)}.
|
||||
* @hide
|
||||
*/
|
||||
public interface OnDrmConfigHelper {
|
||||
/**
|
||||
@@ -3197,6 +3189,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* of {@link #prepareDrm(DataSourceDesc, UUID)}.
|
||||
*
|
||||
* @param listener the callback that will be run
|
||||
* @hide
|
||||
*/
|
||||
// This is a synchronous call.
|
||||
public void setOnDrmConfigHelper(OnDrmConfigHelper listener) {
|
||||
@@ -3208,6 +3201,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
/**
|
||||
* Interface definition for callbacks to be invoked when the player has the corresponding
|
||||
* DRM events.
|
||||
* @hide
|
||||
*/
|
||||
public static class DrmEventCallback {
|
||||
/**
|
||||
@@ -3241,6 +3235,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
*
|
||||
* @param eventCallback the callback that will be run
|
||||
* @param executor the executor through which the callback should be invoked
|
||||
* @hide
|
||||
*/
|
||||
// This is a synchronous call.
|
||||
public void registerDrmEventCallback(@NonNull @CallbackExecutor Executor executor,
|
||||
@@ -3261,6 +3256,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* Unregisters the {@link DrmEventCallback}.
|
||||
*
|
||||
* @param eventCallback the callback to be unregistered
|
||||
* @hide
|
||||
*/
|
||||
// This is a synchronous call.
|
||||
public void unregisterDrmEventCallback(DrmEventCallback eventCallback) {
|
||||
@@ -3278,31 +3274,37 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* <p>
|
||||
*
|
||||
* DRM preparation has succeeded.
|
||||
* @hide
|
||||
*/
|
||||
public static final int PREPARE_DRM_STATUS_SUCCESS = 0;
|
||||
|
||||
/**
|
||||
* The device required DRM provisioning but couldn't reach the provisioning server.
|
||||
* @hide
|
||||
*/
|
||||
public static final int PREPARE_DRM_STATUS_PROVISIONING_NETWORK_ERROR = 1;
|
||||
|
||||
/**
|
||||
* The device required DRM provisioning but the provisioning server denied the request.
|
||||
* @hide
|
||||
*/
|
||||
public static final int PREPARE_DRM_STATUS_PROVISIONING_SERVER_ERROR = 2;
|
||||
|
||||
/**
|
||||
* The DRM preparation has failed .
|
||||
* @hide
|
||||
*/
|
||||
public static final int PREPARE_DRM_STATUS_PREPARATION_ERROR = 3;
|
||||
|
||||
/**
|
||||
* The crypto scheme UUID is not supported by the device.
|
||||
* @hide
|
||||
*/
|
||||
public static final int PREPARE_DRM_STATUS_UNSUPPORTED_SCHEME = 4;
|
||||
|
||||
/**
|
||||
* The hardware resources are not available, due to being in use.
|
||||
* @hide
|
||||
*/
|
||||
public static final int PREPARE_DRM_STATUS_RESOURCE_BUSY = 5;
|
||||
|
||||
@@ -3343,6 +3345,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* @param dsd The DRM protected data source
|
||||
*
|
||||
* @throws IllegalStateException if called before being prepared
|
||||
* @hide
|
||||
*/
|
||||
public DrmInfo getDrmInfo(@NonNull DataSourceDesc dsd) {
|
||||
final SourceInfo sourceInfo = getSourceInfo(dsd);
|
||||
@@ -3398,6 +3401,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* {@link DrmEventCallback#onDrmInfo}.
|
||||
*
|
||||
* @return a token which can be used to cancel the operation later with {@link #cancelCommand}.
|
||||
* @hide
|
||||
*/
|
||||
// This is an asynchronous call.
|
||||
public Object prepareDrm(@NonNull DataSourceDesc dsd, @NonNull UUID uuid) {
|
||||
@@ -3491,6 +3495,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* @param dsd The DRM protected data source
|
||||
*
|
||||
* @throws NoDrmSchemeException if there is no active DRM session to release
|
||||
* @hide
|
||||
*/
|
||||
// This is a synchronous call.
|
||||
public void releaseDrm(@NonNull DataSourceDesc dsd)
|
||||
@@ -3541,6 +3546,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* This may be {@code null} if no additional parameters are to be sent.
|
||||
*
|
||||
* @throws NoDrmSchemeException if there is no active DRM session
|
||||
* @hide
|
||||
*/
|
||||
public MediaDrm.KeyRequest getDrmKeyRequest(
|
||||
@NonNull DataSourceDesc dsd,
|
||||
@@ -3581,6 +3587,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* @throws NoDrmSchemeException if there is no active DRM session
|
||||
* @throws DeniedByServerException if the response indicates that the
|
||||
* server rejected the request
|
||||
* @hide
|
||||
*/
|
||||
// This is a synchronous call.
|
||||
public byte[] provideDrmKeyResponse(
|
||||
@@ -3606,6 +3613,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* @param keySetId identifies the saved key set to restore
|
||||
*
|
||||
* @throws NoDrmSchemeException if there is no active DRM session
|
||||
* @hide
|
||||
*/
|
||||
// This is a synchronous call.
|
||||
public void restoreDrmKeys(
|
||||
@@ -3633,6 +3641,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* {@link MediaDrm#PROPERTY_DESCRIPTION}, {@link MediaDrm#PROPERTY_ALGORITHMS}
|
||||
*
|
||||
* @throws NoDrmSchemeException if there is no active DRM session
|
||||
* @hide
|
||||
*/
|
||||
public String getDrmPropertyString(
|
||||
@NonNull DataSourceDesc dsd,
|
||||
@@ -3659,6 +3668,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* {@link MediaDrm#PROPERTY_DESCRIPTION}, {@link MediaDrm#PROPERTY_ALGORITHMS}
|
||||
*
|
||||
* @throws NoDrmSchemeException if there is no active DRM session
|
||||
* @hide
|
||||
*/
|
||||
// This is a synchronous call.
|
||||
public void setDrmPropertyString(
|
||||
@@ -3676,6 +3686,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
|
||||
/**
|
||||
* Encapsulates the DRM properties of the source.
|
||||
* @hide
|
||||
*/
|
||||
public static final class DrmInfo {
|
||||
private Map<UUID, byte[]> mMapPssh;
|
||||
@@ -3702,36 +3713,37 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
mSupportedSchemes = supportedSchemes;
|
||||
}
|
||||
|
||||
private DrmInfo(PlayerMessage msg) {
|
||||
Log.v(TAG, "DrmInfo(" + msg + ")");
|
||||
private static DrmInfo create(PlayerMessage msg) {
|
||||
Log.v(TAG, "DrmInfo.create(" + msg + ")");
|
||||
|
||||
Iterator<Value> in = msg.getValuesList().iterator();
|
||||
byte[] pssh = in.next().getBytesValue().toByteArray();
|
||||
|
||||
Log.v(TAG, "DrmInfo() PSSH: " + arrToHex(pssh));
|
||||
mMapPssh = parsePSSH(pssh, pssh.length);
|
||||
Log.v(TAG, "DrmInfo() PSSH: " + mMapPssh);
|
||||
Log.v(TAG, "DrmInfo.create() PSSH: " + DrmInfo.arrToHex(pssh));
|
||||
Map<UUID, byte[]> mapPssh = DrmInfo.parsePSSH(pssh, pssh.length);
|
||||
Log.v(TAG, "DrmInfo.create() PSSH: " + mapPssh);
|
||||
|
||||
int supportedDRMsCount = in.next().getInt32Value();
|
||||
mSupportedSchemes = new UUID[supportedDRMsCount];
|
||||
UUID[] supportedSchemes = new UUID[supportedDRMsCount];
|
||||
for (int i = 0; i < supportedDRMsCount; i++) {
|
||||
byte[] uuid = new byte[16];
|
||||
in.next().getBytesValue().copyTo(uuid, 0);
|
||||
|
||||
mSupportedSchemes[i] = bytesToUUID(uuid);
|
||||
supportedSchemes[i] = DrmInfo.bytesToUUID(uuid);
|
||||
|
||||
Log.v(TAG, "DrmInfo() supportedScheme[" + i + "]: " + mSupportedSchemes[i]);
|
||||
Log.v(TAG, "DrmInfo() supportedScheme[" + i + "]: " + supportedSchemes[i]);
|
||||
}
|
||||
|
||||
Log.v(TAG, "DrmInfo() psshsize: " + pssh.length
|
||||
Log.v(TAG, "DrmInfo.create() psshsize: " + pssh.length
|
||||
+ " supportedDRMsCount: " + supportedDRMsCount);
|
||||
return new DrmInfo(mapPssh, supportedSchemes);
|
||||
}
|
||||
|
||||
private DrmInfo makeCopy() {
|
||||
return new DrmInfo(this.mMapPssh, this.mSupportedSchemes);
|
||||
}
|
||||
|
||||
private String arrToHex(byte[] bytes) {
|
||||
private static String arrToHex(byte[] bytes) {
|
||||
String out = "0x";
|
||||
for (int i = 0; i < bytes.length; i++) {
|
||||
out += String.format("%02x", bytes[i]);
|
||||
@@ -3740,7 +3752,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
return out;
|
||||
}
|
||||
|
||||
private UUID bytesToUUID(byte[] uuid) {
|
||||
private static UUID bytesToUUID(byte[] uuid) {
|
||||
long msb = 0, lsb = 0;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
msb |= (((long) uuid[i] & 0xff) << (8 * (7 - i)));
|
||||
@@ -3750,7 +3762,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
return new UUID(msb, lsb);
|
||||
}
|
||||
|
||||
private Map<UUID, byte[]> parsePSSH(byte[] pssh, int psshsize) {
|
||||
private static Map<UUID, byte[]> parsePSSH(byte[] pssh, int psshsize) {
|
||||
Map<UUID, byte[]> result = new HashMap<UUID, byte[]>();
|
||||
|
||||
final int uuidSize = 16;
|
||||
@@ -3814,6 +3826,7 @@ public class MediaPlayer2 implements AutoCloseable
|
||||
* Thrown when a DRM method is called before preparing a DRM scheme through
|
||||
* {@link MediaPlayer2#prepareDrm(DataSourceDesc, UUID)}.
|
||||
* Extends MediaDrm.MediaDrmException
|
||||
* @hide
|
||||
*/
|
||||
public static final class NoDrmSchemeException extends MediaDrmException {
|
||||
public NoDrmSchemeException(String detailMessage) {
|
||||
|
||||
@@ -30,7 +30,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
* Structure of data source descriptor for sources using URI.
|
||||
*
|
||||
* Used by {@link MediaPlayer2#setDataSource(DataSourceDesc)},
|
||||
|
||||
@@ -18,8 +18,6 @@ package android.media;
|
||||
|
||||
/**
|
||||
* Immutable class for describing width and height dimensions.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public final class VideoSize {
|
||||
/**
|
||||
@@ -28,7 +26,7 @@ public final class VideoSize {
|
||||
* @param width The width of the video size
|
||||
* @param height The height of the video size
|
||||
*/
|
||||
public VideoSize(int width, int height) {
|
||||
VideoSize(int width, int height) {
|
||||
mWidth = width;
|
||||
mHeight = height;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user