Remove camera requirement

This commit is contained in:
Mygod
2016-07-13 11:38:23 +08:00
parent 0e4cfb7a01
commit b14ff7082d
3 changed files with 13 additions and 18 deletions
@@ -4,6 +4,7 @@ import java.nio.charset.Charset
import android.app.Activity
import android.content._
import android.content.pm.PackageManager
import android.nfc.NfcAdapter.CreateNdefMessageCallback
import android.nfc.{NdefMessage, NdefRecord, NfcAdapter, NfcEvent}
import android.os.{Bundle, Handler}
@@ -263,6 +264,8 @@ final class ProfileManagerActivity extends AppCompatActivity with OnMenuItemClic
val importAddFAB = findViewById(R.id.fab_import_add).asInstanceOf[FloatingActionButton]
importAddFAB.setImageDrawable(dm.getDrawable(this, R.drawable.ic_content_paste))
importAddFAB.setOnClickListener(this)
menu.setOnMenuToggleListener(opened => if (opened) qrcodeAddFAB.setVisibility(
if (getPackageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA)) View.VISIBLE else View.GONE))
}