rename SERVICE_ACTION to SERVICE_INTERFACE
For API consistency this intent is suppose to be named SERVICE_INTERFACE. bug:17390782 Change-Id: I4c3b1d8476dd6c939792f73615e92d7bfa6d5758
This commit is contained in:
@@ -27056,7 +27056,7 @@ package android.service.media {
|
||||
method public abstract android.service.media.MediaBrowserService.BrowserRoot onGetRoot(java.lang.String, int, android.os.Bundle);
|
||||
method public abstract void onLoadChildren(java.lang.String, android.service.media.MediaBrowserService.Result<java.util.List<android.media.browse.MediaBrowser.MediaItem>>);
|
||||
method public void setSessionToken(android.media.session.MediaSession.Token);
|
||||
field public static final java.lang.String SERVICE_ACTION = "android.media.browse.MediaBrowserService";
|
||||
field public static final java.lang.String SERVICE_INTERFACE = "android.media.browse.MediaBrowserService";
|
||||
}
|
||||
|
||||
public static final class MediaBrowserService.BrowserRoot {
|
||||
|
||||
@@ -136,7 +136,7 @@ public final class MediaBrowser {
|
||||
|
||||
mState = CONNECT_STATE_CONNECTING;
|
||||
|
||||
final Intent intent = new Intent(MediaBrowserService.SERVICE_ACTION);
|
||||
final Intent intent = new Intent(MediaBrowserService.SERVICE_INTERFACE);
|
||||
intent.setComponent(mServiceComponent);
|
||||
|
||||
final ServiceConnection thisConnection = mServiceConnection = new MediaServiceConnection();
|
||||
|
||||
@@ -51,7 +51,7 @@ import java.util.List;
|
||||
* </p>
|
||||
*
|
||||
* To extend this class, you must declare the service in your manifest file with
|
||||
* an intent filter with the {@link #SERVICE_ACTION} action.
|
||||
* an intent filter with the {@link #SERVICE_INTERFACE} action.
|
||||
*
|
||||
* For example:
|
||||
* </p><pre>
|
||||
@@ -72,7 +72,7 @@ public abstract class MediaBrowserService extends Service {
|
||||
* The {@link Intent} that must be declared as handled by the service.
|
||||
*/
|
||||
@SdkConstant(SdkConstantType.SERVICE_ACTION)
|
||||
public static final String SERVICE_ACTION = "android.media.browse.MediaBrowserService";
|
||||
public static final String SERVICE_INTERFACE = "android.media.browse.MediaBrowserService";
|
||||
|
||||
private final ArrayMap<IBinder, ConnectionRecord> mConnections = new ArrayMap();
|
||||
private final Handler mHandler = new Handler();
|
||||
@@ -270,7 +270,7 @@ public abstract class MediaBrowserService extends Service {
|
||||
|
||||
@Override
|
||||
public IBinder onBind(Intent intent) {
|
||||
if (SERVICE_ACTION.equals(intent.getAction())) {
|
||||
if (SERVICE_INTERFACE.equals(intent.getAction())) {
|
||||
return mBinder;
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -94,7 +94,7 @@ public class AppListFragment extends ListFragment {
|
||||
|
||||
// Load the data
|
||||
final PackageManager pm = context.getPackageManager();
|
||||
final Intent intent = new Intent(MediaBrowserService.SERVICE_ACTION);
|
||||
final Intent intent = new Intent(MediaBrowserService.SERVICE_INTERFACE);
|
||||
final List<ResolveInfo> list = pm.queryIntentServices(intent, 0);
|
||||
final int N = list.size();
|
||||
mItems = new ArrayList(N);
|
||||
|
||||
Reference in New Issue
Block a user