New hearing device pairing page (1/2)

Rewrite a new hearing device pairing page with update UI for "See more
devices".

Bug: 307473972
Test: atest HearingDevicePairingFragmentTest
Test: flip the flag com.android.settings.flags.new_hearing_device_pairing_page && atest HearingAidPairingDialogFragmentTest AddDevicePreferenceControllerTest
Change-Id: Ic60601905e3d0d7d7c5b1ef9733652118a211f1d
This commit is contained in:
Angela Wang
2023-11-22 12:39:17 +00:00
parent 4ee6d84eb4
commit 3e9f1ff659
13 changed files with 905 additions and 13 deletions

View File

@@ -29,8 +29,10 @@ import androidx.appcompat.app.AlertDialog;
import com.android.settings.R;
import com.android.settings.accessibility.HearingDevicePairingDetail;
import com.android.settings.accessibility.HearingDevicePairingFragment;
import com.android.settings.core.SubSettingLauncher;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
import com.android.settings.flags.Flags;
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
import com.android.settingslib.bluetooth.HearingAidInfo;
import com.android.settingslib.bluetooth.LocalBluetoothManager;
@@ -123,8 +125,11 @@ public class HearingAidPairingDialogFragment extends InstrumentedDialogFragment
final int launchPage = getArguments().getInt(KEY_LAUNCH_PAGE);
final boolean launchFromA11y = (launchPage == SettingsEnums.ACCESSIBILITY)
|| (launchPage == SettingsEnums.ACCESSIBILITY_HEARING_AID_SETTINGS);
final String a11yDestination = Flags.newHearingDevicePairingPage()
? HearingDevicePairingFragment.class.getName()
: HearingDevicePairingDetail.class.getName();
final String destination = launchFromA11y
? HearingDevicePairingDetail.class.getName()
? a11yDestination
: BluetoothPairingDetail.class.getName();
new SubSettingLauncher(getActivity())
.setDestination(destination)