mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-06-05 21:49:48 +02:00
do not disable/enable NotificationListener at runtime (leads to loss of permissions to read notifications)
This commit is contained in:
@@ -58,7 +58,7 @@ public class BluetoothCommunicationService extends Service {
|
|||||||
PhoneCallReceiver.class,
|
PhoneCallReceiver.class,
|
||||||
SMSReceiver.class,
|
SMSReceiver.class,
|
||||||
K9Receiver.class,
|
K9Receiver.class,
|
||||||
NotificationListener.class,
|
//NotificationListener.class, // disabling this leads to loss of permission to read notifications
|
||||||
};
|
};
|
||||||
|
|
||||||
int newState;
|
int newState;
|
||||||
|
@@ -50,7 +50,13 @@ public class PhoneCallReceiver extends BroadcastReceiver {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TelephonyManager.CALL_STATE_IDLE:
|
case TelephonyManager.CALL_STATE_IDLE:
|
||||||
pebblePhoneCommand = PebbleProtocol.PHONECONTROL_END;
|
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;
|
break;
|
||||||
}
|
}
|
||||||
if (pebblePhoneCommand != -1) {
|
if (pebblePhoneCommand != -1) {
|
||||||
|
Reference in New Issue
Block a user