mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixing checking permissions on runtime
This commit is contained in:
parent
8784721a5b
commit
696319453d
1 changed files with 3 additions and 4 deletions
|
|
@ -1213,10 +1213,9 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
|
|||
Log.i("[Permission] " + permission + " is " + (permissionGranted == PackageManager.PERMISSION_GRANTED ? "granted" : "denied"));
|
||||
|
||||
if (permissionGranted != PackageManager.PERMISSION_GRANTED) {
|
||||
if (LinphonePreferences.instance().firstTimeAskingForPermission(permission) || ActivityCompat.shouldShowRequestPermissionRationale(this, permission)) {
|
||||
Log.i("[Permission] Asking for " + permission);
|
||||
ActivityCompat.requestPermissions(this, new String[] { permission }, result);
|
||||
}
|
||||
ActivityCompat.shouldShowRequestPermissionRationale(this, permission);
|
||||
Log.i("[Permission] Asking for " + permission);
|
||||
ActivityCompat.requestPermissions(this, new String[] { permission }, result);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue