Add visibility control to ADB QR code preference.

The preference should be hidden if isAdbWifiQrSupported() is false.

Bug: 150163684
Bug: 149843499

Test: make RunSettingsRoboTests ROBOTEST_FILTER=AdbQrCodePreferenceControllerTest
Change-Id: I3e833440fb1a6f369ac97cec8db04f2b99dd4640
(cherry picked from commit 6178918653)
Exempt-From-Owner-Approval: cherry-pick
This commit is contained in:
Joshua Duong
2020-03-17 09:38:54 -07:00
parent 3eddda5985
commit 56ad92c3b9
5 changed files with 238 additions and 54 deletions

View File

@@ -193,6 +193,7 @@ public class AdbQrcodeScannerFragment extends WifiDppQrCodeBaseFragment implemen
} catch (RemoteException e) {
Log.e(TAG, "Unable to cancel pairing");
}
getActivity().setResult(Activity.RESULT_CANCELED);
getActivity().finish();
}
@@ -268,6 +269,7 @@ public class AdbQrcodeScannerFragment extends WifiDppQrCodeBaseFragment implemen
mAdbConfig.getPreSharedKey());
} catch (RemoteException e) {
Log.e(TAG, "Unable to enable QR code pairing");
getActivity().setResult(Activity.RESULT_CANCELED);
getActivity().finish();
}
}