Fix pair another dialog doesn't show up after pairing in all bluetooth device page.

Solution: Finish the page immediately to back to previous page when already BONDED the device in
all bluetooth device page.

Bug: 270096758
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ViewAllBluetoothDevicesPreferenceControllerTest
Change-Id: I13a88c3fbe0c6851f9446a9f574a1c18f934cd2e
This commit is contained in:
jasonwshsu
2023-04-05 23:58:33 +08:00
parent d3b3ed5e6d
commit c8a53a9391
5 changed files with 183 additions and 3 deletions

View File

@@ -20,6 +20,7 @@ import android.app.settings.SettingsEnums;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothUuid;
import android.bluetooth.le.ScanFilter;
import android.content.Context;
import androidx.annotation.VisibleForTesting;
@@ -47,6 +48,12 @@ public class HearingDevicePairingDetail extends BluetoothDevicePairingDetailBase
setFilter(Collections.singletonList(filter));
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
use(ViewAllBluetoothDevicesPreferenceController.class).init(this);
}
@Override
public void onStart() {
super.onStart();