- Start baresip service also when there is no need to ask for Microphone

permission.
This commit is contained in:
Juha Heinanen
2020-04-12 14:10:37 +03:00
parent 1b89bb9ff9
commit 5b1f828774

View File

@ -435,8 +435,12 @@ class MainActivity : AppCompatActivity() {
askPasswords(accounts)
} else {
// Baresip is started for the first time
Utils.requestPermission(this, Manifest.permission.RECORD_AUDIO,
RECORD_PERMISSION_REQUEST_CODE)
if (!Utils.checkPermission(this, Manifest.permission.RECORD_AUDIO))
Utils.requestPermission(this, Manifest.permission.RECORD_AUDIO,
RECORD_PERMISSION_REQUEST_CODE)
else
// Some old devices have granted Mic permission without a need to ask
startBaresip()
}
} // OnCreate