1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-27 12:26:48 +01:00

do not disable/enable NotificationListener at runtime (leads to loss of permissions to read notifications)

This commit is contained in:
Andreas Shimokawa 2015-02-07 13:20:38 +01:00
parent a47ba3c96f
commit efa7920b9d
2 changed files with 8 additions and 2 deletions

View File

@ -58,7 +58,7 @@ public class BluetoothCommunicationService extends Service {
PhoneCallReceiver.class,
SMSReceiver.class,
K9Receiver.class,
NotificationListener.class,
//NotificationListener.class, // disabling this leads to loss of permission to read notifications
};
int newState;

View File

@ -50,7 +50,13 @@ public class PhoneCallReceiver extends BroadcastReceiver {
}
break;
case TelephonyManager.CALL_STATE_IDLE:
if (mLastState == TelephonyManager.CALL_STATE_RINGING) {
//pebblePhoneCommand = PebbleProtocol.PHONECONTROL_MISSEDCALL;
pebblePhoneCommand = PebbleProtocol.PHONECONTROL_END; // MISSED CALL DOES NOT WORK
}
else {
pebblePhoneCommand = PebbleProtocol.PHONECONTROL_END;
}
break;
}
if (pebblePhoneCommand != -1) {