mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 21:06:50 +01:00
Merge branch 'master' into feature-weather
This commit is contained in:
commit
2148b431ea
@ -1,5 +1,8 @@
|
||||
###Changelog
|
||||
|
||||
####Version next
|
||||
* Improved handling of notifications for some apps
|
||||
|
||||
####Version 0.15.0
|
||||
* New device: Liveview
|
||||
* Liveview: initial support (set the time and receive notifications)
|
||||
|
@ -1,39 +0,0 @@
|
||||
Andreas Shimokawa <shimokawa@fsfe.org>
|
||||
Carsten Pfeiffer <cpfeiffer@users.noreply.github.com>
|
||||
Daniele Gobbetti <daniele@gobbetti.name>
|
||||
Julien Pivotto <roidelapluie@inuits.eu>
|
||||
Steffen Liebergeld <perl@gmx.org>
|
||||
Lem Dulfo <lemuel.dulfo@gmail.com>
|
||||
Sergey Trofimov <sarg@sarg.org.ru>
|
||||
JohnnySun <bmy001@gmail.com>
|
||||
Uwe Hermann <uwe@hermann-uwe.de>
|
||||
0nse <0nse@users.noreply.github.com>
|
||||
Gergely Peidl <gergely@peidl.net>
|
||||
Christian Fischer <sw-dev@computerlyrik.de>
|
||||
Normano64 <per.bergqwist@gmail.com>
|
||||
Ⲇⲁⲛⲓ Φi <daniphii@outlook.com>
|
||||
xzovy <caleb@caleb-cooper.net>
|
||||
xphnx <xphnx@users.noreply.github.com>
|
||||
Tarik Sekmen <tarik@ilixi.org>
|
||||
Szymon Tomasz Stefanek <s.stefanek@gmail.com>
|
||||
Roman Plevka <rplevka@redhat.com>
|
||||
rober <rober@prtl.nodomain.net>
|
||||
Nicolò Balzarotti <anothersms@gmail.com>
|
||||
Natanael Arndt <arndtn@gmail.com>
|
||||
Marc Schlaich <marc.schlaich@googlemail.com>
|
||||
kevlarcade <kevlarcade@gmail.com>
|
||||
Kevin Richter <me@kevinrichter.nl>
|
||||
Kasha <kasha_malaga@hotmail.com>
|
||||
Ivan <ivan_tizhanin@mail.ru>
|
||||
Gilles MOREL <contact@gilles-morel.fr>
|
||||
Gilles Émilien MOREL <Almtesh@users.noreply.github.com>
|
||||
Chris Perelstein <chris.perelstein@gmail.com>
|
||||
Carlos Ferreira <calbertoferreira@gmail.com>
|
||||
atkyritsis <at.kyritsis@gmail.com>
|
||||
andre <andre.buesgen@yahoo.de>
|
||||
Alexey Afanasev <avafanasiev@gmail.com>
|
||||
6arms1leg <m.brnsfld@googlemail.com>
|
||||
|
||||
And all the Transifex translators, which I cannot automatically list, at the moment.
|
||||
|
||||
git log --raw | grep "^Author: " | sort | uniq -c | sort -k 1 -n -r | cut -f 2- -d: > CONTRIBUTORS.md
|
63
CONTRIBUTORS.rst
Normal file
63
CONTRIBUTORS.rst
Normal file
@ -0,0 +1,63 @@
|
||||
.. 2>/dev/null
|
||||
names ()
|
||||
{
|
||||
echo -e "\n exit;\n**Contributors (sorted by number of commits):**\n";
|
||||
git log --all --format='%aN:%aE' | sed 's/@users.github.com/@users.noreply.github.com/g' | awk 'BEGIN{FS=":"}{ct[$2]+=1;if (length($1) > length(e[$2])) {e[$2]=$1}}END{for (i in e) { n[e[i]]=i;c[e[i]]+=ct[i] }; for (a in n) print c[a]"\t* "a" <"n[a]">";}' | sort -n -r | cut -f 2-
|
||||
}
|
||||
quine ()
|
||||
{
|
||||
{
|
||||
echo ".. 2>/dev/null";
|
||||
declare -f names | sed -e 's/^[[:space:]]*/ /';
|
||||
declare -f quine | sed -e 's/^[[:space:]]*/ /';
|
||||
echo -e " quine\n";
|
||||
names;
|
||||
echo -e "\nAnd all the Transifex translators, which I cannot automatically list, at the moment.\n\n*To update the contributors list just run this file with bash*"
|
||||
} > CONTRIBUTORS.rst;
|
||||
exit
|
||||
}
|
||||
quine
|
||||
|
||||
|
||||
exit;
|
||||
**Contributors (sorted by number of commits):**
|
||||
|
||||
* Andreas Shimokawa <shimokawa@fsfe.org>
|
||||
* Carsten Pfeiffer <cpfeiffer@users.noreply.github.com>
|
||||
* Daniele Gobbetti <daniele+github@gobbetti.name>
|
||||
* Julien Pivotto <roidelapluie@inuits.eu>
|
||||
* Steffen Liebergeld <perl@gmx.org>
|
||||
* Lem Dulfo <lemuel.dulfo@gmail.com>
|
||||
* Sergey Trofimov <sarg@sarg.org.ru>
|
||||
* JohnnySun <bmy001@gmail.com>
|
||||
* Uwe Hermann <uwe@hermann-uwe.de>
|
||||
* Gergely Peidl <gergely@peidl.net>
|
||||
* 0nse <0nse@users.noreply.github.com>
|
||||
* Christian Fischer <sw-dev@computerlyrik.de>
|
||||
* Normano64 <per.bergqwist@gmail.com>
|
||||
* Ⲇⲁⲛⲓ Φi <daniphii@outlook.com>
|
||||
* xzovy <caleb@caleb-cooper.net>
|
||||
* xphnx <xphnx@users.noreply.github.com>
|
||||
* Tarik Sekmen <tarik@ilixi.org>
|
||||
* Szymon Tomasz Stefanek <s.stefanek@gmail.com>
|
||||
* Roman Plevka <rplevka@redhat.com>
|
||||
* rober <rober@prtl.nodomain.net>
|
||||
* Nicolò Balzarotti <anothersms@gmail.com>
|
||||
* Natanael Arndt <arndtn@gmail.com>
|
||||
* Marc Schlaich <marc.schlaich@googlemail.com>
|
||||
* kevlarcade <kevlarcade@gmail.com>
|
||||
* Kevin Richter <me@kevinrichter.nl>
|
||||
* Kasha <kasha_malaga@hotmail.com>
|
||||
* Ivan <ivan_tizhanin@mail.ru>
|
||||
* Gilles MOREL <contact@gilles-morel.fr>
|
||||
* Gilles Émilien MOREL <Almtesh@users.noreply.github.com>
|
||||
* Chris Perelstein <chris.perelstein@gmail.com>
|
||||
* Carlos Ferreira <calbertoferreira@gmail.com>
|
||||
* atkyritsis <at.kyritsis@gmail.com>
|
||||
* andre <andre.buesgen@yahoo.de>
|
||||
* Alexey Afanasev <avafanasiev@gmail.com>
|
||||
* 6arms1leg <m.brnsfld@googlemail.com>
|
||||
|
||||
And all the Transifex translators, which I cannot automatically list, at the moment.
|
||||
|
||||
*To update the contributors list just run this file with bash*
|
@ -34,7 +34,6 @@ import nodomain.freeyourgadget.gadgetbridge.model.AppNotificationType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.MusicSpec;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.MusicStateSpec;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.NotificationSpec;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.NotificationType;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.DeviceCommunicationService;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.LimitedQueue;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
|
||||
@ -190,19 +189,13 @@ public class NotificationListener extends NotificationListenerService {
|
||||
if (!prefs.getBoolean("notifications_generic_whenscreenon", false)) {
|
||||
PowerManager powermanager = (PowerManager) getSystemService(POWER_SERVICE);
|
||||
if (powermanager.isScreenOn()) {
|
||||
LOG.info("Not forwarding notification, screen seems to be on and settings do not allow this");
|
||||
// LOG.info("Not forwarding notification, screen seems to be on and settings do not allow this");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//don't forward group summary notifications to the wearable, they are meant for the android device only
|
||||
if ((notification.flags & Notification.FLAG_GROUP_SUMMARY) == Notification.FLAG_GROUP_SUMMARY) {
|
||||
LOG.info("Not forwarding notification, FLAG_GROUP_SUMMARY is set");
|
||||
return;
|
||||
}
|
||||
|
||||
if ((notification.flags & Notification.FLAG_ONGOING_EVENT) == Notification.FLAG_ONGOING_EVENT) {
|
||||
LOG.info("Not forwarding notification, FLAG_ONGOING_EVENT is set");
|
||||
// LOG.info("Not forwarding notification, FLAG_ONGOING_EVENT is set. Notification flags: " + notification.flags);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -258,7 +251,7 @@ public class NotificationListener extends NotificationListenerService {
|
||||
|
||||
notificationSpec.type = AppNotificationType.getInstance().get(source);
|
||||
|
||||
LOG.info("Processing notification from source " + source);
|
||||
LOG.info("Processing notification from source " + source + " with flags: " + notification.flags);
|
||||
|
||||
dissectNotificationTo(notification, notificationSpec, preferBigText);
|
||||
notificationSpec.id = (int) sbn.getPostTime(); //FIMXE: a truly unique id would be better
|
||||
@ -266,8 +259,9 @@ public class NotificationListener extends NotificationListenerService {
|
||||
NotificationCompat.WearableExtender wearableExtender = new NotificationCompat.WearableExtender(notification);
|
||||
List<NotificationCompat.Action> actions = wearableExtender.getActions();
|
||||
|
||||
if (actions.isEmpty() && notificationSpec.type == NotificationType.TELEGRAM) {
|
||||
return; // workaround for duplicate telegram message
|
||||
if (actions.isEmpty() && (notification.flags & Notification.FLAG_GROUP_SUMMARY) == Notification.FLAG_GROUP_SUMMARY) { //this could cause #395 to come back
|
||||
LOG.info("Not forwarding notification, FLAG_GROUP_SUMMARY is set and no wearable action present. Notification flags: " + notification.flags);
|
||||
return;
|
||||
}
|
||||
|
||||
for (NotificationCompat.Action act : actions) {
|
||||
|
@ -10,6 +10,8 @@ import java.io.IOException;
|
||||
import java.io.PipedInputStream;
|
||||
import java.io.PipedOutputStream;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||
|
||||
public class PebbleLESupport {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(PebbleLESupport.class);
|
||||
private final BluetoothDevice mBtDevice;
|
||||
@ -19,6 +21,7 @@ public class PebbleLESupport {
|
||||
private PipedInputStream mPipedInputStream;
|
||||
private PipedOutputStream mPipedOutputStream;
|
||||
private int mMTU = 20;
|
||||
private int mMTULimit = Integer.MAX_VALUE;
|
||||
boolean mIsConnected = false;
|
||||
|
||||
public PebbleLESupport(Context context, final BluetoothDevice btDevice, PipedInputStream pipedInputStream, PipedOutputStream pipedOutputStream) throws IOException {
|
||||
@ -31,6 +34,9 @@ public class PebbleLESupport {
|
||||
} catch (IOException e) {
|
||||
LOG.warn("could not connect input stream");
|
||||
}
|
||||
mMTULimit = GBApplication.getPrefs().getInt("pebble_mtu_limit", 512);
|
||||
mMTULimit = Math.max(mMTULimit, 20);
|
||||
mMTULimit = Math.min(mMTULimit, 512);
|
||||
|
||||
mPebbleGATTServer = new PebbleGATTServer(this, context, mBtDevice);
|
||||
if (mPebbleGATTServer.initialize()) {
|
||||
@ -99,7 +105,7 @@ public class PebbleLESupport {
|
||||
}
|
||||
|
||||
void setMTU(int mtu) {
|
||||
mMTU = mtu;
|
||||
mMTU = Math.min(mtu, mMTULimit);
|
||||
}
|
||||
|
||||
private class PipeReader extends Thread {
|
||||
|
@ -120,6 +120,8 @@
|
||||
<string name="pref_summary_pebble_forceuntested">Enable features that are untested. ENABLE ONLY IF YOU KNOW WHAT YOU ARE DOING!</string>
|
||||
<string name="pref_title_pebble_forcele">Always prefer BLE</string>
|
||||
<string name="pref_summary_pebble_forcele">Use experimental Pebble LE support for all Pebbles instead of BT classic, requires paring a "Pebble LE" after non LE had been connected once</string>
|
||||
<string name="pref_title_pebble_mtu_limit">Pebble 2/LE GATT MTU limit</string>
|
||||
<string name="pref_summary_pebble_mtu_limit">If your Pebble 2/Pebble LE does not work as expected, try this setting to limit the MTU (valid range 20–512)</string>
|
||||
<string name="pref_title_pebble_enable_applogs">Enable Watch App Logging</string>
|
||||
<string name="pref_summary_pebble_enable_applogs">Will cause logs from watch apps to be logged by Gadgetbridge (requires reconnect)</string>
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<changelog>
|
||||
<release version="next">
|
||||
<change>* Improved handling of notifications for some apps</change>
|
||||
</release>
|
||||
<release version="0.15.0" versioncode="77">
|
||||
<change>New device: Liveview</change>
|
||||
<change>Liveview: initial support (set the time and receive notifications)</change>
|
||||
|
@ -341,6 +341,13 @@
|
||||
android:key="pebble_force_le"
|
||||
android:summary="@string/pref_summary_pebble_forcele"
|
||||
android:title="@string/pref_title_pebble_forcele" />
|
||||
<EditTextPreference
|
||||
android:inputType="number"
|
||||
android:key="pebble_mtu_limit"
|
||||
android:maxLength="3"
|
||||
android:defaultValue="512"
|
||||
android:title="@string/pref_title_pebble_mtu_limit"
|
||||
android:summary="@string/pref_summary_pebble_mtu_limit" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="pebble_enable_applogs"
|
||||
|
Loading…
Reference in New Issue
Block a user