Skip to content
Snippets Groups Projects
Commit eff708b4 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add MediaCommunicationManager#getVersion()" into sc-dev

parents 08078fe9 87e73461
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,7 @@ package android.media {
}
public class MediaCommunicationManager {
method @IntRange(from=1) public int getVersion();
}
public class MediaController2 implements java.lang.AutoCloseable {
......
......@@ -15,6 +15,7 @@
*/
package android.media;
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.SystemService;
import android.content.Context;
......@@ -30,6 +31,16 @@ import com.android.modules.utils.build.SdkLevel;
public class MediaCommunicationManager {
private static final String TAG = "MediaCommunicationManager";
/**
* The manager version used from beginning.
*/
private static final int VERSION_1 = 1;
/**
* Current manager version.
*/
private static final int CURRENT_VERSION = VERSION_1;
private final Context mContext;
private final IMediaCommunicationService mService;
......@@ -43,7 +54,14 @@ public class MediaCommunicationManager {
mContext = context;
mService = IMediaCommunicationService.Stub.asInterface(
MediaFrameworkInitializer.getMediaServiceManager()
.getMediaCommunicationServiceRegisterer()
.get());
.getMediaCommunicationServiceRegisterer()
.get());
}
/**
* Gets the version of this {@link MediaCommunicationManager}.
*/
public @IntRange(from = 1) int getVersion() {
return CURRENT_VERSION;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment