aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui
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
parentbuild: upgrade runtime dependencies (diff)
downloadwireguard-android-a300f269f154eddc244fe7fc3f8de556c6172993.tar.xz
wireguard-android-a300f269f154eddc244fe7fc3f8de556c6172993.zip
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')
-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 8f56084..c8df80b 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