mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-25 18:15:49 +01:00
Add setting to enable voip call support (default off)
There were too many bugs reported, so make that optional
This commit is contained in:
parent
665b1b6b5a
commit
4638acf2d3
@ -240,7 +240,9 @@ public class NotificationListener extends NotificationListenerService {
|
||||
|
||||
@Override
|
||||
public void onNotificationPosted(StatusBarNotification sbn) {
|
||||
if ("call".equals(sbn.getNotification().category)) {
|
||||
Prefs prefs = GBApplication.getPrefs();
|
||||
|
||||
if ("call".equals(sbn.getNotification().category) && prefs.getBoolean("notification_support_voip_calls", false)) {
|
||||
handleCallNotification(sbn);
|
||||
return;
|
||||
}
|
||||
@ -249,10 +251,6 @@ public class NotificationListener extends NotificationListenerService {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Prefs prefs = GBApplication.getPrefs();
|
||||
|
||||
switch (GBApplication.getGrantedInterruptionFilter()) {
|
||||
case NotificationManager.INTERRUPTION_FILTER_ALL:
|
||||
break;
|
||||
|
@ -83,6 +83,7 @@
|
||||
<string name="pref_header_notifications">Notifications</string>
|
||||
<string name="pref_title_notifications_repetitions">Repetitions</string>
|
||||
<string name="pref_title_notifications_call">Phone Calls</string>
|
||||
<string name="pref_title_support_voip_calls">Enable VoIP app calls</string>
|
||||
<string name="pref_title_notifications_sms">SMS</string>
|
||||
<string name="pref_title_notifications_timeout">Minimum time between notifications</string>
|
||||
<string name="pref_title_notifications_pebblemsg">Pebble Messages</string>
|
||||
|
@ -202,6 +202,11 @@
|
||||
android:key="notification_mode_calls"
|
||||
android:title="@string/pref_title_notifications_call"
|
||||
android:summary="%s" />
|
||||
<CheckBoxPreference
|
||||
android:layout="@layout/preference_checkbox"
|
||||
android:defaultValue="false"
|
||||
android:key="notification_support_voip_calls"
|
||||
android:title="@string/pref_title_support_voip_calls" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="when_screen_off"
|
||||
|
Loading…
Reference in New Issue
Block a user