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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user