Pebble: Add option to disable call display

Closes #494
master
Andreas Shimokawa 2017-01-09 14:41:02 +01:00
parent a2c052090b
commit f05b51fd83
5 changed files with 16 additions and 1 deletions

View File

@ -4,6 +4,7 @@
* Add weather support through "Weather Notification" app
* Pebble: Support for build-in weather system app (FW 4.x)
* Pebble: Add weather support for various watchfaces
* Pebble: Add option to disable call display
* Pebble 2/LE: Improve reliablitly and transfer speed
####Version 0.16.0

View File

@ -11,6 +11,7 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.UUID;
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
import nodomain.freeyourgadget.gadgetbridge.model.Alarm;
import nodomain.freeyourgadget.gadgetbridge.model.CalendarEventSpec;
@ -120,7 +121,11 @@ public class PebbleSupport extends AbstractSerialDeviceSupport {
@Override
public void onSetCallState(CallSpec callSpec) {
if (reconnect()) {
super.onSetCallState(callSpec);
if (callSpec.command == CallSpec.CALL_OUTGOING) {
if (GBApplication.getPrefs().getBoolean("pebble_enable_outgoing_call",true)) {
super.onSetCallState(callSpec);
}
}
}
}

View File

@ -104,6 +104,9 @@
<string name="pref_title_pebble_sync_misfit">Sync Misfit</string>
<string name="pref_title_pebble_sync_morpheuz">Sync Morpheuz</string>
<string name="pref_title_enable_outgoing_call">Support outgoing calls</string>
<string name="pref_summary_enable_outgoing_call">Disabling this will also stop the Pebble 2/LE to vibrate on outgoing calls</string>
<string name="pref_title_enable_pebblekit">Allow 3rd Party Android App Access</string>
<string name="pref_summary_enable_pebblekit">Enable experimental support for Android Apps using PebbleKit</string>

View File

@ -4,6 +4,7 @@
<change>Add weather support through "Weather Notification" app</change>
<change>Pebble: Support for build-in weather system app (FW 4.x)</change>
<change>Pebble: Add weather support for various watchfaces</change>
<change>Pebble: Add option to disable call display</change>
<change>Pebble 2/LE: Improve reliablitly and transfer speed</change>
</release>
<release version="0.16.0" versioncode="80">

View File

@ -152,6 +152,11 @@
android:title="@string/pref_title_pebble_settings">
<PreferenceCategory
android:title="@string/pref_header_general">
<CheckBoxPreference
android:defaultValue="true"
android:key="pebble_enable_outgoing_call"
android:summary="@string/pref_summary_enable_outgoing_call"
android:title="@string/pref_title_enable_outgoing_call" />
<CheckBoxPreference
android:defaultValue="false"
android:key="pebble_enable_pebblekit"