Enable toString for Result in broadcast radio HAL

ToString is enabled for Result enum in AIDL broadcast radio HAL. Some
automatic generated files were also modified when updating this AIDL
API.

Bug: 264931778
Test: atest VtsHalBroadcastradioAidlTargetTest
Change-Id: Ia4ac02a95adbbcceac90c5b5106a7ea52dc447e9
This commit is contained in:
Weilin Xu
2023-01-10 19:33:45 +00:00
parent c4447be492
commit f6c673b497
7 changed files with 48 additions and 47 deletions

View File

@@ -37,8 +37,8 @@ parcelable AmFmRegionConfig {
android.hardware.broadcastradio.AmFmBandRange[] ranges;
int fmDeemphasis;
int fmRds;
const int DEEMPHASIS_D50 = 1;
const int DEEMPHASIS_D75 = 2;
const int RDS = 1;
const int RBDS = 2;
const int DEEMPHASIS_D50 = (1 << 0);
const int DEEMPHASIS_D75 = (1 << 1);
const int RDS = (1 << 0);
const int RBDS = (1 << 1);
}

View File

@@ -36,11 +36,11 @@ package android.hardware.broadcastradio;
enum AnnouncementType {
INVALID = 0,
EMERGENCY = 1,
WARNING = 2,
TRAFFIC = 3,
WEATHER = 4,
NEWS = 5,
EVENT = 6,
SPORT = 7,
MISC = 8,
WARNING,
TRAFFIC,
WEATHER,
NEWS,
EVENT,
SPORT,
MISC,
}

View File

@@ -35,12 +35,12 @@ package android.hardware.broadcastradio;
@Backing(type="int") @JavaDerive(equals=true, toString=true) @VintfStability
enum ConfigFlag {
FORCE_MONO = 1,
FORCE_ANALOG = 2,
FORCE_DIGITAL = 3,
RDS_AF = 4,
RDS_REG = 5,
DAB_DAB_LINKING = 6,
DAB_FM_LINKING = 7,
DAB_DAB_SOFT_LINKING = 8,
DAB_FM_SOFT_LINKING = 9,
FORCE_ANALOG,
FORCE_DIGITAL,
RDS_AF,
RDS_REG,
DAB_DAB_LINKING,
DAB_FM_LINKING,
DAB_DAB_SOFT_LINKING,
DAB_FM_SOFT_LINKING,
}

View File

@@ -37,16 +37,16 @@ enum IdentifierType {
VENDOR_START = 1000,
VENDOR_END = 1999,
INVALID = 0,
AMFM_FREQUENCY_KHZ = 1,
RDS_PI = 2,
HD_STATION_ID_EXT = 3,
HD_STATION_NAME = 4,
DAB_SID_EXT = 5,
DAB_ENSEMBLE = 6,
DAB_SCID = 7,
DAB_FREQUENCY_KHZ = 8,
DRMO_SERVICE_ID = 9,
DRMO_FREQUENCY_KHZ = 10,
SXM_SERVICE_ID = 12,
SXM_CHANNEL = 13,
AMFM_FREQUENCY_KHZ,
RDS_PI,
HD_STATION_ID_EXT,
HD_STATION_NAME,
DAB_SID_EXT,
DAB_ENSEMBLE,
DAB_SCID,
DAB_FREQUENCY_KHZ,
DRMO_SERVICE_ID,
DRMO_FREQUENCY_KHZ,
SXM_SERVICE_ID = (DRMO_FREQUENCY_KHZ + 2),
SXM_CHANNEL,
}

View File

@@ -42,10 +42,10 @@ parcelable ProgramInfo {
int signalQuality;
android.hardware.broadcastradio.Metadata[] metadata;
android.hardware.broadcastradio.VendorKeyValue[] vendorInfo;
const int FLAG_LIVE = 1;
const int FLAG_MUTED = 2;
const int FLAG_TRAFFIC_PROGRAM = 4;
const int FLAG_TRAFFIC_ANNOUNCEMENT = 8;
const int FLAG_TUNABLE = 16;
const int FLAG_STEREO = 32;
const int FLAG_LIVE = (1 << 0);
const int FLAG_MUTED = (1 << 1);
const int FLAG_TRAFFIC_PROGRAM = (1 << 2);
const int FLAG_TRAFFIC_ANNOUNCEMENT = (1 << 3);
const int FLAG_TUNABLE = (1 << 4);
const int FLAG_STEREO = (1 << 5);
}

View File

@@ -32,14 +32,14 @@
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.broadcastradio;
@Backing(type="int") @VintfStability
@Backing(type="int") @JavaDerive(equals=true, toString=true) @VintfStability
enum Result {
OK = 0,
INTERNAL_ERROR = 1,
INVALID_ARGUMENTS = 2,
INVALID_STATE = 3,
NOT_SUPPORTED = 4,
TIMEOUT = 5,
CANCELED = 6,
UNKNOWN_ERROR = 7,
OK,
INTERNAL_ERROR,
INVALID_ARGUMENTS,
INVALID_STATE,
NOT_SUPPORTED,
TIMEOUT,
CANCELED,
UNKNOWN_ERROR,
}

View File

@@ -21,11 +21,12 @@ package android.hardware.broadcastradio;
*/
@VintfStability
@Backing(type="int")
@JavaDerive(equals=true, toString=true)
enum Result {
/**
* Methods run without error.
*/
OK,
OK = 0,
/**
* Internal error in HAL.