Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf7c436d authored by Alice Kuo's avatar Alice Kuo
Browse files

Update language to comply with Android's inclusive language guidance

See https://source.android.com/setup/contribute/respectful-code for reference

 
Bug: 161896447
Change-Id: I56ece5f658e18f4dbf88159dec9bdd47490e406f
parent 6a6e7f35
Loading
Loading
Loading
Loading
+25 −25
Original line number Diff line number Diff line
@@ -41,9 +41,9 @@ const uint8_t codec_info_sbc[AVDT_CODEC_SIZE] = {
                         // Allocation Method: A2DP_SBC_IE_ALLOC_MD_L
    2,                   // MinimumBitpool Value: A2DP_SBC_IE_MIN_BITPOOL
    53,                  // Maximum Bitpool Value: A2DP_SBC_MAX_BITPOOL
    7,                   // Dummy
    8,                   // Dummy
    9                    // Dummy
    7,                   // Fake
    8,                   // Fake
    9                    // Fake
};

const uint8_t codec_info_sbc_capability[AVDT_CODEC_SIZE] = {
@@ -61,9 +61,9 @@ const uint8_t codec_info_sbc_capability[AVDT_CODEC_SIZE] = {
        0x01,                    // Allocation Method: A2DP_SBC_IE_ALLOC_MD_L
    2,   // MinimumBitpool Value: A2DP_SBC_IE_MIN_BITPOOL
    53,  // Maximum Bitpool Value: A2DP_SBC_MAX_BITPOOL
    7,   // Dummy
    8,   // Dummy
    9    // Dummy
    7,   // Fake
    8,   // Fake
    9    // Fake
};

const uint8_t codec_info_sbc_sink_capability[AVDT_CODEC_SIZE] = {
@@ -86,9 +86,9 @@ const uint8_t codec_info_sbc_sink_capability[AVDT_CODEC_SIZE] = {
                      // A2DP_SBC_IE_ALLOC_MD_L
    2,                // MinimumBitpool Value: A2DP_SBC_IE_MIN_BITPOOL
    53,               // Maximum Bitpool Value: A2DP_SBC_MAX_BITPOOL
    7,                // Dummy
    8,                // Dummy
    9                 // Dummy
    7,                // Fake
    8,                // Fake
    9                 // Fake
};

const uint8_t codec_info_aac[AVDT_CODEC_SIZE] = {
@@ -103,9 +103,9 @@ const uint8_t codec_info_aac[AVDT_CODEC_SIZE] = {
                 // Bit Rate: 320000 = 0x4e200
    0xe2,        // Bit Rate: 320000 = 0x4e200
    0x00,        // Bit Rate: 320000 = 0x4e200
    7,           // Dummy
    8,           // Dummy
    9            // Dummy
    7,           // Unused
    8,           // Unused
    9            // Unused
};

const uint8_t codec_info_aac_capability[AVDT_CODEC_SIZE] = {
@@ -121,9 +121,9 @@ const uint8_t codec_info_aac_capability[AVDT_CODEC_SIZE] = {
                 // Bit Rate: 320000 = 0x4e200
    0xe2,        // Bit Rate: 320000 = 0x4e200
    0x00,        // Bit Rate: 320000 = 0x4e200
    7,           // Dummy
    8,           // Dummy
    9            // Dummy
    7,           // Unused
    8,           // Unused
    9            // Unused
};

const uint8_t codec_info_aac_sink_capability[AVDT_CODEC_SIZE] = {
@@ -147,9 +147,9 @@ const uint8_t codec_info_aac_sink_capability[AVDT_CODEC_SIZE] = {
                                       // Bit Rate: 320000 = 0x4e200
    0xe2,                              // Bit Rate: 320000 = 0x4e200
    0x00,                              // Bit Rate: 320000 = 0x4e200
    7,                                 // Dummy
    8,                                 // Dummy
    9                                  // Dummy
    7,                                 // Fake
    8,                                 // Fake
    9                                  // Fake
};

const uint8_t codec_info_non_a2dp[AVDT_CODEC_SIZE] = {
@@ -158,16 +158,16 @@ const uint8_t codec_info_non_a2dp[AVDT_CODEC_SIZE] = {
    0xFF,           // Media Codec Type: A2DP_MEDIA_CT_NON_A2DP
    3,    4, 0, 0,  // Vendor ID: LSB first, upper two octets should be 0
    7,    8,        // Codec ID: LSB first
    9               // Dummy
    9               // Fake
};

const uint8_t codec_info_non_a2dp_dummy[AVDT_CODEC_SIZE] = {
const uint8_t codec_info_non_a2dp_fake[AVDT_CODEC_SIZE] = {
    8,              // Length
    0,              // Media Type: AVDT_MEDIA_TYPE_AUDIO
    0xFF,           // Media Codec Type: A2DP_MEDIA_CT_NON_A2DP
    3,    4, 0, 0,  // Vendor ID: LSB first, upper two octets should be 0
    7,    8,        // Codec ID: LSB first
    10              // Dummy
    10              // Unused
};

static const char* APTX_ENCODER_LIB_NAME = "libaptX_encoder.so";
@@ -410,7 +410,7 @@ TEST_F(StackA2dpTest, test_a2dp_get_media_type) {
  EXPECT_EQ(A2DP_GetMediaType(codec_info_aac), AVDT_MEDIA_TYPE_AUDIO);
  EXPECT_EQ(A2DP_GetMediaType(codec_info_non_a2dp), AVDT_MEDIA_TYPE_AUDIO);

  // Prepare dummy codec info for video and for multimedia
  // Prepare fake codec info for video and for multimedia
  memset(codec_info_test, 0, sizeof(codec_info_test));
  codec_info_test[0] = sizeof(codec_info_test);
  codec_info_test[1] = 0x01 << 4;
@@ -456,7 +456,7 @@ TEST_F(StackA2dpTest, test_a2dp_codec_type_equals) {
  EXPECT_TRUE(
      A2DP_CodecTypeEquals(codec_info_aac, codec_info_aac_sink_capability));
  EXPECT_TRUE(
      A2DP_CodecTypeEquals(codec_info_non_a2dp, codec_info_non_a2dp_dummy));
      A2DP_CodecTypeEquals(codec_info_non_a2dp, codec_info_non_a2dp_fake));
  EXPECT_FALSE(A2DP_CodecTypeEquals(codec_info_sbc, codec_info_non_a2dp));
  EXPECT_FALSE(A2DP_CodecTypeEquals(codec_info_aac, codec_info_non_a2dp));
  EXPECT_FALSE(A2DP_CodecTypeEquals(codec_info_sbc, codec_info_aac));
@@ -505,14 +505,14 @@ TEST_F(StackA2dpTest, test_a2dp_codec_equals) {
  codec_info_aac_test[8] = codec_info_aac[8] + 1;
  EXPECT_FALSE(A2DP_CodecEquals(codec_info_aac, codec_info_aac_test));

  // Test two SBC codecs that are identical, but with different dummy
  // Test two SBC codecs that are identical, but with different fake
  // trailer data.
  memset(codec_info_sbc_test, 0xAB, sizeof(codec_info_sbc_test));
  memcpy(codec_info_sbc_test, codec_info_sbc, sizeof(codec_info_sbc));
  codec_info_sbc_test[7] = codec_info_sbc[7] + 1;
  EXPECT_TRUE(A2DP_CodecEquals(codec_info_sbc, codec_info_sbc_test));

  // Test two AAC codecs that are identical, but with different dummy
  // Test two AAC codecs that are identical, but with different fake
  // trailer data.
  memset(codec_info_aac_test, 0xAB, sizeof(codec_info_aac_test));
  memcpy(codec_info_aac_test, codec_info_aac, sizeof(codec_info_aac));