This change adds filter filters to the calendar sync options:
1. Declined events
2. Canceled events
3. Color Label filtering
4. Focus Time event filtering
5. Working Location event filtering
6. All Day Event filtering
This changes also inverts the menu for teh sync black list so that is
now a white list. The underlying prefs variables have not changed, just
how the interface displays them so existing user settings will carry
over.
The color label filtering is more useful on calendars from Google
Workspace Calendars that actually have named colors. There is no way
that I can find to access the names of the colors to show to the user,
but it can still be useful to tag some events that you don't want synced.
In addition to the color filters, Google Workspace Calendar has extended
parameters called Focus Time and Working Location. Working location
appears as an all day event every day and if you use the Focus Time as a
Calendar block, your calendar may be filled with these events. For my
work calendar these two event types choke out the "real" events, so it
is nice to filter them.
This properly encodes the notification json as UTF-8 instead of ASCII so
that other characters are correctly sent.
Also fix a null pointer in logging in the BLEQueue
Some devices use the MFG specific data to identify the device since a
custom name can be programed into the device (Apple Airpods for example).
Additional info like serial numbers and device type info is also often
encoded into the mfg data so it can be useful for a coordinator to
parse. This change propogates the MFG data into the GDDeviceCandidate so
the coordinator can utilize it if needed.
This change aims to improve the connection reliability on Even Realities
G1. It has a few changes:
1. Fixed a bug in MultiBLEDeviceSupport where if one devices "fails" to
connect because it is already connected, the other devices would be
skipped over.
2. Take the ConectionMonitor lock in G1 Device support when one of the
devices being disconnected is being handled, this prevents
reconnection or double disconnects overlapping leading to unexpected
state.
3. Add a hack when one side disconnects so that the global state of the
sub devices never passes through NOT_CONNECTED and instead moves
right from CONNECTED to WAITING_FOR_RECONNECT. This prevents the the
doubling of reconnection delay multiple times resulting in full 64
seconds reconnect attempts.
4. When one device disconnects, both BLE queues are now explicitly
disconnected. Previously just the device state was changed, which
meant reconnection was not always reliable.
5. Made the heart beat delay dynamic, when android low power mode kicks
in, the system may only check the timer expiration every 20 seconds.
Previously to get around this, the delay was set to a fixed 8
seconds, but this uses additional power when not in low power mode.
Now the thread will check the system added delay based on the time
since the last heartbeat and will schedule dymaically based on that.
The minimum delay is still 8 seconds, but now when batter saver is
not enabled, the delay will change to 25 seconds.
6. Fixed some nullptr exceptions when handling the device disconnection
when one device is not yet connected.
It seems like I didn't actually redeploy the app to my phone when
testing my previous change, so I was actually testing the old code
(which works with my particular device name). After rebuilding for
sure with the new code, I didn't get the indexOf offsets correct.
This fixes the bug introduced by the previous change.
This change fixes several things:
1. Update the logic for 3 state related functions for MultiBLEDevice
so they now take into account all sub devices.
2. Fix several race condidtions in the initialization logic. This
fixes one lens permenantly not being connected.
3. Add a callback when one of the devicess diconnects to put the
both sides of the lens into WAITING_FOR_RECONNECT state.
4. Decrease the heartbeat sleep to 8 seconds. Since Android Deep sleep
can add upwards to 20 seconds to the sleep time, this means most
heartbeats will be sent every 28 seconds.
5. Fixed a bug in the per-side state when the device was disconnected
without the SideManager object being destroyed which lead to the
full initialization process not being followed on reconnection.
Some glasses have shown up that have the format G1_X_L instead of the
previously expecte G1_XX_L. Update the regex so it can support any
number of digits in that position.
Previously, each side of the glasses had it's own sequence number, after
longer periods of time, these numbers would go out of sync and the
glasses would crash because the values are expected to be the same. Now
there is a single sequence number, and packets that are sent to both
lenses will now share the same sequence number. The heartbeat runner is
also moved to the shared space so that the time outs of the BLE
connections do not get skewed.
This change helps improve the connection experience when GadgetBridge is
working as a background task. The glasses must be send a heartbeat
packet every 32 seconds, otherwise they will disconnect. When
GadgetBridge is running in the background there is a 15-20 second delay
between the background handler waking up. This means that when the wake
up time is sceduled for 30 seconds, it often won't be woken up for 45-50
seconds leading to almost immediate disconnect after the user turns off
the screen. The official app gets around this by using a 5 second delay
leading to ~25 seconds of delay in sleep mode, but this over sends when
the phone is awake. Instead of doing that, I maintain the 28 second
delay but I change the background thread to a higher priority so that it
more consistently wakes up within th 32 second BLE limit.
Also added support for Notifications being sent to the glasses.
Add support for:
- Charging status
- Battery level of the case
- Fetching Serial Number
- Parsing hardware information from serial number
- Add Hard Reset button
- Toggle for device level debug logging
- Bug Fix: kill heartbeat worker on disconnect
- Weather
- Toggle for 12H/24H time
- Set the dashboard to minimal on connection
This change adds in a toggle for "silent mode" which turns the displays
off and makes the glasses act like normal glasses.
This change also adds the following configuration settings:
- Screen Location/height
- Screen Depth Effect
- Head Tilt Activation Angle
- Toggle Auto Brightness
- Brightness Level
- Wear Detection
Also refactored Communications file to have a consistent naming style.
This change switches G1DeviceSupport from managing to individual devices
to using AbstractBTLEMultiDeviceSupport which allows it to manage both
BLE connections under a single support class. This also updates the
Pairing activity to make it much more reliable at bonding and pairing
both devices.
This change adds a class that mirrors AbstractBTLEDeviceSupport, except
that it holds and arrays of bluetooth queues instead of just one. This
allows a single GBDevice to be composited into a single DeviceSupport
class. This is useful if there is a gadget that has multiple bluetooth
radios, but the gadget is a single device. It could also be useful if
multiple gadgets were to be grouped under a single Device (such as a
display and a remote), this way the support class can access both
devices fully without having to send messages or it can aggregate calls
to things like onNotification and make sure it is sent to all devices.
My main goal is to add support for the Even Realities G1 Smart Glasses
which use two BLE radios (one for each lens of the glasses). This code
is quite well tested on the following branch: