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