Merge "Flag new MediaRoute2Info types" into main
diff --git a/core/api/current.txt b/core/api/current.txt
index 7e3da22..7d51574 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -23842,14 +23842,14 @@
field @FlaggedApi("com.android.media.flags.enable_audio_policies_device_and_bluetooth_controller") public static final int TYPE_HDMI_EARC = 29; // 0x1d
field public static final int TYPE_HEARING_AID = 23; // 0x17
field public static final int TYPE_REMOTE_AUDIO_VIDEO_RECEIVER = 1003; // 0x3eb
- field public static final int TYPE_REMOTE_CAR = 1008; // 0x3f0
- field public static final int TYPE_REMOTE_COMPUTER = 1006; // 0x3ee
- field public static final int TYPE_REMOTE_GAME_CONSOLE = 1007; // 0x3ef
- field public static final int TYPE_REMOTE_SMARTPHONE = 1010; // 0x3f2
- field public static final int TYPE_REMOTE_SMARTWATCH = 1009; // 0x3f1
+ field @FlaggedApi("com.android.media.flags.enable_new_media_route_2_info_types") public static final int TYPE_REMOTE_CAR = 1008; // 0x3f0
+ field @FlaggedApi("com.android.media.flags.enable_new_media_route_2_info_types") public static final int TYPE_REMOTE_COMPUTER = 1006; // 0x3ee
+ field @FlaggedApi("com.android.media.flags.enable_new_media_route_2_info_types") public static final int TYPE_REMOTE_GAME_CONSOLE = 1007; // 0x3ef
+ field @FlaggedApi("com.android.media.flags.enable_new_media_route_2_info_types") public static final int TYPE_REMOTE_SMARTPHONE = 1010; // 0x3f2
+ field @FlaggedApi("com.android.media.flags.enable_new_media_route_2_info_types") public static final int TYPE_REMOTE_SMARTWATCH = 1009; // 0x3f1
field public static final int TYPE_REMOTE_SPEAKER = 1002; // 0x3ea
- field public static final int TYPE_REMOTE_TABLET = 1004; // 0x3ec
- field public static final int TYPE_REMOTE_TABLET_DOCKED = 1005; // 0x3ed
+ field @FlaggedApi("com.android.media.flags.enable_new_media_route_2_info_types") public static final int TYPE_REMOTE_TABLET = 1004; // 0x3ec
+ field @FlaggedApi("com.android.media.flags.enable_new_media_route_2_info_types") public static final int TYPE_REMOTE_TABLET_DOCKED = 1005; // 0x3ed
field public static final int TYPE_REMOTE_TV = 1001; // 0x3e9
field public static final int TYPE_UNKNOWN = 0; // 0x0
field public static final int TYPE_USB_ACCESSORY = 12; // 0xc
diff --git a/media/java/android/media/MediaRoute2Info.java b/media/java/android/media/MediaRoute2Info.java
index 937151b..8ad3587 100644
--- a/media/java/android/media/MediaRoute2Info.java
+++ b/media/java/android/media/MediaRoute2Info.java
@@ -19,6 +19,7 @@
import static android.media.MediaRouter2Utils.toUniqueId;
import static com.android.media.flags.Flags.FLAG_ENABLE_AUDIO_POLICIES_DEVICE_AND_BLUETOOTH_CONTROLLER;
+import static com.android.media.flags.Flags.FLAG_ENABLE_NEW_MEDIA_ROUTE_2_INFO_TYPES;
import android.annotation.FlaggedApi;
import android.annotation.IntDef;
@@ -306,6 +307,7 @@
*
* @see #getType
*/
+ @FlaggedApi(FLAG_ENABLE_NEW_MEDIA_ROUTE_2_INFO_TYPES)
public static final int TYPE_REMOTE_TABLET = 1004;
/**
@@ -316,6 +318,7 @@
*
* @see #getType
*/
+ @FlaggedApi(FLAG_ENABLE_NEW_MEDIA_ROUTE_2_INFO_TYPES)
public static final int TYPE_REMOTE_TABLET_DOCKED = 1005;
/**
@@ -326,6 +329,7 @@
*
* @see #getType
*/
+ @FlaggedApi(FLAG_ENABLE_NEW_MEDIA_ROUTE_2_INFO_TYPES)
public static final int TYPE_REMOTE_COMPUTER = 1006;
/**
@@ -336,6 +340,7 @@
*
* @see #getType
*/
+ @FlaggedApi(FLAG_ENABLE_NEW_MEDIA_ROUTE_2_INFO_TYPES)
public static final int TYPE_REMOTE_GAME_CONSOLE = 1007;
/**
@@ -346,6 +351,7 @@
*
* @see #getType
*/
+ @FlaggedApi(FLAG_ENABLE_NEW_MEDIA_ROUTE_2_INFO_TYPES)
public static final int TYPE_REMOTE_CAR = 1008;
/**
@@ -356,6 +362,7 @@
*
* @see #getType
*/
+ @FlaggedApi(FLAG_ENABLE_NEW_MEDIA_ROUTE_2_INFO_TYPES)
public static final int TYPE_REMOTE_SMARTWATCH = 1009;
/**
@@ -366,6 +373,7 @@
*
* @see #getType
*/
+ @FlaggedApi(FLAG_ENABLE_NEW_MEDIA_ROUTE_2_INFO_TYPES)
public static final int TYPE_REMOTE_SMARTPHONE = 1010;
/**
diff --git a/media/java/android/media/flags/media_better_together.aconfig b/media/java/android/media/flags/media_better_together.aconfig
index 386534b..dd1df47 100644
--- a/media/java/android/media/flags/media_better_together.aconfig
+++ b/media/java/android/media/flags/media_better_together.aconfig
@@ -15,29 +15,36 @@
}
flag {
- namespace: "media_solutions"
name: "enable_audio_policies_device_and_bluetooth_controller"
+ namespace: "media_solutions"
description: "Use Audio Policies implementation for device and Bluetooth route controllers."
bug: "280576228"
}
flag {
- namespace: "media_solutions"
name: "disable_screen_off_broadcast_receiver"
+ namespace: "media_solutions"
description: "Disables the broadcast receiver that prevents scanning when the screen is off."
bug: "304234628"
}
flag {
- namespace: "media_solutions"
name: "fallback_to_default_handling_when_media_session_has_fixed_volume_handling"
+ namespace: "media_solutions"
description: "Fallbacks to the default handling for volume adjustment when media session has fixed volume handling and its app is in the foreground and setting a media controller."
bug: "293743975"
}
flag {
- namespace: "media_solutions"
name: "enable_waiting_state_for_system_session_creation_request"
+ namespace: "media_solutions"
description: "Introduces a waiting state for the session creation request and prevents it from early failing when the selectedRoute from the bluetooth stack doesn't match the pending request route id."
bug: "307723189"
}
+
+flag {
+ name: "enable_new_media_route_2_info_types"
+ namespace: "media_solutions"
+ description: "Enables the following type constants in MediaRoute2Info: CAR, COMPUTER, GAME_CONSOLE, SMARTPHONE, SMARTWATCH, TABLET, TABLET_DOCKED. Note that this doesn't gate any behavior. It only guards some API int symbols."
+ bug: "301713440"
+}