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

Commit 5866463e authored by Joshua Duong's avatar Joshua Duong
Browse files

[a11y] Fix TalkBack readback on adb qrcode fragment.

TalkBack was picking up the text in the action bar, so if we hide it,
it will read the first body of text it encounters which would be "Scan
QR code. Pair device over Wi-Fi by scanning a QR code."

Bug: 152461605

Test: Manual. Enable TalkBack in Settings > Accessibility > TalkBack.
Navigate to Developer options > Wireless debugging > Pair by QR code.
When QR code scanner fragment opens, it should say "Scan QR code. Pair
device over Wi-Fi by scanning a QR code."

Change-Id: Ia91bf4ea215e6a377335f2b9dcf2acf10afd268e
(cherry picked from commit bfd73c0d)
Exempt-From-Owner-Approval: cherry-pick
parent 7c4557be
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -207,6 +207,15 @@ public class AdbQrcodeScannerFragment extends WifiDppQrCodeBaseFragment implemen
        super.onAttach(context);
    }

    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);

        getActivity().getActionBar().hide();
        // setTitle for TalkBack
        getActivity().setTitle(R.string.wifi_dpp_scan_qr_code);
    }

    @Override
    public int getMetricsCategory() {
        return 0;