2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-29 05:07:40 +00:00

Request READ_CALL_LOG permission

This commit is contained in:
Nicolas Fella 2019-03-18 01:34:51 +00:00
parent fb2859c24d
commit f7763bf5a9
2 changed files with 6 additions and 1 deletions

View File

@ -31,6 +31,7 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.READ_CALL_LOG"/>
<application
android:icon="@drawable/icon"

View File

@ -314,7 +314,11 @@ public class TelephonyPlugin extends Plugin {
@Override
public String[] getRequiredPermissions() {
return new String[]{Manifest.permission.READ_PHONE_STATE, Manifest.permission.READ_SMS};
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
return new String[]{Manifest.permission.READ_PHONE_STATE, Manifest.permission.READ_SMS, Manifest.permission.READ_CALL_LOG};
} else {
return new String[0];
}
}
@Override