diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index e9d2fc015..c9ecb863a 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -8,6 +8,7 @@
-->
+
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ControlCenterv2.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ControlCenterv2.java
index 6071254e0..9a796beb9 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ControlCenterv2.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ControlCenterv2.java
@@ -297,6 +297,8 @@ public class ControlCenterv2 extends AppCompatActivity
wantedPermissions.add(Manifest.permission.READ_CONTACTS);
if (ContextCompat.checkSelfPermission(this, Manifest.permission.CALL_PHONE) == PackageManager.PERMISSION_DENIED)
wantedPermissions.add(Manifest.permission.CALL_PHONE);
+ if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_CALL_LOG) == PackageManager.PERMISSION_DENIED)
+ wantedPermissions.add(Manifest.permission.READ_CALL_LOG);
if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) == PackageManager.PERMISSION_DENIED)
wantedPermissions.add(Manifest.permission.READ_PHONE_STATE);
if (ContextCompat.checkSelfPermission(this, Manifest.permission.PROCESS_OUTGOING_CALLS) == PackageManager.PERMISSION_DENIED)
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/PhoneCallReceiver.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/PhoneCallReceiver.java
index e5252eda5..e5ae08672 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/PhoneCallReceiver.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/PhoneCallReceiver.java
@@ -41,9 +41,11 @@ public class PhoneCallReceiver extends BroadcastReceiver {
if (intent.getAction().equals("android.intent.action.NEW_OUTGOING_CALL")) {
mSavedNumber = intent.getExtras().getString("android.intent.extra.PHONE_NUMBER");
} else {
- String number = intent.getExtras().getString(TelephonyManager.EXTRA_INCOMING_NUMBER);
- int state = tm.getCallState();
- onCallStateChanged(context, state, number);
+ if (intent.hasExtra(TelephonyManager.EXTRA_INCOMING_NUMBER)) {
+ String number = intent.getExtras().getString(TelephonyManager.EXTRA_INCOMING_NUMBER);
+ int state = tm.getCallState();
+ onCallStateChanged(context, state, number);
+ }
}
}