Hide "QR-code" button from config import menu for Android devices without camera
This commit is contained in:
parent
3e02dfef63
commit
2b61c48303
6 changed files with 25 additions and 2 deletions
|
|
@ -5,6 +5,7 @@ import android.content.Intent
|
|||
import android.content.Intent.EXTRA_MIME_TYPES
|
||||
import android.content.Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY
|
||||
import android.content.ServiceConnection
|
||||
import android.content.pm.PackageManager
|
||||
import android.net.Uri
|
||||
import android.net.VpnService
|
||||
import android.os.Bundle
|
||||
|
|
@ -418,6 +419,9 @@ class AmneziaActivity : QtActivity() {
|
|||
Log.v(TAG, "Set notification text")
|
||||
}
|
||||
|
||||
@Suppress("unused")
|
||||
fun isCameraPresent(): Boolean = applicationContext.packageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA)
|
||||
|
||||
@Suppress("unused")
|
||||
fun startQrCodeReader() {
|
||||
Log.v(TAG, "Start camera")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue