From d402da220140ff7d7f94d1ded2f7190d0b063354 Mon Sep 17 00:00:00 2001 From: Kyunglyul Hyun Date: Mon, 17 Mar 2025 06:25:04 +0000 Subject: Properly stop tethering in test teardown Previously, tethering started in a test was not stopped, preventing subsequent enableTethering calls in other tests. Bug: 403168836 Test: atest pts-bot:BNEP Flag: EXEMPT, test only change Change-Id: I70a69702b735be7c419a0f4bb86e3c3684338faa --- android/pandora/server/src/Pan.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/android/pandora/server/src/Pan.kt b/android/pandora/server/src/Pan.kt index 62334af83b..6961eea7dd 100644 --- a/android/pandora/server/src/Pan.kt +++ b/android/pandora/server/src/Pan.kt @@ -67,6 +67,7 @@ class Pan(private val context: Context) : PANImplBase(), Closeable { } override fun close() { + mTetheringManager.stopTethering(TETHERING_BLUETOOTH) bluetoothAdapter.closeProfileProxy(BluetoothProfile.PAN, bluetoothPan) mScope.cancel() } -- cgit v1.2.3-59-g8ed1b From 941fbc7f81ade46b51da0f71f8d386875884a007 Mon Sep 17 00:00:00 2001 From: Srini S Date: Mon, 17 Mar 2025 10:57:07 -0700 Subject: Test L2CAP LE socket creation and createBond concurrency - Make Remote device non-connectable over LE - Initiate LE socket connection from DUT to Remote device - Initiate LE pairing from DUT to Remote device - Start LE Advertisement from Remote device after few seconds Expectation: LE connection should be created and LE Pairing should succeed. Test: atest PairingTest Flag: TEST_ONLY Bug: 397969281 Change-Id: I5756dbd11ec56c06b27504e87476315fd0238056 --- .../src/android/bluetooth/pairing/PairingTest.java | 101 +++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/framework/tests/bumble/src/android/bluetooth/pairing/PairingTest.java b/framework/tests/bumble/src/android/bluetooth/pairing/PairingTest.java index 37dc344cb5..ecb400deb3 100644 --- a/framework/tests/bumble/src/android/bluetooth/pairing/PairingTest.java +++ b/framework/tests/bumble/src/android/bluetooth/pairing/PairingTest.java @@ -32,6 +32,7 @@ import android.bluetooth.BluetoothHidHost; import android.bluetooth.BluetoothManager; import android.bluetooth.BluetoothProfile; import android.bluetooth.BluetoothStatusCodes; +import android.bluetooth.BluetoothSocket; import android.bluetooth.PandoraDevice; import android.bluetooth.StreamObserverSpliterator; import android.bluetooth.Utils; @@ -41,6 +42,7 @@ import android.bluetooth.test_utils.BlockingBluetoothAdapter; import android.bluetooth.test_utils.EnableBluetoothRule; import android.content.Context; import android.os.ParcelUuid; +import android.util.Log; import android.platform.test.annotations.RequiresFlagsEnabled; import android.platform.test.flag.junit.CheckFlagsRule; import android.platform.test.flag.junit.DeviceFlagsValueProvider; @@ -80,6 +82,9 @@ import java.time.Duration; import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.io.IOException; @RunWith(TestParameterInjector.class) public class PairingTest { @@ -87,6 +92,7 @@ public class PairingTest { private static final Duration BOND_INTENT_TIMEOUT = Duration.ofSeconds(10); private static final int TEST_DELAY_MS = 1000; + private static final int TEST_PSM = 5; private static final ParcelUuid BATTERY_UUID = ParcelUuid.fromString("0000180F-0000-1000-8000-00805F9B34FB"); @@ -836,6 +842,101 @@ public class PairingTest { intentReceiver.close(); } + /** + * Test pending LE L2CAP socket connection and LE pairing + * + *

Prerequisites: + * + *

    + *
  1. Bumble and Android are not bonded + *
+ * + *

Steps: + * + *

    + *
  1. Make Remote device non-connectable over LE + *
  2. Initiate LE socket connection from DUT to Remote device + *
  3. Initiate LE pairing from DUT to Remote device + *
  4. Start LE Advertisement from Remote device after few seconds + *
+ * + *

Expectation: LE connection should be created and LE Pairing should succeed. + */ + @Test + public void testCreateLeSocket_BondLe() throws Exception { + IntentReceiver intentReceiver = new IntentReceiver.Builder(sTargetContext, + BluetoothDevice.ACTION_ACL_CONNECTED, + BluetoothDevice.ACTION_PAIRING_REQUEST, + BluetoothDevice.ACTION_BOND_STATE_CHANGED) + .build(); + + StreamObserver pairingEventAnswerObserver = + mBumble.security() + .withDeadlineAfter(BOND_INTENT_TIMEOUT.toMillis(), TimeUnit.MILLISECONDS) + .onPairing(mPairingEventStreamObserver); + + BluetoothSocket bluetoothSocket = mBumbleDevice.createL2capChannel(TEST_PSM); + + ExecutorService executor = Executors.newSingleThreadExecutor(); + executor.submit(() -> { + try { + bluetoothSocket.connect(); + } catch (IOException e) { + Log.e(TAG, "Exception during socket connection: " + e); + } + }); + executor.shutdown(); + + // Wait for LE L2CAP socket connection above to be called and reach BT stack + Thread.sleep(2000); + + mBumbleDevice.createBond(BluetoothDevice.TRANSPORT_LE); + + /* Make LE L2CAP socket connection and LE Bond calls to wait for few seconds + and start LE advertisement from remote device. */ + Thread.sleep(3000); + + // Start LE advertisement from Bumble + AdvertiseRequest.Builder advRequestBuilder = + AdvertiseRequest.newBuilder().setLegacy(true) + .setConnectable(true) + .setOwnAddressType(OwnAddressType.PUBLIC); + + StreamObserverSpliterator responseObserver = + new StreamObserverSpliterator<>(); + mBumble.host().advertise(advRequestBuilder.build(), responseObserver); + + intentReceiver.verifyReceivedOrdered( + hasAction(BluetoothDevice.ACTION_BOND_STATE_CHANGED), + hasExtra(BluetoothDevice.EXTRA_DEVICE, mBumbleDevice), + hasExtra(BluetoothDevice.EXTRA_BOND_STATE, BluetoothDevice.BOND_BONDING)); + + intentReceiver.verifyReceivedOrdered( + hasAction(BluetoothDevice.ACTION_ACL_CONNECTED), + hasExtra(BluetoothDevice.EXTRA_DEVICE, mBumbleDevice), + hasExtra(BluetoothDevice.EXTRA_TRANSPORT, BluetoothDevice.TRANSPORT_LE)); + + intentReceiver.verifyReceivedOrdered( + hasAction(BluetoothDevice.ACTION_PAIRING_REQUEST), + hasExtra(BluetoothDevice.EXTRA_DEVICE, mBumbleDevice), + hasExtra( + BluetoothDevice.EXTRA_PAIRING_VARIANT, + BluetoothDevice.PAIRING_VARIANT_CONSENT)); + mBumbleDevice.setPairingConfirmation(true); + + PairingEvent pairingEvent = mPairingEventStreamObserver.iterator().next(); + assertThat(pairingEvent.hasJustWorks()).isTrue(); + pairingEventAnswerObserver.onNext( + PairingEventAnswer.newBuilder().setEvent(pairingEvent).setConfirm(true).build()); + + intentReceiver.verifyReceivedOrdered( + hasAction(BluetoothDevice.ACTION_BOND_STATE_CHANGED), + hasExtra(BluetoothDevice.EXTRA_DEVICE, mBumbleDevice), + hasExtra(BluetoothDevice.EXTRA_BOND_STATE, BluetoothDevice.BOND_BONDED)); + + intentReceiver.close(); + } + /** Helper/testStep functions goes here */ /** -- cgit v1.2.3-59-g8ed1b From 1ada35c61bcc1ac0f19e035e07d6f8a02c1b6128 Mon Sep 17 00:00:00 2001 From: Philip Chen Date: Wed, 19 Mar 2025 18:28:30 +0000 Subject: Enable/Disable debug features based on build type Currently we use `ro.debuggable` sysprop to proxy the build type and enable the debug features only for userdebug & eng builds (i.e. non-user builds). Since some non-production devices (e.g. Cuttlefish) could set `ro.debuggable` even for user build, let's not rely on `ro.debuggable` but directly detect the build type via `ro.build.type`. Bug: 375056207 Test: m com.android.bt Change-Id: I9c6a2e41786863315bfb89617ec914e06de4bab5 --- system/gd/hal/snoop_logger.cc | 14 +++++++------- system/gd/hal/snoop_logger.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/system/gd/hal/snoop_logger.cc b/system/gd/hal/snoop_logger.cc index 538d13ec3e..2462834b53 100644 --- a/system/gd/hal/snoop_logger.cc +++ b/system/gd/hal/snoop_logger.cc @@ -55,7 +55,7 @@ static std::string GetBtSnoopMode() { // Default mode is FILTERED on userdebug/eng build, DISABLED on user build. // In userdebug/eng build, it can also be overwritten by modifying the global setting std::string btsnoop_mode = SnoopLogger::kBtSnoopLogModeDisabled; - if (os::GetSystemPropertyBool(SnoopLogger::kIsDebuggableProperty, false)) { + if (os::GetSystemProperty(SnoopLogger::kRoBuildType) != "user") { btsnoop_mode = os::GetSystemProperty(SnoopLogger::kBtSnoopDefaultLogModeProperty) .value_or(SnoopLogger::kBtSnoopLogModeFiltered); } @@ -471,7 +471,7 @@ size_t get_btsnooz_packet_length_to_write(const HciPacket& packet, SnoopLogger:: // system properties const std::string SnoopLogger::kBtSnoopMaxPacketsPerFileProperty = "persist.bluetooth.btsnoopsize"; -const std::string SnoopLogger::kIsDebuggableProperty = "ro.debuggable"; +const std::string SnoopLogger::kRoBuildType = "ro.build.type"; const std::string SnoopLogger::kBtSnoopLogModeProperty = "persist.bluetooth.btsnooplogmode"; const std::string SnoopLogger::kBtSnoopDefaultLogModeProperty = "persist.bluetooth.btsnoopdefaultmode"; @@ -1333,7 +1333,7 @@ void SnoopLogger::Start() { EnableFilters(); } - if (os::GetSystemPropertyBool(kIsDebuggableProperty, false)) { + if (os::GetSystemProperty(kRoBuildType) != "user") { // Cf b/375056207: The implementation must pass a security review // in order to enable the snoop logger socket in user builds. auto snoop_logger_socket = std::make_unique(&syscall_if); @@ -1404,9 +1404,9 @@ size_t SnoopLogger::GetMaxPacketsPerFile() { size_t SnoopLogger::GetMaxPacketsPerBuffer() { // We want to use at most 256 KB memory for btsnooz log for release builds // and 512 KB memory for userdebug/eng builds - auto is_debuggable = os::GetSystemPropertyBool(kIsDebuggableProperty, false); + auto is_debug_build = (os::GetSystemProperty(kRoBuildType) != "user"); - size_t btsnooz_max_memory_usage_bytes = (is_debuggable ? 1024 : 256) * 1024; + size_t btsnooz_max_memory_usage_bytes = (is_debug_build ? 1024 : 256) * 1024; // Calculate max number of packets based on max memory usage and max packet size return btsnooz_max_memory_usage_bytes / kDefaultBtSnoozMaxBytesPerPacket; } @@ -1419,8 +1419,8 @@ void SnoopLogger::RegisterSocket(SnoopLoggerSocketInterface* socket) { } bool SnoopLogger::IsBtSnoopLogPersisted() { - auto is_debuggable = os::GetSystemPropertyBool(kIsDebuggableProperty, false); - return is_debuggable && os::GetSystemPropertyBool(kBtSnoopLogPersists, false); + auto is_debug_build = (os::GetSystemProperty(kRoBuildType) != "user"); + return is_debug_build && os::GetSystemPropertyBool(kBtSnoopLogPersists, false); } bool SnoopLogger::IsQualcommDebugLogEnabled() { diff --git a/system/gd/hal/snoop_logger.h b/system/gd/hal/snoop_logger.h index b0783442b3..5f45e8a0b2 100644 --- a/system/gd/hal/snoop_logger.h +++ b/system/gd/hal/snoop_logger.h @@ -146,7 +146,7 @@ public: static const ModuleFactory Factory; static const std::string kBtSnoopMaxPacketsPerFileProperty; - static const std::string kIsDebuggableProperty; + static const std::string kRoBuildType; static const std::string kBtSnoopLogModeProperty; static const std::string kBtSnoopLogPersists; static const std::string kBtSnoopDefaultLogModeProperty; -- cgit v1.2.3-59-g8ed1b From 02f3e47481809699e5472fc4350d6e7cefc2048e Mon Sep 17 00:00:00 2001 From: Ömer Faruk Yılmaz Date: Wed, 19 Mar 2025 22:09:37 -0700 Subject: Add flag rssi_scan_filter Bug: 404986559 Bug: 315241296 Test: m com.android.bt Flag: com.android.bluetooth.flags.rssi_scan_filter Change-Id: Id6c8b6b53b72b9cf76189052681e1b58432ae89f --- flags/gap.aconfig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/flags/gap.aconfig b/flags/gap.aconfig index 8e7d9c99ac..419e846836 100644 --- a/flags/gap.aconfig +++ b/flags/gap.aconfig @@ -283,3 +283,10 @@ flag { purpose: PURPOSE_BUGFIX } } + +flag { + name: "rssi_scan_filter" + namespace: "bluetooth" + description: "Add RSSI ScanFilter" + bug: "404986559" +} -- cgit v1.2.3-59-g8ed1b From 6ad11c69d3162a433236502dd4b8b4e38e442bd1 Mon Sep 17 00:00:00 2001 From: Łukasz Rymanowski Date: Mon, 17 Mar 2025 13:36:47 +0000 Subject: flag: Remove leaudio_speed_up_reconfiguration_between_call flag Flag has been delivered Bug: 352686917 Test: atest bluetooth_le_audio_client_test Flag: EXEMPT, flag cleanup Change-Id: I8256e68a65d543f32516094717cda14d00adad18 --- flags/leaudio.aconfig | 10 - system/bta/le_audio/client.cc | 10 - system/bta/le_audio/le_audio_client_test.cc | 464 ---------------------------- 3 files changed, 484 deletions(-) diff --git a/flags/leaudio.aconfig b/flags/leaudio.aconfig index a2f77b5658..c475373093 100644 --- a/flags/leaudio.aconfig +++ b/flags/leaudio.aconfig @@ -115,16 +115,6 @@ flag { } } -flag { - name: "leaudio_speed_up_reconfiguration_between_call" - namespace: "bluetooth" - description: "Fix reconfiguration time between call and media" - bug: "352686917" - metadata { - purpose: PURPOSE_BUGFIX - } -} - flag { name: "leaudio_set_codec_config_preference" namespace: "bluetooth" diff --git a/system/bta/le_audio/client.cc b/system/bta/le_audio/client.cc index 43c5100b02..e03c456b84 100644 --- a/system/bta/le_audio/client.cc +++ b/system/bta/le_audio/client.cc @@ -1332,11 +1332,6 @@ public: in_call_ = in_call; - if (!com::android::bluetooth::flags::leaudio_speed_up_reconfiguration_between_call()) { - log::debug("leaudio_speed_up_reconfiguration_between_call flag is not enabled"); - return; - } - if (active_group_id_ == bluetooth::groups::kGroupUnknown) { log::debug("There is no active group"); return; @@ -5451,11 +5446,6 @@ public: remote_metadata.source.set(LeAudioContextType::CONVERSATIONAL); } - if (!com::android::bluetooth::flags::leaudio_speed_up_reconfiguration_between_call()) { - UpdateSinkLocalMetadataContextTypes(remote_metadata.source); - UpdateSourceLocalMetadataContextTypes(remote_metadata.sink); - } - if (IsInVoipCall()) { log::debug("Unsetting RINGTONE from remote sink"); remote_metadata.sink.unset(LeAudioContextType::RINGTONE); diff --git a/system/bta/le_audio/le_audio_client_test.cc b/system/bta/le_audio/le_audio_client_test.cc index 02104518d2..10e2f2b561 100644 --- a/system/bta/le_audio/le_audio_client_test.cc +++ b/system/bta/le_audio/le_audio_client_test.cc @@ -8837,111 +8837,7 @@ TEST_F(UnicastTest, TwoEarbudsStopConversational_StartStreamSonification) { Mock::VerifyAndClearExpectations(&mock_state_machine_); } -TEST_F(UnicastTest, TwoEarbudsStreamingContextSwitchReconfigure) { - // TODO(b/352686917). Remove the test when flag will be removing - com::android::bluetooth::flags::provider_->leaudio_speed_up_reconfiguration_between_call(false); - - uint8_t group_size = 2; - int group_id = 2; - - // Report working CSIS - ON_CALL(mock_csis_client_module_, IsCsisClientRunning()).WillByDefault(Return(true)); - - ON_CALL(mock_csis_client_module_, GetDesiredSize(group_id)) - .WillByDefault(Invoke([&](int /*group_id*/) { return group_size; })); - - // First earbud - const RawAddress test_address0 = GetTestAddress(0); - EXPECT_CALL(mock_btif_storage_, AddLeaudioAutoconnect(test_address0, true)).Times(1); - ConnectCsisDevice(test_address0, 1 /*conn_id*/, codec_spec_conf::kLeAudioLocationFrontLeft, - codec_spec_conf::kLeAudioLocationFrontLeft, group_size, group_id, 1 /* rank*/); - - // Second earbud - const RawAddress test_address1 = GetTestAddress(1); - EXPECT_CALL(mock_btif_storage_, AddLeaudioAutoconnect(test_address1, true)).Times(1); - ConnectCsisDevice(test_address1, 2 /*conn_id*/, codec_spec_conf::kLeAudioLocationFrontRight, - codec_spec_conf::kLeAudioLocationFrontRight, group_size, group_id, 2 /* rank*/, - true /*connect_through_csis*/); - - constexpr int gmcs_ccid = 1; - constexpr int gtbs_ccid = 2; - - // Start streaming MEDIA - EXPECT_CALL(*mock_le_audio_source_hal_client_, Start(_, _, _)).Times(1); - EXPECT_CALL(*mock_le_audio_sink_hal_client_, Start(_, _, _)).Times(1); - LeAudioClient::Get()->SetCcidInformation(gmcs_ccid, 4 /* Media */); - LeAudioClient::Get()->SetCcidInformation(gtbs_ccid, 2 /* Phone */); - LeAudioClient::Get()->GroupSetActive(group_id); - SyncOnMainLoop(); - - types::BidirectionalPair> ccids = {.sink = {gmcs_ccid}, .source = {}}; - EXPECT_CALL(mock_state_machine_, StartStream(_, _, _, ccids)).Times(1); - StartStreaming(AUDIO_USAGE_MEDIA, AUDIO_CONTENT_TYPE_MUSIC, group_id); - - SyncOnMainLoop(); - Mock::VerifyAndClearExpectations(&mock_state_machine_); - Mock::VerifyAndClearExpectations(&mock_audio_hal_client_callbacks_); - Mock::VerifyAndClearExpectations(mock_le_audio_source_hal_client_); - - // Verify Data transfer on two peer sinks - uint8_t cis_count_out = 2; - uint8_t cis_count_in = 0; - TestAudioDataTransfer(group_id, cis_count_out, cis_count_in, 1920); - - // Stop - StopStreaming(group_id); - // simulate suspend timeout passed, alarm executing - fake_osi_alarm_set_on_mloop_.cb(fake_osi_alarm_set_on_mloop_.data); - Mock::VerifyAndClearExpectations(&mock_audio_hal_client_callbacks_); - - log::info("SetInCall is used by GTBS - and only then we can expect CCID to be set."); - LeAudioClient::Get()->SetInCall(true); - - // Conversational is a bidirectional scenario so expect GTBS CCID - // in the metadata for both directions. Can be called twice when one - // direction resume after the other and metadata is updated. - ccids = {.sink = {gtbs_ccid}, .source = {gtbs_ccid}}; - EXPECT_CALL(mock_state_machine_, - StartStream(_, types::LeAudioContextType::CONVERSATIONAL, _, ccids)) - .Times(AtLeast(1)); - StartStreaming(AUDIO_USAGE_VOICE_COMMUNICATION, AUDIO_CONTENT_TYPE_SPEECH, group_id); - - SyncOnMainLoop(); - Mock::VerifyAndClearExpectations(&mock_audio_hal_client_callbacks_); - Mock::VerifyAndClearExpectations(mock_le_audio_source_hal_client_); - - // Verify Data transfer on two peer sinks and one source - cis_count_out = 2; - cis_count_in = 2; - TestAudioDataTransfer(group_id, cis_count_out, cis_count_in, 1920, 40); - - log::info("End call"); - LeAudioClient::Get()->SetInCall(false); - UpdateLocalSourceMetadata(AUDIO_USAGE_UNKNOWN, AUDIO_CONTENT_TYPE_UNKNOWN, false); - UpdateLocalSinkMetadata(std::nullopt); - // Stop - StopStreaming(group_id, true); - - log::info("Switch back to MEDIA"); - ccids = {.sink = {gmcs_ccid}, .source = {}}; - types::BidirectionalPair contexts = { - .sink = types::AudioContexts(types::LeAudioContextType::MEDIA), - .source = types::AudioContexts()}; - EXPECT_CALL(mock_state_machine_, - ConfigureStream(_, bluetooth::le_audio::types::LeAudioContextType::MEDIA, contexts, - ccids, _)) - .Times(1); - StartStreaming(AUDIO_USAGE_MEDIA, AUDIO_CONTENT_TYPE_MUSIC, group_id, AUDIO_SOURCE_INVALID, true); - - SyncOnMainLoop(); - Mock::VerifyAndClearExpectations(&mock_state_machine_); - Mock::VerifyAndClearExpectations(&mock_audio_hal_client_callbacks_); - Mock::VerifyAndClearExpectations(mock_le_audio_source_hal_client_); -} - TEST_F(UnicastTest, TwoEarbudsStreamingContextSwitchReconfigure_SpeedUpReconfigFlagEnabled) { - com::android::bluetooth::flags::provider_->leaudio_speed_up_reconfiguration_between_call(true); - uint8_t group_size = 2; int group_id = 2; @@ -10937,79 +10833,7 @@ TEST_F(UnicastTest, SwitchBetweenSoundEffectAndMicrophoneScenario) { * What we can do now is to keep streaming (and reconfigure if needed for the * use case). */ -TEST_F(UnicastTest, UpdateNotSupportedContextTypeUnspecifiedAvailable) { - // TODO(b/352686917). Remove the test when flag will be removing - com::android::bluetooth::flags::provider_->leaudio_speed_up_reconfiguration_between_call(false); - - const RawAddress test_address0 = GetTestAddress(0); - int group_id = bluetooth::groups::kGroupUnknown; - - available_snk_context_types_ = - (types::LeAudioContextType::RINGTONE | types::LeAudioContextType::CONVERSATIONAL | - types::LeAudioContextType::UNSPECIFIED | types::LeAudioContextType::MEDIA) - .value(); - supported_snk_context_types_ = available_snk_context_types_; - available_src_context_types_ = available_snk_context_types_; - supported_src_context_types_ = available_src_context_types_; - - SetSampleDatabaseEarbudsValid(1, test_address0, codec_spec_conf::kLeAudioLocationStereo, - codec_spec_conf::kLeAudioLocationStereo, default_channel_cnt, - default_channel_cnt, 0x0004, false /*add_csis*/, true /*add_cas*/, - true /*add_pacs*/, default_ase_cnt /*add_ascs_cnt*/, 1 /*set_size*/, - 0 /*rank*/); - EXPECT_CALL(mock_audio_hal_client_callbacks_, - OnConnectionState(ConnectionState::CONNECTED, test_address0)) - .Times(1); - EXPECT_CALL(mock_audio_hal_client_callbacks_, - OnGroupNodeStatus(test_address0, _, GroupNodeStatus::ADDED)) - .WillOnce(DoAll(SaveArg<1>(&group_id))); - - ConnectLeAudio(test_address0); - ASSERT_NE(group_id, bluetooth::groups::kGroupUnknown); - - // Start streaming - uint8_t cis_count_out = 1; - uint8_t cis_count_in = 0; - - LeAudioClient::Get()->SetInCall(true); - - // Audio sessions are started only when device gets active - EXPECT_CALL(*mock_le_audio_source_hal_client_, Start(_, _, _)).Times(1); - EXPECT_CALL(*mock_le_audio_sink_hal_client_, Start(_, _, _)).Times(1); - LeAudioClient::Get()->GroupSetActive(group_id); - SyncOnMainLoop(); - - StartStreaming(AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE, AUDIO_CONTENT_TYPE_UNKNOWN, group_id); - LocalAudioSourceResume(); - LocalAudioSinkResume(); - - Mock::VerifyAndClearExpectations(&mock_audio_hal_client_callbacks_); - Mock::VerifyAndClearExpectations(mock_le_audio_source_hal_client_); - SyncOnMainLoop(); - - // Verify Data transfer on one audio source cis - TestAudioDataTransfer(group_id, cis_count_out, cis_count_in, 1920); - - LeAudioClient::Get()->SetInCall(false); - LocalAudioSinkSuspend(); - UpdateLocalSinkMetadata(std::nullopt); - - /* We should use GAME configuration, but do not send the GAME context type, as - * it is not available on the remote device. - */ - EXPECT_CALL(mock_state_machine_, StopStream(_)).Times(0); - types::BidirectionalPair contexts = { - .sink = types::AudioContexts(types::LeAudioContextType::UNSPECIFIED), - .source = types::AudioContexts()}; - EXPECT_CALL(mock_state_machine_, StartStream(_, types::LeAudioContextType::GAME, contexts, _)) - .Times(1); - UpdateLocalSourceMetadata(AUDIO_USAGE_GAME, AUDIO_CONTENT_TYPE_UNKNOWN, false); - SyncOnMainLoop(); -} - TEST_F(UnicastTest, UpdateNotSupportedContextTypeUnspecifiedAvailable_SpeedUpReconfigFlagEnabled) { - com::android::bluetooth::flags::provider_->leaudio_speed_up_reconfiguration_between_call(true); - const RawAddress test_address0 = GetTestAddress(0); int group_id = bluetooth::groups::kGroupUnknown; @@ -11081,146 +10905,7 @@ TEST_F(UnicastTest, UpdateNotSupportedContextTypeUnspecifiedAvailable_SpeedUpRec * always results with one bidirectional context, so that the remote device * is not confused about our intentions. */ -TEST_F(UnicastTest, UpdateMultipleBidirContextTypes) { - // TODO(b/352686917). Remove the test when flag will be removing - com::android::bluetooth::flags::provider_->leaudio_speed_up_reconfiguration_between_call(false); - - const RawAddress test_address0 = GetTestAddress(0); - int group_id = bluetooth::groups::kGroupUnknown; - - available_snk_context_types_ = (types::LeAudioContextType::CONVERSATIONAL | - types::LeAudioContextType::GAME | types::LeAudioContextType::LIVE) - .value(); - supported_snk_context_types_ = - available_snk_context_types_ | - types::AudioContexts(types::LeAudioContextType::UNSPECIFIED).value(); - available_src_context_types_ = available_snk_context_types_; - supported_src_context_types_ = - available_src_context_types_ | - types::AudioContexts(types::LeAudioContextType::UNSPECIFIED).value(); - - SetSampleDatabaseEarbudsValid(1, test_address0, codec_spec_conf::kLeAudioLocationAnyLeft, - codec_spec_conf::kLeAudioLocationStereo, default_channel_cnt, - default_channel_cnt, 0x0024, false /*add_csis*/, true /*add_cas*/, - true /*add_pacs*/, default_ase_cnt /*add_ascs_cnt*/, 1 /*set_size*/, - 0 /*rank*/); - EXPECT_CALL(mock_audio_hal_client_callbacks_, - OnConnectionState(ConnectionState::CONNECTED, test_address0)) - .Times(1); - EXPECT_CALL(mock_audio_hal_client_callbacks_, - OnGroupNodeStatus(test_address0, _, GroupNodeStatus::ADDED)) - .WillOnce(DoAll(SaveArg<1>(&group_id))); - - ConnectLeAudio(test_address0); - ASSERT_NE(group_id, bluetooth::groups::kGroupUnknown); - - // Audio sessions are started only when device gets active - EXPECT_CALL(*mock_le_audio_source_hal_client_, Start(_, _, _)).Times(1); - EXPECT_CALL(*mock_le_audio_sink_hal_client_, Start(_, _, _)).Times(1); - LeAudioClient::Get()->GroupSetActive(group_id); - SyncOnMainLoop(); - - // When the local audio sink resumes expect only LIVE context - types::BidirectionalPair contexts = { - .sink = types::AudioContexts(types::LeAudioContextType::LIVE), - .source = types::AudioContexts(types::LeAudioContextType::LIVE)}; - EXPECT_CALL(mock_state_machine_, - StartStream(_, bluetooth::le_audio::types::LeAudioContextType::LIVE, contexts, _)) - .Times(1); - - // 1) Start the recording. Sink resume will trigger the reconfiguration - // --------------------------------------------------------------------- - ASSERT_NE(nullptr, unicast_sink_hal_cb_); - UpdateLocalSinkMetadata(AUDIO_SOURCE_MIC); - LocalAudioSinkResume(); - - Mock::VerifyAndClearExpectations(mock_le_audio_source_hal_client_); - Mock::VerifyAndClearExpectations(mock_le_audio_sink_hal_client_); - Mock::VerifyAndClearExpectations(&mock_state_machine_); - - /* After the reconfiguration the local Audio Sink HAL has to resume again */ - LocalAudioSourceResume(); - LocalAudioSinkResume(); - - Mock::VerifyAndClearExpectations(mock_le_audio_source_hal_client_); - Mock::VerifyAndClearExpectations(mock_le_audio_sink_hal_client_); - Mock::VerifyAndClearExpectations(&mock_state_machine_); - - // Verify Data transfer on one audio source and sink cis - uint8_t cis_count_out = 1; - uint8_t cis_count_in = 1; - TestAudioDataTransfer(group_id, cis_count_out, cis_count_in, 1920, 40); - - // Stop - StopStreaming(group_id); - Mock::VerifyAndClearExpectations(&mock_audio_hal_client_callbacks_); - - // 2) Now set in call preference to get CONVERSATIONAL into the mix - // ----------------------------------------------------------------- - LeAudioClient::Get()->SetInCall(true); - - // Verify that we only got CONVERSATIONAL context and no LIVE - contexts = {.sink = types::AudioContexts(types::LeAudioContextType::CONVERSATIONAL), - .source = types::AudioContexts(types::LeAudioContextType::CONVERSATIONAL)}; - EXPECT_CALL(mock_state_machine_, - StartStream(_, bluetooth::le_audio::types::LeAudioContextType::CONVERSATIONAL, - contexts, _)) - .Times(1); - - // Start with ringtone on local source - ASSERT_NE(nullptr, unicast_sink_hal_cb_); - StartStreaming(AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE, AUDIO_CONTENT_TYPE_UNKNOWN, group_id); - - // Resume both directions - LocalAudioSourceResume(); - LocalAudioSinkResume(); - - Mock::VerifyAndClearExpectations(&mock_audio_hal_client_callbacks_); - Mock::VerifyAndClearExpectations(mock_le_audio_source_hal_client_); - Mock::VerifyAndClearExpectations(&mock_state_machine_); - - // Verify Data transfer on one audio source cis - cis_count_out = 1; - cis_count_in = 1; - TestAudioDataTransfer(group_id, cis_count_out, cis_count_in, 1920, 40); - - // 3) Disable call so we could go to GAME - // --------------------------------------- - LeAudioClient::Get()->SetInCall(false); - - /* Start the game on local source - expect no previous sink (LIVE) metadata */ - EXPECT_CALL(mock_state_machine_, StopStream(_)).Times(0); - contexts = {.sink = types::AudioContexts(types::LeAudioContextType::GAME), - .source = types::AudioContexts(types::LeAudioContextType::GAME)}; - EXPECT_CALL(mock_state_machine_, StartStream(_, types::LeAudioContextType::GAME, contexts, _)) - .Times(1); - UpdateLocalSourceMetadata(AUDIO_USAGE_GAME, AUDIO_CONTENT_TYPE_UNKNOWN, false); - - /* If the above triggers reconfiguration, Audio Hal action is needed to - * restart the stream. - */ - LocalAudioSourceResume(); - LocalAudioSinkResume(); - Mock::VerifyAndClearExpectations(&mock_state_machine_); - - // 4) Stop streaming - // ------------------ - StopStreaming(group_id); - Mock::VerifyAndClearExpectations(&mock_audio_hal_client_callbacks_); - - // Release - EXPECT_CALL(*mock_le_audio_source_hal_client_, Stop()).Times(1); - EXPECT_CALL(*mock_le_audio_source_hal_client_, OnDestroyed()).Times(1); - EXPECT_CALL(*mock_le_audio_sink_hal_client_, OnDestroyed()).Times(1); - do_in_main_thread(base::BindOnce( - [](LeAudioClient* client) { client->GroupSetActive(bluetooth::groups::kGroupUnknown); }, - LeAudioClient::Get())); - SyncOnMainLoop(); -} - TEST_F(UnicastTest, UpdateMultipleBidirContextTypes_SpeedUpReconfigFlagEnabled) { - com::android::bluetooth::flags::provider_->leaudio_speed_up_reconfiguration_between_call(true); - const RawAddress test_address0 = GetTestAddress(0); int group_id = bluetooth::groups::kGroupUnknown; @@ -11444,154 +11129,7 @@ TEST_F(UnicastTest, UpdateDisableLocalAudioSinkOnGame) { } /* Start music when in a call, end the call, continue with music only */ -TEST_F(UnicastTest, MusicDuringCallContextTypes) { - // TODO(b/352686917). Remove the test when flag will be removing - com::android::bluetooth::flags::provider_->leaudio_speed_up_reconfiguration_between_call(false); - - const RawAddress test_address0 = GetTestAddress(0); - int group_id = bluetooth::groups::kGroupUnknown; - - available_snk_context_types_ = - (types::LeAudioContextType::CONVERSATIONAL | types::LeAudioContextType::RINGTONE | - types::LeAudioContextType::GAME | types::LeAudioContextType::MEDIA | - types::LeAudioContextType::LIVE | types::LeAudioContextType::NOTIFICATIONS) - .value(); - supported_snk_context_types_ = - available_snk_context_types_ | - types::AudioContexts(types::LeAudioContextType::UNSPECIFIED).value(); - available_src_context_types_ = available_snk_context_types_; - available_src_context_types_ &= - ~((types::LeAudioContextType::NOTIFICATIONS | types::LeAudioContextType::MEDIA).value()); - supported_src_context_types_ = - available_src_context_types_ | - types::AudioContexts(types::LeAudioContextType::UNSPECIFIED).value(); - - SetSampleDatabaseEarbudsValid(1, test_address0, codec_spec_conf::kLeAudioLocationAnyLeft, - codec_spec_conf::kLeAudioLocationStereo, default_channel_cnt, - default_channel_cnt, 0x0024, false /*add_csis*/, true /*add_cas*/, - true /*add_pacs*/, default_ase_cnt /*add_ascs_cnt*/, 1 /*set_size*/, - 0 /*rank*/); - EXPECT_CALL(mock_audio_hal_client_callbacks_, - OnConnectionState(ConnectionState::CONNECTED, test_address0)) - .Times(1); - EXPECT_CALL(mock_audio_hal_client_callbacks_, - OnGroupNodeStatus(test_address0, _, GroupNodeStatus::ADDED)) - .WillOnce(DoAll(SaveArg<1>(&group_id))); - - ConnectLeAudio(test_address0); - ASSERT_NE(group_id, bluetooth::groups::kGroupUnknown); - - // Audio sessions are started only when device gets active - EXPECT_CALL(*mock_le_audio_source_hal_client_, Start(_, _, _)).Times(1); - EXPECT_CALL(*mock_le_audio_sink_hal_client_, Start(_, _, _)).Times(1); - LeAudioClient::Get()->GroupSetActive(group_id); - SyncOnMainLoop(); - - log::info("TESTPOINT 1: Start with the call first"); - // ----------------------------- - // CONVERSATIONAL is from In Call preference, and RINGTONE is from metadata - LeAudioClient::Get()->SetInCall(true); - types::BidirectionalPair contexts = { - .sink = types::AudioContexts(types::LeAudioContextType::RINGTONE | - types::LeAudioContextType::CONVERSATIONAL), - .source = types::AudioContexts(types::LeAudioContextType::CONVERSATIONAL)}; - EXPECT_CALL(mock_state_machine_, - StartStream(_, bluetooth::le_audio::types::LeAudioContextType::CONVERSATIONAL, - contexts, _)) - .Times(1); - StartStreaming(AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE, AUDIO_CONTENT_TYPE_UNKNOWN, group_id); - LocalAudioSinkResume(); - - // Verify - Mock::VerifyAndClearExpectations(&mock_audio_hal_client_callbacks_); - Mock::VerifyAndClearExpectations(mock_le_audio_source_hal_client_); - Mock::VerifyAndClearExpectations(&mock_state_machine_); - - // Verify Data transfer - uint8_t cis_count_out = 1; - uint8_t cis_count_in = 1; - TestAudioDataTransfer(group_id, cis_count_out, cis_count_in, 1920, 40); - - log::info("TESTPOINT 2: Start MEDIA during the call, expect MEDIA only on the remote sink"); - contexts = {.sink = types::AudioContexts(types::LeAudioContextType::CONVERSATIONAL | - types::LeAudioContextType::MEDIA), - .source = types::AudioContexts(types::LeAudioContextType::CONVERSATIONAL)}; - EXPECT_CALL(mock_state_machine_, - StartStream(_, bluetooth::le_audio::types::LeAudioContextType::CONVERSATIONAL, - contexts, _)) - .Times(1); - UpdateLocalSourceMetadata(AUDIO_USAGE_MEDIA, AUDIO_CONTENT_TYPE_MUSIC, false); - SyncOnMainLoop(); - - Mock::VerifyAndClearExpectations(&mock_state_machine_); - Mock::VerifyAndClearExpectations(mock_le_audio_source_hal_client_); - Mock::VerifyAndClearExpectations(mock_le_audio_sink_hal_client_); - - log::info( - "TESTPOINT 3: Disable In Call preference but do not suspend the local sink. Play " - "notification on the same stream."); - // Verify both context are sent as the metadata. - // --------------------------------------- - LeAudioClient::Get()->SetInCall(false); - - EXPECT_CALL(mock_state_machine_, StopStream(_)).Times(0); - contexts = {.sink = types::AudioContexts(types::LeAudioContextType::NOTIFICATIONS | - types::LeAudioContextType::CONVERSATIONAL), - .source = types::AudioContexts(types::LeAudioContextType::CONVERSATIONAL)}; - EXPECT_CALL(mock_state_machine_, - StartStream(_, types::LeAudioContextType::CONVERSATIONAL, contexts, _)) - .Times(1); - UpdateLocalSourceMetadata(AUDIO_USAGE_NOTIFICATION, AUDIO_CONTENT_TYPE_UNKNOWN, - /*reconfigure=*/false); - Mock::VerifyAndClearExpectations(&mock_state_machine_); - Mock::VerifyAndClearExpectations(mock_le_audio_source_hal_client_); - Mock::VerifyAndClearExpectations(mock_le_audio_sink_hal_client_); - - log::info("TESTPOINT 4: Disable call so we could go back to MEDIA"); - // --------------------------------------- - // Suspend should stop the stream - EXPECT_CALL(mock_state_machine_, StopStream(_)).Times(1); - UpdateLocalSinkMetadata(std::nullopt); - LocalAudioSourceSuspend(); - LocalAudioSinkSuspend(); - // simulate suspend timeout passed, alarm executing - fake_osi_alarm_set_on_mloop_.cb(fake_osi_alarm_set_on_mloop_.data); - Mock::VerifyAndClearExpectations(&mock_state_machine_); - - // Restart the stream with MEDIA - contexts = {.sink = types::AudioContexts(types::LeAudioContextType::MEDIA), - .source = types::AudioContexts()}; - EXPECT_CALL(mock_state_machine_, StartStream(_, types::LeAudioContextType::MEDIA, contexts, _)) - .Times(1); - UpdateLocalSourceMetadata(AUDIO_USAGE_MEDIA, AUDIO_CONTENT_TYPE_MUSIC, - /*reconfigure=*/false); - Mock::VerifyAndClearExpectations(mock_le_audio_source_hal_client_); - Mock::VerifyAndClearExpectations(mock_le_audio_sink_hal_client_); - - /* The source needs to resume to reconfigure to MEDIA */ - LocalAudioSourceResume(/*expect_confirm=*/false); - LocalAudioSourceResume(/*expect_confirm=*/true); - Mock::VerifyAndClearExpectations(&mock_state_machine_); - Mock::VerifyAndClearExpectations(mock_le_audio_source_hal_client_); - Mock::VerifyAndClearExpectations(mock_le_audio_sink_hal_client_); - - log::info("TESTPOINT 5: Stop streaming"); - // ------------------ - StopStreaming(group_id); - Mock::VerifyAndClearExpectations(&mock_audio_hal_client_callbacks_); - - // Release - EXPECT_CALL(*mock_le_audio_source_hal_client_, Stop()).Times(1); - EXPECT_CALL(*mock_le_audio_source_hal_client_, OnDestroyed()).Times(1); - EXPECT_CALL(*mock_le_audio_sink_hal_client_, OnDestroyed()).Times(1); - do_in_main_thread(base::BindOnce( - [](LeAudioClient* client) { client->GroupSetActive(bluetooth::groups::kGroupUnknown); }, - LeAudioClient::Get())); - SyncOnMainLoop(); -} - TEST_F(UnicastTest, MetadataUpdateDuringReconfiguration) { - com::android::bluetooth::flags::provider_->leaudio_speed_up_reconfiguration_between_call(true); const RawAddress test_address0 = GetTestAddress(0); int group_id = bluetooth::groups::kGroupUnknown; @@ -11664,8 +11202,6 @@ TEST_F(UnicastTest, MetadataUpdateDuringReconfiguration) { } TEST_F(UnicastTest, MusicDuringCallContextTypes_SpeedUpReconfigFlagEnabled) { - com::android::bluetooth::flags::provider_->leaudio_speed_up_reconfiguration_between_call(true); - const RawAddress test_address0 = GetTestAddress(0); int group_id = bluetooth::groups::kGroupUnknown; -- cgit v1.2.3-59-g8ed1b From fc5b76899c464056dc52b5d1273fdfba7b95b34b Mon Sep 17 00:00:00 2001 From: Łukasz Rymanowski Date: Mon, 17 Mar 2025 13:45:08 +0000 Subject: flag: Remove leaudio_codec_config_callback_order_fix flag Flag has been delivered Bug: 326442537 Test: mmm packages/modules/Bluetooth Flag: EXEMPT, flag cleanup Change-Id: I9c28b4374fd6101b44c32f855c6d1fa04be54bd5 --- .../src/com/android/bluetooth/le_audio/LeAudioService.java | 5 ----- .../com/android/bluetooth/le_audio/LeAudioServiceTest.java | 3 --- flags/leaudio.aconfig | 10 ---------- system/bta/le_audio/client.cc | 12 ++++-------- system/bta/le_audio/le_audio_client_test.cc | 1 - 5 files changed, 4 insertions(+), 27 deletions(-) diff --git a/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java b/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java index 4f0d215e5b..3576d07c3c 100644 --- a/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java +++ b/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java @@ -3371,11 +3371,6 @@ public class LeAudioService extends ProfileService { boolean inputCodecOrFreqChanged) { Log.i(TAG, "notifyAudioFrameworkForCodecConfigUpdate groupId: " + groupId); - if (!Flags.leaudioCodecConfigCallbackOrderFix()) { - Log.d(TAG, "leaudio_codec_config_callback_order_fix is not enabled"); - return; - } - if (mActiveAudioOutDevice != null && outputCodecOrFreqChanged) { int volume = getAudioDeviceGroupVolume(groupId); diff --git a/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceTest.java index cf836ddc3c..77f42a6100 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceTest.java @@ -210,7 +210,6 @@ public class LeAudioServiceTest { public static List getParams() { return FlagsParameterization.progressionOf( Flags.FLAG_LEAUDIO_BROADCAST_PRIMARY_GROUP_SELECTION, - Flags.FLAG_LEAUDIO_CODEC_CONFIG_CALLBACK_ORDER_FIX, Flags.FLAG_LEAUDIO_UNICAST_NO_AVAILABLE_CONTEXTS, Flags.FLAG_LEAUDIO_BROADCAST_API_MANAGE_PRIMARY_GROUP, Flags.FLAG_DO_NOT_HARDCODE_TMAP_ROLE_MASK); @@ -1842,7 +1841,6 @@ public class LeAudioServiceTest { /** Test native interface group status message handling */ @Test - @EnableFlags(Flags.FLAG_LEAUDIO_CODEC_CONFIG_CALLBACK_ORDER_FIX) public void testMessageFromNativeGroupCodecConfigChangedNonActiveDevice() { onGroupCodecConfChangedCallbackCalled = false; @@ -1928,7 +1926,6 @@ public class LeAudioServiceTest { /** Test native interface group status message handling */ @Test - @EnableFlags(Flags.FLAG_LEAUDIO_CODEC_CONFIG_CALLBACK_ORDER_FIX) public void testMessageFromNativeGroupCodecConfigChangedActiveDevice_DifferentConfiguration() { onGroupCodecConfChangedCallbackCalled = false; diff --git a/flags/leaudio.aconfig b/flags/leaudio.aconfig index c475373093..bc9210e9b4 100644 --- a/flags/leaudio.aconfig +++ b/flags/leaudio.aconfig @@ -43,16 +43,6 @@ flag { } } -flag { - name: "leaudio_codec_config_callback_order_fix" - namespace: "bluetooth" - description: "Fix for the order on the callback" - bug: "326442537" - metadata { - purpose: PURPOSE_BUGFIX - } -} - flag { name: "leaudio_allow_leaudio_only_devices" namespace: "bluetooth" diff --git a/system/bta/le_audio/client.cc b/system/bta/le_audio/client.cc index e03c456b84..388070ef8a 100644 --- a/system/bta/le_audio/client.cc +++ b/system/bta/le_audio/client.cc @@ -1789,14 +1789,10 @@ public: /* Reset sink and source listener notified status */ sink_monitor_notified_status_ = std::nullopt; source_monitor_notified_status_ = std::nullopt; - if (com::android::bluetooth::flags::leaudio_codec_config_callback_order_fix()) { - SendAudioGroupSelectableCodecConfigChanged(group); - SendAudioGroupCurrentCodecConfigChanged(group); - callbacks_->OnGroupStatus(active_group_id_, GroupStatus::ACTIVE); - } else { - callbacks_->OnGroupStatus(active_group_id_, GroupStatus::ACTIVE); - SendAudioGroupSelectableCodecConfigChanged(group); - } + + SendAudioGroupSelectableCodecConfigChanged(group); + SendAudioGroupCurrentCodecConfigChanged(group); + callbacks_->OnGroupStatus(active_group_id_, GroupStatus::ACTIVE); } void SetEnableState(const RawAddress& address, bool enabled) override { diff --git a/system/bta/le_audio/le_audio_client_test.cc b/system/bta/le_audio/le_audio_client_test.cc index 10e2f2b561..a27c272872 100644 --- a/system/bta/le_audio/le_audio_client_test.cc +++ b/system/bta/le_audio/le_audio_client_test.cc @@ -4792,7 +4792,6 @@ TEST_F(UnicastTest, GroupSetActiveNonConnectedGroup) { } TEST_F(UnicastTest, GroupSetActive_CurrentCodecSentOfActive) { - com::android::bluetooth::flags::provider_->leaudio_codec_config_callback_order_fix(true); const RawAddress test_address0 = GetTestAddress(0); int group_id = bluetooth::groups::kGroupUnknown; -- cgit v1.2.3-59-g8ed1b From 36f54bc09b39cb478b0e7768f16557a280339ff8 Mon Sep 17 00:00:00 2001 From: Łukasz Rymanowski Date: Mon, 17 Mar 2025 14:55:19 +0000 Subject: flag: Remove le_audio_support_unidirectional_voice_assistant flag Flag has been delivered Bug: 332510824 Test: mmm packages/modules/Bluetooth Flag: EXEMPT, flag cleanup Change-Id: I43d79ad4975a4844a5dad560e8ec23595bf0ffb7 --- flags/leaudio.aconfig | 7 ------- system/bta/le_audio/device_groups.cc | 24 ++++++++++-------------- system/bta/le_audio/le_audio_client_test.cc | 3 --- 3 files changed, 10 insertions(+), 24 deletions(-) diff --git a/flags/leaudio.aconfig b/flags/leaudio.aconfig index bc9210e9b4..5675f8e795 100644 --- a/flags/leaudio.aconfig +++ b/flags/leaudio.aconfig @@ -68,13 +68,6 @@ flag { bug: "372840605" } -flag { - name: "le_audio_support_unidirectional_voice_assistant" - namespace: "bluetooth" - description: "Allow to create unidirectional stream for VOICEASSISTANT" - bug: "332510824" -} - flag { name: "run_clock_recovery_in_worker_thread" namespace: "bluetooth" diff --git a/system/bta/le_audio/device_groups.cc b/system/bta/le_audio/device_groups.cc index 43f27c0a31..6b1f98a6f8 100644 --- a/system/bta/le_audio/device_groups.cc +++ b/system/bta/le_audio/device_groups.cc @@ -862,8 +862,7 @@ LeAudioDeviceGroup::GetAudioSetConfigurationRequirements(types::LeAudioContextTy continue; } - if ((com::android::bluetooth::flags::le_audio_support_unidirectional_voice_assistant() && - ctx_type == types::LeAudioContextType::VOICEASSISTANTS) || + if (ctx_type == types::LeAudioContextType::VOICEASSISTANTS || ctx_type == types::LeAudioContextType::GAME) { // For GAME and VOICE ASSISTANT, ignore direction if it is not supported only on a single // direction. @@ -1689,19 +1688,16 @@ bool LeAudioDeviceGroup::IsAudioSetConfigurationSupported( continue; } - if (com::android::bluetooth::flags::le_audio_support_unidirectional_voice_assistant()) { - // Verify the direction requirements. - if (direction == types::kLeAudioDirectionSink && - requirements.sink_requirements->size() == 0) { - log::debug("There is no requirement for Sink direction."); - return false; - } + // Verify the direction requirements. + if (direction == types::kLeAudioDirectionSink && requirements.sink_requirements->size() == 0) { + log::debug("There is no requirement for Sink direction."); + return false; + } - if (direction == types::kLeAudioDirectionSource && - requirements.source_requirements->size() == 0) { - log::debug("There is no requirement for source direction."); - return false; - } + if (direction == types::kLeAudioDirectionSource && + requirements.source_requirements->size() == 0) { + log::debug("There is no requirement for source direction."); + return false; } // Match with requirement first if we have diff --git a/system/bta/le_audio/le_audio_client_test.cc b/system/bta/le_audio/le_audio_client_test.cc index a27c272872..5b72088f3d 100644 --- a/system/bta/le_audio/le_audio_client_test.cc +++ b/system/bta/le_audio/le_audio_client_test.cc @@ -6577,7 +6577,6 @@ TEST_F(UnicastTest, SpeakerStreamingNonDefault) { } TEST_F(UnicastTest, TestUnidirectionalGameAndLiveRecording) { - com::android::bluetooth::flags::provider_->le_audio_support_unidirectional_voice_assistant(true); const RawAddress test_address0 = GetTestAddress(0); int group_id = bluetooth::groups::kGroupUnknown; @@ -6768,7 +6767,6 @@ TEST_F(UnicastTest, TestUnidirectionalGameAndLiveRecordingMicOnlyDev) { } TEST_F(UnicastTest, TestUnidirectionalVoiceAssistant_Sink) { - com::android::bluetooth::flags::provider_->le_audio_support_unidirectional_voice_assistant(true); const RawAddress test_address0 = GetTestAddress(0); int group_id = bluetooth::groups::kGroupUnknown; @@ -6842,7 +6840,6 @@ TEST_F(UnicastTest, TestUnidirectionalVoiceAssistant_Sink) { } TEST_F(UnicastTest, TestUnidirectionalVoiceAssistant_Source) { - com::android::bluetooth::flags::provider_->le_audio_support_unidirectional_voice_assistant(true); const RawAddress test_address0 = GetTestAddress(0); int group_id = bluetooth::groups::kGroupUnknown; -- cgit v1.2.3-59-g8ed1b From e9fa461492231c8cc6249d208097ac314fd4f33c Mon Sep 17 00:00:00 2001 From: Łukasz Rymanowski Date: Mon, 17 Mar 2025 15:01:14 +0000 Subject: flag: Remove leaudio_unicast_no_available_contexts flag Flag has been delivered Bug: 367325041 Test: mmm packages/modules/Bluetooth Flag: EXEMPT, flag cleanup Change-Id: Ib0decd98bfadbcc4098912bfac77922ad7648c1a --- .../app/src/com/android/bluetooth/le_audio/LeAudioService.java | 5 ++--- .../src/com/android/bluetooth/le_audio/LeAudioServiceTest.java | 4 ---- flags/leaudio.aconfig | 10 ---------- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java b/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java index 3576d07c3c..54ced65311 100644 --- a/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java +++ b/android/app/src/com/android/bluetooth/le_audio/LeAudioService.java @@ -348,7 +348,7 @@ public class LeAudioService extends ProfileService { mLostLeadDeviceWhileStreaming = null; mCurrentLeadDevice = null; mInbandRingtoneEnabled = isInbandRingtoneEnabled; - mAvailableContexts = Flags.leaudioUnicastNoAvailableContexts() ? null : 0; + mAvailableContexts = null; mInputSelectableConfig = new ArrayList<>(); mOutputSelectableConfig = new ArrayList<>(); mInactivatedDueToContextType = false; @@ -4342,8 +4342,7 @@ public class LeAudioService extends ProfileService { if (getConnectedPeerDevices(groupId).isEmpty()) { descriptor.mIsConnected = false; descriptor.mAutoActiveModeEnabled = true; - descriptor.mAvailableContexts = - Flags.leaudioUnicastNoAvailableContexts() ? null : 0; + descriptor.mAvailableContexts = null; if (descriptor.isActive()) { /* Notify Native layer */ removeActiveDevice(hasFallbackDevice); diff --git a/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceTest.java index 77f42a6100..46255e6657 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceTest.java @@ -210,7 +210,6 @@ public class LeAudioServiceTest { public static List getParams() { return FlagsParameterization.progressionOf( Flags.FLAG_LEAUDIO_BROADCAST_PRIMARY_GROUP_SELECTION, - Flags.FLAG_LEAUDIO_UNICAST_NO_AVAILABLE_CONTEXTS, Flags.FLAG_LEAUDIO_BROADCAST_API_MANAGE_PRIMARY_GROUP, Flags.FLAG_DO_NOT_HARDCODE_TMAP_ROLE_MASK); } @@ -2835,7 +2834,6 @@ public class LeAudioServiceTest { * */ @Test - @EnableFlags(Flags.FLAG_LEAUDIO_UNICAST_NO_AVAILABLE_CONTEXTS) public void testActivateGroupWhenAvailableContextAreBack_Scenario1() { int groupId = 1; /* AUDIO_DIRECTION_OUTPUT_BIT = 0x01 */ @@ -2919,7 +2917,6 @@ public class LeAudioServiceTest { * */ @Test - @EnableFlags(Flags.FLAG_LEAUDIO_UNICAST_NO_AVAILABLE_CONTEXTS) public void testActivateDeviceWhenAvailableContextAreBack_Scenario2() { int groupId = 1; /* AUDIO_DIRECTION_OUTPUT_BIT = 0x01 */ @@ -3017,7 +3014,6 @@ public class LeAudioServiceTest { * 4. The available contexts are updated with non-zero value. Group becomes active. */ @Test - @EnableFlags(Flags.FLAG_LEAUDIO_UNICAST_NO_AVAILABLE_CONTEXTS) public void testActivateDeviceWhenAvailableContextAreBack_Scenario3() { int groupId = 1; /* AUDIO_DIRECTION_OUTPUT_BIT = 0x01 */ diff --git a/flags/leaudio.aconfig b/flags/leaudio.aconfig index 5675f8e795..0c005a3463 100644 --- a/flags/leaudio.aconfig +++ b/flags/leaudio.aconfig @@ -129,16 +129,6 @@ flag { } } -flag { - name: "leaudio_unicast_no_available_contexts" - namespace: "bluetooth" - description: "Fix handling initial zero available contexts" - bug: "367325041" - metadata { - purpose: PURPOSE_BUGFIX - } -} - flag { name: "leaudio_improve_switch_during_phone_call" namespace: "bluetooth" -- cgit v1.2.3-59-g8ed1b From 4356efed58e6b510fe73063016d57291f38ebe93 Mon Sep 17 00:00:00 2001 From: Łukasz Rymanowski Date: Mon, 17 Mar 2025 15:08:25 +0000 Subject: flag: Remove leaudio_improve_switch_during_phone_call flag Flag has been delivered Bug: 369322905 Test: mmm packages/modules/Bluetooth Flag: EXEMPT, flag cleanup Change-Id: I774c0dfb9b17848d5bc1ef1e97d611f8b277437f --- flags/leaudio.aconfig | 10 ---------- system/bta/le_audio/client.cc | 5 ----- system/bta/le_audio/le_audio_client_test.cc | 4 ---- 3 files changed, 19 deletions(-) diff --git a/flags/leaudio.aconfig b/flags/leaudio.aconfig index 0c005a3463..ad06ad64a1 100644 --- a/flags/leaudio.aconfig +++ b/flags/leaudio.aconfig @@ -129,16 +129,6 @@ flag { } } -flag { - name: "leaudio_improve_switch_during_phone_call" - namespace: "bluetooth" - description: "Fix audio slip to speaker while switching bt audio device during phonecall" - bug: "369322905" - metadata { - purpose: PURPOSE_BUGFIX - } -} - flag { name: "leaudio_sort_scans_to_sync_by_fails" namespace: "bluetooth" diff --git a/system/bta/le_audio/client.cc b/system/bta/le_audio/client.cc index 388070ef8a..ff1b7e2c77 100644 --- a/system/bta/le_audio/client.cc +++ b/system/bta/le_audio/client.cc @@ -1636,11 +1636,6 @@ public: } void PrepareStreamForAConversational(LeAudioDeviceGroup* group) { - if (!com::android::bluetooth::flags::leaudio_improve_switch_during_phone_call()) { - log::info("Flag leaudio_improve_switch_during_phone_call is not enabled"); - return; - } - log::debug("group_id: {}", group->group_id_); auto remote_direction = bluetooth::le_audio::types::kLeAudioDirectionSink; diff --git a/system/bta/le_audio/le_audio_client_test.cc b/system/bta/le_audio/le_audio_client_test.cc index 5b72088f3d..69cd0fe768 100644 --- a/system/bta/le_audio/le_audio_client_test.cc +++ b/system/bta/le_audio/le_audio_client_test.cc @@ -5022,7 +5022,6 @@ TEST_F(UnicastTest, GroupSetActive_and_InactiveDuringStreamConfiguration) { } TEST_F(UnicastTest, AnotherGroupSetActive_DuringMediaStream) { - com::android::bluetooth::flags::provider_->leaudio_improve_switch_during_phone_call(true); const RawAddress test_address0 = GetTestAddress(0); const RawAddress test_address1 = GetTestAddress(1); int group_id_1 = 1; @@ -5101,7 +5100,6 @@ TEST_F(UnicastTest, AnotherGroupSetActive_DuringMediaStream) { } TEST_F(UnicastTest, AnotherGroupSetActive_DuringVoip) { - com::android::bluetooth::flags::provider_->leaudio_improve_switch_during_phone_call(true); const RawAddress test_address0 = GetTestAddress(0); const RawAddress test_address1 = GetTestAddress(1); int group_id_1 = 1; @@ -5174,7 +5172,6 @@ TEST_F(UnicastTest, AnotherGroupSetActive_DuringVoip) { } TEST_F(UnicastTest, GroupSetActive_and_GroupSetInactive_DuringPhoneCall) { - com::android::bluetooth::flags::provider_->leaudio_improve_switch_during_phone_call(true); const RawAddress test_address0 = GetTestAddress(0); int group_id = bluetooth::groups::kGroupUnknown; @@ -5221,7 +5218,6 @@ TEST_F(UnicastTest, GroupSetActive_and_GroupSetInactive_DuringPhoneCall) { } TEST_F(UnicastTest, GroupSetActive_DuringPhoneCall_ThenResume) { - com::android::bluetooth::flags::provider_->leaudio_improve_switch_during_phone_call(true); const RawAddress test_address0 = GetTestAddress(0); int group_id = bluetooth::groups::kGroupUnknown; -- cgit v1.2.3-59-g8ed1b From 6870e5c16b24813e6a40078cc60777faed2ebae5 Mon Sep 17 00:00:00 2001 From: Łukasz Rymanowski Date: Mon, 17 Mar 2025 17:12:52 +0000 Subject: flag: Remove leaudio_mono_location_errata flag Flag has been delivered Bug: 331139722 Test: mmm packages/modules/Bluetooth Flag: EXEMPT, flag cleanup Change-Id: I0a52adef9694ca6b852f52621583840252f7fb2c --- flags/leaudio.aconfig | 10 ---------- system/bta/le_audio/codec_manager.cc | 7 ++----- system/bta/le_audio/codec_manager_test.cc | 4 ---- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/flags/leaudio.aconfig b/flags/leaudio.aconfig index ad06ad64a1..7a917fbaca 100644 --- a/flags/leaudio.aconfig +++ b/flags/leaudio.aconfig @@ -50,16 +50,6 @@ flag { bug: "328471369" } -flag { - name: "leaudio_mono_location_errata" - namespace: "bluetooth" - description: "Add mono location as per Bluetooth Assigned Numbers" - bug: "331139722" - metadata { - purpose: PURPOSE_BUGFIX - } -} - flag { name: "leaudio_mono_location_errata_api" is_exported: true diff --git a/system/bta/le_audio/codec_manager.cc b/system/bta/le_audio/codec_manager.cc index 104d397833..03ea6eede7 100644 --- a/system/bta/le_audio/codec_manager.cc +++ b/system/bta/le_audio/codec_manager.cc @@ -787,11 +787,8 @@ public: bool UpdateCisMonoConfiguration(const std::vector& cises, const stream_parameters& stream_params, uint8_t direction) { - if (!LeAudioHalVerifier::SupportsStreamActiveApi() || - !com::android::bluetooth::flags::leaudio_mono_location_errata()) { - log::error( - "SupportsStreamActiveApi() not supported or leaudio_mono_location_errata flag is not " - "enabled. Mono stream cannot be enabled"); + if (!LeAudioHalVerifier::SupportsStreamActiveApi()) { + log::error("SupportsStreamActiveApi() not supported. Mono stream cannot be enabled"); return false; } diff --git a/system/bta/le_audio/codec_manager_test.cc b/system/bta/le_audio/codec_manager_test.cc index c69464b72e..f238b959f8 100644 --- a/system/bta/le_audio/codec_manager_test.cc +++ b/system/bta/le_audio/codec_manager_test.cc @@ -369,8 +369,6 @@ public: // Disable codec extensibility by default osi_property_set_bool(kPropLeAudioCodecExtensibility, false); - com::android::bluetooth::flags::provider_->leaudio_mono_location_errata(false); - CodecManagerTestBase::SetUp(); } }; @@ -542,7 +540,6 @@ TEST_F(CodecManagerTestAdsp, testStreamConfigurationAdspDownMix) { } TEST_F(CodecManagerTestAdsp, testStreamConfigurationMono) { - com::android::bluetooth::flags::provider_->leaudio_mono_location_errata(true); const std::vector offloading_preference(0); codec_manager->Start(offloading_preference); @@ -1343,7 +1340,6 @@ TEST_F(CodecManagerTestHost, test_dont_call_hal_for_config) { } TEST_F(CodecManagerTestAdsp, testStreamConfigurationVendor) { - com::android::bluetooth::flags::provider_->leaudio_mono_location_errata(true); osi_property_set_bool(kPropLeAudioCodecExtensibility, true); const std::vector offloading_preference(0); -- cgit v1.2.3-59-g8ed1b From 51af1f1d0252f12cefe360037861a75859d667ca Mon Sep 17 00:00:00 2001 From: William Escande Date: Thu, 20 Mar 2025 13:32:03 -0700 Subject: BlockingAdapter: remove STATE_UNKNOWN STATE_UNKNOWN was an attempt to enforce we are not in a transitionary state, but "isLeEnabled" already does that. This state is currently miss-behaving if the test start while bluetooth is already off. Bug: 404722316 Fix: 404722316 Test: atest CtsRangingTestCases Flag: TEST_ONLY Change-Id: I3546a3f8628d6c87fa26a28e6a9fbf8604734a1e --- framework/tests/util/src/BlockingBluetoothAdapter.kt | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/framework/tests/util/src/BlockingBluetoothAdapter.kt b/framework/tests/util/src/BlockingBluetoothAdapter.kt index 13ea7aee9b..5d55b80c51 100644 --- a/framework/tests/util/src/BlockingBluetoothAdapter.kt +++ b/framework/tests/util/src/BlockingBluetoothAdapter.kt @@ -145,22 +145,14 @@ object BlockingBluetoothAdapter { Log.e(TAG, "disable: Failed") return false } - // Notify that disable was call. - state.wasDisabled = true return state.waitForStateWithTimeout(stateChangeTimeout, STATE_OFF) } } private class AdapterStateListener(context: Context, private val adapter: BluetoothAdapter) { - private val STATE_UNKNOWN = -42 private val STATE_BLE_TURNING_ON = 14 // BluetoothAdapter.STATE_BLE_TURNING_ON private val STATE_BLE_TURNING_OFF = 16 // BluetoothAdapter.STATE_BLE_TURNING_OFF - // Set to true once a call to disable is made, in order to force the differentiation between the - // various state hidden within STATE_OFF (OFF, BLE_TURNING_ON, BLE_TURNING_OFF) - // Once true, getter will return STATE_OFF when there has not been any callback sent to it - var wasDisabled = false - val adapterStateFlow = callbackFlow { val broadcastReceiver = @@ -184,10 +176,8 @@ private class AdapterStateListener(context: Context, private val adapter: Blueto state } else if (adapter.isLeEnabled()) { STATE_BLE_ON - } else if (wasDisabled) { - STATE_OFF } else { - STATE_UNKNOWN + STATE_OFF } } @@ -200,7 +190,6 @@ private class AdapterStateListener(context: Context, private val adapter: Blueto // Cts cannot use BluetoothAdapter.nameForState prior to T, some module test on R private fun nameForState(state: Int): String { return when (state) { - STATE_UNKNOWN -> "UNKNOWN: State is oneOf(OFF, BLE_TURNING_ON, BLE_TURNING_OFF)" STATE_OFF -> "OFF" STATE_TURNING_ON -> "TURNING_ON" STATE_ON -> "ON" -- cgit v1.2.3-59-g8ed1b From 103b98c64230e494cadd063493ad2b8dae89384b Mon Sep 17 00:00:00 2001 From: William Escande Date: Thu, 20 Mar 2025 13:49:55 -0700 Subject: getAdapterProxy: null-check re-order Bug: 404290817 Fix: 404290817 Bug: 404058947 Flag: EXEMPT bugfix obvious and without risk Test: atest CtsBluetoothTestCases Change-Id: I18e528e7324c81d710952425b7dfacf4a504bf40 --- framework/java/android/bluetooth/BluetoothAdapter.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/java/android/bluetooth/BluetoothAdapter.java b/framework/java/android/bluetooth/BluetoothAdapter.java index 1b37497323..b7feb11e19 100644 --- a/framework/java/android/bluetooth/BluetoothAdapter.java +++ b/framework/java/android/bluetooth/BluetoothAdapter.java @@ -3460,14 +3460,14 @@ public final class BluetoothAdapter { BiFunction constructor = PROFILE_CONSTRUCTORS.get(profile); - BluetoothProfile profileProxy = constructor.apply(context, this); - ProfileConnection connection = new ProfileConnection(profile, listener, executor); - if (constructor == null) { Log.e(TAG, "getProfileProxy(): Unknown profile " + profile); return false; } + BluetoothProfile profileProxy = constructor.apply(context, this); + ProfileConnection connection = new ProfileConnection(profile, listener, executor); + synchronized (sProfileLock) { // Synchronize with the binder callback to prevent performing the // ProfileConnection.connect concurrently -- cgit v1.2.3-59-g8ed1b From abe4240103a45172ca58bdbbe557c50091de3af0 Mon Sep 17 00:00:00 2001 From: Ömer Faruk Yılmaz Date: Wed, 19 Mar 2025 15:41:09 +0000 Subject: Add ScanClientTest Bug: 404652736 Test: atest ScanClientTest Flag: EXEMPT test only Change-Id: I37c95a2d444647437196c9b6566bb8061393efd8 --- .../android/bluetooth/le_scan/ScanClientTest.kt | 90 ++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 android/app/tests/unit/src/com/android/bluetooth/le_scan/ScanClientTest.kt diff --git a/android/app/tests/unit/src/com/android/bluetooth/le_scan/ScanClientTest.kt b/android/app/tests/unit/src/com/android/bluetooth/le_scan/ScanClientTest.kt new file mode 100644 index 0000000000..3cff05a6fe --- /dev/null +++ b/android/app/tests/unit/src/com/android/bluetooth/le_scan/ScanClientTest.kt @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2025 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.bluetooth.le_scan + +import android.bluetooth.le.ScanFilter +import android.bluetooth.le.ScanSettings +import androidx.test.ext.junit.runners.AndroidJUnit4 +import androidx.test.filters.SmallTest +import com.google.common.testing.EqualsTester +import com.google.common.truth.Truth.assertThat +import org.junit.Test +import org.junit.runner.RunWith + +/** Test cases for [ScanClient]. */ +@SmallTest +@RunWith(AndroidJUnit4::class) +class ScanClientTest { + + private val scanClient = ScanClient(1) + + @Test + fun constructor() { + val scanClientWithDefaultSettings = ScanClient(1) + assertThat(scanClientWithDefaultSettings.mSettings.scanMode) + .isEqualTo(ScanSettings.SCAN_MODE_LOW_LATENCY) + } + + @Test + fun constructor_withFilters() { + val filters = listOf(ScanFilter.Builder().build()) + val scanSettings = ScanSettings.Builder().build() + val scanClientWithFilters = ScanClient(1, scanSettings, filters) + assertThat(scanClientWithFilters.mFilters).isEqualTo(filters) + } + + @Test + fun constructor_withAppUid() { + val appUid = 1234 + val scanSettings = ScanSettings.Builder().build() + val scanClientWithAppUid = ScanClient(1, scanSettings, null, appUid) + assertThat(scanClientWithAppUid.mAppUid).isEqualTo(appUid) + } + + @Test + fun equals() { + val scanSettings = ScanSettings.Builder().build() + EqualsTester() + .addEqualityGroup( + ScanClient(1, scanSettings, null), + ScanClient(1, scanSettings, null), + ScanClient(1, scanSettings, listOf(ScanFilter.Builder().build())), + ScanClient(1, scanSettings, null, 1234), + ScanClient(1, scanSettings, null, 5678), + ) + .addEqualityGroup(ScanClient(2, scanSettings, null)) + .testEquals() + } + + @Test + fun toString_doesNotCrash() { + scanClient.toString() + } + + @Test + fun updateScanMode() { + val newScanMode = ScanSettings.SCAN_MODE_BALANCED + val updated = scanClient.updateScanMode(newScanMode) + assertThat(updated).isTrue() + assertThat(scanClient.mSettings.scanMode).isEqualTo(newScanMode) + + val sameScanMode = scanClient.mSettings.scanMode + val notUpdated = scanClient.updateScanMode(sameScanMode) + assertThat(notUpdated).isFalse() + assertThat(scanClient.mSettings.scanMode).isEqualTo(sameScanMode) + } +} -- cgit v1.2.3-59-g8ed1b From 0fef2c96d722d99ae2127fec6a671bac4c21068e Mon Sep 17 00:00:00 2001 From: Ömer Faruk Yılmaz Date: Fri, 21 Mar 2025 01:40:52 +0000 Subject: Add "Test cases for ...Test" to all unit tests This makes it easy to jump the source code via CTRL/CMD + click when viewing the test files in Code Search and most IDEs. Bug: 404652736 Test: atest BluetoothJavaUnitTests Flag: EXEMPT test only Change-Id: I68011122e04084441825a6a09775bcbfdd3c3058 --- .../com/android/bluetooth/btservice/AdapterServiceTest.java | 1 + .../com/android/bluetooth/opp/BluetoothOppBtEnableActivityTest.java | 1 + .../com/android/bluetooth/opp/BluetoothOppBtEnablingActivityTest.java | 1 + .../com/android/bluetooth/opp/BluetoothOppLauncherActivityTest.java | 1 + .../com/android/bluetooth/opp/BluetoothOppServiceCleanupTest.java | 1 + .../com/android/bluetooth/opp/BluetoothOppUtilityTest.java | 1 + .../com/android/bluetooth/opp/IncomingFileConfirmActivityTest.java | 1 + .../com/android/bluetooth/pbap/BluetoothPbapActivityTest.java | 1 + .../instrumentation/com/android/bluetooth/telephony/CallInfoTest.java | 1 + .../app/tests/unit/src/com/android/bluetooth/ObexAppParametersTest.java | 1 + .../app/tests/unit/src/com/android/bluetooth/SignedLongLongTest.java | 2 +- .../tests/unit/src/com/android/bluetooth/a2dp/A2dpCodecConfigTest.java | 1 + .../unit/src/com/android/bluetooth/a2dp/A2dpServiceBinderTest.java | 2 +- .../app/tests/unit/src/com/android/bluetooth/a2dp/A2dpServiceTest.java | 1 + .../tests/unit/src/com/android/bluetooth/a2dp/A2dpStateMachineTest.java | 1 + .../src/com/android/bluetooth/a2dpsink/A2dpSinkServiceBinderTest.java | 2 +- .../unit/src/com/android/bluetooth/a2dpsink/A2dpSinkServiceTest.java | 1 + .../src/com/android/bluetooth/a2dpsink/A2dpSinkStateMachineTest.java | 1 + .../src/com/android/bluetooth/a2dpsink/A2dpSinkStreamHandlerTest.java | 1 + .../tests/unit/src/com/android/bluetooth/a2dpsink/StackEventTest.java | 1 + .../com/android/bluetooth/audio_util/BrowsablePlayerConnectorTest.java | 1 + .../src/com/android/bluetooth/audio_util/BrowserPlayerWrapperTest.java | 1 + .../tests/unit/src/com/android/bluetooth/audio_util/GPMWrapperTest.java | 1 + .../app/tests/unit/src/com/android/bluetooth/audio_util/ImageTest.java | 1 + .../unit/src/com/android/bluetooth/audio_util/MediaPlayerListTest.java | 1 + .../src/com/android/bluetooth/audio_util/MediaPlayerWrapperTest.java | 1 + .../tests/unit/src/com/android/bluetooth/audio_util/MetadataTest.java | 1 + .../unit/src/com/android/bluetooth/avrcp/AvrcpBipObexServerTest.java | 1 + .../unit/src/com/android/bluetooth/avrcp/AvrcpCoverArtStorageTest.java | 1 + .../unit/src/com/android/bluetooth/avrcp/AvrcpPassthroughTest.java | 1 + .../unit/src/com/android/bluetooth/avrcp/AvrcpTargetServiceTest.java | 1 + .../unit/src/com/android/bluetooth/avrcp/AvrcpVolumeManagerTest.java | 1 + .../app/tests/unit/src/com/android/bluetooth/avrcp/CoverArtTest.java | 1 + .../src/com/android/bluetooth/avrcpcontroller/AvrcpBipClientTest.java | 1 + .../bluetooth/avrcpcontroller/AvrcpControllerNativeInterfaceTest.java | 1 + .../bluetooth/avrcpcontroller/AvrcpControllerServiceBinderTest.java | 2 +- .../android/bluetooth/avrcpcontroller/AvrcpControllerServiceTest.java | 1 + .../bluetooth/avrcpcontroller/AvrcpControllerStateMachineTest.java | 1 + .../android/bluetooth/avrcpcontroller/AvrcpCoverArtProviderTest.java | 1 + .../com/android/bluetooth/avrcpcontroller/AvrcpCoverArtStorageTest.java | 2 +- .../unit/src/com/android/bluetooth/avrcpcontroller/AvrcpItemTest.java | 2 +- .../unit/src/com/android/bluetooth/avrcpcontroller/AvrcpPlayerTest.java | 1 + .../unit/src/com/android/bluetooth/avrcpcontroller/BrowseNodeTest.java | 1 + .../unit/src/com/android/bluetooth/avrcpcontroller/BrowseTreeTest.java | 1 + .../bluetooth/avrcpcontroller/PlayerApplicationSettingsTest.java | 1 + .../unit/src/com/android/bluetooth/avrcpcontroller/StackEventTest.java | 1 + .../android/bluetooth/avrcpcontroller/bip/BipAttachmentFormatTest.java | 2 +- .../src/com/android/bluetooth/avrcpcontroller/bip/BipDatetimeTest.java | 2 +- .../src/com/android/bluetooth/avrcpcontroller/bip/BipEncodingTest.java | 2 +- .../android/bluetooth/avrcpcontroller/bip/BipImageDescriptorTest.java | 2 +- .../com/android/bluetooth/avrcpcontroller/bip/BipImageFormatTest.java | 2 +- .../android/bluetooth/avrcpcontroller/bip/BipImagePropertiesTest.java | 2 +- .../src/com/android/bluetooth/avrcpcontroller/bip/BipImageTest.java | 2 +- .../src/com/android/bluetooth/avrcpcontroller/bip/BipPixelTest.java | 2 +- .../android/bluetooth/avrcpcontroller/bip/BipTransformationTest.java | 2 +- .../bluetooth/avrcpcontroller/bip/RequestGetImagePropertiesTest.java | 1 + .../com/android/bluetooth/avrcpcontroller/bip/RequestGetImageTest.java | 1 + .../tests/unit/src/com/android/bluetooth/bas/BatteryServiceTest.java | 1 + .../unit/src/com/android/bluetooth/bas/BatteryStateMachineTest.java | 1 + .../tests/unit/src/com/android/bluetooth/bass_client/BaseDataTest.java | 1 + .../com/android/bluetooth/bass_client/BassClientServiceBinderTest.java | 2 +- .../src/com/android/bluetooth/bass_client/BassClientServiceTest.java | 2 +- .../com/android/bluetooth/bass_client/BassClientStateMachineTest.java | 1 + .../android/bluetooth/bass_client/PeriodicAdvertisementResultTest.java | 1 + .../src/com/android/bluetooth/bass_client/PublicBroadcastDataTest.java | 1 + .../src/com/android/bluetooth/btservice/ActiveDeviceManagerTest.java | 1 + .../unit/src/com/android/bluetooth/btservice/AdapterPropertiesTest.java | 1 + .../src/com/android/bluetooth/btservice/AdapterServiceBinderTest.java | 2 +- .../unit/src/com/android/bluetooth/btservice/AdapterSuspendTest.java | 1 + .../unit/src/com/android/bluetooth/btservice/BondStateMachineTest.java | 1 + .../unit/src/com/android/bluetooth/btservice/CompanionManagerTest.java | 1 + .../app/tests/unit/src/com/android/bluetooth/btservice/ConfigTest.java | 1 + .../unit/src/com/android/bluetooth/btservice/DataMigrationTest.java | 1 + .../unit/src/com/android/bluetooth/btservice/MetricsLoggerTest.java | 2 +- .../tests/unit/src/com/android/bluetooth/btservice/PhonePolicyTest.java | 1 + .../unit/src/com/android/bluetooth/btservice/ProfileServiceTest.java | 1 + .../unit/src/com/android/bluetooth/btservice/RemoteDevicesTest.java | 1 + .../src/com/android/bluetooth/btservice/SilenceDeviceManagerTest.java | 1 + .../btservice/bluetoothKeystore/BluetoothKeystoreServiceTest.java | 1 + .../com/android/bluetooth/btservice/storage/AudioPolicyEntityTest.java | 1 + .../com/android/bluetooth/btservice/storage/DatabaseManagerTest.java | 1 + .../bluetooth/content_profiles/ContentProfileErrorReportUtilsTest.java | 1 + .../com/android/bluetooth/csip/CsipSetCoordinatorServiceBinderTest.java | 2 +- .../src/com/android/bluetooth/csip/CsipSetCoordinatorServiceTest.java | 1 + .../com/android/bluetooth/csip/CsipSetCoordinatorStateMachineTest.java | 1 + .../tests/unit/src/com/android/bluetooth/gatt/AdvertiseBinderTest.kt | 2 +- .../src/com/android/bluetooth/gatt/DistanceMeasurementBinderTest.kt | 2 +- .../unit/src/com/android/bluetooth/gatt/GattServiceBinderTest.java | 2 +- .../unit/src/com/android/bluetooth/hap/HapClientNativeCallbackTest.java | 1 + .../unit/src/com/android/bluetooth/hap/HapClientServiceBinderTest.java | 2 +- .../tests/unit/src/com/android/bluetooth/hap/HapClientServiceTest.java | 1 + .../unit/src/com/android/bluetooth/hap/HapClientStackEventTest.java | 1 + .../unit/src/com/android/bluetooth/hap/HapClientStateMachineTest.java | 1 + .../com/android/bluetooth/hearingaid/HearingAidNativeInterfaceTest.java | 1 + .../com/android/bluetooth/hearingaid/HearingAidServiceBinderTest.java | 2 +- .../src/com/android/bluetooth/hearingaid/HearingAidServiceTest.java | 1 + .../com/android/bluetooth/hearingaid/HearingAidStateMachineTest.java | 1 + .../app/tests/unit/src/com/android/bluetooth/hfp/AtPhonebookTest.java | 1 + .../com/android/bluetooth/hfp/HeadsetAgIndicatorEnableStateTest.java | 1 + .../unit/src/com/android/bluetooth/hfp/HeadsetClccResponseTest.java | 1 + .../tests/unit/src/com/android/bluetooth/hfp/HeadsetPhoneStateTest.java | 2 +- .../com/android/bluetooth/hfp/HeadsetServiceAndStateMachineTest.java | 1 + .../unit/src/com/android/bluetooth/hfp/HeadsetServiceBinderTest.java | 2 +- .../tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceTest.java | 2 +- .../tests/unit/src/com/android/bluetooth/hfp/HeadsetStackEventTest.java | 1 + .../unit/src/com/android/bluetooth/hfp/HeadsetStateMachineTest.java | 2 +- .../com/android/bluetooth/hfp/HeadsetVendorSpecificResultCodeTest.java | 1 + .../com/android/bluetooth/hfpclient/HeadsetClientServiceBinderTest.java | 2 +- .../src/com/android/bluetooth/hfpclient/HeadsetClientServiceTest.java | 1 + .../com/android/bluetooth/hfpclient/HeadsetClientStateMachineTest.java | 1 + .../src/com/android/bluetooth/hfpclient/HfpNativeInterfaceTest.java | 1 + .../tests/unit/src/com/android/bluetooth/hfpclient/StackEventTest.java | 1 + .../android/bluetooth/hfpclient/VendorCommandResponseProcessorTest.java | 1 + .../bluetooth/hfpclient/connserv/HeadsetClientServiceInterfaceTest.java | 1 + .../src/com/android/bluetooth/hfpclient/connserv/HfpClientCallTest.java | 1 + .../bluetooth/hfpclient/connserv/HfpClientConnectionServiceTest.java | 1 + .../android/bluetooth/hfpclient/connserv/HfpClientConnectionTest.java | 1 + .../android/bluetooth/hfpclient/connserv/HfpClientDeviceBlockTest.java | 2 +- .../src/com/android/bluetooth/hid/HidDeviceNativeInterfaceTest.java | 1 + .../unit/src/com/android/bluetooth/hid/HidDeviceServiceBinderTest.java | 2 +- .../tests/unit/src/com/android/bluetooth/hid/HidDeviceServiceTest.java | 1 + .../tests/unit/src/com/android/bluetooth/hid/HidHostServiceTest.java | 1 + .../src/com/android/bluetooth/le_audio/ContentControlIdKeeperTest.java | 1 + .../src/com/android/bluetooth/le_audio/LeAudioBroadcastServiceTest.java | 1 + .../bluetooth/le_audio/LeAudioBroadcasterNativeInterfaceTest.java | 1 + .../src/com/android/bluetooth/le_audio/LeAudioNativeInterfaceTest.java | 1 + .../src/com/android/bluetooth/le_audio/LeAudioServiceBinderTest.java | 2 +- .../unit/src/com/android/bluetooth/le_audio/LeAudioServiceTest.java | 1 + .../src/com/android/bluetooth/le_audio/LeAudioStateMachineTest.java | 1 + .../src/com/android/bluetooth/le_audio/LeAudioTmapGattServerTest.java | 1 + .../unit/src/com/android/bluetooth/le_scan/MsftAdvMonitorTest.java | 1 + .../app/tests/unit/src/com/android/bluetooth/le_scan/ScanBinderTest.kt | 2 +- .../unit/src/com/android/bluetooth/map/BluetoothMapAccountItemTest.java | 1 + .../unit/src/com/android/bluetooth/map/BluetoothMapAppParamsTest.java | 1 + .../src/com/android/bluetooth/map/BluetoothMapContentObserverTest.java | 1 + .../unit/src/com/android/bluetooth/map/BluetoothMapContentTest.java | 1 + .../com/android/bluetooth/map/BluetoothMapConvoContactElementTest.java | 1 + .../com/android/bluetooth/map/BluetoothMapConvoListingElementTest.java | 1 + .../src/com/android/bluetooth/map/BluetoothMapConvoListingTest.java | 1 + .../src/com/android/bluetooth/map/BluetoothMapFolderElementTest.java | 1 + .../unit/src/com/android/bluetooth/map/BluetoothMapMasInstanceTest.java | 1 + .../android/bluetooth/map/BluetoothMapMessageListingElementTest.java | 1 + .../src/com/android/bluetooth/map/BluetoothMapMessageListingTest.java | 1 + .../unit/src/com/android/bluetooth/map/BluetoothMapObexServerTest.java | 1 + .../src/com/android/bluetooth/map/BluetoothMapServiceBinderTest.java | 2 +- .../unit/src/com/android/bluetooth/map/BluetoothMapServiceTest.java | 1 + .../unit/src/com/android/bluetooth/map/BluetoothMapSmsPduTest.java | 1 + .../tests/unit/src/com/android/bluetooth/map/BluetoothMapUtilsTest.java | 1 + .../src/com/android/bluetooth/map/BluetoothMapbMessageEmailTest.java | 1 + .../src/com/android/bluetooth/map/BluetoothMapbMessageMimeTest.java | 1 + .../unit/src/com/android/bluetooth/map/BluetoothMapbMessageSmsTest.java | 1 + .../unit/src/com/android/bluetooth/map/BluetoothMapbMessageTest.java | 1 + .../src/com/android/bluetooth/map/BluetoothMapbMessageVCardTest.java | 1 + .../tests/unit/src/com/android/bluetooth/map/ConvoContactInfoTest.java | 1 + android/app/tests/unit/src/com/android/bluetooth/map/EventTest.java | 1 + .../app/tests/unit/src/com/android/bluetooth/map/FilterInfoTest.java | 1 + .../app/tests/unit/src/com/android/bluetooth/map/MapContactTest.java | 1 + android/app/tests/unit/src/com/android/bluetooth/map/MsgTest.java | 1 + .../tests/unit/src/com/android/bluetooth/map/SmsMmsContactsTest.java | 1 + .../unit/src/com/android/bluetooth/mapapi/BluetoothMapContractTest.java | 1 + .../src/com/android/bluetooth/mapapi/BluetoothMapEmailProviderTest.java | 1 + .../src/com/android/bluetooth/mapapi/BluetoothMapIMProviderTest.java | 1 + .../tests/unit/src/com/android/bluetooth/mapclient/BmessageTest.java | 1 + .../tests/unit/src/com/android/bluetooth/mapclient/EventReportTest.java | 1 + .../unit/src/com/android/bluetooth/mapclient/MapClientContentTest.java | 1 + .../src/com/android/bluetooth/mapclient/MapClientServiceBinderTest.java | 2 +- .../unit/src/com/android/bluetooth/mapclient/MapClientServiceTest.java | 1 + .../src/com/android/bluetooth/mapclient/MapClientStateMachineTest.java | 1 + .../app/tests/unit/src/com/android/bluetooth/mapclient/MessageTest.java | 1 + .../unit/src/com/android/bluetooth/mapclient/MessagesFilterTest.java | 1 + .../unit/src/com/android/bluetooth/mapclient/MessagesListingTest.java | 1 + .../unit/src/com/android/bluetooth/mapclient/MnsObexServerTest.java | 1 + .../tests/unit/src/com/android/bluetooth/mapclient/ObexTimeTest.java | 1 + .../tests/unit/src/com/android/bluetooth/mcp/McpServiceBinderTest.java | 2 +- .../app/tests/unit/src/com/android/bluetooth/mcp/McpServiceTest.java | 1 + .../unit/src/com/android/bluetooth/mcp/MediaControlGattServiceTest.java | 1 + .../unit/src/com/android/bluetooth/mcp/MediaControlProfileTest.java | 1 + .../tests/unit/src/com/android/bluetooth/opp/BluetoothOppBatchTest.java | 1 + .../src/com/android/bluetooth/opp/BluetoothOppHandoverReceiverTest.java | 1 + .../unit/src/com/android/bluetooth/opp/BluetoothOppManagerTest.java | 1 + .../src/com/android/bluetooth/opp/BluetoothOppNotificationTest.java | 1 + .../com/android/bluetooth/opp/BluetoothOppObexClientSessionTest.java | 1 + .../com/android/bluetooth/opp/BluetoothOppObexServerSessionTest.java | 1 + .../unit/src/com/android/bluetooth/opp/BluetoothOppPreferenceTest.java | 1 + .../src/com/android/bluetooth/opp/BluetoothOppReceiveFileInfoTest.java | 1 + .../unit/src/com/android/bluetooth/opp/BluetoothOppReceiverTest.java | 1 + .../src/com/android/bluetooth/opp/BluetoothOppSendFileInfoTest.java | 1 + .../unit/src/com/android/bluetooth/opp/BluetoothOppServiceTest.java | 1 + .../unit/src/com/android/bluetooth/opp/BluetoothOppShareInfoTest.java | 1 + .../src/com/android/bluetooth/opp/BluetoothOppTransferActivityTest.java | 1 + .../src/com/android/bluetooth/opp/BluetoothOppTransferHistoryTest.java | 2 +- .../unit/src/com/android/bluetooth/opp/BluetoothOppTransferTest.java | 2 +- .../unit/src/com/android/bluetooth/opp/BluetoothOppUtilityTest.java | 1 + .../tests/unit/src/com/android/bluetooth/pan/PanServiceBinderTest.java | 2 +- .../app/tests/unit/src/com/android/bluetooth/pan/PanServiceTest.java | 1 + .../src/com/android/bluetooth/pbap/BluetoothPbapAuthenticatorTest.java | 1 + .../com/android/bluetooth/pbap/BluetoothPbapCallLogComposerTest.java | 1 + .../unit/src/com/android/bluetooth/pbap/BluetoothPbapConfigTest.java | 1 + .../src/com/android/bluetooth/pbap/BluetoothPbapObexServerTest.java | 1 + .../src/com/android/bluetooth/pbap/BluetoothPbapServiceBinderTest.java | 2 +- .../unit/src/com/android/bluetooth/pbap/BluetoothPbapServiceTest.java | 1 + .../com/android/bluetooth/pbap/BluetoothPbapSimVcardManagerTest.java | 1 + .../unit/src/com/android/bluetooth/pbap/BluetoothPbapUtilsTest.java | 1 + .../bluetooth/pbap/BluetoothPbapVcardManagerNestedClassesTest.java | 1 + .../src/com/android/bluetooth/pbap/BluetoothPbapVcardManagerTest.java | 1 + .../unit/src/com/android/bluetooth/pbap/HandlerForStringBufferTest.java | 1 + .../tests/unit/src/com/android/bluetooth/pbap/PbapStateMachineTest.java | 1 + .../com/android/bluetooth/pbapclient/PbapApplicationParametersTest.java | 1 + .../bluetooth/pbapclient/PbapClientAccountAuthenticatorServiceTest.java | 1 + .../bluetooth/pbapclient/PbapClientAccountAuthenticatorTest.java | 1 + .../com/android/bluetooth/pbapclient/PbapClientAccountManagerTest.java | 1 + .../android/bluetooth/pbapclient/PbapClientConnectionHandlerTest.java | 1 + .../com/android/bluetooth/pbapclient/PbapClientContactsStorageTest.java | 1 + .../android/bluetooth/pbapclient/PbapClientObexAuthenticatorTest.java | 1 + .../src/com/android/bluetooth/pbapclient/PbapClientObexClientTest.java | 1 + .../com/android/bluetooth/pbapclient/PbapClientObexTransportTest.java | 1 + .../com/android/bluetooth/pbapclient/PbapClientServiceBinderTest.java | 2 +- .../src/com/android/bluetooth/pbapclient/PbapClientServiceTest.java | 1 + .../unit/src/com/android/bluetooth/pbapclient/PbapClientSocketTest.java | 1 + .../com/android/bluetooth/pbapclient/PbapClientStateMachineOldTest.java | 1 + .../com/android/bluetooth/pbapclient/PbapClientStateMachineTest.java | 1 + .../src/com/android/bluetooth/pbapclient/PbapPhonebookMetadataTest.java | 1 + .../unit/src/com/android/bluetooth/pbapclient/PbapPhonebookTest.java | 1 + .../unit/src/com/android/bluetooth/pbapclient/PbapSdpRecordTest.java | 1 + .../src/com/android/bluetooth/pbapclient/PhonebookPullRequestTest.java | 1 + .../android/bluetooth/pbapclient/RequestPullPhonebookMetadataTest.java | 1 + .../src/com/android/bluetooth/pbapclient/RequestPullPhonebookTest.java | 1 + .../app/tests/unit/src/com/android/bluetooth/sap/SapMessageTest.java | 1 + .../unit/src/com/android/bluetooth/sap/SapRilReceiverHidlTest.java | 1 + .../tests/unit/src/com/android/bluetooth/sap/SapRilReceiverTest.java | 1 + android/app/tests/unit/src/com/android/bluetooth/sap/SapServerTest.java | 1 + .../tests/unit/src/com/android/bluetooth/sap/SapServiceBinderTest.java | 2 +- .../app/tests/unit/src/com/android/bluetooth/sap/SapServiceTest.java | 1 + android/app/tests/unit/src/com/android/bluetooth/tbs/TbsGattTest.java | 1 + .../app/tests/unit/src/com/android/bluetooth/tbs/TbsGenericTest.java | 1 + .../tests/unit/src/com/android/bluetooth/tbs/TbsServiceBinderTest.java | 2 +- .../unit/src/com/android/bluetooth/telephony/BluetoothCallTest.java | 1 + .../src/com/android/bluetooth/vc/VolumeControlInputDescriptorTest.java | 1 + .../src/com/android/bluetooth/vc/VolumeControlNativeCallbackTest.java | 1 + .../src/com/android/bluetooth/vc/VolumeControlOffsetDescriptorTest.java | 1 + .../src/com/android/bluetooth/vc/VolumeControlServiceBinderTest.java | 2 +- .../unit/src/com/android/bluetooth/vc/VolumeControlServiceTest.java | 1 + .../src/com/android/bluetooth/vc/VolumeControlStateMachineTest.java | 1 + .../tests/unit/src/android/bluetooth/BluetoothCodecConfigTest.java | 2 +- .../tests/unit/src/android/bluetooth/BluetoothCodecStatusTest.java | 2 +- .../unit/src/android/bluetooth/BluetoothLeAudioCodecConfigTest.java | 2 +- framework/tests/unit/src/android/bluetooth/BluetoothUuidTest.java | 2 +- framework/tests/unit/src/android/bluetooth/le/ScanFilterTest.java | 2 +- framework/tests/unit/src/android/bluetooth/le/ScanRecordTest.java | 2 +- framework/tests/unit/src/android/bluetooth/le/ScanSettingsTest.java | 2 +- 250 files changed, 250 insertions(+), 52 deletions(-) diff --git a/android/app/tests/instrumentation/com/android/bluetooth/btservice/AdapterServiceTest.java b/android/app/tests/instrumentation/com/android/bluetooth/btservice/AdapterServiceTest.java index 768c62ee34..33dd02ef1f 100644 --- a/android/app/tests/instrumentation/com/android/bluetooth/btservice/AdapterServiceTest.java +++ b/android/app/tests/instrumentation/com/android/bluetooth/btservice/AdapterServiceTest.java @@ -97,6 +97,7 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.List; +/** Test cases for {@link AdapterService}. */ @MediumTest @RunWith(ParameterizedAndroidJunit4.class) public class AdapterServiceTest { diff --git a/android/app/tests/instrumentation/com/android/bluetooth/opp/BluetoothOppBtEnableActivityTest.java b/android/app/tests/instrumentation/com/android/bluetooth/opp/BluetoothOppBtEnableActivityTest.java index 23b8b132f3..98af642bfd 100644 --- a/android/app/tests/instrumentation/com/android/bluetooth/opp/BluetoothOppBtEnableActivityTest.java +++ b/android/app/tests/instrumentation/com/android/bluetooth/opp/BluetoothOppBtEnableActivityTest.java @@ -47,6 +47,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; +/** Test cases for {@link BluetoothOppBtEnableActivity}. */ public class BluetoothOppBtEnableActivityTest { Intent mIntent; diff --git a/android/app/tests/instrumentation/com/android/bluetooth/opp/BluetoothOppBtEnablingActivityTest.java b/android/app/tests/instrumentation/com/android/bluetooth/opp/BluetoothOppBtEnablingActivityTest.java index d31d579e47..0a7003909d 100644 --- a/android/app/tests/instrumentation/com/android/bluetooth/opp/BluetoothOppBtEnablingActivityTest.java +++ b/android/app/tests/instrumentation/com/android/bluetooth/opp/BluetoothOppBtEnablingActivityTest.java @@ -51,6 +51,7 @@ import org.mockito.Spy; import java.util.concurrent.atomic.AtomicBoolean; +/** Test cases for {@link BluetoothOppBtEnablingActivity}. */ @RunWith(AndroidJUnit4.class) public class BluetoothOppBtEnablingActivityTest { @Rule public final MockitoRule mMockitoRule = new MockitoRule(); diff --git a/android/app/tests/instrumentation/com/android/bluetooth/opp/BluetoothOppLauncherActivityTest.java b/android/app/tests/instrumentation/com/android/bluetooth/opp/BluetoothOppLauncherActivityTest.java index 7bb7bbfbc3..3e656d6169 100644 --- a/android/app/tests/instrumentation/com/android/bluetooth/opp/BluetoothOppLauncherActivityTest.java +++ b/android/app/tests/instrumentation/com/android/bluetooth/opp/BluetoothOppLauncherActivityTest.java @@ -74,6 +74,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +/** Test cases for {@link BluetoothOppLauncherActivity}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class BluetoothOppLauncherActivityTest { diff --git a/android/app/tests/instrumentation/com/android/bluetooth/opp/BluetoothOppServiceCleanupTest.java b/android/app/tests/instrumentation/com/android/bluetooth/opp/BluetoothOppServiceCleanupTest.java index a1cb6e8fa9..7d72d8fc1e 100644 --- a/android/app/tests/instrumentation/com/android/bluetooth/opp/BluetoothOppServiceCleanupTest.java +++ b/android/app/tests/instrumentation/com/android/bluetooth/opp/BluetoothOppServiceCleanupTest.java @@ -36,6 +36,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link BluetoothOppServiceCleanup}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class BluetoothOppServiceCleanupTest { diff --git a/android/app/tests/instrumentation/com/android/bluetooth/opp/BluetoothOppUtilityTest.java b/android/app/tests/instrumentation/com/android/bluetooth/opp/BluetoothOppUtilityTest.java index 92423c17ea..c27d16d8f8 100644 --- a/android/app/tests/instrumentation/com/android/bluetooth/opp/BluetoothOppUtilityTest.java +++ b/android/app/tests/instrumentation/com/android/bluetooth/opp/BluetoothOppUtilityTest.java @@ -35,6 +35,7 @@ import org.junit.Test; import org.mockito.Mock; import org.mockito.Spy; +/** Test cases for {@link BluetoothOppUtility}. */ public class BluetoothOppUtilityTest { @Rule public final MockitoRule mMockitoRule = new MockitoRule(); diff --git a/android/app/tests/instrumentation/com/android/bluetooth/opp/IncomingFileConfirmActivityTest.java b/android/app/tests/instrumentation/com/android/bluetooth/opp/IncomingFileConfirmActivityTest.java index 473b55c3e0..305fc53fc7 100644 --- a/android/app/tests/instrumentation/com/android/bluetooth/opp/IncomingFileConfirmActivityTest.java +++ b/android/app/tests/instrumentation/com/android/bluetooth/opp/IncomingFileConfirmActivityTest.java @@ -69,6 +69,7 @@ import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; // Long class name cause problem with Junit4. It will raise java.lang.NoClassDefFoundError +/** Test cases for {@link BluetoothOppIncomingFileConfirmActivity}. */ @RunWith(AndroidJUnit4.class) public class IncomingFileConfirmActivityTest { @Rule public final MockitoRule mMockitoRule = new MockitoRule(); diff --git a/android/app/tests/instrumentation/com/android/bluetooth/pbap/BluetoothPbapActivityTest.java b/android/app/tests/instrumentation/com/android/bluetooth/pbap/BluetoothPbapActivityTest.java index 09316dbc78..acd8a49077 100644 --- a/android/app/tests/instrumentation/com/android/bluetooth/pbap/BluetoothPbapActivityTest.java +++ b/android/app/tests/instrumentation/com/android/bluetooth/pbap/BluetoothPbapActivityTest.java @@ -55,6 +55,7 @@ import org.junit.runner.RunWith; import java.util.concurrent.atomic.AtomicBoolean; +/** Test cases for {@link BluetoothPbapActivity}. */ @LargeTest @RunWith(AndroidJUnit4.class) public class BluetoothPbapActivityTest { diff --git a/android/app/tests/instrumentation/com/android/bluetooth/telephony/CallInfoTest.java b/android/app/tests/instrumentation/com/android/bluetooth/telephony/CallInfoTest.java index 18a4b4d053..f407f971d5 100644 --- a/android/app/tests/instrumentation/com/android/bluetooth/telephony/CallInfoTest.java +++ b/android/app/tests/instrumentation/com/android/bluetooth/telephony/CallInfoTest.java @@ -52,6 +52,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.UUID; +/** Test cases for {@link CallInfo}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class CallInfoTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/ObexAppParametersTest.java b/android/app/tests/unit/src/com/android/bluetooth/ObexAppParametersTest.java index 1166a4ae10..dec896c409 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/ObexAppParametersTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/ObexAppParametersTest.java @@ -30,6 +30,7 @@ import org.junit.runner.RunWith; import java.nio.ByteBuffer; import java.util.Arrays; +/** Test cases for {@link ObexAppParameters}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class ObexAppParametersTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/SignedLongLongTest.java b/android/app/tests/unit/src/com/android/bluetooth/SignedLongLongTest.java index 00b4306532..e473bc2d5a 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/SignedLongLongTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/SignedLongLongTest.java @@ -25,7 +25,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; -/** Test for SignedLongLong.java */ +/** Test cases for {@link SignedLongLong}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class SignedLongLongTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/a2dp/A2dpCodecConfigTest.java b/android/app/tests/unit/src/com/android/bluetooth/a2dp/A2dpCodecConfigTest.java index 8f5dd839ae..5476f25186 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/a2dp/A2dpCodecConfigTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/a2dp/A2dpCodecConfigTest.java @@ -44,6 +44,7 @@ import org.mockito.Mock; import java.util.Arrays; +/** Test cases for {@link A2dpCodecConfig}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class A2dpCodecConfigTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/a2dp/A2dpServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/a2dp/A2dpServiceBinderTest.java index 65d00773ba..a754fe5376 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/a2dp/A2dpServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/a2dp/A2dpServiceBinderTest.java @@ -46,7 +46,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -/** Test cases for {@link A2dpServiceBinder} */ +/** Test cases for {@link A2dpServiceBinder}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class A2dpServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/a2dp/A2dpServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/a2dp/A2dpServiceTest.java index b2fb43b362..4cfd988490 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/a2dp/A2dpServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/a2dp/A2dpServiceTest.java @@ -82,6 +82,7 @@ import java.time.Duration; import java.util.Arrays; import java.util.List; +/** Test cases for {@link A2dpService}. */ @MediumTest @RunWith(ParameterizedAndroidJunit4.class) public class A2dpServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/a2dp/A2dpStateMachineTest.java b/android/app/tests/unit/src/com/android/bluetooth/a2dp/A2dpStateMachineTest.java index c44094bd2c..72b776ed42 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/a2dp/A2dpStateMachineTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/a2dp/A2dpStateMachineTest.java @@ -69,6 +69,7 @@ import org.mockito.hamcrest.MockitoHamcrest; import java.util.Arrays; +/** Test cases for {@link A2dpStateMachine}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class A2dpStateMachineTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/A2dpSinkServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/A2dpSinkServiceBinderTest.java index 6f7723caa9..bf2db08235 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/A2dpSinkServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/A2dpSinkServiceBinderTest.java @@ -37,7 +37,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -/** Test cases for {@link A2dpSinkServiceBinder} */ +/** Test cases for {@link A2dpSinkServiceBinder}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class A2dpSinkServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/A2dpSinkServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/A2dpSinkServiceTest.java index 8b108c65e5..d9b8bf0ede 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/A2dpSinkServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/A2dpSinkServiceTest.java @@ -54,6 +54,7 @@ import org.mockito.Mock; import java.util.ArrayList; import java.util.List; +/** Test cases for {@link A2dpSinkService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class A2dpSinkServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/A2dpSinkStateMachineTest.java b/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/A2dpSinkStateMachineTest.java index 5641fbe7fc..c61300d7d2 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/A2dpSinkStateMachineTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/A2dpSinkStateMachineTest.java @@ -48,6 +48,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; +/** Test cases for {@link A2dpSinkStateMachine}. */ @RunWith(AndroidJUnit4.class) public class A2dpSinkStateMachineTest { @Rule public final MockitoRule mMockitoRule = new MockitoRule(); diff --git a/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/A2dpSinkStreamHandlerTest.java b/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/A2dpSinkStreamHandlerTest.java index 0870b09f51..afb9715fe0 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/A2dpSinkStreamHandlerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/A2dpSinkStreamHandlerTest.java @@ -49,6 +49,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; +/** Test cases for {@link A2dpSinkStreamHandler}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class A2dpSinkStreamHandlerTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/StackEventTest.java b/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/StackEventTest.java index 5a0b67d77e..0057695df6 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/StackEventTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/StackEventTest.java @@ -31,6 +31,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link StackEvent}. */ @RunWith(AndroidJUnit4.class) public class StackEventTest { private final BluetoothDevice mDevice = getTestDevice(21); diff --git a/android/app/tests/unit/src/com/android/bluetooth/audio_util/BrowsablePlayerConnectorTest.java b/android/app/tests/unit/src/com/android/bluetooth/audio_util/BrowsablePlayerConnectorTest.java index 47109d6b16..63899b1004 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/audio_util/BrowsablePlayerConnectorTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/audio_util/BrowsablePlayerConnectorTest.java @@ -47,6 +47,7 @@ import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +/** Test cases for {@link BrowsablePlayerConnector}. */ @RunWith(AndroidJUnit4.class) public final class BrowsablePlayerConnectorTest { private static final int TIMEOUT_MS = 300; diff --git a/android/app/tests/unit/src/com/android/bluetooth/audio_util/BrowserPlayerWrapperTest.java b/android/app/tests/unit/src/com/android/bluetooth/audio_util/BrowserPlayerWrapperTest.java index 7d77021833..dfc3103acc 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/audio_util/BrowserPlayerWrapperTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/audio_util/BrowserPlayerWrapperTest.java @@ -57,6 +57,7 @@ import java.io.InputStream; import java.util.ArrayList; import java.util.List; +/** Test cases for {@link BrowserPlayerWrapper}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class BrowserPlayerWrapperTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/audio_util/GPMWrapperTest.java b/android/app/tests/unit/src/com/android/bluetooth/audio_util/GPMWrapperTest.java index 74d63bddbf..261cea6c24 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/audio_util/GPMWrapperTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/audio_util/GPMWrapperTest.java @@ -37,6 +37,7 @@ import org.junit.runner.RunWith; import java.util.ArrayList; import java.util.List; +/** Test cases for {@link GPMWrapper}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class GPMWrapperTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/audio_util/ImageTest.java b/android/app/tests/unit/src/com/android/bluetooth/audio_util/ImageTest.java index a74a0e7789..588c34d55b 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/audio_util/ImageTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/audio_util/ImageTest.java @@ -49,6 +49,7 @@ import org.mockito.Mock; import java.io.InputStream; +/** Test cases for {@link Image}. */ @RunWith(AndroidJUnit4.class) public class ImageTest { private Context mTargetContext; diff --git a/android/app/tests/unit/src/com/android/bluetooth/audio_util/MediaPlayerListTest.java b/android/app/tests/unit/src/com/android/bluetooth/audio_util/MediaPlayerListTest.java index c7d5458ca2..1eb7960fe8 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/audio_util/MediaPlayerListTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/audio_util/MediaPlayerListTest.java @@ -49,6 +49,7 @@ import org.mockito.Mock; import java.util.ArrayList; +/** Test cases for {@link MediaPlayerList}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class MediaPlayerListTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/audio_util/MediaPlayerWrapperTest.java b/android/app/tests/unit/src/com/android/bluetooth/audio_util/MediaPlayerWrapperTest.java index ca7d227747..0a2991cecf 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/audio_util/MediaPlayerWrapperTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/audio_util/MediaPlayerWrapperTest.java @@ -54,6 +54,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; +/** Test cases for {@link MediaPlayerWrapper}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class MediaPlayerWrapperTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/audio_util/MetadataTest.java b/android/app/tests/unit/src/com/android/bluetooth/audio_util/MetadataTest.java index b0ac35637d..fafeb1e459 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/audio_util/MetadataTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/audio_util/MetadataTest.java @@ -51,6 +51,7 @@ import org.mockito.Mock; import java.io.InputStream; +/** Test cases for {@link Metadata}. */ @RunWith(AndroidJUnit4.class) public class MetadataTest { private Context mTargetContext; diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcp/AvrcpBipObexServerTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcp/AvrcpBipObexServerTest.java index d67e19ee60..d8e35e3eef 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcp/AvrcpBipObexServerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcp/AvrcpBipObexServerTest.java @@ -47,6 +47,7 @@ import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.io.OutputStream; +/** Test cases for {@link AvrcpBipObexServer}. */ @RunWith(AndroidJUnit4.class) public class AvrcpBipObexServerTest { private static final String TYPE_GET_LINKED_THUMBNAIL = "x-bt/img-thm"; diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcp/AvrcpCoverArtStorageTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcp/AvrcpCoverArtStorageTest.java index 46e24db940..6655ead6ac 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcp/AvrcpCoverArtStorageTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcp/AvrcpCoverArtStorageTest.java @@ -35,6 +35,7 @@ import org.junit.runner.RunWith; import java.io.InputStream; +/** Test cases for {@link AvrcpCoverArtStorage}. */ @RunWith(AndroidJUnit4.class) public class AvrcpCoverArtStorageTest { private Resources mTestResources; diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcp/AvrcpPassthroughTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcp/AvrcpPassthroughTest.java index 8dbaf5833b..0876c4ae55 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcp/AvrcpPassthroughTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcp/AvrcpPassthroughTest.java @@ -9,6 +9,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; +/** Test cases for {@link AvrcpPassthrough}. */ @RunWith(JUnit4.class) public final class AvrcpPassthroughTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcp/AvrcpTargetServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcp/AvrcpTargetServiceTest.java index 1111e05af7..42ff54db9a 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcp/AvrcpTargetServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcp/AvrcpTargetServiceTest.java @@ -59,6 +59,7 @@ import org.mockito.Mock; import java.util.ArrayList; import java.util.List; +/** Test cases for {@link AvrcpTargetService}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class AvrcpTargetServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcp/AvrcpVolumeManagerTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcp/AvrcpVolumeManagerTest.java index 4ce83f3a56..dee01695ba 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcp/AvrcpVolumeManagerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcp/AvrcpVolumeManagerTest.java @@ -47,6 +47,7 @@ import org.junit.rules.TestName; import org.junit.runner.RunWith; import org.mockito.Mock; +/** Test cases for {@link AvrcpVolumeManager}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class AvrcpVolumeManagerTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcp/CoverArtTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcp/CoverArtTest.java index 1312a589aa..11631341ac 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcp/CoverArtTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcp/CoverArtTest.java @@ -42,6 +42,7 @@ import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.Arrays; +/** Test cases for {@link CoverArt}. */ @RunWith(AndroidJUnit4.class) public class CoverArtTest { private Resources mTestResources; diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpBipClientTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpBipClientTest.java index 16360b5cce..9276985e84 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpBipClientTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpBipClientTest.java @@ -42,6 +42,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; +/** Test cases for {@link AvrcpBipClient}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class AvrcpBipClientTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerNativeInterfaceTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerNativeInterfaceTest.java index 6364c499a4..6c2841efe7 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerNativeInterfaceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerNativeInterfaceTest.java @@ -25,6 +25,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link AvrcpControllerNativeInterface}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class AvrcpControllerNativeInterfaceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerServiceBinderTest.java index c4bc5dad1a..e994e5bb0d 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerServiceBinderTest.java @@ -35,7 +35,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -/** Test cases for {@link AvrcpControllerServiceBinder} */ +/** Test cases for {@link AvrcpControllerServiceBinder}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class AvrcpControllerServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerServiceTest.java index ee46a1accd..abed5c7f6b 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerServiceTest.java @@ -62,6 +62,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +/** Test cases for {@link AvrcpControllerService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class AvrcpControllerServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerStateMachineTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerStateMachineTest.java index 43688601fe..76bc1c60de 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerStateMachineTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerStateMachineTest.java @@ -68,6 +68,7 @@ import java.util.ArrayList; import java.util.List; import java.util.UUID; +/** Test cases for {@link AvrcpControllerStateMachine}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class AvrcpControllerStateMachineTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpCoverArtProviderTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpCoverArtProviderTest.java index b2fbbe132f..5fb2c5edfa 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpCoverArtProviderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpCoverArtProviderTest.java @@ -38,6 +38,7 @@ import org.mockito.Mock; import java.io.FileNotFoundException; +/** Test cases for {@link AvrcpCoverArtProvider}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class AvrcpCoverArtProviderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpCoverArtStorageTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpCoverArtStorageTest.java index 33aa418fda..1e23a27ae8 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpCoverArtStorageTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpCoverArtStorageTest.java @@ -39,7 +39,7 @@ import org.junit.runner.RunWith; import java.io.InputStream; -/** A test suite for the AvrcpCoverArtStorage class. */ +/** Test cases for {@link AvrcpCoverArtStorage}. */ @RunWith(AndroidJUnit4.class) public final class AvrcpCoverArtStorageTest { private final Context mTargetContext = diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpItemTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpItemTest.java index 40c03dd0ae..a11423a34c 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpItemTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpItemTest.java @@ -33,7 +33,7 @@ import com.google.common.testing.EqualsTester; import org.junit.Test; import org.junit.runner.RunWith; -/** A test suite for the AvrcpItem class. */ +/** Test cases for {@link AvrcpItem}. */ @RunWith(AndroidJUnit4.class) public final class AvrcpItemTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpPlayerTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpPlayerTest.java index 95d12cb2a1..e7794c8077 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpPlayerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/AvrcpPlayerTest.java @@ -31,6 +31,7 @@ import org.junit.Rule; import org.junit.Test; import org.mockito.Mock; +/** Test cases for {@link AvrcpPlayer}. */ public class AvrcpPlayerTest { @Rule public final MockitoRule mMockitoRule = new MockitoRule(); diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/BrowseNodeTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/BrowseNodeTest.java index aa06d75c77..d978cecccf 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/BrowseNodeTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/BrowseNodeTest.java @@ -40,6 +40,7 @@ import org.junit.runner.RunWith; import java.util.ArrayList; import java.util.List; +/** Test cases for {@link BrowseNode}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class BrowseNodeTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/BrowseTreeTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/BrowseTreeTest.java index 5d359d1ef4..0439478842 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/BrowseTreeTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/BrowseTreeTest.java @@ -28,6 +28,7 @@ import org.junit.Test; import java.util.Set; +/** Test cases for {@link BrowseTree}. */ public class BrowseTreeTest { private static final String ILLEGAL_ID = "illegal_id"; private static final String TEST_HANDLE = "test_handle"; diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/PlayerApplicationSettingsTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/PlayerApplicationSettingsTest.java index a106f6e97f..17dca38977 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/PlayerApplicationSettingsTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/PlayerApplicationSettingsTest.java @@ -26,6 +26,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link PlayerApplicationSettings}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class PlayerApplicationSettingsTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/StackEventTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/StackEventTest.java index ded802cbb7..005e96d4e2 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/StackEventTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/StackEventTest.java @@ -24,6 +24,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link StackEvent}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class StackEventTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipAttachmentFormatTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipAttachmentFormatTest.java index 68b06e5c95..bc3873aee7 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipAttachmentFormatTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipAttachmentFormatTest.java @@ -31,7 +31,7 @@ import java.util.Calendar; import java.util.Date; import java.util.TimeZone; -/** A test suite for the BipAttachmentFormat class */ +/** Test cases for {@link BipAttachmentFormat}. */ @RunWith(AndroidJUnit4.class) public class BipAttachmentFormatTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipDatetimeTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipDatetimeTest.java index abdee02e65..025abaa8ec 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipDatetimeTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipDatetimeTest.java @@ -32,7 +32,7 @@ import java.util.Date; import java.util.Locale; import java.util.TimeZone; -/** A test suite for the BipDateTime class */ +/** Test cases for {@link BipDatetime}. */ @RunWith(AndroidJUnit4.class) public class BipDatetimeTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipEncodingTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipEncodingTest.java index dd6c498679..0c637f6777 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipEncodingTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipEncodingTest.java @@ -23,7 +23,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; -/** A test suite for the BipEncoding class */ +/** Test cases for {@link BipEncoding}. */ @RunWith(AndroidJUnit4.class) public class BipEncodingTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipImageDescriptorTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipImageDescriptorTest.java index 0d87190643..75ac3ac536 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipImageDescriptorTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipImageDescriptorTest.java @@ -25,7 +25,7 @@ import com.google.common.testing.EqualsTester; import org.junit.Test; import org.junit.runner.RunWith; -/** A test suite for the BipImageDescriptor class */ +/** Test cases for {@link BipImageDescriptor}. */ @RunWith(AndroidJUnit4.class) public class BipImageDescriptorTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipImageFormatTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipImageFormatTest.java index 2ee0bda8bb..4fb29f0699 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipImageFormatTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipImageFormatTest.java @@ -25,7 +25,7 @@ import com.google.common.testing.EqualsTester; import org.junit.Test; import org.junit.runner.RunWith; -/** A test suite for the BipImageFormat class */ +/** Test cases for {@link BipImageFormat}. */ @RunWith(AndroidJUnit4.class) public class BipImageFormatTest { @Test diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipImagePropertiesTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipImagePropertiesTest.java index a1c9829273..e8cd024158 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipImagePropertiesTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipImagePropertiesTest.java @@ -27,7 +27,7 @@ import java.io.ByteArrayInputStream; import java.io.InputStream; import java.nio.charset.StandardCharsets; -/** A test suite for the BipImageProperties class */ +/** Test cases for {@link BipImageProperties}. */ @RunWith(AndroidJUnit4.class) public class BipImagePropertiesTest { private static final String IMAGE_HANDLE = "123456789"; diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipImageTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipImageTest.java index ca98f02d21..b4d81ca7f9 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipImageTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipImageTest.java @@ -33,7 +33,7 @@ import org.junit.runner.RunWith; import java.io.InputStream; -/** A test suite for the BipImage class */ +/** Test cases for {@link BipImage}. */ @RunWith(AndroidJUnit4.class) public class BipImageTest { private static final String sImageHandle = "123456789"; diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipPixelTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipPixelTest.java index 1f47f0c606..51df561043 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipPixelTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipPixelTest.java @@ -23,7 +23,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; -/** A test suite for the BipPixel class */ +/** Test cases for {@link BipPixel}. */ @RunWith(AndroidJUnit4.class) public class BipPixelTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipTransformationTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipTransformationTest.java index 7d5eb5a986..bfaa399881 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipTransformationTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/BipTransformationTest.java @@ -23,7 +23,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; -/** A test suite for the BipTransformation class */ +/** Test cases for {@link BipTransformation}. */ @RunWith(AndroidJUnit4.class) public class BipTransformationTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/RequestGetImagePropertiesTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/RequestGetImagePropertiesTest.java index 9633aa4f95..2ad0923cb2 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/RequestGetImagePropertiesTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/RequestGetImagePropertiesTest.java @@ -24,6 +24,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link RequestGetImageProperties}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class RequestGetImagePropertiesTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/RequestGetImageTest.java b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/RequestGetImageTest.java index 4d5ca54dfb..f1e4b1f001 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/RequestGetImageTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/RequestGetImageTest.java @@ -24,6 +24,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link RequestGetImage}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class RequestGetImageTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/bas/BatteryServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/bas/BatteryServiceTest.java index 84c9640524..f12a91f276 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/bas/BatteryServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/bas/BatteryServiceTest.java @@ -54,6 +54,7 @@ import org.mockito.Mock; import java.util.List; +/** Test cases for {@link BatteryService}. */ @MediumTest @RunWith(JUnit4.class) public class BatteryServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/bas/BatteryStateMachineTest.java b/android/app/tests/unit/src/com/android/bluetooth/bas/BatteryStateMachineTest.java index 5e439f826b..982400f2fb 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/bas/BatteryStateMachineTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/bas/BatteryStateMachineTest.java @@ -50,6 +50,7 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import org.mockito.Mock; +/** Test cases for {@link BatteryStateMachine}. */ @SmallTest @RunWith(JUnit4.class) public class BatteryStateMachineTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/bass_client/BaseDataTest.java b/android/app/tests/unit/src/com/android/bluetooth/bass_client/BaseDataTest.java index c8305744e2..2b644a3853 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/bass_client/BaseDataTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/bass_client/BaseDataTest.java @@ -28,6 +28,7 @@ import org.junit.runners.JUnit4; import java.util.Random; +/** Test cases for {@link BaseData}. */ @RunWith(JUnit4.class) public class BaseDataTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/bass_client/BassClientServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/bass_client/BassClientServiceBinderTest.java index 584f0cdeea..84b34536d2 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/bass_client/BassClientServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/bass_client/BassClientServiceBinderTest.java @@ -50,7 +50,7 @@ import org.mockito.Mockito; import java.util.Collections; import java.util.List; -/** Test cases for {@link BassClientServiceBinder} */ +/** Test cases for {@link BassClientServiceBinder}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class BassClientServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/bass_client/BassClientServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/bass_client/BassClientServiceTest.java index 464cb5c652..bbdc6bb9b1 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/bass_client/BassClientServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/bass_client/BassClientServiceTest.java @@ -123,7 +123,7 @@ import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; -/** Tests for {@link BassClientService} */ +/** Test cases for {@link BassClientService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class BassClientServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/bass_client/BassClientStateMachineTest.java b/android/app/tests/unit/src/com/android/bluetooth/bass_client/BassClientStateMachineTest.java index 6915785794..c0f21e18fb 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/bass_client/BassClientStateMachineTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/bass_client/BassClientStateMachineTest.java @@ -130,6 +130,7 @@ import java.util.List; import java.util.Random; import java.util.UUID; +/** Test cases for {@link BassClientStateMachine}. */ @MediumTest @RunWith(JUnit4.class) public class BassClientStateMachineTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/bass_client/PeriodicAdvertisementResultTest.java b/android/app/tests/unit/src/com/android/bluetooth/bass_client/PeriodicAdvertisementResultTest.java index d7d0605fb5..bec7426b66 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/bass_client/PeriodicAdvertisementResultTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/bass_client/PeriodicAdvertisementResultTest.java @@ -29,6 +29,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link PeriodicAdvertisementResult}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class PeriodicAdvertisementResultTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/bass_client/PublicBroadcastDataTest.java b/android/app/tests/unit/src/com/android/bluetooth/bass_client/PublicBroadcastDataTest.java index 48c2b7935c..422225a419 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/bass_client/PublicBroadcastDataTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/bass_client/PublicBroadcastDataTest.java @@ -28,6 +28,7 @@ import org.junit.runners.JUnit4; import java.util.Random; +/** Test cases for {@link PublicBroadcastData}. */ @RunWith(JUnit4.class) public class PublicBroadcastDataTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/btservice/ActiveDeviceManagerTest.java b/android/app/tests/unit/src/com/android/bluetooth/btservice/ActiveDeviceManagerTest.java index 2af03df4ae..746e4985e9 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/btservice/ActiveDeviceManagerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/btservice/ActiveDeviceManagerTest.java @@ -84,6 +84,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +/** Test cases for {@link ActiveDeviceManager}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class ActiveDeviceManagerTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/btservice/AdapterPropertiesTest.java b/android/app/tests/unit/src/com/android/bluetooth/btservice/AdapterPropertiesTest.java index db3a61cb3a..8699768543 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/btservice/AdapterPropertiesTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/btservice/AdapterPropertiesTest.java @@ -44,6 +44,7 @@ import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Mock; +/** Test cases for {@link AdapterProperties}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class AdapterPropertiesTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/btservice/AdapterServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/btservice/AdapterServiceBinderTest.java index 7e143a2851..dcf1aaf4bc 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/btservice/AdapterServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/btservice/AdapterServiceBinderTest.java @@ -42,7 +42,7 @@ import org.mockito.Mockito; import java.io.FileDescriptor; -/** Test cases for {@link AdapterServiceBinder} */ +/** Test cases for {@link AdapterServiceBinder}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class AdapterServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/btservice/AdapterSuspendTest.java b/android/app/tests/unit/src/com/android/bluetooth/btservice/AdapterSuspendTest.java index bc86ce8ee1..ee866721a5 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/btservice/AdapterSuspendTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/btservice/AdapterSuspendTest.java @@ -41,6 +41,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; +/** Test cases for {@link AdapterSuspend}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class AdapterSuspendTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/btservice/BondStateMachineTest.java b/android/app/tests/unit/src/com/android/bluetooth/btservice/BondStateMachineTest.java index f420ffb43f..c08eaa32e4 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/btservice/BondStateMachineTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/btservice/BondStateMachineTest.java @@ -49,6 +49,7 @@ import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Mock; +/** Test cases for {@link BondStateMachine}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class BondStateMachineTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/btservice/CompanionManagerTest.java b/android/app/tests/unit/src/com/android/bluetooth/btservice/CompanionManagerTest.java index bea6e8ea6d..72b5389982 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/btservice/CompanionManagerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/btservice/CompanionManagerTest.java @@ -40,6 +40,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; +/** Test cases for {@link CompanionManager}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class CompanionManagerTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/btservice/ConfigTest.java b/android/app/tests/unit/src/com/android/bluetooth/btservice/ConfigTest.java index 704234cf1e..e338d8b9df 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/btservice/ConfigTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/btservice/ConfigTest.java @@ -26,6 +26,7 @@ import org.junit.runners.JUnit4; import java.util.Arrays; +/** Test cases for {@link Config}. */ @RunWith(JUnit4.class) public final class ConfigTest { @Test diff --git a/android/app/tests/unit/src/com/android/bluetooth/btservice/DataMigrationTest.java b/android/app/tests/unit/src/com/android/bluetooth/btservice/DataMigrationTest.java index ec8bfd09be..2b7a5d26b9 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/btservice/DataMigrationTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/btservice/DataMigrationTest.java @@ -61,6 +61,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +/** Test cases for {@link DataMigration}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class DataMigrationTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/btservice/MetricsLoggerTest.java b/android/app/tests/unit/src/com/android/bluetooth/btservice/MetricsLoggerTest.java index ae3db21382..54e986d93d 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/btservice/MetricsLoggerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/btservice/MetricsLoggerTest.java @@ -58,7 +58,7 @@ import java.time.ZoneId; import java.util.HashMap; import java.util.Map; -/** Unit tests for {@link MetricsLogger} */ +/** Test cases for {@link MetricsLogger}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class MetricsLoggerTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/btservice/PhonePolicyTest.java b/android/app/tests/unit/src/com/android/bluetooth/btservice/PhonePolicyTest.java index 28188621a0..068379dfe4 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/btservice/PhonePolicyTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/btservice/PhonePolicyTest.java @@ -80,6 +80,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +/** Test cases for {@link PhonePolicy}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class PhonePolicyTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/btservice/ProfileServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/btservice/ProfileServiceTest.java index 960374ddae..1a1b2258ce 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/btservice/ProfileServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/btservice/ProfileServiceTest.java @@ -65,6 +65,7 @@ import java.util.Map; import java.util.concurrent.FutureTask; import java.util.stream.Collectors; +/** Test cases for {@link ProfileService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class ProfileServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/btservice/RemoteDevicesTest.java b/android/app/tests/unit/src/com/android/bluetooth/btservice/RemoteDevicesTest.java index 4a261c1b06..2f50505082 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/btservice/RemoteDevicesTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/btservice/RemoteDevicesTest.java @@ -57,6 +57,7 @@ import org.mockito.hamcrest.MockitoHamcrest; import java.util.ArrayList; +/** Test cases for {@link RemoteDevices}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class RemoteDevicesTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/btservice/SilenceDeviceManagerTest.java b/android/app/tests/unit/src/com/android/bluetooth/btservice/SilenceDeviceManagerTest.java index 8cbf61d8d8..a5a87971fb 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/btservice/SilenceDeviceManagerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/btservice/SilenceDeviceManagerTest.java @@ -49,6 +49,7 @@ import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Mock; +/** Test cases for {@link SilenceDeviceManager}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class SilenceDeviceManagerTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/btservice/bluetoothKeystore/BluetoothKeystoreServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/btservice/bluetoothKeystore/BluetoothKeystoreServiceTest.java index 0b3cc08343..3047b07016 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/btservice/bluetoothKeystore/BluetoothKeystoreServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/btservice/bluetoothKeystore/BluetoothKeystoreServiceTest.java @@ -42,6 +42,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +/** Test cases for {@link BluetoothKeystoreService}. */ @RunWith(JUnit4.class) public final class BluetoothKeystoreServiceTest { private static final String TAG = BluetoothKeystoreServiceTest.class.getSimpleName(); diff --git a/android/app/tests/unit/src/com/android/bluetooth/btservice/storage/AudioPolicyEntityTest.java b/android/app/tests/unit/src/com/android/bluetooth/btservice/storage/AudioPolicyEntityTest.java index 317153b64b..87c102438f 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/btservice/storage/AudioPolicyEntityTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/btservice/storage/AudioPolicyEntityTest.java @@ -24,6 +24,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; +/** Test cases for {@link AudioPolicyEntity}. */ @RunWith(JUnit4.class) public final class AudioPolicyEntityTest { @Test diff --git a/android/app/tests/unit/src/com/android/bluetooth/btservice/storage/DatabaseManagerTest.java b/android/app/tests/unit/src/com/android/bluetooth/btservice/storage/DatabaseManagerTest.java index 21449beaf5..f3adb8244b 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/btservice/storage/DatabaseManagerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/btservice/storage/DatabaseManagerTest.java @@ -73,6 +73,7 @@ import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; +/** Test cases for {@link DatabaseManager}. */ @MediumTest @RunWith(AndroidJUnit4.class) public final class DatabaseManagerTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/content_profiles/ContentProfileErrorReportUtilsTest.java b/android/app/tests/unit/src/com/android/bluetooth/content_profiles/ContentProfileErrorReportUtilsTest.java index e682e9af17..2a86f1291e 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/content_profiles/ContentProfileErrorReportUtilsTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/content_profiles/ContentProfileErrorReportUtilsTest.java @@ -25,6 +25,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link ContentProfileErrorReportUtils}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class ContentProfileErrorReportUtilsTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/csip/CsipSetCoordinatorServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/csip/CsipSetCoordinatorServiceBinderTest.java index 81adae18f4..916fe65f2f 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/csip/CsipSetCoordinatorServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/csip/CsipSetCoordinatorServiceBinderTest.java @@ -39,7 +39,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -/** Test cases for {@link CsipSetCoordinatorServiceBinder} */ +/** Test cases for {@link CsipSetCoordinatorServiceBinder}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class CsipSetCoordinatorServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/csip/CsipSetCoordinatorServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/csip/CsipSetCoordinatorServiceTest.java index 72fbd125b6..80d06fc4c4 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/csip/CsipSetCoordinatorServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/csip/CsipSetCoordinatorServiceTest.java @@ -82,6 +82,7 @@ import org.mockito.hamcrest.MockitoHamcrest; import java.util.List; import java.util.UUID; +/** Test cases for {@link CsipSetCoordinatorService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class CsipSetCoordinatorServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/csip/CsipSetCoordinatorStateMachineTest.java b/android/app/tests/unit/src/com/android/bluetooth/csip/CsipSetCoordinatorStateMachineTest.java index 4c9cd6fb5e..339bb318be 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/csip/CsipSetCoordinatorStateMachineTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/csip/CsipSetCoordinatorStateMachineTest.java @@ -51,6 +51,7 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.Mockito; +/** Test cases for {@link CsipSetCoordinatorStateMachine}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class CsipSetCoordinatorStateMachineTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/gatt/AdvertiseBinderTest.kt b/android/app/tests/unit/src/com/android/bluetooth/gatt/AdvertiseBinderTest.kt index 6b038678f0..467c5e9815 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/gatt/AdvertiseBinderTest.kt +++ b/android/app/tests/unit/src/com/android/bluetooth/gatt/AdvertiseBinderTest.kt @@ -37,7 +37,7 @@ import org.mockito.Mockito.mock import org.mockito.Mockito.verify import org.mockito.kotlin.whenever -/** Test cases for [AdvertiseBinder] */ +/** Test cases for [AdvertiseBinder]. */ @SmallTest @RunWith(AndroidJUnit4::class) class AdvertiseBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/gatt/DistanceMeasurementBinderTest.kt b/android/app/tests/unit/src/com/android/bluetooth/gatt/DistanceMeasurementBinderTest.kt index b20eda9a17..ac890b1ef5 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/gatt/DistanceMeasurementBinderTest.kt +++ b/android/app/tests/unit/src/com/android/bluetooth/gatt/DistanceMeasurementBinderTest.kt @@ -42,7 +42,7 @@ import org.mockito.Mockito.mock import org.mockito.Mockito.verify import org.mockito.kotlin.whenever -/** Test cases for [DistanceMeasurementBinder] */ +/** Test cases for [DistanceMeasurementBinder]. */ @SmallTest @RunWith(AndroidJUnit4::class) class DistanceMeasurementBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/gatt/GattServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/gatt/GattServiceBinderTest.java index f9bb1d556d..b956bec5cc 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/gatt/GattServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/gatt/GattServiceBinderTest.java @@ -42,7 +42,7 @@ import org.mockito.Mock; import java.util.UUID; -/** Test cases for {@link GattServiceBinder} */ +/** Test cases for {@link GattServiceBinder}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class GattServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hap/HapClientNativeCallbackTest.java b/android/app/tests/unit/src/com/android/bluetooth/hap/HapClientNativeCallbackTest.java index 5e1218b202..004051b041 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hap/HapClientNativeCallbackTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hap/HapClientNativeCallbackTest.java @@ -35,6 +35,7 @@ import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Mock; +/** Test cases for {@link HapClientNativeCallback}. */ public class HapClientNativeCallbackTest { @Rule public final MockitoRule mMockitoRule = new MockitoRule(); @Rule public Expect expect = Expect.create(); diff --git a/android/app/tests/unit/src/com/android/bluetooth/hap/HapClientServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/hap/HapClientServiceBinderTest.java index 3544578497..3178045545 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hap/HapClientServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hap/HapClientServiceBinderTest.java @@ -44,7 +44,7 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.Mockito; -/** Test cases for {@link HapClientServiceBinder} */ +/** Test cases for {@link HapClientServiceBinder}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class HapClientServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hap/HapClientServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/hap/HapClientServiceTest.java index 045ed21e09..1cf197294b 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hap/HapClientServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hap/HapClientServiceTest.java @@ -92,6 +92,7 @@ import java.util.List; import java.util.Map; import java.util.Optional; +/** Test cases for {@link HapClientService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class HapClientServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hap/HapClientStackEventTest.java b/android/app/tests/unit/src/com/android/bluetooth/hap/HapClientStackEventTest.java index 01a12b7a9b..1f40cec30e 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hap/HapClientStackEventTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hap/HapClientStackEventTest.java @@ -22,6 +22,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; +/** Test cases for {@link HapClientStackEvent}. */ @RunWith(JUnit4.class) public final class HapClientStackEventTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hap/HapClientStateMachineTest.java b/android/app/tests/unit/src/com/android/bluetooth/hap/HapClientStateMachineTest.java index f953dc47ff..83bd1ee7d8 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hap/HapClientStateMachineTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hap/HapClientStateMachineTest.java @@ -63,6 +63,7 @@ import org.mockito.InOrder; import org.mockito.Mock; import org.mockito.hamcrest.MockitoHamcrest; +/** Test cases for {@link HapClientStateMachine}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class HapClientStateMachineTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hearingaid/HearingAidNativeInterfaceTest.java b/android/app/tests/unit/src/com/android/bluetooth/hearingaid/HearingAidNativeInterfaceTest.java index 6b32743a7b..cf2e78e06a 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hearingaid/HearingAidNativeInterfaceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hearingaid/HearingAidNativeInterfaceTest.java @@ -40,6 +40,7 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.Mockito; +/** Test cases for {@link HearingAidNativeInterface}. */ public class HearingAidNativeInterfaceTest { @Rule public final MockitoRule mMockitoRule = new MockitoRule(); diff --git a/android/app/tests/unit/src/com/android/bluetooth/hearingaid/HearingAidServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/hearingaid/HearingAidServiceBinderTest.java index 8dae3bf594..ac740f3a16 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hearingaid/HearingAidServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hearingaid/HearingAidServiceBinderTest.java @@ -46,7 +46,7 @@ import org.mockito.Mock; import java.util.ArrayList; import java.util.List; -/** Test cases for {@link HearingAidServiceBinder} */ +/** Test cases for {@link HearingAidServiceBinder}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class HearingAidServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hearingaid/HearingAidServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/hearingaid/HearingAidServiceTest.java index a284d6a414..760489f724 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hearingaid/HearingAidServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hearingaid/HearingAidServiceTest.java @@ -80,6 +80,7 @@ import org.mockito.hamcrest.MockitoHamcrest; import java.util.List; +/** Test cases for {@link HearingAidService}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class HearingAidServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hearingaid/HearingAidStateMachineTest.java b/android/app/tests/unit/src/com/android/bluetooth/hearingaid/HearingAidStateMachineTest.java index 07cd5703ff..6511691991 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hearingaid/HearingAidStateMachineTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hearingaid/HearingAidStateMachineTest.java @@ -57,6 +57,7 @@ import org.mockito.InOrder; import org.mockito.Mock; import org.mockito.hamcrest.MockitoHamcrest; +/** Test cases for {@link HearingAidStateMachine}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class HearingAidStateMachineTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfp/AtPhonebookTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfp/AtPhonebookTest.java index b54da60e79..1d7a9a2bdb 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfp/AtPhonebookTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfp/AtPhonebookTest.java @@ -56,6 +56,7 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.Spy; +/** Test cases for {@link AtPhonebook}. */ @RunWith(AndroidJUnit4.class) public class AtPhonebookTest { @Rule public final MockitoRule mMockitoRule = new MockitoRule(); diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetAgIndicatorEnableStateTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetAgIndicatorEnableStateTest.java index 8fa050b679..462182fe54 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetAgIndicatorEnableStateTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetAgIndicatorEnableStateTest.java @@ -24,6 +24,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link HeadsetAgIndicatorEnableState}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class HeadsetAgIndicatorEnableStateTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetClccResponseTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetClccResponseTest.java index 63e0f2632d..9350e3bc5c 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetClccResponseTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetClccResponseTest.java @@ -24,6 +24,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link HeadsetClccResponse}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class HeadsetClccResponseTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetPhoneStateTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetPhoneStateTest.java index edcf484239..0c808f1352 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetPhoneStateTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetPhoneStateTest.java @@ -43,7 +43,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -/** Unit test to verify various methods in {@link HeadsetPhoneState} */ +/** Test cases for {@link HeadsetPhoneState}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class HeadsetPhoneStateTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceAndStateMachineTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceAndStateMachineTest.java index 835f03aaa2..6595d55deb 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceAndStateMachineTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceAndStateMachineTest.java @@ -89,6 +89,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; +/** Test cases for {@link HeadsetServiceAndStateMachine}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class HeadsetServiceAndStateMachineTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceBinderTest.java index 73f3610505..efbbe34e56 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceBinderTest.java @@ -36,7 +36,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -/** Test cases for {@link HeadsetServiceBinder} */ +/** Test cases for {@link HeadsetServiceBinder}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class HeadsetServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceTest.java index b16578c823..2e03a61c22 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceTest.java @@ -84,7 +84,7 @@ import java.util.HashMap; import java.util.List; import java.util.Set; -/** Tests for {@link HeadsetService} */ +/** Test cases for {@link HeadsetService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class HeadsetServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetStackEventTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetStackEventTest.java index d5f66da856..43e0d3d58e 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetStackEventTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetStackEventTest.java @@ -28,6 +28,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link HeadsetStackEvent}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class HeadsetStackEventTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetStateMachineTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetStateMachineTest.java index 68c17a10f8..9f4a2c1382 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetStateMachineTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetStateMachineTest.java @@ -86,7 +86,7 @@ import org.mockito.Mockito; import java.util.ArrayList; -/** Tests for {@link HeadsetStateMachine} */ +/** Test cases for {@link HeadsetStateMachine}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class HeadsetStateMachineTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetVendorSpecificResultCodeTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetVendorSpecificResultCodeTest.java index cfb1dea03c..8afc87f7ab 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetVendorSpecificResultCodeTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetVendorSpecificResultCodeTest.java @@ -28,6 +28,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link HeadsetVendorSpecificResultCode}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class HeadsetVendorSpecificResultCodeTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/HeadsetClientServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/HeadsetClientServiceBinderTest.java index 87f18055e5..ff08ed765a 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/HeadsetClientServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/HeadsetClientServiceBinderTest.java @@ -36,7 +36,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -/** Test cases for {@link HeadsetClientServiceBinder} */ +/** Test cases for {@link HeadsetClientServiceBinder}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class HeadsetClientServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/HeadsetClientServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/HeadsetClientServiceTest.java index a8a81b0440..5e6eac9d11 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/HeadsetClientServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/HeadsetClientServiceTest.java @@ -62,6 +62,7 @@ import java.util.HashMap; import java.util.Map; import java.util.concurrent.TimeUnit; +/** Test cases for {@link HeadsetClientService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class HeadsetClientServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachineTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachineTest.java index 7e47efeb4a..1395089d3f 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachineTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachineTest.java @@ -84,6 +84,7 @@ import org.mockito.hamcrest.MockitoHamcrest; import java.util.List; import java.util.Set; +/** Test cases for {@link HeadsetClientStateMachine}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class HeadsetClientStateMachineTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/HfpNativeInterfaceTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/HfpNativeInterfaceTest.java index bd480693e8..681d98e56b 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/HfpNativeInterfaceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/HfpNativeInterfaceTest.java @@ -33,6 +33,7 @@ import org.junit.Test; import org.mockito.ArgumentCaptor; import org.mockito.Mock; +/** Test cases for {@link HfpNativeInterface}. */ public class HfpNativeInterfaceTest { private static final byte[] TEST_DEVICE_ADDRESS = new byte[] {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/StackEventTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/StackEventTest.java index cb397e29ec..350f332b58 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/StackEventTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/StackEventTest.java @@ -26,6 +26,7 @@ import org.junit.runner.RunWith; import java.lang.reflect.Field; +/** Test cases for {@link StackEvent}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class StackEventTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/VendorCommandResponseProcessorTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/VendorCommandResponseProcessorTest.java index 0c9522b05b..2b7ca8da47 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/VendorCommandResponseProcessorTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/VendorCommandResponseProcessorTest.java @@ -39,6 +39,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; +/** Test cases for {@link VendorCommandResponseProcessor}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class VendorCommandResponseProcessorTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/connserv/HeadsetClientServiceInterfaceTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/connserv/HeadsetClientServiceInterfaceTest.java index 11d5a02a56..86daa5adae 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/connserv/HeadsetClientServiceInterfaceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/connserv/HeadsetClientServiceInterfaceTest.java @@ -39,6 +39,7 @@ import org.mockito.Mock; import java.util.List; import java.util.Set; +/** Test cases for {@link HeadsetClientServiceInterface}. */ @RunWith(AndroidJUnit4.class) public class HeadsetClientServiceInterfaceTest { @Rule public final MockitoRule mMockitoRule = new MockitoRule(); diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/connserv/HfpClientCallTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/connserv/HfpClientCallTest.java index d622a00666..a0d622cf15 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/connserv/HfpClientCallTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/connserv/HfpClientCallTest.java @@ -28,6 +28,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link HfpClientCall}. */ @RunWith(AndroidJUnit4.class) public class HfpClientCallTest { private static final int TEST_ID = 0; diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/connserv/HfpClientConnectionServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/connserv/HfpClientConnectionServiceTest.java index d6cffe4f20..ba858947f1 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/connserv/HfpClientConnectionServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/connserv/HfpClientConnectionServiceTest.java @@ -64,6 +64,7 @@ import org.mockito.Mock; import java.util.Arrays; import java.util.List; +/** Test cases for {@link HfpClientConnectionService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class HfpClientConnectionServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/connserv/HfpClientConnectionTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/connserv/HfpClientConnectionTest.java index 5423abf868..31a3a61073 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/connserv/HfpClientConnectionTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/connserv/HfpClientConnectionTest.java @@ -46,6 +46,7 @@ import org.mockito.junit.MockitoJUnitRunner; import java.util.Set; +/** Test cases for {@link HfpClientConnection}. */ @MediumTest @RunWith(MockitoJUnitRunner.class) public class HfpClientConnectionTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/connserv/HfpClientDeviceBlockTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/connserv/HfpClientDeviceBlockTest.java index 09178c30d5..85388f52a4 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hfpclient/connserv/HfpClientDeviceBlockTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hfpclient/connserv/HfpClientDeviceBlockTest.java @@ -35,13 +35,13 @@ import androidx.test.filters.MediumTest; import androidx.test.runner.AndroidJUnit4; import org.junit.Before; -import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Mock; +/** Test cases for {@link HfpClientDeviceBlock}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class HfpClientDeviceBlockTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hid/HidDeviceNativeInterfaceTest.java b/android/app/tests/unit/src/com/android/bluetooth/hid/HidDeviceNativeInterfaceTest.java index d393b8dc65..b67eadbdb8 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hid/HidDeviceNativeInterfaceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hid/HidDeviceNativeInterfaceTest.java @@ -34,6 +34,7 @@ import org.junit.Rule; import org.junit.Test; import org.mockito.Mock; +/** Test cases for {@link HidDeviceNativeInterface}. */ public class HidDeviceNativeInterfaceTest { private static final byte[] TEST_DEVICE_ADDRESS = new byte[] {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/android/app/tests/unit/src/com/android/bluetooth/hid/HidDeviceServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/hid/HidDeviceServiceBinderTest.java index 4369e85310..ad15865941 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hid/HidDeviceServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hid/HidDeviceServiceBinderTest.java @@ -42,7 +42,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -/** Test cases for {@link HidDeviceServiceBinder} */ +/** Test cases for {@link HidDeviceServiceBinder}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class HidDeviceServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hid/HidDeviceServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/hid/HidDeviceServiceTest.java index a242f054a7..cff2659d8a 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hid/HidDeviceServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hid/HidDeviceServiceTest.java @@ -74,6 +74,7 @@ import org.mockito.InOrder; import org.mockito.Mock; import org.mockito.hamcrest.MockitoHamcrest; +/** Test cases for {@link HidDeviceService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class HidDeviceServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/hid/HidHostServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/hid/HidHostServiceTest.java index 10f5f3257f..bc0d0167c0 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/hid/HidHostServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/hid/HidHostServiceTest.java @@ -51,6 +51,7 @@ import org.mockito.Mock; import java.util.List; +/** Test cases for {@link HidHostService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class HidHostServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/le_audio/ContentControlIdKeeperTest.java b/android/app/tests/unit/src/com/android/bluetooth/le_audio/ContentControlIdKeeperTest.java index 0fc41d3d0c..03f7fb345d 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/le_audio/ContentControlIdKeeperTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/le_audio/ContentControlIdKeeperTest.java @@ -41,6 +41,7 @@ import org.mockito.Mock; import java.util.Map; import java.util.UUID; +/** Test cases for {@link ContentControlIdKeeper}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class ContentControlIdKeeperTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioBroadcastServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioBroadcastServiceTest.java index e1569ea836..5f3beeea95 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioBroadcastServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioBroadcastServiceTest.java @@ -113,6 +113,7 @@ import org.mockito.hamcrest.MockitoHamcrest; import java.util.ArrayList; import java.util.List; +/** Test cases for {@link LeAudioBroadcastService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class LeAudioBroadcastServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioBroadcasterNativeInterfaceTest.java b/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioBroadcasterNativeInterfaceTest.java index f9c57e1494..c3dc110482 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioBroadcasterNativeInterfaceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioBroadcasterNativeInterfaceTest.java @@ -35,6 +35,7 @@ import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Mock; +/** Test cases for {@link LeAudioBroadcasterNativeInterface}. */ @RunWith(AndroidJUnit4.class) public class LeAudioBroadcasterNativeInterfaceTest { @Rule public final MockitoRule mMockitoRule = new MockitoRule(); diff --git a/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioNativeInterfaceTest.java b/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioNativeInterfaceTest.java index 369304c608..978b2b192a 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioNativeInterfaceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioNativeInterfaceTest.java @@ -36,6 +36,7 @@ import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Mock; +/** Test cases for {@link LeAudioNativeInterface}. */ @RunWith(AndroidJUnit4.class) public class LeAudioNativeInterfaceTest { @Rule public final MockitoRule mMockitoRule = new MockitoRule(); diff --git a/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceBinderTest.java index 68677ffedb..623ced680c 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceBinderTest.java @@ -48,7 +48,7 @@ import org.mockito.Mockito; import java.util.UUID; -/** Test cases for {@link LeAudioServiceBinder} */ +/** Test cases for {@link LeAudioServiceBinder}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class LeAudioServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceTest.java index cf836ddc3c..1690ba0775 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceTest.java @@ -123,6 +123,7 @@ import java.util.Objects; import java.util.Set; import java.util.stream.Collectors; +/** Test cases for {@link LeAudioService}. */ @MediumTest @RunWith(ParameterizedAndroidJunit4.class) public class LeAudioServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioStateMachineTest.java b/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioStateMachineTest.java index 3057a13b55..ad88d08b6e 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioStateMachineTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioStateMachineTest.java @@ -58,6 +58,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; +/** Test cases for {@link LeAudioStateMachine}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class LeAudioStateMachineTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioTmapGattServerTest.java b/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioTmapGattServerTest.java index abb4ddd7a7..a7955e76f9 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioTmapGattServerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioTmapGattServerTest.java @@ -44,6 +44,7 @@ import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Mock; +/** Test cases for {@link LeAudioTmapGattServer}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class LeAudioTmapGattServerTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/le_scan/MsftAdvMonitorTest.java b/android/app/tests/unit/src/com/android/bluetooth/le_scan/MsftAdvMonitorTest.java index 6e396df67e..c717d7f013 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/le_scan/MsftAdvMonitorTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/le_scan/MsftAdvMonitorTest.java @@ -25,6 +25,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; +/** Test cases for {@link MsftAdvMonitor}. */ @RunWith(JUnit4.class) public final class MsftAdvMonitorTest { private static final String TAG = MsftAdvMonitorTest.class.getSimpleName(); diff --git a/android/app/tests/unit/src/com/android/bluetooth/le_scan/ScanBinderTest.kt b/android/app/tests/unit/src/com/android/bluetooth/le_scan/ScanBinderTest.kt index 3424c48a54..238b4c5b29 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/le_scan/ScanBinderTest.kt +++ b/android/app/tests/unit/src/com/android/bluetooth/le_scan/ScanBinderTest.kt @@ -39,7 +39,7 @@ import org.mockito.Mock import org.mockito.Mockito.mock import org.mockito.Mockito.verify -/** Test cases for [ScanBinder] */ +/** Test cases for [ScanBinder]. */ @SmallTest @RunWith(AndroidJUnit4::class) class ScanBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapAccountItemTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapAccountItemTest.java index 6e493ee6d5..64d6192271 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapAccountItemTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapAccountItemTest.java @@ -26,6 +26,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link BluetoothMapAccountItem}. */ @RunWith(AndroidJUnit4.class) public class BluetoothMapAccountItemTest { private static final String TEST_NAME = "test_name"; diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapAppParamsTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapAppParamsTest.java index c0defe0c21..8803980264 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapAppParamsTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapAppParamsTest.java @@ -30,6 +30,7 @@ import org.junit.runner.RunWith; import java.nio.ByteBuffer; +/** Test cases for {@link BluetoothMapAppParams}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class BluetoothMapAppParamsTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapContentObserverTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapContentObserverTest.java index b131039e99..d17d1e0a85 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapContentObserverTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapContentObserverTest.java @@ -74,6 +74,7 @@ import java.util.HashSet; import java.util.Map; import java.util.concurrent.TimeUnit; +/** Test cases for {@link BluetoothMapContentObserver}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class BluetoothMapContentObserverTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapContentTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapContentTest.java index b149953287..ae34c71782 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapContentTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapContentTest.java @@ -68,6 +68,7 @@ import java.io.FileNotFoundException; import java.io.InputStream; import java.util.HashMap; +/** Test cases for {@link BluetoothMapContent}. */ @RunWith(AndroidJUnit4.class) public class BluetoothMapContentTest { private static final String TEST_TEXT = "text"; diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapConvoContactElementTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapConvoContactElementTest.java index 6e8f60f5ce..ed57d98121 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapConvoContactElementTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapConvoContactElementTest.java @@ -34,6 +34,7 @@ import java.io.StringReader; import java.io.StringWriter; import java.text.SimpleDateFormat; +/** Test cases for {@link BluetoothMapConvoContactElement}. */ @RunWith(AndroidJUnit4.class) public class BluetoothMapConvoContactElementTest { private static final String TEST_UCI = "test_bt_uci"; diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapConvoListingElementTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapConvoListingElementTest.java index da6e865ab3..e0227b86cb 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapConvoListingElementTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapConvoListingElementTest.java @@ -38,6 +38,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +/** Test cases for {@link BluetoothMapConvoListingElement}. */ @RunWith(AndroidJUnit4.class) public class BluetoothMapConvoListingElementTest { private static final long TEST_ID = 1111; diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapConvoListingTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapConvoListingTest.java index e333d7b4bb..d2a0f0ebcb 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapConvoListingTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapConvoListingTest.java @@ -31,6 +31,7 @@ import org.junit.runner.RunWith; import java.io.ByteArrayInputStream; import java.io.InputStream; +/** Test cases for {@link BluetoothMapConvoListing}. */ @RunWith(AndroidJUnit4.class) public class BluetoothMapConvoListingTest { private static final long TEST_LAST_ACTIVITY_EARLIEST = 0; diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapFolderElementTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapFolderElementTest.java index 0ba98aef33..4b974cd2bc 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapFolderElementTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapFolderElementTest.java @@ -24,6 +24,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link BluetoothMapFolderElement}. */ @RunWith(AndroidJUnit4.class) public class BluetoothMapFolderElementTest { private static final boolean TEST_HAS_SMS_MMS_CONTENT = true; diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapMasInstanceTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapMasInstanceTest.java index 87c33d6588..dd56b933c2 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapMasInstanceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapMasInstanceTest.java @@ -33,6 +33,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; +/** Test cases for {@link BluetoothMapMasInstance}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class BluetoothMapMasInstanceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapMessageListingElementTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapMessageListingElementTest.java index bf58abaebc..de6e1f25bb 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapMessageListingElementTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapMessageListingElementTest.java @@ -35,6 +35,7 @@ import java.io.StringReader; import java.io.StringWriter; import java.text.SimpleDateFormat; +/** Test cases for {@link BluetoothMapMessageListingElement}. */ @RunWith(AndroidJUnit4.class) public class BluetoothMapMessageListingElementTest { private static final long TEST_CP_HANDLE = 1; diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapMessageListingTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapMessageListingTest.java index d78405aff4..f748832912 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapMessageListingTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapMessageListingTest.java @@ -37,6 +37,7 @@ import java.time.LocalDateTime; import java.time.ZoneOffset; import java.time.format.DateTimeFormatter; +/** Test cases for {@link BluetoothMapMessageListing}. */ @RunWith(AndroidJUnit4.class) public class BluetoothMapMessageListingTest { private static final long TEST_DATE_TIME_EARLIEST = 0; diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapObexServerTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapObexServerTest.java index a5c4b8425e..27bca34f3a 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapObexServerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapObexServerTest.java @@ -50,6 +50,7 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.Spy; +/** Test cases for {@link BluetoothMapObexServer}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class BluetoothMapObexServerTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapServiceBinderTest.java index 0ebb4e7bd2..01f83b4eac 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapServiceBinderTest.java @@ -36,7 +36,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -/** Test cases for {@link BluetoothMapServiceBinder} */ +/** Test cases for {@link BluetoothMapServiceBinder}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class BluetoothMapServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapServiceTest.java index f2c455bbc1..2e61805948 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapServiceTest.java @@ -45,6 +45,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; +/** Test cases for {@link BluetoothMapService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class BluetoothMapServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapSmsPduTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapSmsPduTest.java index 2f96c2ead9..01c05e37e8 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapSmsPduTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapSmsPduTest.java @@ -48,6 +48,7 @@ import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.List; +/** Test cases for {@link BluetoothMapSmsPdu}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class BluetoothMapSmsPduTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapUtilsTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapUtilsTest.java index 57467027e1..9325a8fcff 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapUtilsTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapUtilsTest.java @@ -30,6 +30,7 @@ import org.junit.runner.RunWith; import java.nio.charset.StandardCharsets; +/** Test cases for {@link BluetoothMapUtils}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class BluetoothMapUtilsTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapbMessageEmailTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapbMessageEmailTest.java index b3094670e2..3d4b2e53d7 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapbMessageEmailTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapbMessageEmailTest.java @@ -29,6 +29,7 @@ import org.junit.runner.RunWith; import java.io.ByteArrayInputStream; import java.io.InputStream; +/** Test cases for {@link BluetoothMapbMessageEmail}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class BluetoothMapbMessageEmailTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapbMessageMimeTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapbMessageMimeTest.java index 7aa1ad9b1c..af8e22b461 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapbMessageMimeTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapbMessageMimeTest.java @@ -33,6 +33,7 @@ import java.util.Arrays; import java.util.Date; import java.util.Locale; +/** Test cases for {@link BluetoothMapbMessageMime}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class BluetoothMapbMessageMimeTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapbMessageSmsTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapbMessageSmsTest.java index 9cec017f97..478a594859 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapbMessageSmsTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapbMessageSmsTest.java @@ -38,6 +38,7 @@ import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.List; +/** Test cases for {@link BluetoothMapbMessageSms}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class BluetoothMapbMessageSmsTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapbMessageTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapbMessageTest.java index d778b412a6..aaa8914b41 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapbMessageTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapbMessageTest.java @@ -31,6 +31,7 @@ import org.junit.runner.RunWith; import java.io.ByteArrayInputStream; import java.io.InputStream; +/** Test cases for {@link BluetoothMapbMessage}. */ @RunWith(AndroidJUnit4.class) public class BluetoothMapbMessageTest { private static final String TEST_VERSION_STRING = "1.0"; diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapbMessageVCardTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapbMessageVCardTest.java index 69a57b83b2..d9823360db 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapbMessageVCardTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/BluetoothMapbMessageVCardTest.java @@ -31,6 +31,7 @@ import org.junit.runner.RunWith; import java.io.ByteArrayInputStream; import java.io.InputStream; +/** Test cases for {@link BluetoothMapbMessageVCard}. */ @RunWith(AndroidJUnit4.class) public class BluetoothMapbMessageVCardTest { private static final String TEST_NAME = "test_name"; diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/ConvoContactInfoTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/ConvoContactInfoTest.java index fc99e7134e..bf0936428e 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/ConvoContactInfoTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/ConvoContactInfoTest.java @@ -28,6 +28,7 @@ import com.android.bluetooth.mapapi.BluetoothMapContract; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link ConvoContactInfo}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class ConvoContactInfoTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/EventTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/EventTest.java index edd0863d4b..13de9d11ab 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/EventTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/EventTest.java @@ -39,6 +39,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link Event}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class EventTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/FilterInfoTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/FilterInfoTest.java index 7042e34980..b8d8de4d36 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/FilterInfoTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/FilterInfoTest.java @@ -32,6 +32,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link FilterInfo}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class FilterInfoTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/MapContactTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/MapContactTest.java index 93babf8f81..c55efd2b77 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/MapContactTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/MapContactTest.java @@ -26,6 +26,7 @@ import com.android.bluetooth.SignedLongLong; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link MapContact}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class MapContactTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/MsgTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/MsgTest.java index 4a0963cd78..98450d3e6d 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/MsgTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/MsgTest.java @@ -26,6 +26,7 @@ import com.google.common.testing.EqualsTester; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link Msg}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class MsgTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/map/SmsMmsContactsTest.java b/android/app/tests/unit/src/com/android/bluetooth/map/SmsMmsContactsTest.java index fdf2ee67e1..525143d623 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/map/SmsMmsContactsTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/map/SmsMmsContactsTest.java @@ -39,6 +39,7 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.Spy; +/** Test cases for {@link SmsMmsContacts}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class SmsMmsContactsTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/mapapi/BluetoothMapContractTest.java b/android/app/tests/unit/src/com/android/bluetooth/mapapi/BluetoothMapContractTest.java index 021c1ae82f..d7690e732c 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/mapapi/BluetoothMapContractTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/mapapi/BluetoothMapContractTest.java @@ -25,6 +25,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link BluetoothMapContract}. */ @RunWith(AndroidJUnit4.class) public class BluetoothMapContractTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/mapapi/BluetoothMapEmailProviderTest.java b/android/app/tests/unit/src/com/android/bluetooth/mapapi/BluetoothMapEmailProviderTest.java index 1dadfd906d..348f374211 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/mapapi/BluetoothMapEmailProviderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/mapapi/BluetoothMapEmailProviderTest.java @@ -47,6 +47,7 @@ import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; +/** Test cases for {@link BluetoothMapEmailProvider}. */ @RunWith(AndroidJUnit4.class) public class BluetoothMapEmailProviderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/mapapi/BluetoothMapIMProviderTest.java b/android/app/tests/unit/src/com/android/bluetooth/mapapi/BluetoothMapIMProviderTest.java index 2fccf754e5..774e8c5f20 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/mapapi/BluetoothMapIMProviderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/mapapi/BluetoothMapIMProviderTest.java @@ -56,6 +56,7 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; +/** Test cases for {@link BluetoothMapIMProvider}. */ @RunWith(AndroidJUnit4.class) public class BluetoothMapIMProviderTest { private static final String TAG = BluetoothMapIMProviderTest.class.getSimpleName(); diff --git a/android/app/tests/unit/src/com/android/bluetooth/mapclient/BmessageTest.java b/android/app/tests/unit/src/com/android/bluetooth/mapclient/BmessageTest.java index 06d66600d7..89471435f7 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/mapclient/BmessageTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/mapclient/BmessageTest.java @@ -26,6 +26,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link Bmessage}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class BmessageTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/mapclient/EventReportTest.java b/android/app/tests/unit/src/com/android/bluetooth/mapclient/EventReportTest.java index 05facb51cc..b48868aba5 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/mapclient/EventReportTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/mapclient/EventReportTest.java @@ -33,6 +33,7 @@ import java.io.DataInputStream; import java.io.IOException; import java.io.InputStream; +/** Test cases for {@link EventReport}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class EventReportTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/mapclient/MapClientContentTest.java b/android/app/tests/unit/src/com/android/bluetooth/mapclient/MapClientContentTest.java index 09d946390b..32980a2068 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/mapclient/MapClientContentTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/mapclient/MapClientContentTest.java @@ -65,6 +65,7 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; +/** Test cases for {@link MapClientContent}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class MapClientContentTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/mapclient/MapClientServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/mapclient/MapClientServiceBinderTest.java index 4e6910718f..98279f3d8d 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/mapclient/MapClientServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/mapclient/MapClientServiceBinderTest.java @@ -36,7 +36,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -/** Test cases for {@link MapClientServiceBinder} */ +/** Test cases for {@link MapClientServiceBinder}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class MapClientServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/mapclient/MapClientServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/mapclient/MapClientServiceTest.java index 66f04951ee..8ea8c2bba8 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/mapclient/MapClientServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/mapclient/MapClientServiceTest.java @@ -64,6 +64,7 @@ import org.mockito.Mock; import java.util.ArrayList; import java.util.List; +/** Test cases for {@link MapClientService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class MapClientServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/mapclient/MapClientStateMachineTest.java b/android/app/tests/unit/src/com/android/bluetooth/mapclient/MapClientStateMachineTest.java index 73280280ca..e2ec29a16c 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/mapclient/MapClientStateMachineTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/mapclient/MapClientStateMachineTest.java @@ -101,6 +101,7 @@ import java.util.Map; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +/** Test cases for {@link MapClientStateMachine}. */ @MediumTest @RunWith(ParameterizedAndroidJunit4.class) public class MapClientStateMachineTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/mapclient/MessageTest.java b/android/app/tests/unit/src/com/android/bluetooth/mapclient/MessageTest.java index 967e5b209d..154f5140ca 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/mapclient/MessageTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/mapclient/MessageTest.java @@ -26,6 +26,7 @@ import org.junit.runner.RunWith; import java.util.HashMap; +/** Test cases for {@link Message}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class MessageTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/mapclient/MessagesFilterTest.java b/android/app/tests/unit/src/com/android/bluetooth/mapclient/MessagesFilterTest.java index 5433d67897..7b148666f5 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/mapclient/MessagesFilterTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/mapclient/MessagesFilterTest.java @@ -26,6 +26,7 @@ import org.junit.runner.RunWith; import java.util.Calendar; +/** Test cases for {@link MessagesFilter}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class MessagesFilterTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/mapclient/MessagesListingTest.java b/android/app/tests/unit/src/com/android/bluetooth/mapclient/MessagesListingTest.java index ab6e7a46a4..4a821e1cbe 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/mapclient/MessagesListingTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/mapclient/MessagesListingTest.java @@ -26,6 +26,7 @@ import org.junit.runner.RunWith; import java.io.ByteArrayInputStream; +/** Test cases for {@link MessagesListing}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class MessagesListingTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/mapclient/MnsObexServerTest.java b/android/app/tests/unit/src/com/android/bluetooth/mapclient/MnsObexServerTest.java index 2abea296e7..56b0a6d0eb 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/mapclient/MnsObexServerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/mapclient/MnsObexServerTest.java @@ -41,6 +41,7 @@ import org.mockito.Mock; import java.io.ByteArrayInputStream; import java.io.DataInputStream; +/** Test cases for {@link MnsObexServer}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class MnsObexServerTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/mapclient/ObexTimeTest.java b/android/app/tests/unit/src/com/android/bluetooth/mapclient/ObexTimeTest.java index 6f8bad385c..d6fb3090b1 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/mapclient/ObexTimeTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/mapclient/ObexTimeTest.java @@ -29,6 +29,7 @@ import java.time.Instant; import java.util.Date; import java.util.TimeZone; +/** Test cases for {@link ObexTime}. */ @RunWith(AndroidJUnit4.class) @SuppressLint("UndefinedEquals") public class ObexTimeTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/mcp/McpServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/mcp/McpServiceBinderTest.java index dc21e810b8..534f8f1d18 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/mcp/McpServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/mcp/McpServiceBinderTest.java @@ -34,7 +34,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -/** Test cases for {@link McpServiceBinder} */ +/** Test cases for {@link McpServiceBinder}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class McpServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/mcp/McpServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/mcp/McpServiceTest.java index 5ff65a4f8c..c32483fcdc 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/mcp/McpServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/mcp/McpServiceTest.java @@ -38,6 +38,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; +/** Test cases for {@link McpService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class McpServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/mcp/MediaControlGattServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/mcp/MediaControlGattServiceTest.java index 6b3df639aa..9a88458050 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/mcp/MediaControlGattServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/mcp/MediaControlGattServiceTest.java @@ -57,6 +57,7 @@ import java.util.List; import java.util.Map; import java.util.UUID; +/** Test cases for {@link MediaControlGattService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class MediaControlGattServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/mcp/MediaControlProfileTest.java b/android/app/tests/unit/src/com/android/bluetooth/mcp/MediaControlProfileTest.java index 0aa5f199d5..35ba769a81 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/mcp/MediaControlProfileTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/mcp/MediaControlProfileTest.java @@ -52,6 +52,7 @@ import org.mockito.Mock; import java.util.HashMap; import java.util.UUID; +/** Test cases for {@link MediaControlProfile}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class MediaControlProfileTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppBatchTest.java b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppBatchTest.java index e3f764d2bc..6017de3b42 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppBatchTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppBatchTest.java @@ -38,6 +38,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; +/** Test cases for {@link BluetoothOppBatch}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class BluetoothOppBatchTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppHandoverReceiverTest.java b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppHandoverReceiverTest.java index daa65ebba6..cbc97b1242 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppHandoverReceiverTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppHandoverReceiverTest.java @@ -49,6 +49,7 @@ import org.mockito.Spy; import java.util.ArrayList; import java.util.List; +/** Test cases for {@link BluetoothOppHandoverReceiver}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class BluetoothOppHandoverReceiverTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppManagerTest.java b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppManagerTest.java index b20858b647..6d9edf9aec 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppManagerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppManagerTest.java @@ -56,6 +56,7 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; +/** Test cases for {@link BluetoothOppManager}. */ @RunWith(AndroidJUnit4.class) public class BluetoothOppManagerTest { Context mContext; diff --git a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppNotificationTest.java b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppNotificationTest.java index 5e5d11ce4d..928cfcae60 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppNotificationTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppNotificationTest.java @@ -58,6 +58,7 @@ import org.mockito.Mock; import java.util.Locale; +/** Test cases for {@link BluetoothOppNotification}. */ @RunWith(AndroidJUnit4.class) public class BluetoothOppNotificationTest { static final int TIMEOUT_MS = 3000; diff --git a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppObexClientSessionTest.java b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppObexClientSessionTest.java index b216680836..083a7d1508 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppObexClientSessionTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppObexClientSessionTest.java @@ -59,6 +59,7 @@ import java.io.OutputStream; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +/** Test cases for {@link BluetoothOppObexClientSession}. */ @RunWith(AndroidJUnit4.class) public class BluetoothOppObexClientSessionTest { @Rule public final MockitoRule mMockitoRule = new MockitoRule(); diff --git a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppObexServerSessionTest.java b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppObexServerSessionTest.java index 1e850d057b..8a93a3f0ac 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppObexServerSessionTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppObexServerSessionTest.java @@ -62,6 +62,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +/** Test cases for {@link BluetoothOppObexServerSession}. */ @RunWith(AndroidJUnit4.class) public class BluetoothOppObexServerSessionTest { @Rule public final MockitoRule mMockitoRule = new MockitoRule(); diff --git a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppPreferenceTest.java b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppPreferenceTest.java index 91b1b0b65d..f0f4fe71dc 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppPreferenceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppPreferenceTest.java @@ -40,6 +40,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link BluetoothOppPreference}. */ @RunWith(AndroidJUnit4.class) public class BluetoothOppPreferenceTest { Context mContext; diff --git a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppReceiveFileInfoTest.java b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppReceiveFileInfoTest.java index 3f74ac90d1..b532222f5f 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppReceiveFileInfoTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppReceiveFileInfoTest.java @@ -41,6 +41,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link BluetoothOppReceiveFileInfo}. */ @RunWith(AndroidJUnit4.class) public class BluetoothOppReceiveFileInfoTest { Context mContext; diff --git a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppReceiverTest.java b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppReceiverTest.java index 0a144d7b35..8ff6fab596 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppReceiverTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppReceiverTest.java @@ -61,6 +61,7 @@ import org.mockito.Mock; import java.util.ArrayList; import java.util.List; +/** Test cases for {@link BluetoothOppReceiver}. */ @RunWith(AndroidJUnit4.class) public class BluetoothOppReceiverTest { @Rule public final MockitoRule mMockitoRule = new MockitoRule(); diff --git a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppSendFileInfoTest.java b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppSendFileInfoTest.java index d76517320e..20725f3600 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppSendFileInfoTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppSendFileInfoTest.java @@ -52,6 +52,7 @@ import org.mockito.Mock; import java.io.FileInputStream; import java.io.IOException; +/** Test cases for {@link BluetoothOppSendFileInfo}. */ @RunWith(TestParameterInjector.class) public class BluetoothOppSendFileInfoTest { Context mContext; diff --git a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppServiceTest.java index a065757c01..e5db783227 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppServiceTest.java @@ -52,6 +52,7 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.Mockito; +/** Test cases for {@link BluetoothOppService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class BluetoothOppServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppShareInfoTest.java b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppShareInfoTest.java index 212f1ffef7..7e37021813 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppShareInfoTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppShareInfoTest.java @@ -27,6 +27,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link BluetoothOppShareInfo}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class BluetoothOppShareInfoTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppTransferActivityTest.java b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppTransferActivityTest.java index ece55f357e..c0cf0349fe 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppTransferActivityTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppTransferActivityTest.java @@ -56,6 +56,7 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; +/** Test cases for {@link BluetoothOppTransferActivity}. */ @RunWith(AndroidJUnit4.class) public class BluetoothOppTransferActivityTest { @Rule public final MockitoRule mMockitoRule = new MockitoRule(); diff --git a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppTransferHistoryTest.java b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppTransferHistoryTest.java index 3d313bdfb5..1e84a06020 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppTransferHistoryTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppTransferHistoryTest.java @@ -63,7 +63,7 @@ import org.mockito.Spy; import java.util.ArrayList; import java.util.List; -/** This class will also test BluetoothOppTransferAdapter */ +/** Test cases for {@link BluetoothOppTransferHistory} and {@link BluetoothOppTransferAdapter}. */ @RunWith(AndroidJUnit4.class) public class BluetoothOppTransferHistoryTest { @Rule public final MockitoRule mMockitoRule = new MockitoRule(); diff --git a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppTransferTest.java b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppTransferTest.java index 3ab02065e3..57365d631c 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppTransferTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppTransferTest.java @@ -51,7 +51,6 @@ import androidx.test.runner.AndroidJUnit4; import com.android.bluetooth.BluetoothMethodProxy; import com.android.bluetooth.BluetoothObexTransport; -import com.android.bluetooth.flags.Flags; import com.android.obex.ObexTransport; import org.junit.After; @@ -63,6 +62,7 @@ import org.mockito.Mock; import java.util.Objects; +/** Test cases for {@link BluetoothOppTransfer}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class BluetoothOppTransferTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppUtilityTest.java b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppUtilityTest.java index cadff94862..e99d7800a0 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppUtilityTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppUtilityTest.java @@ -64,6 +64,7 @@ import java.util.List; import java.util.Objects; import java.util.concurrent.atomic.AtomicInteger; +/** Test cases for {@link BluetoothOppUtility}. */ public class BluetoothOppUtilityTest { @Rule public final MockitoRule mMockitoRule = new MockitoRule(); diff --git a/android/app/tests/unit/src/com/android/bluetooth/pan/PanServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/pan/PanServiceBinderTest.java index 272ada98d7..53fa3d4226 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pan/PanServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pan/PanServiceBinderTest.java @@ -36,7 +36,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -/** Test cases for {@link PanServiceBinder} */ +/** Test cases for {@link PanServiceBinder}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class PanServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pan/PanServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/pan/PanServiceTest.java index 1621909b73..ca91194688 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pan/PanServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pan/PanServiceTest.java @@ -60,6 +60,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; +/** Test cases for {@link PanService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class PanServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapAuthenticatorTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapAuthenticatorTest.java index 78d61ff046..8ace3204d5 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapAuthenticatorTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapAuthenticatorTest.java @@ -34,6 +34,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; +/** Test cases for {@link BluetoothPbapAuthenticator}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class BluetoothPbapAuthenticatorTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapCallLogComposerTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapCallLogComposerTest.java index 73aa0f015f..40bdec97be 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapCallLogComposerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapCallLogComposerTest.java @@ -49,6 +49,7 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.Spy; +/** Test cases for {@link BluetoothPbapCallLogComposer}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class BluetoothPbapCallLogComposerTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapConfigTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapConfigTest.java index a95fbcc461..3e4f84b144 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapConfigTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapConfigTest.java @@ -36,6 +36,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; +/** Test cases for {@link BluetoothPbapConfig}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class BluetoothPbapConfigTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapObexServerTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapObexServerTest.java index a833c6134b..2baf4075cd 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapObexServerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapObexServerTest.java @@ -77,6 +77,7 @@ import org.mockito.Spy; import java.io.IOException; import java.io.OutputStream; +/** Test cases for {@link BluetoothPbapObexServer}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class BluetoothPbapObexServerTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapServiceBinderTest.java index 5c713d62b5..2142eba264 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapServiceBinderTest.java @@ -36,7 +36,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -/** Test cases for {@link BluetoothPbapServiceBinder} */ +/** Test cases for {@link BluetoothPbapServiceBinder}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class BluetoothPbapServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapServiceTest.java index e19ca130bf..27eb54f24f 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapServiceTest.java @@ -68,6 +68,7 @@ import org.mockito.Spy; import java.util.List; +/** Test cases for {@link BluetoothPbapService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class BluetoothPbapServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapSimVcardManagerTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapSimVcardManagerTest.java index 4afce15b68..75728b2c05 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapSimVcardManagerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapSimVcardManagerTest.java @@ -56,6 +56,7 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; +/** Test cases for {@link BluetoothPbapSimVcardManager}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class BluetoothPbapSimVcardManagerTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapUtilsTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapUtilsTest.java index df448082c2..cb0530c641 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapUtilsTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapUtilsTest.java @@ -60,6 +60,7 @@ import java.util.ArrayList; import java.util.Calendar; import java.util.List; +/** Test cases for {@link BluetoothPbapUtils}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class BluetoothPbapUtilsTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapVcardManagerNestedClassesTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapVcardManagerNestedClassesTest.java index e95e90088a..1ecc61ae71 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapVcardManagerNestedClassesTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapVcardManagerNestedClassesTest.java @@ -43,6 +43,7 @@ import org.mockito.Mock; import java.util.concurrent.atomic.AtomicInteger; +/** Test cases for {@link BluetoothPbapVcardManagerNestedClasses}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class BluetoothPbapVcardManagerNestedClassesTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapVcardManagerTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapVcardManagerTest.java index 3b6034cd33..56ba69d410 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapVcardManagerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbap/BluetoothPbapVcardManagerTest.java @@ -52,6 +52,7 @@ import java.util.Arrays; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; +/** Test cases for {@link BluetoothPbapVcardManager}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class BluetoothPbapVcardManagerTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbap/HandlerForStringBufferTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbap/HandlerForStringBufferTest.java index 9382902122..d5e4068122 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbap/HandlerForStringBufferTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbap/HandlerForStringBufferTest.java @@ -40,6 +40,7 @@ import org.mockito.Mock; import java.io.IOException; import java.io.OutputStream; +/** Test cases for {@link HandlerForStringBuffer}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class HandlerForStringBufferTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbap/PbapStateMachineTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbap/PbapStateMachineTest.java index c46ea24702..d83d663ff8 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbap/PbapStateMachineTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbap/PbapStateMachineTest.java @@ -45,6 +45,7 @@ import org.mockito.Mock; import java.io.IOException; import java.io.InputStream; +/** Test cases for {@link PbapStateMachine}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class PbapStateMachineTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapApplicationParametersTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapApplicationParametersTest.java index 8f8c076648..18e91bef08 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapApplicationParametersTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapApplicationParametersTest.java @@ -24,6 +24,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link PbapApplicationParameters}. */ @RunWith(AndroidJUnit4.class) public class PbapApplicationParametersTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientAccountAuthenticatorServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientAccountAuthenticatorServiceTest.java index dfc7c322a5..6cfec032ba 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientAccountAuthenticatorServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientAccountAuthenticatorServiceTest.java @@ -36,6 +36,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link PbapClientAccountAuthenticatorService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class PbapClientAccountAuthenticatorServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientAccountAuthenticatorTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientAccountAuthenticatorTest.java index fce20be7ad..8b1bcee2fa 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientAccountAuthenticatorTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientAccountAuthenticatorTest.java @@ -35,6 +35,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; +/** Test cases for {@link PbapClientAccountAuthenticator}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class PbapClientAccountAuthenticatorTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientAccountManagerTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientAccountManagerTest.java index e3ed3884a4..075fa2eddb 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientAccountManagerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientAccountManagerTest.java @@ -61,6 +61,7 @@ import org.mockito.Mock; import java.util.List; +/** Test cases for {@link PbapClientAccountManager}. */ @RunWith(AndroidJUnit4.class) public class PbapClientAccountManagerTest { private static final String ACCOUNT_TYPE = "com.android.bluetooth.pbapclient.account"; diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientConnectionHandlerTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientConnectionHandlerTest.java index eef3517311..b76cb683df 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientConnectionHandlerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientConnectionHandlerTest.java @@ -44,6 +44,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; +/** Test cases for {@link PbapClientConnectionHandler}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class PbapClientConnectionHandlerTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientContactsStorageTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientContactsStorageTest.java index afd2c2a085..fdd4473648 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientContactsStorageTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientContactsStorageTest.java @@ -67,6 +67,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +/** Test cases for {@link PbapClientContactsStorage}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class PbapClientContactsStorageTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientObexAuthenticatorTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientObexAuthenticatorTest.java index 45476f1b73..5846e6fb08 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientObexAuthenticatorTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientObexAuthenticatorTest.java @@ -27,6 +27,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link PbapClientObexAuthenticator}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class PbapClientObexAuthenticatorTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientObexClientTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientObexClientTest.java index ef315042d2..ac82e6be59 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientObexClientTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientObexClientTest.java @@ -67,6 +67,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +/** Test cases for {@link PbapClientObexClient}. */ @RunWith(AndroidJUnit4.class) public class PbapClientObexClientTest { private static final int TEST_L2CAP_PSM = 4098; diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientObexTransportTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientObexTransportTest.java index b594ac70b4..fda3858c81 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientObexTransportTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientObexTransportTest.java @@ -42,6 +42,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +/** Test cases for {@link PbapClientObexTransport}. */ @RunWith(AndroidJUnit4.class) public class PbapClientObexTransportTest { @Rule public final MockitoRule mMockitoRule = new MockitoRule(); diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientServiceBinderTest.java index 94b51136dd..a54827346b 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientServiceBinderTest.java @@ -47,7 +47,7 @@ import org.mockito.Mock; import java.util.List; -/** Test cases for {@link PbapClientServiceBinder} */ +/** Test cases for {@link PbapClientServiceBinder}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class PbapClientServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientServiceTest.java index bf3014a7ac..302f432d21 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientServiceTest.java @@ -84,6 +84,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +/** Test cases for {@link PbapClientService}. */ @MediumTest @RunWith(ParameterizedAndroidJunit4.class) public class PbapClientServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientSocketTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientSocketTest.java index 64f1979437..28b00d2c53 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientSocketTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientSocketTest.java @@ -38,6 +38,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +/** Test cases for {@link PbapClientSocket}. */ @RunWith(AndroidJUnit4.class) public class PbapClientSocketTest { @Rule public final MockitoRule mMockitoRule = new MockitoRule(); diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientStateMachineOldTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientStateMachineOldTest.java index 73c1722e75..c1cdc928a8 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientStateMachineOldTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientStateMachineOldTest.java @@ -53,6 +53,7 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.Mockito; +/** Test cases for {@link PbapClientStateMachineOld}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class PbapClientStateMachineOldTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientStateMachineTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientStateMachineTest.java index d9b8bef9d4..cf3e39ed48 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientStateMachineTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapClientStateMachineTest.java @@ -63,6 +63,7 @@ import org.mockito.Mock; import java.util.ArrayList; import java.util.List; +/** Test cases for {@link PbapClientStateMachine}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class PbapClientStateMachineTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapPhonebookMetadataTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapPhonebookMetadataTest.java index 2abafedf77..05a9b43198 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapPhonebookMetadataTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapPhonebookMetadataTest.java @@ -23,6 +23,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link PbapPhonebookMetadata}. */ @RunWith(AndroidJUnit4.class) public class PbapPhonebookMetadataTest { private static final int SIZE = 5; diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapPhonebookTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapPhonebookTest.java index 5c24a9f794..fff637e015 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapPhonebookTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapPhonebookTest.java @@ -32,6 +32,7 @@ import java.io.InputStream; import java.nio.charset.StandardCharsets; import java.util.Arrays; +/** Test cases for {@link PbapPhonebook}. */ @RunWith(AndroidJUnit4.class) public class PbapPhonebookTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapSdpRecordTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapSdpRecordTest.java index 3248d6e9db..caeb536a3f 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapSdpRecordTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PbapSdpRecordTest.java @@ -32,6 +32,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link PbapSdpRecord}. */ @RunWith(AndroidJUnit4.class) public class PbapSdpRecordTest { private BluetoothDevice mTestDevice; diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PhonebookPullRequestTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PhonebookPullRequestTest.java index 10526bac41..e7df7f174f 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PhonebookPullRequestTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/PhonebookPullRequestTest.java @@ -35,6 +35,7 @@ import org.junit.runner.RunWith; import java.util.ArrayList; import java.util.List; +/** Test cases for {@link PhonebookPullRequest}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class PhonebookPullRequestTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/RequestPullPhonebookMetadataTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/RequestPullPhonebookMetadataTest.java index 2e404f9614..42e0f1e4fe 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/RequestPullPhonebookMetadataTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/RequestPullPhonebookMetadataTest.java @@ -37,6 +37,7 @@ import org.junit.runner.RunWith; import java.io.IOException; import java.nio.ByteBuffer; +/** Test cases for {@link RequestPullPhonebookMetadata}. */ @RunWith(AndroidJUnit4.class) public class RequestPullPhonebookMetadataTest { private static final String PHONEBOOK_NAME = "phonebook"; diff --git a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/RequestPullPhonebookTest.java b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/RequestPullPhonebookTest.java index 551d3e3d2f..cec2030657 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/pbapclient/RequestPullPhonebookTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/pbapclient/RequestPullPhonebookTest.java @@ -34,6 +34,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +/** Test cases for {@link RequestPullPhonebook}. */ @RunWith(AndroidJUnit4.class) public class RequestPullPhonebookTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/sap/SapMessageTest.java b/android/app/tests/unit/src/com/android/bluetooth/sap/SapMessageTest.java index 174e71a954..5e1db970cd 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/sap/SapMessageTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/sap/SapMessageTest.java @@ -55,6 +55,7 @@ import org.mockito.Mockito; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; +/** Test cases for {@link SapMessage}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class SapMessageTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/sap/SapRilReceiverHidlTest.java b/android/app/tests/unit/src/com/android/bluetooth/sap/SapRilReceiverHidlTest.java index 5d30fa6e93..70eb47e560 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/sap/SapRilReceiverHidlTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/sap/SapRilReceiverHidlTest.java @@ -70,6 +70,7 @@ import org.mockito.Spy; import java.util.ArrayList; import java.util.Arrays; +/** Test cases for {@link SapRilReceiverHidl}. */ @LargeTest @RunWith(AndroidJUnit4.class) public class SapRilReceiverHidlTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/sap/SapRilReceiverTest.java b/android/app/tests/unit/src/com/android/bluetooth/sap/SapRilReceiverTest.java index 80983b2eef..ae4e35a715 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/sap/SapRilReceiverTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/sap/SapRilReceiverTest.java @@ -73,6 +73,7 @@ import org.mockito.Spy; import java.util.Arrays; +/** Test cases for {@link SapRilReceiver}. */ @LargeTest @RunWith(AndroidJUnit4.class) public class SapRilReceiverTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/sap/SapServerTest.java b/android/app/tests/unit/src/com/android/bluetooth/sap/SapServerTest.java index 69d6434ff2..b6a90affd5 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/sap/SapServerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/sap/SapServerTest.java @@ -83,6 +83,7 @@ import org.mockito.Spy; import java.io.InputStream; import java.io.OutputStream; +/** Test cases for {@link SapServer}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class SapServerTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/sap/SapServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/sap/SapServiceBinderTest.java index 10d1a092e0..7ee0e89bfb 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/sap/SapServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/sap/SapServiceBinderTest.java @@ -38,7 +38,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -/** Test cases for {@link SapServiceBinder} */ +/** Test cases for {@link SapServiceBinder}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class SapServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/sap/SapServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/sap/SapServiceTest.java index 06d41b2db8..db9dcb14a2 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/sap/SapServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/sap/SapServiceTest.java @@ -46,6 +46,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; +/** Test cases for {@link SapService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class SapServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/tbs/TbsGattTest.java b/android/app/tests/unit/src/com/android/bluetooth/tbs/TbsGattTest.java index 81d7bc1bd5..35ab51cb25 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/tbs/TbsGattTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/tbs/TbsGattTest.java @@ -56,6 +56,7 @@ import java.util.Map; import java.util.TreeMap; import java.util.UUID; +/** Test cases for {@link TbsGatt}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class TbsGattTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/tbs/TbsGenericTest.java b/android/app/tests/unit/src/com/android/bluetooth/tbs/TbsGenericTest.java index 381da33bc0..73822ed8b4 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/tbs/TbsGenericTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/tbs/TbsGenericTest.java @@ -52,6 +52,7 @@ import java.util.List; import java.util.Map; import java.util.UUID; +/** Test cases for {@link TbsGeneric}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class TbsGenericTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/tbs/TbsServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/tbs/TbsServiceBinderTest.java index 7758d101b1..66f70c1354 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/tbs/TbsServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/tbs/TbsServiceBinderTest.java @@ -40,7 +40,7 @@ import java.util.ArrayList; import java.util.List; import java.util.UUID; -/** Test cases for {@link TbsServiceBinder} */ +/** Test cases for {@link TbsServiceBinder}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class TbsServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/telephony/BluetoothCallTest.java b/android/app/tests/unit/src/com/android/bluetooth/telephony/BluetoothCallTest.java index 441ac2b603..d3145bde1b 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/telephony/BluetoothCallTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/telephony/BluetoothCallTest.java @@ -33,6 +33,7 @@ import java.util.ArrayList; import java.util.List; import java.util.UUID; +/** Test cases for {@link BluetoothCall}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class BluetoothCallTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlInputDescriptorTest.java b/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlInputDescriptorTest.java index eac31c5d95..091c85b761 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlInputDescriptorTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlInputDescriptorTest.java @@ -38,6 +38,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; +/** Test cases for {@link VolumeControlInputDescriptor}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class VolumeControlInputDescriptorTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlNativeCallbackTest.java b/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlNativeCallbackTest.java index e474775f88..f239ca9bbd 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlNativeCallbackTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlNativeCallbackTest.java @@ -45,6 +45,7 @@ import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Mock; +/** Test cases for {@link VolumeControlNativeCallback}. */ @RunWith(AndroidJUnit4.class) public class VolumeControlNativeCallbackTest { @Rule public final MockitoRule mMockitoRule = new MockitoRule(); diff --git a/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlOffsetDescriptorTest.java b/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlOffsetDescriptorTest.java index 4f7389b8f8..a0f6f450de 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlOffsetDescriptorTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlOffsetDescriptorTest.java @@ -25,6 +25,7 @@ import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; +/** Test cases for {@link VolumeControlOffsetDescriptor}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class VolumeControlOffsetDescriptorTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlServiceBinderTest.java b/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlServiceBinderTest.java index 32296381c8..f2167cf4f6 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlServiceBinderTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlServiceBinderTest.java @@ -38,7 +38,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -/** Test cases for {@link VolumeControlServiceBinder} */ +/** Test cases for {@link VolumeControlServiceBinder}. */ @SmallTest @RunWith(AndroidJUnit4.class) public class VolumeControlServiceBinderTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlServiceTest.java index 9412ebfe40..b7bc838af4 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlServiceTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlServiceTest.java @@ -96,6 +96,7 @@ import java.util.Arrays; import java.util.List; import java.util.stream.IntStream; +/** Test cases for {@link VolumeControlService}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class VolumeControlServiceTest { diff --git a/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlStateMachineTest.java b/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlStateMachineTest.java index 40b274f7e6..7570c7d387 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlStateMachineTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/vc/VolumeControlStateMachineTest.java @@ -63,6 +63,7 @@ import org.mockito.InOrder; import org.mockito.Mock; import org.mockito.hamcrest.MockitoHamcrest; +/** Test cases for {@link VolumeControlStateMachine}. */ @MediumTest @RunWith(AndroidJUnit4.class) public class VolumeControlStateMachineTest { diff --git a/framework/tests/unit/src/android/bluetooth/BluetoothCodecConfigTest.java b/framework/tests/unit/src/android/bluetooth/BluetoothCodecConfigTest.java index d2ca867f01..1129a2c8db 100644 --- a/framework/tests/unit/src/android/bluetooth/BluetoothCodecConfigTest.java +++ b/framework/tests/unit/src/android/bluetooth/BluetoothCodecConfigTest.java @@ -26,7 +26,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; -/** Unit test cases for {@link BluetoothCodecConfig}. */ +/** Test cases for {@link BluetoothCodecConfig}. */ @RunWith(AndroidJUnit4.class) public class BluetoothCodecConfigTest { diff --git a/framework/tests/unit/src/android/bluetooth/BluetoothCodecStatusTest.java b/framework/tests/unit/src/android/bluetooth/BluetoothCodecStatusTest.java index 25b1812bf5..33aae7f0e6 100644 --- a/framework/tests/unit/src/android/bluetooth/BluetoothCodecStatusTest.java +++ b/framework/tests/unit/src/android/bluetooth/BluetoothCodecStatusTest.java @@ -26,7 +26,7 @@ import org.junit.runner.RunWith; import java.util.List; -/** Unit test cases for {@link BluetoothCodecStatus}. */ +/** Test cases for {@link BluetoothCodecStatus}. */ @RunWith(AndroidJUnit4.class) public class BluetoothCodecStatusTest { diff --git a/framework/tests/unit/src/android/bluetooth/BluetoothLeAudioCodecConfigTest.java b/framework/tests/unit/src/android/bluetooth/BluetoothLeAudioCodecConfigTest.java index 7a8f16d778..095e8dc5c2 100644 --- a/framework/tests/unit/src/android/bluetooth/BluetoothLeAudioCodecConfigTest.java +++ b/framework/tests/unit/src/android/bluetooth/BluetoothLeAudioCodecConfigTest.java @@ -24,7 +24,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; -/** Unit test cases for {@link BluetoothLeAudioCodecConfig}. */ +/** Test cases for {@link BluetoothLeAudioCodecConfig}. */ @RunWith(AndroidJUnit4.class) public class BluetoothLeAudioCodecConfigTest { diff --git a/framework/tests/unit/src/android/bluetooth/BluetoothUuidTest.java b/framework/tests/unit/src/android/bluetooth/BluetoothUuidTest.java index 808f1cf95f..4a36c65f40 100644 --- a/framework/tests/unit/src/android/bluetooth/BluetoothUuidTest.java +++ b/framework/tests/unit/src/android/bluetooth/BluetoothUuidTest.java @@ -27,7 +27,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -/** Unit test cases for {@link BluetoothUuid}. */ +/** Test cases for {@link BluetoothUuid}. */ @RunWith(JUnit4.class) public class BluetoothUuidTest { diff --git a/framework/tests/unit/src/android/bluetooth/le/ScanFilterTest.java b/framework/tests/unit/src/android/bluetooth/le/ScanFilterTest.java index 18dc031429..c204028f4f 100644 --- a/framework/tests/unit/src/android/bluetooth/le/ScanFilterTest.java +++ b/framework/tests/unit/src/android/bluetooth/le/ScanFilterTest.java @@ -25,7 +25,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -/** Test for Bluetooth LE {@link ScanFilter}. */ +/** Test cases for {@link ScanFilter}. */ @RunWith(JUnit4.class) public class ScanFilterTest { diff --git a/framework/tests/unit/src/android/bluetooth/le/ScanRecordTest.java b/framework/tests/unit/src/android/bluetooth/le/ScanRecordTest.java index 4292583191..68463b4f78 100644 --- a/framework/tests/unit/src/android/bluetooth/le/ScanRecordTest.java +++ b/framework/tests/unit/src/android/bluetooth/le/ScanRecordTest.java @@ -34,7 +34,7 @@ import java.util.List; import java.util.function.Predicate; /** - * Unit test cases for {@link ScanRecord}. + * Test cases for {@link ScanRecord}. * *

To run this test, use adb shell am instrument -e class 'android.bluetooth.ScanRecordTest' -w * 'com.android.bluetooth.tests/android.bluetooth.BluetoothTestRunner' diff --git a/framework/tests/unit/src/android/bluetooth/le/ScanSettingsTest.java b/framework/tests/unit/src/android/bluetooth/le/ScanSettingsTest.java index b9ee993b82..2af50ae5da 100644 --- a/framework/tests/unit/src/android/bluetooth/le/ScanSettingsTest.java +++ b/framework/tests/unit/src/android/bluetooth/le/ScanSettingsTest.java @@ -41,7 +41,7 @@ import org.junit.rules.TestRule; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -/** Test for Bluetooth LE {@link ScanSettings}. */ +/** Test cases for {@link ScanSettings}. */ @RunWith(JUnit4.class) public class ScanSettingsTest { @Rule -- cgit v1.2.3-59-g8ed1b From 685a8c57d229b4fd718567813b13e2c924113ea9 Mon Sep 17 00:00:00 2001 From: Ömer Faruk Yılmaz Date: Wed, 19 Mar 2025 03:05:57 +0000 Subject: Optimize and clean up ScanControllerTest - Add more coverage. 10 more unit tests - Reorganize tests to follow the order of ScanController - Consolidate onBatchScanReportsInternal to a single test with @TestParameter - Remove unused TestLooper Bug: 404652736 Test: atest ScanControllerTest Flag: EXEMPT test only Change-Id: I5d104312c507eb7a74e0ab46f2eca24d3deae75c --- .../bluetooth/le_scan/ScanControllerTest.java | 540 ++++++++++++--------- 1 file changed, 319 insertions(+), 221 deletions(-) diff --git a/android/app/tests/unit/src/com/android/bluetooth/le_scan/ScanControllerTest.java b/android/app/tests/unit/src/com/android/bluetooth/le_scan/ScanControllerTest.java index f1d428906b..8b6ec0548d 100644 --- a/android/app/tests/unit/src/com/android/bluetooth/le_scan/ScanControllerTest.java +++ b/android/app/tests/unit/src/com/android/bluetooth/le_scan/ScanControllerTest.java @@ -19,6 +19,8 @@ package com.android.bluetooth.le_scan; import static android.bluetooth.BluetoothProfile.STATE_CONNECTED; import static android.bluetooth.BluetoothProfile.STATE_CONNECTING; +import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation; + import static com.android.bluetooth.TestUtils.MockitoRule; import static com.android.bluetooth.TestUtils.getTestDevice; @@ -55,7 +57,6 @@ import android.platform.test.flag.junit.SetFlagsRule; import androidx.test.filters.SmallTest; import androidx.test.platform.app.InstrumentationRegistry; -import com.android.bluetooth.TestLooper; import com.android.bluetooth.TestUtils; import com.android.bluetooth.btservice.AdapterService; import com.android.bluetooth.btservice.CompanionManager; @@ -79,23 +80,30 @@ import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.Set; +import java.util.UUID; /** Test cases for {@link ScanController}. */ @SmallTest @RunWith(TestParameterInjector.class) public class ScanControllerTest { + @Rule public final MockitoRule mMockitoRule = new MockitoRule(); @Rule public final SetFlagsRule mSetFlagsRule = new SetFlagsRule(); - @Mock private ScannerMap mScannerMap; - @Mock private ScannerMap.ScannerApp mApp; - @Mock private PeriodicScanManager mPeriodicScanManager; - @Mock private ScanManager mScanManager; - @Mock private Resources mResources; - @Mock private AdapterService mAdapterService; @Mock private GattObjectsFactory mGattObjectsFactory; @Mock private ScanObjectsFactory mScanObjectsFactory; + @Mock private AdapterService mAdapterService; @Mock private GattNativeInterface mNativeInterface; + @Mock private PeriodicScanManager mPeriodicScanManager; + @Mock private Resources mResources; + @Mock private ScanManager mScanManager; + @Mock private ScannerMap mScannerMap; + @Mock private ScannerMap.ScannerApp mApp; + + private static final int TEST_SCANNER_ID = 1; + private static final int TEST_STATUS = 0; + private static final int TEST_ACTION = 1; + private static final int TEST_CLIENT_IF = 2; private final BluetoothAdapter mAdapter = InstrumentationRegistry.getInstrumentation() @@ -104,11 +112,10 @@ public class ScanControllerTest { .getAdapter(); private final BluetoothDevice mDevice = getTestDevice(89); private final AttributionSource mAttributionSource = mAdapter.getAttributionSource(); - private final Context mContext = - InstrumentationRegistry.getInstrumentation().getTargetContext(); + private final Context mContext = getInstrumentation().getTargetContext(); - private ScanController mScanController; private CompanionManager mBtCompanionManager; + private ScanController mScanController; @Before public void setUp() throws Exception { @@ -120,7 +127,6 @@ public class ScanControllerTest { .when(mScanObjectsFactory) .createScanManager(any(), any(), any(), any()); doReturn(mPeriodicScanManager).when(mScanObjectsFactory).createPeriodicScanManager(); - doReturn(mResources).when(mAdapterService).getResources(); doReturn(mContext.getPackageManager()).when(mAdapterService).getPackageManager(); doReturn(mContext.getSharedPreferences("ScanControllerTest", Context.MODE_PRIVATE)) @@ -133,9 +139,6 @@ public class ScanControllerTest { mBtCompanionManager = new CompanionManager(mAdapterService, null); doReturn(mBtCompanionManager).when(mAdapterService).getCompanionManager(); - TestLooper testLooper = new TestLooper(); - testLooper.startAutoDispatch(); - mScanController = new ScanController(mAdapterService); mScanController.setScannerMap(mScannerMap); } @@ -143,183 +146,21 @@ public class ScanControllerTest { @After public void tearDown() throws Exception { mScanController.cleanup(); - GattObjectsFactory.setInstanceForTesting(null); ScanObjectsFactory.setInstanceForTesting(null); } @Test - public void testParseBatchTimestamp() { - long timestampNanos = mScanController.parseTimestampNanos(new byte[] {-54, 7}); - assertThat(timestampNanos).isEqualTo(99700000000L); - } - - @Test - public void continuePiStartScan() { - int scannerId = 1; - - ScanController.PendingIntentInfo pii = - new ScanController.PendingIntentInfo( - null, new ScanSettings.Builder().build(), null, null, 0); - mApp.mInfo = pii; - - AppScanStats appScanStats = mock(AppScanStats.class); - doReturn(appScanStats).when(mScannerMap).getAppScanStatsById(scannerId); - - mScanController.continuePiStartScan(scannerId, mApp); - - verify(appScanStats) - .recordScanStart(pii.settings(), pii.filters(), false, false, scannerId, null); - verify(mScanManager).startScan(any()); - } - - @Test - public void continuePiStartScanCheckUid() { - int scannerId = 1; - - ScanController.PendingIntentInfo pii = - new ScanController.PendingIntentInfo( - null, new ScanSettings.Builder().build(), null, null, 123); - mApp.mInfo = pii; - - AppScanStats appScanStats = mock(AppScanStats.class); - doReturn(appScanStats).when(mScannerMap).getAppScanStatsById(scannerId); - - mScanController.continuePiStartScan(scannerId, mApp); - - verify(appScanStats) - .recordScanStart(pii.settings(), pii.filters(), false, false, scannerId, null); + public void notifyProfileConnectionStateChange_notify_scanManager() { + mScanController.notifyProfileConnectionStateChange( + BluetoothProfile.A2DP, STATE_CONNECTING, STATE_CONNECTED); verify(mScanManager) - .startScan( - argThat( - new ArgumentMatcher() { - @Override - public boolean matches(ScanClient client) { - return pii.callingUid() == client.mAppUid; - } - })); - } - - @Test - public void onBatchScanReportsInternal_deliverBatchScan_full( - @TestParameter boolean expectResults) throws RemoteException { - int status = 1; - int scannerId = 2; - int reportType = ScanManager.SCAN_RESULT_TYPE_FULL; - int numRecords = 1; - byte[] recordData = - new byte[] { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x00, 0x00, 0x00, 0x00 - }; - - Set scanClientSet = new HashSet<>(); - ScanClient scanClient = new ScanClient(scannerId); - scanClient.mAssociatedDevices = new ArrayList<>(); - if (expectResults) { - scanClient.mHasScanWithoutLocationPermission = true; - } - scanClientSet.add(scanClient); - doReturn(scanClientSet).when(mScanManager).getFullBatchScanQueue(); - doReturn(mApp).when(mScannerMap).getById(scanClient.mScannerId); - IScannerCallback callback = mock(IScannerCallback.class); - mApp.mCallback = callback; - - mScanController.onBatchScanReportsInternal( - status, scannerId, reportType, numRecords, recordData); - verify(mScanManager).callbackDone(scannerId, status); - if (expectResults) { - verify(callback).onBatchScanResults(any()); - } else { - verify(callback, never()).onBatchScanResults(any()); - } - } - - @Test - public void onBatchScanReportsInternal_deliverBatchScan_truncated( - @TestParameter boolean expectResults) throws RemoteException { - int status = 1; - int scannerId = 2; - int reportType = ScanManager.SCAN_RESULT_TYPE_TRUNCATED; - int numRecords = 1; - byte[] recordData = - new byte[] { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x04, 0x02, 0x02, 0x00, 0x00, 0x02 - }; - - Set scanClientSet = new HashSet<>(); - ScanClient scanClient = new ScanClient(scannerId); - scanClient.mAssociatedDevices = new ArrayList<>(); - if (expectResults) { - scanClient.mAssociatedDevices.add("02:00:00:00:00:00"); - } - scanClientSet.add(scanClient); - doReturn(scanClientSet).when(mScanManager).getBatchScanQueue(); - doReturn(mApp).when(mScannerMap).getById(scanClient.mScannerId); - IScannerCallback callback = mock(IScannerCallback.class); - mApp.mCallback = callback; - - mScanController.onBatchScanReportsInternal( - status, scannerId, reportType, numRecords, recordData); - verify(mScanManager).callbackDone(scannerId, status); - if (expectResults) { - verify(callback).onBatchScanResults(any()); - } else { - verify(callback, never()).onBatchScanResults(any()); - } - } - - @Test - public void enforceReportDelayFloor() { - long reportDelayFloorHigher = ScanController.DEFAULT_REPORT_DELAY_FLOOR + 1; - ScanSettings scanSettings = - new ScanSettings.Builder().setReportDelay(reportDelayFloorHigher).build(); - - ScanSettings newScanSettings = mScanController.enforceReportDelayFloor(scanSettings); - - assertThat(newScanSettings.getReportDelayMillis()) - .isEqualTo(scanSettings.getReportDelayMillis()); - - ScanSettings scanSettingsFloor = new ScanSettings.Builder().setReportDelay(1).build(); - - ScanSettings newScanSettingsFloor = - mScanController.enforceReportDelayFloor(scanSettingsFloor); - - assertThat(newScanSettingsFloor.getReportDelayMillis()) - .isEqualTo(ScanController.DEFAULT_REPORT_DELAY_FLOOR); - } - - @Test - public void registerScanner() throws Exception { - IScannerCallback callback = mock(IScannerCallback.class); - WorkSource workSource = mock(WorkSource.class); - - AppScanStats appScanStats = mock(AppScanStats.class); - doReturn(appScanStats).when(mScannerMap).getAppScanStatsByUid(Binder.getCallingUid()); - - mScanController.registerScanner(callback, workSource, mAttributionSource); - verify(mScannerMap) - .add( - any(), - eq(mAttributionSource), - eq(workSource), - eq(callback), - any(), - eq(mScanController)); - verify(mScanManager).registerScanner(any()); - } - - @Test - public void flushPendingBatchResults() { - int scannerId = 3; - - mScanController.flushPendingBatchResults(scannerId, mAttributionSource); - verify(mScanManager).flushBatchScanResults(new ScanClient(scannerId)); + .handleBluetoothProfileConnectionStateChanged( + BluetoothProfile.A2DP, STATE_CONNECTING, STATE_CONNECTED); } @Test public void onScanResult_remoteException_clientDied() throws Exception { - int scannerId = 1; - int eventType = 0; int addressType = 0; String address = "02:00:00:00:00:00"; @@ -331,22 +172,19 @@ public class ScanControllerTest { int periodicAdvInt = 0; byte[] advData = new byte[0]; - ScanClient scanClient = new ScanClient(scannerId); + ScanClient scanClient = new ScanClient(TEST_SCANNER_ID); scanClient.mHasNetworkSettingsPermission = true; scanClient.mSettings = new ScanSettings.Builder() .setCallbackType(ScanSettings.CALLBACK_TYPE_ALL_MATCHES) .setLegacy(false) .build(); - AppScanStats appScanStats = mock(AppScanStats.class); IScannerCallback callback = mock(IScannerCallback.class); - mApp.mCallback = callback; mApp.mAppScanStats = appScanStats; scanClient.mStats = appScanStats; Set scanClientSet = Collections.singleton(scanClient); - doReturn(address).when(mAdapterService).getIdentityAddress(anyString()); doReturn(scanClientSet).when(mScanManager).getRegularScanQueue(); doReturn(mApp).when(mScannerMap).getById(scanClient.mScannerId); @@ -369,66 +207,179 @@ public class ScanControllerTest { address); assertThat(scanClient.mAppDied).isTrue(); - verify(appScanStats).recordScanStop(scannerId); + verify(appScanStats).recordScanStop(TEST_SCANNER_ID); } @Test - public void registerSync() { - ScanResult scanResult = new ScanResult(mDevice, 1, 2, 3, 4, 5, 6, 7, null, 8); - int skip = 1; - int timeout = 2; - IPeriodicAdvertisingCallback callback = mock(IPeriodicAdvertisingCallback.class); + public void onScannerRegistered_success_callback() throws RemoteException { + long uuidLsb = 12345L; + long uuidMsb = 67890L; + UUID uuid = new UUID(uuidMsb, uuidLsb); + IScannerCallback callback = mock(IScannerCallback.class); + mApp.mCallback = callback; + doReturn(mApp).when(mScannerMap).getByUuid(uuid); - mScanController.registerSync(scanResult, skip, timeout, callback, mAttributionSource); - verify(mPeriodicScanManager).startSync(scanResult, skip, timeout, callback); + mScanController.onScannerRegistered(TEST_STATUS, TEST_SCANNER_ID, uuidLsb, uuidMsb); + + verify(mApp).linkToDeath(any()); + verify(callback).onScannerRegistered(TEST_STATUS, TEST_SCANNER_ID); + assertThat(mApp.mId).isEqualTo(TEST_SCANNER_ID); } @Test - public void transferSync() { - int serviceData = 1; - int syncHandle = 2; + public void onScanFilterEnableDisabled_callbackDone_scanManager() { + mScanController.onScanFilterEnableDisabled(TEST_ACTION, TEST_STATUS, TEST_CLIENT_IF); + verify(mScanManager).callbackDone(TEST_CLIENT_IF, TEST_STATUS); + } - mScanController.transferSync(mDevice, serviceData, syncHandle, mAttributionSource); - verify(mPeriodicScanManager).transferSync(mDevice, serviceData, syncHandle); + @Test + public void onScanFilterParamsConfigured_callbackDone_scanManager() { + int availableSpace = 3; + + mScanController.onScanFilterParamsConfigured( + TEST_ACTION, TEST_STATUS, TEST_CLIENT_IF, availableSpace); + verify(mScanManager).callbackDone(TEST_CLIENT_IF, TEST_STATUS); } @Test - public void transferSetInfo() { - int serviceData = 1; - int advHandle = 2; - IPeriodicAdvertisingCallback callback = mock(IPeriodicAdvertisingCallback.class); + public void onScanFilterConfig_callbackDone_scanManager() { + int filterType = 3; + int availableSpace = 4; - mScanController.transferSetInfo( - mDevice, serviceData, advHandle, callback, mAttributionSource); - verify(mPeriodicScanManager).transferSetInfo(mDevice, serviceData, advHandle, callback); + mScanController.onScanFilterConfig( + TEST_ACTION, TEST_STATUS, TEST_CLIENT_IF, filterType, availableSpace); + verify(mScanManager).callbackDone(TEST_CLIENT_IF, TEST_STATUS); } @Test - public void unregisterSync() { - IPeriodicAdvertisingCallback callback = mock(IPeriodicAdvertisingCallback.class); + public void onBatchScanStorageConfigured_callbackDone_scanManager() { + mScanController.onBatchScanStorageConfigured(TEST_STATUS, TEST_CLIENT_IF); + verify(mScanManager).callbackDone(TEST_CLIENT_IF, TEST_STATUS); + } - mScanController.unregisterSync(callback, mAttributionSource); - verify(mPeriodicScanManager).stopSync(callback); + @Test + public void onBatchScanStartStopped_callbackDone_scanManager() { + int startStopAction = 0; + + mScanController.onBatchScanStartStopped(startStopAction, TEST_STATUS, TEST_CLIENT_IF); + verify(mScanManager).callbackDone(TEST_CLIENT_IF, TEST_STATUS); } @Test - public void profileConnectionStateChanged_notifyScanManager() { - mScanController.notifyProfileConnectionStateChange( - BluetoothProfile.A2DP, STATE_CONNECTING, STATE_CONNECTED); - verify(mScanManager) - .handleBluetoothProfileConnectionStateChanged( - BluetoothProfile.A2DP, STATE_CONNECTING, STATE_CONNECTED); + public void onBatchScanReportsInternal_deliverBatchScan( + @TestParameter boolean expectResults, @TestParameter boolean isTruncated) + throws RemoteException { + int reportType = + isTruncated + ? ScanManager.SCAN_RESULT_TYPE_TRUNCATED + : ScanManager.SCAN_RESULT_TYPE_FULL; + int numRecords = 1; + final byte[] recordData; + if (isTruncated) { + recordData = + new byte[] { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x04, 0x02, 0x02, 0x00, 0x00, 0x02 + }; + } else { + recordData = + new byte[] { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x00, 0x00, 0x00, 0x00 + }; + } + + Set scanClientSet = new HashSet<>(); + ScanClient scanClient = new ScanClient(TEST_SCANNER_ID); + scanClient.mAssociatedDevices = new ArrayList<>(); + if (expectResults) { + if (isTruncated) { + scanClient.mAssociatedDevices.add("02:00:00:00:00:00"); + } else { + scanClient.mHasScanWithoutLocationPermission = true; + } + } + scanClientSet.add(scanClient); + if (isTruncated) { + doReturn(scanClientSet).when(mScanManager).getBatchScanQueue(); + } else { + doReturn(scanClientSet).when(mScanManager).getFullBatchScanQueue(); + } + doReturn(mApp).when(mScannerMap).getById(scanClient.mScannerId); + IScannerCallback callback = mock(IScannerCallback.class); + mApp.mCallback = callback; + + mScanController.onBatchScanReportsInternal( + TEST_STATUS, TEST_SCANNER_ID, reportType, numRecords, recordData); + verify(mScanManager).callbackDone(TEST_SCANNER_ID, TEST_STATUS); + if (expectResults) { + verify(callback).onBatchScanResults(any()); + } else { + verify(callback, never()).onBatchScanResults(any()); + } } @Test - public void onTrackAdvFoundLost() throws Exception { - int scannerId = 1; + public void parseTimestampNanos() { + long timestampNanos = mScanController.parseTimestampNanos(new byte[] {-54, 7}); + assertThat(timestampNanos).isEqualTo(99700000000L); + } + + @Test + public void createOnTrackAdvFoundLostObject() { int advPacketLen = 1; byte[] advPacket = new byte[] {0x02}; int scanResponseLen = 3; byte[] scanResponse = new byte[] {0x04}; int filtIndex = 5; + int advState = ScanController.ADVT_STATE_ONFOUND; + int advInfoPresent = 7; + String address = "00:11:22:33:FF:EE"; + int addrType = BluetoothDevice.ADDRESS_TYPE_RANDOM; + int txPower = 9; + int rssiValue = 10; + int timeStamp = 11; + + AdvtFilterOnFoundOnLostInfo advtFilterOnFoundOnLostInfo = + new AdvtFilterOnFoundOnLostInfo( + TEST_SCANNER_ID, + advPacketLen, + ByteString.copyFrom(advPacket), + scanResponseLen, + ByteString.copyFrom(scanResponse), + filtIndex, + advState, + advInfoPresent, + address, + addrType, + txPower, + rssiValue, + timeStamp); + AdvtFilterOnFoundOnLostInfo advtFilterOnFoundOnLostInfoCreated = + mScanController.createOnTrackAdvFoundLostObject( + TEST_SCANNER_ID, + advPacketLen, + advPacket, + scanResponseLen, + scanResponse, + filtIndex, + advState, + advInfoPresent, + address, + addrType, + txPower, + rssiValue, + timeStamp); + + assertThat(advtFilterOnFoundOnLostInfo).isEqualTo(advtFilterOnFoundOnLostInfoCreated); + } + + @Test + public void onTrackAdvFoundLost() throws RemoteException { + int advPacketLen = 1; + byte[] advPacket = new byte[] {0x02}; + int scanResponseLen = 3; + byte[] scanResponse = new byte[] {0x04}; + int filtIndex = 5; int advState = ScanController.ADVT_STATE_ONFOUND; int advInfoPresent = 7; String address = "00:11:22:33:FF:EE"; @@ -437,7 +388,7 @@ public class ScanControllerTest { int rssiValue = 10; int timeStamp = 11; - ScanClient scanClient = new ScanClient(scannerId); + ScanClient scanClient = new ScanClient(TEST_SCANNER_ID); scanClient.mHasNetworkSettingsPermission = true; scanClient.mSettings = new ScanSettings.Builder() @@ -448,15 +399,14 @@ public class ScanControllerTest { ScannerMap.ScannerApp app = mock(ScannerMap.ScannerApp.class); IScannerCallback callback = mock(IScannerCallback.class); - app.mCallback = callback; - doReturn(app).when(mScannerMap).getById(scannerId); + doReturn(app).when(mScannerMap).getById(TEST_SCANNER_ID); doReturn(scanClientSet).when(mScanManager).getRegularScanQueue(); AdvtFilterOnFoundOnLostInfo advtFilterOnFoundOnLostInfo = new AdvtFilterOnFoundOnLostInfo( - scannerId, + TEST_SCANNER_ID, advPacketLen, ByteString.copyFrom(advPacket), scanResponseLen, @@ -477,4 +427,152 @@ public class ScanControllerTest { assertThat(result.getValue().getDevice().getAddress()).isEqualTo(address); assertThat(result.getValue().getDevice().getAddressType()).isEqualTo(addrType); } + + @Test + public void registerScanner() { + IScannerCallback callback = mock(IScannerCallback.class); + WorkSource workSource = mock(WorkSource.class); + AppScanStats appScanStats = mock(AppScanStats.class); + doReturn(appScanStats).when(mScannerMap).getAppScanStatsByUid(Binder.getCallingUid()); + + mScanController.registerScanner(callback, workSource, mAttributionSource); + verify(mScannerMap) + .add( + any(), + eq(mAttributionSource), + eq(workSource), + eq(callback), + any(), + eq(mScanController)); + verify(mScanManager).registerScanner(any()); + } + + @Test + public void unregisterScanner() { + mScanController.unregisterScanner(TEST_SCANNER_ID, mAttributionSource); + + verify(mScannerMap).remove(TEST_SCANNER_ID); + verify(mScanManager).unregisterScanner(TEST_SCANNER_ID); + } + + @Test + public void continuePiStartScan() { + ScanController.PendingIntentInfo pii = + new ScanController.PendingIntentInfo( + null, new ScanSettings.Builder().build(), null, null, 0); + mApp.mInfo = pii; + + AppScanStats appScanStats = mock(AppScanStats.class); + doReturn(appScanStats).when(mScannerMap).getAppScanStatsById(TEST_SCANNER_ID); + + mScanController.continuePiStartScan(TEST_SCANNER_ID, mApp); + + verify(appScanStats) + .recordScanStart( + pii.settings(), pii.filters(), false, false, TEST_SCANNER_ID, null); + verify(mScanManager).startScan(any()); + } + + @Test + public void continuePiStartScanCheckUid() { + ScanController.PendingIntentInfo pii = + new ScanController.PendingIntentInfo( + null, new ScanSettings.Builder().build(), null, null, 123); + mApp.mInfo = pii; + + AppScanStats appScanStats = mock(AppScanStats.class); + doReturn(appScanStats).when(mScannerMap).getAppScanStatsById(TEST_SCANNER_ID); + + mScanController.continuePiStartScan(TEST_SCANNER_ID, mApp); + + verify(appScanStats) + .recordScanStart( + pii.settings(), pii.filters(), false, false, TEST_SCANNER_ID, null); + verify(mScanManager) + .startScan( + argThat( + new ArgumentMatcher() { + @Override + public boolean matches(ScanClient client) { + return pii.callingUid() == client.mAppUid; + } + })); + } + + @Test + public void flushPendingBatchResults() { + mScanController.flushPendingBatchResults(TEST_SCANNER_ID, mAttributionSource); + verify(mScanManager).flushBatchScanResults(new ScanClient(TEST_SCANNER_ID)); + } + + @Test + public void registerSync() { + ScanResult scanResult = new ScanResult(mDevice, 1, 2, 3, 4, 5, 6, 7, null, 8); + int skip = 1; + int timeout = 2; + IPeriodicAdvertisingCallback callback = mock(IPeriodicAdvertisingCallback.class); + + mScanController.registerSync(scanResult, skip, timeout, callback, mAttributionSource); + verify(mPeriodicScanManager).startSync(scanResult, skip, timeout, callback); + } + + @Test + public void unregisterSync() { + IPeriodicAdvertisingCallback callback = mock(IPeriodicAdvertisingCallback.class); + + mScanController.unregisterSync(callback, mAttributionSource); + verify(mPeriodicScanManager).stopSync(callback); + } + + @Test + public void transferSync() { + int serviceData = 1; + int syncHandle = 2; + + mScanController.transferSync(mDevice, serviceData, syncHandle, mAttributionSource); + verify(mPeriodicScanManager).transferSync(mDevice, serviceData, syncHandle); + } + + @Test + public void transferSetInfo() { + int serviceData = 1; + int advHandle = 2; + IPeriodicAdvertisingCallback callback = mock(IPeriodicAdvertisingCallback.class); + + mScanController.transferSetInfo( + mDevice, serviceData, advHandle, callback, mAttributionSource); + verify(mPeriodicScanManager).transferSetInfo(mDevice, serviceData, advHandle, callback); + } + + @Test + public void enforceReportDelayFloor() { + long reportDelayFloorHigher = ScanController.DEFAULT_REPORT_DELAY_FLOOR + 1; + ScanSettings scanSettings = + new ScanSettings.Builder().setReportDelay(reportDelayFloorHigher).build(); + ScanSettings newScanSettings = mScanController.enforceReportDelayFloor(scanSettings); + + assertThat(newScanSettings.getReportDelayMillis()) + .isEqualTo(scanSettings.getReportDelayMillis()); + + ScanSettings scanSettingsFloor = new ScanSettings.Builder().setReportDelay(1).build(); + ScanSettings newScanSettingsFloor = + mScanController.enforceReportDelayFloor(scanSettingsFloor); + + assertThat(newScanSettingsFloor.getReportDelayMillis()) + .isEqualTo(ScanController.DEFAULT_REPORT_DELAY_FLOOR); + } + + @Test + public void dumpRegisterId_doesNotCrash() { + StringBuilder sb = new StringBuilder(); + mScanController.dumpRegisterId(sb); + assertThat(sb.toString()).isNotNull(); + } + + @Test + public void dump_doesNotCrash() { + StringBuilder sb = new StringBuilder(); + mScanController.dump(sb); + assertThat(sb.toString()).isNotNull(); + } } -- cgit v1.2.3-59-g8ed1b From f0d5530b3b6937884105198385d851274ef2aa13 Mon Sep 17 00:00:00 2001 From: Krzysztof Kopyściński Date: Fri, 21 Mar 2025 07:53:54 +0000 Subject: Pandora: prepare for LE Audio streaming This patch moves streaming functions from HAP interface to LE Audio one, making it possible to use by all test groups. It also applies fixes to logic in kotlin, making it usable to enter streaming state. Bug: 398162752 Flag: EXEMPT, test only change Test: atest pts-bot, not actually used in tests yet Change-Id: Ie543469206046ce58306a1d0fe753e22cb2ab113 --- android/pandora/mmi2grpc/mmi2grpc/_audio.py | 2 +- android/pandora/mmi2grpc/mmi2grpc/hap.py | 7 +- android/pandora/server/configs/PtsBotTest.xml | 1 + android/pandora/server/src/Hap.kt | 66 --------------- android/pandora/server/src/LeAudio.kt | 96 +++++++++++++++++++++- pandora/interfaces/pandora_experimental/hap.proto | 12 --- .../interfaces/pandora_experimental/le_audio.proto | 25 ++++++ 7 files changed, 126 insertions(+), 83 deletions(-) diff --git a/android/pandora/mmi2grpc/mmi2grpc/_audio.py b/android/pandora/mmi2grpc/mmi2grpc/_audio.py index 7bc97167a8..6ab5b148ff 100644 --- a/android/pandora/mmi2grpc/mmi2grpc/_audio.py +++ b/android/pandora/mmi2grpc/mmi2grpc/_audio.py @@ -18,7 +18,7 @@ import math import os from threading import Thread -# import numpy as np +import numpy as np # from scipy.io import wavfile SINE_FREQUENCY = 440 diff --git a/android/pandora/mmi2grpc/mmi2grpc/hap.py b/android/pandora/mmi2grpc/mmi2grpc/hap.py index bd2fd83643..99202e9f7f 100644 --- a/android/pandora/mmi2grpc/mmi2grpc/hap.py +++ b/android/pandora/mmi2grpc/mmi2grpc/hap.py @@ -28,7 +28,8 @@ from pandora.security_grpc import Security from pandora.security_pb2 import LE_LEVEL3, PairingEventAnswer from pandora_experimental.gatt_grpc import GATT from pandora_experimental.hap_grpc import HAP -from pandora_experimental.hap_pb2 import HaPlaybackAudioRequest +from pandora_experimental.le_audio_pb2 import LeAudioPlaybackAudioRequest +from pandora_experimental.le_audio_grpc import LeAudio BASE_UUID = uuid.UUID("00000000-0000-1000-8000-00805F9B34FB") SINK_ASE_UUID = 0x2BC4 @@ -60,9 +61,9 @@ class HAPProxy(ProfileProxy): self.connection = None def convert_frame(data): - return HaPlaybackAudioRequest(data=data, source=self.source) + return LeAudioPlaybackAudioRequest(data=data) - self.audio = AudioSignal(lambda frames: self.hap.HaPlaybackAudio(map(convert_frame, frames)), + self.audio = AudioSignal(lambda frames: self.le_audio.LeAudioPlaybackAudio(map(convert_frame, frames)), AUDIO_SIGNAL_AMPLITUDE, AUDIO_SIGNAL_SAMPLING_RATE) def test_started(self, test: str, **kwargs): diff --git a/android/pandora/server/configs/PtsBotTest.xml b/android/pandora/server/configs/PtsBotTest.xml index 2acbd64521..60a609cc56 100644 --- a/android/pandora/server/configs/PtsBotTest.xml +++ b/android/pandora/server/configs/PtsBotTest.xml @@ -35,6 +35,7 @@