briar issueshttps://code.briarproject.org/groups/briar/-/issues2022-03-31T09:24:23Zhttps://code.briarproject.org/briar/briar/-/issues/2295Let MailboxPropertyManager broadcast event when contact's mailbox props are u...2022-03-31T09:24:23ZDaniel LublinLet MailboxPropertyManager broadcast event when contact's mailbox props are updatedOn incoming mailbox properties update, MailboxPropertyManagerImpl#incomingMessage should broadcast an event that a contact's mailbox props were updated.
It is the Mailbox client manager that will consume this event: https://code.briarpr...On incoming mailbox properties update, MailboxPropertyManagerImpl#incomingMessage should broadcast an event that a contact's mailbox props were updated.
It is the Mailbox client manager that will consume this event: https://code.briarproject.org/briar/briar/-/issues/2228MailboxDaniel LublinDaniel Lublinhttps://code.briarproject.org/briar/dont-kill-me-lib/-/issues/1Backport Huawei power management fix2022-04-29T14:38:06ZTorsten GroteBackport Huawei power management fixhttps://code.briarproject.org/briar/briar/-/merge_requests/1602https://code.briarproject.org/briar/briar/-/merge_requests/1602https://code.briarproject.org/briar/briar/-/issues/2294Mailbox worker for updating our own mailbox's contact list2022-08-12T12:44:41ZakwizgranMailbox worker for updating our own mailbox's contact listThe mailbox client for our own mailbox (#2290) has a worker for updating the mailbox's contact list. The worker is started when the client is created and destroyed when the client is destroyed.
The worker runs in parallel with the uploa...The mailbox client for our own mailbox (#2290) has a worker for updating the mailbox's contact list. The worker is started when the client is created and destroyed when the client is destroyed.
The worker runs in parallel with the upload and download workers. If a task belonging to an upload or download worker tries to access the inbox or outbox of a contact that hasn't been added to the mailbox's contact list, the task will fail and retry until the mailbox's contact list is brought up to date. If a task belonging to an upload or download worker tries to access the inbox or outbox of a contact that's been removed from the mailbox's contact list, the task will fail and retry until the contact is deassigned from the client, causing the task to be cancelled.
The worker keeps a reference to its current API task, if any, so the task can be cancelled when the worker is destroyed.
The worker's lifecycle is:
1. Check connectivity
2. Fetch and store the mailbox's supported API versions (#2299, #2302)
3. Reconcile the mailbox's contact list with the local contact list (#2182, #2183, #2187)
3. Wait for the local contact list to change
The worker can be in the following states:
* Waiting for connectivity check
* Fetching API versions
* Updating contact list
* Waiting for changes
When the worker is created:
* Set the current state to "waiting for connectivity check"
* Call the client's connectivity check method
When the worker is destroyed:
* Set the current state to "destroyed"
* Cancel the current API task, if any
When a connectivity check succeeds:
* If the current state is "waiting for connectivity check":
* Set the current state to "updating contact list"
* Start a fetch-api-versions task
When a fetch-api-versions task succeeds:
* If the current state is "fetching API versions":
* Store the mailbox's supported API versions
* Start a get-contact-list task
When a get-contact-list task succeeds:
* If the current state is "updating contact list":
* Load the local contact list
* Compare the remote contact list to the local contact list
* Load the mailbox properties for any contacts that are in the local list but not the remote list
* If any contacts need to be added or deleted:
* Start an add-contact or delete-contact task
* Else:
* Set the current state to "waiting for changes"
When an add-contact or delete-contact task succeeds:
* If the current state is "updating contact list":
* If any more contacts need to be added or deleted:
* Start an add-contact or delete-contact task
* Else:
* Start a get-contact-list task
When an event indicates that a contact has been added or removed:
* If the current state is "waiting for changes":
* Set the current state to "updating contact list"
* Start a get-contact-list taskMailbox: Manage mailbox connectionsakwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/2293Mailbox download worker for our own mailbox2022-08-05T13:40:22ZakwizgranMailbox download worker for our own mailboxThe mailbox client for our own mailbox (#2290) has a single download worker that's shared between all contacts assigned to the mailbox for download. The worker is started when the first contact is assigned for download and destroyed when...The mailbox client for our own mailbox (#2290) has a single download worker that's shared between all contacts assigned to the mailbox for download. The worker is started when the first contact is assigned for download and destroyed when the last contact is deassigned for download or the client is destroyed.
The worker keeps a reference to its current API task, if any, so the task can be cancelled when the worker is destroyed.
The worker's lifecycle is:
1. Check connectivity
2. Download and delete all files from all contacts' outboxes
3. Wait until our hidden service has been reachable for at least the overlap duration
4. Download and delete all files from all contacts' outboxes again, in case any arrived during the overlap period
Downloading and deleting files is more complex for this worker than for the download worker for a contact's mailbox (#2292), firstly because this worker needs to download files from multiple outboxes, and secondly because it needs to ensure fairness between contacts, so that a malicious contact can't deny service to other contacts by flooding its own outbox with files.
The worker ensures fairness in two ways:
1. To ensure that every contact receives service even if some contacts have flooded their own outboxes, the worker lists the outboxes that contain files, lists the files in each of those outboxes, then downloads from the outboxes in round-robin order.
2. To ensure that every contact receives service even if they upload files to their outboxes after the initial check, and if some contacts had already flooded their own outboxes at the time of the initial check, the worker restarts the round-robin after downloading a certain number of files: it lists the outboxes that contain files, lists the files in each of those outboxes, then downloads from the outboxes in round-robin order.
The worker can be in the following states:
* Waiting for connectivity check
* First download
* Waiting for hidden service
* Second download
* Destroyed
When the worker is created:
* Set the current state to "waiting for connectivity check"
* Call the client's connectivity check method
When the worker is destroyed:
* Set the current state to "destroyed"
* Cancel the current API task, if any
When a connectivity check succeeds:
* If the current state is "waiting for connectivity check":
* Set the current state to "first download"
* Start a find-outboxes-with-available-files task (#2170)
When a find-outboxes-with-available-files task succeeds:
* If the current state is "first download" or "second download":
* If there are any outboxes with available files:
* Start a list-outbox task for the first outbox with available files
* Else if the current state is "first download":
* Set the current state to "waiting for hidden service"
When a list-outbox tasks succeeds:
* If the current state is "first download" or "second download":
* If there are files in the outbox:
* Sort the files by timestamp
* Add the file list to the round-robin queue
* If there are more outboxes with available files:
* Start a list-outbox task for the next outbox with available files
* Else if there are any files in the round-robin queue:
* Trim the round-robin queue to ensure fairness (see item 2 above)
* Start a download-file task for the first file in the round-robin queue (#2232)
* Else if the current state is "first download":
* Set the current state to "waiting for hidden service"
* (Note: It's surprising if we reach this branch, and should probably be logged. The find-outboxes-with-available-files task found some outboxes, but after listing those outboxes we didn't find any files)
When a download-file task succeeds:
* Pass the local file's path to the mailbox plugin to get a transport connection reader
* Decorate the transport connection reader to handle disposal
* Pass the decorated transport connection reader to the connection manager
* Data will be read from the local file asynchronously
* If the current state is "first download" or "second download":
* Start a delete-file task for the current file (#2233)
When the transport connection reader is disposed of:
* Delete the local file
When a delete-file task succeeds or tolerably fails:
* If the current state is "first download" or "second download":
* If there are more files in the round-robin queue:
* Start a download-file task for the next file
* Else:
* Start a find-outboxes-with-available-files task
When an event indicates that the hidden service has been reachable for at least the overlap duration:
* If the current state is "waiting for hidden service":
* Set the current state to "second download"
* Start a find-outboxes-with-available-files taskMailbox: Manage mailbox connectionsakwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/2292Mailbox download worker for a contact's mailbox2022-08-05T13:38:01ZakwizgranMailbox download worker for a contact's mailboxWhen a contact is assigned to a contact's mailbox for download, the mailbox client (#2289) creates a download worker. The worker is destroyed when the contact is unassigned for download or the client is destroyed.
The worker keeps a ref...When a contact is assigned to a contact's mailbox for download, the mailbox client (#2289) creates a download worker. The worker is destroyed when the contact is unassigned for download or the client is destroyed.
The worker keeps a reference to its current API task, if any, so the task can be cancelled when the worker is destroyed.
The worker's lifecycle is:
1. Check connectivity
2. Download and delete all files from the inbox
3. Wait until our hidden service has been reachable for at least the overlap duration
4. Download and delete all files from the inbox again, in case any arrived during the overlap period
The worker can be in the following states:
* Waiting for connectivity check
* First download
* Waiting for hidden service
* Second download
* Destroyed
When the worker is created:
* Set the current state to "waiting for connectivity check"
* Call the client's connectivity check method
When the worker is destroyed:
* Set the current state to "destroyed"
* Cancel the current API task, if any
When a connectivity check succeeds:
* If the current state is "waiting for connectivity check":
* Set the current state to "first download"
* Start a list-inbox task
When a list-inbox tasks succeeds:
* If the current state is "first download" or "second download":
* If there are files in the inbox:
* Sort the files by timestamp
* Start a download-file task for the first file (#2232)
* Else if the current state is "first download":
* Set the current state to "waiting for hidden service"
When a download-file task succeeds:
* Pass the local file's path to the mailbox plugin to get a transport connection reader
* Decorate the transport connection reader to handle disposal
* Pass the decorated transport connection reader to the connection manager
* Data will be read from the local file asynchronously
* If the current state is "first download" or "second download":
* Start a delete-file task for the current file (#2233)
When the transport connection reader is disposed of:
* Delete the local file
When a delete-file task succeeds or tolerably fails:
* If the current state is "first download" or "second download":
* If there are more files to download:
* Start a download-file task for the next file
* Else:
* Start a list-inbox task
When an event indicates that the hidden service has been reachable for at least the overlap duration:
* If the current state is "waiting for hidden service":
* Set the current state to "second download"
* Start a list-inbox taskMailbox: Manage mailbox connectionsakwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/2291Mailbox upload worker2022-08-05T14:19:56ZakwizgranMailbox upload workerThe upload worker implementation is shared between the client for our own mailbox (#2290) and the client for a contact's mailbox (#2289). The worker's lifecycle is managed by the mailbox client, which in turn is managed by the mailbox cl...The upload worker implementation is shared between the client for our own mailbox (#2290) and the client for a contact's mailbox (#2289). The worker's lifecycle is managed by the mailbox client, which in turn is managed by the mailbox client manager (#2228).
Each upload worker is associated with a contact that has been assigned to a mailbox for upload. When a contact is reassigned to a different mailbox for upload, the old worker is destroyed and a new worker is created.
The worker can be in the following states:
* Checking for data to send
* Waiting for data to send
* Waiting for connectivity check
* Writing and uploading
* Destroyed
When the worker is created:
* Set the current state to "checking for data to send"
* Check for data to send
When the worker is destroyed:
* Set the current state to "destroyed"
* Cancel the current upload task, if any
To check for data to send:
* Load the time when data will next be ready to send to the contact
* If data is ready to send now:
* Set the current state to "waiting for connectivity check"
* Call the client's connectivity check method
* Else:
* Set the current state to "waiting for data to send"
* Schedule a wakeup task for the time when data will next be ready to send
When an event indicates that new data may be ready to send:
* If the current state is "waiting for data to send":
* Cancel the wakeup task
* Set the current state to "checking for data to send"
* Check for data to upload
When a wakeup task runs:
* If the current state is "waiting for data to send":
* Set the current state to "checking for data to send"
* Check for data to upload
When a connectivity check succeeds:
* If the current state is "waiting for connectivity check":
* Set the current state to "writing and uploading"
* Write and upload a file
To write and upload a file:
* Create a temporary file in the upload directory
* Pass the file's path to the mailbox plugin to get a transport connection writer
* Decorate the transport connection writer to handle disposal
* Create a deferred send handler
* Pass the decorated transport connection writer and the deferred send handler to the connection manager
* Data will be written to the file asynchronously
* The IDs of any sent/acked messages will be recorded by the deferred send handler
When the transport connection writer is disposed of:
* If the write succeeded:
* Start an upload task to upload the file to the mailbox (#2231)
* Else:
* Delete the file
* Set the current state to "checking for data to send"
* Check for data to send
When an upload task succeeds:
* Retrieve the sent/acked message IDs from the deferred send handler
* Mark the messages as sent/acked
* Delete the file
* Set the current state to "checking for data to send"
* Check for data to send
When an upload task is cancelled:
* Delete the fileMailbox: Manage mailbox connectionsakwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/2290Mailbox client for our own mailbox2022-08-12T12:44:40ZakwizgranMailbox client for our own mailboxMailbox clients for communicating with our own mailbox and contacts' mailboxes are managed by a singleton mailbox client manager (#2228).
This ticket covers the client for communicating with our own mailbox. Some code will be shared wit...Mailbox clients for communicating with our own mailbox and contacts' mailboxes are managed by a singleton mailbox client manager (#2228).
This ticket covers the client for communicating with our own mailbox. Some code will be shared with the client for communicating with a contact's mailbox (#2289). The shared code is covered by #2229.
The client's connectivity check will use #2170.
* At any given time the client has zero or more contacts assigned for upload and zero or more contacts assigned for download
* Each contact assigned for upload has its own upload worker
* The client has a single download worker that's shared by all contacts assigned for download
* The client also has a single contact list worker
When the client is created:
* Create and start the contact list worker (#2294)
When the client is destroyed:
* Do all the stuff the superclass does when it's destroyed
* Destroy the contact list worker
When a contact is assigned for upload:
* Create and start the contact's upload worker (#2291)
When a contact is deassigned for upload:
* Destroy the contact's upload worker
When a contact is assigned for download:
* If this is the only contact assigned for download:
* Create and start the shared download worker (#2293)
When a contact is deassigned for download:
* If there are no more contacts assigned for download:
* Destroy the shared download workerMailbox: Manage mailbox connectionsakwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/2289Mailbox client for a contact's mailbox2022-07-13T11:07:36ZakwizgranMailbox client for a contact's mailboxMailbox clients for communicating with our own mailbox and contacts' mailboxes are managed by a singleton mailbox client manager (#2228).
This ticket covers the client for communicating with a contact's mailbox. Some code will be shared...Mailbox clients for communicating with our own mailbox and contacts' mailboxes are managed by a singleton mailbox client manager (#2228).
This ticket covers the client for communicating with a contact's mailbox. Some code will be shared with the client for communicating with our own mailbox (#2290). The shared code is covered by #2229.
The client's connectivity check will use #2186.
* The client always has one contact assigned for upload
* At any given time the client may have one contact assigned for download, depending on whether we have our own mailbox
When the client is created:
* Create and start the upload worker (#2291)
When a contact is assigned for download:
* Create and start the download worker (#2292)
When a contact is deassigned for download:
* Destroy the download workerMailbox: Manage mailbox connectionshttps://code.briarproject.org/briar/briar/-/issues/2288Check whether Tor complains about absence of ec_nistp_64_gcc_128 optimisation...2022-03-18T14:56:41ZakwizgranCheck whether Tor complains about absence of ec_nistp_64_gcc_128 optimisation on Android x86_64On Windows and Linux x64_64, Tor complains if the `ec_nistp_64_gcc_128` optimisation wasn't enabled at compile time. Check whether this also needs to be enabled on Android x86_64.On Windows and Linux x64_64, Tor complains if the `ec_nistp_64_gcc_128` optimisation wasn't enabled at compile time. Check whether this also needs to be enabled on Android x86_64.https://code.briarproject.org/briar/tor-reproducer/-/issues/12Investigate whether we can use --enable-static-tor2022-03-10T14:24:04ZakwizgranInvestigate whether we can use --enable-static-torWhen configuring the Tor build, the `--enable-static-tor` flag sets two flags we're not currently using on all platforms: `--enable-static-zlib` and `-static`.
We had some issues with `--enable-static-zlib` on Android, and `-static` may...When configuring the Tor build, the `--enable-static-tor` flag sets two flags we're not currently using on all platforms: `--enable-static-zlib` and `-static`.
We had some issues with `--enable-static-zlib` on Android, and `-static` may cause portability issues with glibc and NSS on Linux. Find out more about these issues and decide whether we should use `--enable-static-tor` on each platform.https://code.briarproject.org/briar/tor-reproducer/-/issues/10Share more code between platforms2022-03-10T14:07:20ZakwizgranShare more code between platformsRefactor the code to share more code between platforms, perhaps through inheritance. Depends on #9.Refactor the code to share more code between platforms, perhaps through inheritance. Depends on #9.https://code.briarproject.org/briar/tor-reproducer/-/issues/9Extract code from Android Makefile2022-03-10T14:07:20ZakwizgranExtract code from Android MakefileConvert some of the code in the Android Makefile to Python so we more easily compare the Android, Linux and Windows builds and share code between them.Convert some of the code in the Android Makefile to Python so we more easily compare the Android, Linux and Windows builds and share code between them.https://code.briarproject.org/briar/briar/-/issues/2282iOS feasibility study2022-03-03T17:03:06ZakwizgraniOS feasibility studyTo know whether Briar can be viable on iOS we need to answer the following questions.
Online:
* Can the app run a Tor hidden service on iOS? (Bearing in mind that this requires a wake lock on Android to prevent Tor's circuits from timin...To know whether Briar can be viable on iOS we need to answer the following questions.
Online:
* Can the app run a Tor hidden service on iOS? (Bearing in mind that this requires a wake lock on Android to prevent Tor's circuits from timing out when the CPU sleeps.)
* Can the hidden service keep running for a limited time when the app goes into the background?
* Can the app wake periodically while running in the background, connect to a mailbox via Tor and check for messages?
* If the app finds messages when checking the mailbox, can it (a) store the messages in the local database, (b) show a notification?
Offline:
* Can the app advertise a UUID/other info via BLE such that nearby iOS/Android devices can discover it?
* Can the app scan for UUIDs/other info advertised via BLE by nearby iOS/Android devices?
* Can the app make/receive GATT connections to/from iOS/Android devices?
* Can the app make/receive L2CAP-CoC connections to/from iOS/Android devices?
* Can the app provide a wifi hotspot (without internet access)? Can it make/receive TCP connections to/from devices connected to the hotspot?
* Can the app connect to a wifi hotspot (without internet access) provided by another device? Can it make/receive TCP connections to/from other devices connected to the hotspot?
For all of the above we need to know:
* Differences between foreground and background behaviour
* API limits such as rate limits, number of UUIDs that can be scanned for
* Any other circumstances that could affect the behaviour, such as screen being off, low battery, device reboot, user not bringing the app to the foreground for a long time
* Whether user interaction is neededhttps://code.briarproject.org/briar/briar/-/issues/2269Use full camera preview when scanning QR codes2022-06-30T10:05:14ZakwizgranUse full camera preview when scanning QR codesThe QR code scanner only uses the upper half of the camera preview, as this is the only part that's visible when adding contacts in person. However, when pairing a mailbox the whole preview is visible, so the QR code may fail to scan if ...The QR code scanner only uses the upper half of the camera preview, as this is the only part that's visible when adding contacts in person. However, when pairing a mailbox the whole preview is visible, so the QR code may fail to scan if positioned in the middle of the preview.
We should either add a flag to control whether the whole preview is used, or (if testing on bad device combinations allows this), use the whole preview in both cases.
An example of a bad device combination is the Huawei Ascend Y330 showing the QR code and the Moto E3 scanning it.Mailbox: PairingDaniel LublinDaniel Lublinhttps://code.briarproject.org/briar/briar-mailbox/-/issues/90Wait for hidden service to be reachable before showing QR code2022-05-02T13:37:48ZakwizgranWait for hidden service to be reachable before showing QR codeMailbox: PairingTorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/2267Broadcast event when recording connection status of own mailbox2022-04-01T11:18:01ZakwizgranBroadcast event when recording connection status of own mailboxMailbox: Status UI for Briar appDaniel LublinDaniel Lublinhttps://code.briarproject.org/briar/briar/-/issues/2266Check for API/behaviour changes in Android 13 that could affect Briar2023-07-03T11:21:13ZTorsten GroteCheck for API/behaviour changes in Android 13 that could affect Briar* https://developer.android.com/about/versions/13/behavior-changes-13
* https://blog.esper.io/android-13-deep-dive/
* https://commonsware.com/blog/2022/02/12/random-musings-android-13-dp1.html
* https://commonsware.com/blog/2022/03/19/ra...* https://developer.android.com/about/versions/13/behavior-changes-13
* https://blog.esper.io/android-13-deep-dive/
* https://commonsware.com/blog/2022/02/12/random-musings-android-13-dp1.html
* https://commonsware.com/blog/2022/03/19/random-musings-android-13-dp2.html
Changes that may affect us:
* [Low power standby](https://developer.android.com/reference/android/os/PowerManager.html#isLowPowerStandbyEnabled()) is a new power saving mode (apparently distinct from doze, light doze and power save mode) in which apps with foreground services lose network access and their wake locks are ignored. It's not clear whether doze exemption affects this mode. We should look for ADB commands that can be used to test this mode
* [Light idle mode](https://developer.android.com/reference/android/os/PowerManager#isDeviceLightIdleMode()) has also been added to the PowerManager API, although this may just be exposing the "light doze" mode that was [added in Android 7](https://developer.android.com/about/versions/nougat/android-7.0-changes#doze)
* [Apps are placed in the "restricted" app standby bucket](https://developer.android.com/about/versions/13/changes/battery#restricted-bucket) if they "drain a significant amount of device battery during a 24-hour period". This is likely to apply to Briar and Briar Mailbox. Apps are also placed in the "restricted" bucket if the user doesn't interact with them for 8 days. This is very likely to apply to Briar Mailbox and may also apply to Briar. Running a foreground service isn't enough to meet definition of "interaction" being used here. The [docs for app standby buckets](https://developer.android.com/topic/performance/appstandby#buckets) say "Apps that are on the Doze exemption list are exempted from the App Standby Bucket-based restrictions." We should test whether this remains true for the new restrictions. We should also add code to [log which bucket we're in](https://developer.android.com/reference/android/app/usage/UsageStatsManager#getAppStandbyBucket()) periodically
* [Apps need to ask permission to show notifications](https://developer.android.com/about/versions/13/changes/notification-permission) - if the app doesn't target API 33 then the permission prompt will be shown automatically when the notification channels are created, which in Briar's case happens after signing in
* The new [foreground services task manager](https://developer.android.com/about/versions/13/changes/fgs-manager) enables the user to stop foreground services. Stopping an app in this way is [roughly equivalent](https://developer.android.com/about/versions/13/changes/fgs-manager#compare-swipe-up-force-stop) to force-stopping the app, but just different enough to make sure we'll have to test both workflows. Related to #2010
* [New rules for intent filters](https://developer.android.com/about/versions/13/behavior-changes-13#security) could affect our use of intents to open other apps (such as manufacturer-specific power management apps). These rules apply if the app receiving the intent targets API 33 or higher, so it could take a while for any effects to be noticeable
Article: https://medium.com/androiddevelopers/making-sense-of-intent-filters-in-android-13-8f6656903dde
* We should check whether the [`RECEIVER_NOT_EXPORTED`](https://developer.android.com/reference/android/content/Context.html#RECEIVER_NOT_EXPORTED) flag is relevant to us (all our BroadcastReceivers are used for receiving system broadcasts)
* [`NEARBY_WIFI_DEVICES`](https://developer.android.com/reference/android/Manifest.permission#NEARBY_WIFI_DEVICES) permission - this replaces `ACCESS_FINE_LOCATION` for some wifi APIs. We should use the new permission and find out whether location services still need to be enabled for these APIs to work
* If the user places an app in the "restricted" state for background battery usage (which AFAICT is [unrelated](https://developer.android.com/topic/performance/power/power-details) to the "restricted" app standby bucket) then the app [can't run foreground services, schedule alarms or run jobs](https://developer.android.com/about/versions/13/changes/battery#restricted-background-battery-usage). If the app targets API 33 then it can't receive `ACTION_BOOT_COMPLETED` broadcasts either, which we use for the sign-in reminder
* [System notification for long-running foreground services](https://developer.android.com/about/versions/13/changes/battery#system-notification-long-running-fgs) ("APP is running in the background for a long time. Tap to review") - as CommonsWare says, the obvious response from developers is to add `FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK` or `FOREGROUND_SERVICE_TYPE_LOCATION`, and the obvious response from Google is to restrict those flags in the next update
* [System notification for excessive background battery usage](https://developer.android.com/about/versions/13/changes/battery#system-notification-battery-usage) - the docs say this notification will be shown after our foreground service finishes, ie after the user signs out, which may cause confusion
* I'm sure [TARE](https://blog.esper.io/android-13-deep-dive/#tare) will produce great value for users and won't just be the equivalent of adding a dice roll to every attempt to queue a job or schedule an alarm. We should keep it in mind when debugging alarm issues
* [Apps can release unused permissions](https://developer.android.com/about/versions/13/features#developer-downgradable-permissions) - this looks useful for privacy-conscious users but some care will be needed to integrate this into our app lifecycle, as the system kills the app asynchronously at some point after the API is called
* There's a [new AndroidX API for implementing in-app language pickers](https://developer.android.com/about/versions/13/features/app-languages#api-impl), which is great. The user can also pick a per-app language [through the system settings app](https://developer.android.com/about/versions/13/features/app-languages#app-language-settings), in which case "The list of available languages might not reflect the languages that your app supports". This will need testing
* There's a new API for [opting out of screenshots in the recent apps list](https://developer.android.com/reference/android/app/Activity.html#setRecentsScreenshotEnabled(boolean)) without preventing the user from taking screenshots. This may be useful if it doesn't open some other horrendous information leak
* [SystemClock#currentNetworkTimeClock()](https://developer.android.com/reference/android/os/SystemClock.html#currentNetworkTimeClock()) may be useful for diagnosing whether clock sync issues are due to misconfiguration or [NTP tampering](https://gitlab.torproject.org/tpo/core/tor/-/issues/26359)
* Apps with the `ACCESS_FINE_LOCATION` permission are [exempt from most of the power management changes in Android 13](https://developer.android.com/about/versions/13/changes/battery#exemptions), as are media players that are actively playing media. Perhaps Google thinks media players and navigation apps (or exercise trackers?) should be allowed to run in the background, which would be consistent with the apparent intent of previous loopholesTorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/2265Replace ETA with max latency in retransmission logic2022-03-29T13:12:39ZakwizgranReplace ETA with max latency in retransmission logicThe sync protocol allows a message to be retransmitted if either the message's send time (also called expiry time in the database code) has been reached, or if the message's ETA via the currently available transport would be earlier than...The sync protocol allows a message to be retransmitted if either the message's send time (also called expiry time in the database code) has been reached, or if the message's ETA via the currently available transport would be earlier than the ETA of the previous copy. The ETA is based on the max latency of the transport.
This second (ETA) condition is met when the previous copy was sent via a higher-latency transport and a lower-latency transport is now available. But this logic has a weird edge case: immediately after sending a message via a higher-latency transport, the message can be sent via a lower-latency transport, as intended. But as the ETA of the first copy approaches, the message stops being sendable via the lower-latency transport.
This edge case is unlikely to matter when the lower latency is a tiny fraction of the higher latency (eg 30 seconds for Tor vs 28 days for removable drives). But it may become important when the lower latency is a significant fraction of the higher latency (eg 14 days for mailboxes vs 28 days for removable drives).
To remove the edge case we should store the max latency of the transport rather than the ETA, and allow the message to be retransmitted if either the send time has been reached (as now), or if the max latency of the currently available transport is less than the max latency of the transport used for the previous copy. This will require a DB migration.MailboxDaniel LublinDaniel Lublinhttps://code.briarproject.org/briar/briar/-/issues/2261Include mailbox API version in local and remote mailbox properties2022-05-16T13:59:41ZakwizgranInclude mailbox API version in local and remote mailbox propertiesDepends on https://code.briarproject.org/briar/briar/-/issues/2298Depends on https://code.briarproject.org/briar/briar/-/issues/2298Mailbox: Sync mailbox propertiesDaniel LublinDaniel Lublinhttps://code.briarproject.org/briar/public-mesh-research/-/issues/7Initial investigations: Bluetooth LE2023-08-28T16:08:02ZakwizgranInitial investigations: Bluetooth LESubtask of #1. Related to briar#28, briar#303, briar#1147, briar#1546.
Investigate BLE advertising and scanning (including larger advertisement packets in BT 5), L2CAP connections, and coded PHY.
https://www.bluetooth.com/wp-content/up...Subtask of #1. Related to briar#28, briar#303, briar#1147, briar#1546.
Investigate BLE advertising and scanning (including larger advertisement packets in BT 5), L2CAP connections, and coded PHY.
https://www.bluetooth.com/wp-content/uploads/2022/05/Bluetooth_LE_Primer_Paper.pdfPublic mesh researchakwizgranakwizgran