summaryrefslogtreecommitdiffhomepage
path: root/ui/src/main/java/com/wireguard
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-11-10 14:11:25 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2020-11-10 14:11:48 +0100
commita300f269f154eddc244fe7fc3f8de556c6172993 (patch)
tree002d5dc81ad6448b3f959d96ebc2a563f5b828a8 /ui/src/main/java/com/wireguard
parent961cba3f7ca8917b5bcfb564c0c1a1882c791143 (diff)
ui: test for any camera, not just rear one
Some folks use chromebooks, which don't have rear cameras. Reported-by: Jay Tuley <jay.tuley@ekonbenefits.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/src/main/java/com/wireguard')
-rw-r--r--ui/src/main/java/com/wireguard/android/fragment/AddTunnelsSheet.kt2
1 files changed, 1 insertions, 1 deletions
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<View>(R.id.create_from_qrcode)
qrcode.isEnabled = false
qrcode.visibility = View.GONE