Loading res/layout/adb_qrcode_scanner_fragment.xml +3 −1 Original line number Diff line number Diff line Loading @@ -99,10 +99,12 @@ android:layout_height="wrap_content"/> <TextView android:id="@+id/verifying_textview" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/adb_wireless_item_progress_text" android:text="@string/adb_wireless_verifying_qrcode_text"/> android:text="@string/adb_wireless_verifying_qrcode_text" android:accessibilityLiveRegion="polite"/> </LinearLayout> Loading src/com/android/settings/development/AdbQrcodeScannerFragment.java +4 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ public class AdbQrcodeScannerFragment extends WifiDppQrCodeBaseFragment implemen private QrDecorateView mDecorateView; private View mQrCameraView; private View mVerifyingView; private TextView mVerifyingTextView; private TextView mErrorMessage; /** QR code data scanned by camera */ Loading Loading @@ -168,6 +169,7 @@ public class AdbQrcodeScannerFragment extends WifiDppQrCodeBaseFragment implemen mQrCameraView = view.findViewById(R.id.camera_layout); mVerifyingView = view.findViewById(R.id.verifying_layout); mVerifyingTextView = view.findViewById(R.id.verifying_textview); setHeaderTitle(R.string.wifi_dpp_scan_qr_code); mSummary.setText(R.string.adb_wireless_qrcode_pairing_description); Loading Loading @@ -264,6 +266,8 @@ public class AdbQrcodeScannerFragment extends WifiDppQrCodeBaseFragment implemen mDecorateView.setFocused(true); mQrCameraView.setVisibility(View.GONE); mVerifyingView.setVisibility(View.VISIBLE); AdbQrCode.triggerVibrationForQrCodeRecognition(getContext()); mVerifyingTextView.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED); try { mAdbManager.enablePairingByQrCode(mAdbConfig.getSsid(), mAdbConfig.getPreSharedKey()); Loading src/com/android/settings/wifi/dpp/AdbQrCode.java +10 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ package com.android.settings.wifi.dpp; import android.content.Context; import android.text.TextUtils; /** Loading Loading @@ -53,4 +54,13 @@ public class AdbQrCode extends WifiQrCode { public WifiNetworkConfig getAdbNetworkConfig() { return mAdbConfig; } /** * Triggers a vibration to notify of a valid QR code. * * @param context The context to use */ public static void triggerVibrationForQrCodeRecognition(Context context) { WifiDppUtils.triggerVibrationForQrCodeRecognition(context); } } Loading
res/layout/adb_qrcode_scanner_fragment.xml +3 −1 Original line number Diff line number Diff line Loading @@ -99,10 +99,12 @@ android:layout_height="wrap_content"/> <TextView android:id="@+id/verifying_textview" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/adb_wireless_item_progress_text" android:text="@string/adb_wireless_verifying_qrcode_text"/> android:text="@string/adb_wireless_verifying_qrcode_text" android:accessibilityLiveRegion="polite"/> </LinearLayout> Loading
src/com/android/settings/development/AdbQrcodeScannerFragment.java +4 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ public class AdbQrcodeScannerFragment extends WifiDppQrCodeBaseFragment implemen private QrDecorateView mDecorateView; private View mQrCameraView; private View mVerifyingView; private TextView mVerifyingTextView; private TextView mErrorMessage; /** QR code data scanned by camera */ Loading Loading @@ -168,6 +169,7 @@ public class AdbQrcodeScannerFragment extends WifiDppQrCodeBaseFragment implemen mQrCameraView = view.findViewById(R.id.camera_layout); mVerifyingView = view.findViewById(R.id.verifying_layout); mVerifyingTextView = view.findViewById(R.id.verifying_textview); setHeaderTitle(R.string.wifi_dpp_scan_qr_code); mSummary.setText(R.string.adb_wireless_qrcode_pairing_description); Loading Loading @@ -264,6 +266,8 @@ public class AdbQrcodeScannerFragment extends WifiDppQrCodeBaseFragment implemen mDecorateView.setFocused(true); mQrCameraView.setVisibility(View.GONE); mVerifyingView.setVisibility(View.VISIBLE); AdbQrCode.triggerVibrationForQrCodeRecognition(getContext()); mVerifyingTextView.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED); try { mAdbManager.enablePairingByQrCode(mAdbConfig.getSsid(), mAdbConfig.getPreSharedKey()); Loading
src/com/android/settings/wifi/dpp/AdbQrCode.java +10 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ package com.android.settings.wifi.dpp; import android.content.Context; import android.text.TextUtils; /** Loading Loading @@ -53,4 +54,13 @@ public class AdbQrCode extends WifiQrCode { public WifiNetworkConfig getAdbNetworkConfig() { return mAdbConfig; } /** * Triggers a vibration to notify of a valid QR code. * * @param context The context to use */ public static void triggerVibrationForQrCodeRecognition(Context context) { WifiDppUtils.triggerVibrationForQrCodeRecognition(context); } }