From a300f269f154eddc244fe7fc3f8de556c6172993 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 10 Nov 2020 14:11:25 +0100 Subject: ui: test for any camera, not just rear one Some folks use chromebooks, which don't have rear cameras. Reported-by: Jay Tuley Signed-off-by: Jason A. Donenfeld --- ui/src/main/java/com/wireguard/android/fragment/AddTunnelsSheet.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/src/main/java') diff --git a/ui/src/main/java/com/wireguard/android/fragment/AddTunnelsSheet.kt b/ui/src/main/java/com/wireguard/android/fragment/AddTunnelsSheet.kt index 8f56084b..c8df80b1 100644 --- a/ui/src/main/java/com/wireguard/android/fragment/AddTunnelsSheet.kt +++ b/ui/src/main/java/com/wireguard/android/fragment/AddTunnelsSheet.kt @@ -41,7 +41,7 @@ class AddTunnelsSheet : BottomSheetDialogFragment() { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { if (savedInstanceState != null) dismiss() val view = inflater.inflate(R.layout.add_tunnels_bottom_sheet, container, false) - if (activity?.packageManager?.hasSystemFeature(PackageManager.FEATURE_CAMERA) != true) { + if (activity?.packageManager?.hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY) != true) { val qrcode = view.findViewById(R.id.create_from_qrcode) qrcode.isEnabled = false qrcode.visibility = View.GONE -- cgit v1.2.3