method public void removeCallback(android.media.MediaRouter.Callback);
method public void removeUserRoute(android.media.MediaRouter.UserRouteInfo);
method public void selectRoute(int, android.media.MediaRouter.RouteInfo);
- field public static final int CALLBACK_FLAG_ACTIVE_SCAN = 1; // 0x1
+ field public static final int CALLBACK_FLAG_PERFORM_ACTIVE_SCAN = 1; // 0x1
field public static final int CALLBACK_FLAG_UNFILTERED_EVENTS = 2; // 0x2
field public static final int ROUTE_TYPE_LIVE_AUDIO = 1; // 0x1
field public static final int ROUTE_TYPE_LIVE_VIDEO = 2; // 0x2
public void onAttach(Activity activity) {
super.onAttach(activity);
mRouter = (MediaRouter) activity.getSystemService(Context.MEDIA_ROUTER_SERVICE);
- mRouter.addCallback(mRouteTypes, mCallback, MediaRouter.CALLBACK_FLAG_ACTIVE_SCAN);
+ mRouter.addCallback(mRouteTypes, mCallback, MediaRouter.CALLBACK_FLAG_PERFORM_ACTIVE_SCAN);
}
@Override
final int count = mCallbacks.size();
for (int i = 0; i < count; i++) {
CallbackInfo cbi = mCallbacks.get(i);
- if ((cbi.flags & CALLBACK_FLAG_ACTIVE_SCAN) != 0
+ if ((cbi.flags & CALLBACK_FLAG_PERFORM_ACTIVE_SCAN) != 0
&& (cbi.type & type) != 0) {
return true;
}
* discover and select a new route.
* </p>
*/
- public static final int CALLBACK_FLAG_ACTIVE_SCAN = 1 << 0;
+ public static final int CALLBACK_FLAG_PERFORM_ACTIVE_SCAN = 1 << 0;
/**
* Flag for {@link #addCallback}: Do not filter route events.
* @param types Types of routes this callback is interested in
* @param cb Callback to add
* @param flags Flags to control the behavior of the callback.
- * May be zero or a combination of {@link #CALLBACK_FLAG_ACTIVE_SCAN} and
+ * May be zero or a combination of {@link #CALLBACK_FLAG_PERFORM_ACTIVE_SCAN} and
* {@link #CALLBACK_FLAG_UNFILTERED_EVENTS}.
*/
public void addCallback(int types, Callback cb, int flags) {
info = new CallbackInfo(cb, types, flags, this);
sStatic.mCallbacks.add(info);
}
- if ((info.flags & CALLBACK_FLAG_ACTIVE_SCAN) != 0) {
+ if ((info.flags & CALLBACK_FLAG_PERFORM_ACTIVE_SCAN) != 0) {
sStatic.updateActiveScan();
}
}
int index = findCallbackInfo(cb);
if (index >= 0) {
CallbackInfo info = sStatic.mCallbacks.remove(index);
- if ((info.flags & CALLBACK_FLAG_ACTIVE_SCAN) != 0) {
+ if ((info.flags & CALLBACK_FLAG_PERFORM_ACTIVE_SCAN) != 0) {
sStatic.updateActiveScan();
}
} else {