briar merge requestshttps://code.briarproject.org/briar/briar/-/merge_requests2022-06-22T17:45:52Zhttps://code.briarproject.org/briar/briar/-/merge_requests/1667Adapt Xiaomi power setup for MIUI 12.52022-06-22T17:45:52ZakwizgranAdapt Xiaomi power setup for MIUI 12.5Closes #2157, #2158Closes #2157, #2158https://code.briarproject.org/briar/briar/-/merge_requests/1602Catch exception in Huawei power management setup2022-06-10T13:07:06ZakwizgranCatch exception in Huawei power management setupThis branch tries to open either of two activities for Huawei power management setup. If both activities throw exceptions then a toast is shown and the user is allowed to continue with setup.
Closes #2270This branch tries to open either of two activities for Huawei power management setup. If both activities throw exceptions then a toast is shown and the user is allowed to continue with setup.
Closes #2270Android 1.4https://code.briarproject.org/briar/briar/-/merge_requests/1451Show instructions for locking Briar to the Xiaomi recent apps list2021-05-31T13:38:44ZakwizgranShow instructions for locking Briar to the Xiaomi recent apps listThis branch adds a button to the setup screen showing instructions for locking Briar to the recent apps list on Xiaomi/Redmi phones.
The ability to lock apps to the recent apps list has existed [since MIUI 6](https://www.webcazine.com/1...This branch adds a button to the setup screen showing instructions for locking Briar to the recent apps list on Xiaomi/Redmi phones.
The ability to lock apps to the recent apps list has existed [since MIUI 6](https://www.webcazine.com/15313/miui-6-how-to-remove-the-lock-icon-on-an-app-in-task-manager/) (released in [2014](https://en.wikipedia.org/wiki/MIUI#Version_history)) and perhaps earlier. [Since MIUI 10](https://www.webcazine.com/forums/updated-my-mi-phone-to-miui-10-now-how-do-i-lock-an-app-in-recent-view/), locking is done by long-pressing on the app rather that swiping down, so the instructions depend on the MIUI version, which is independent from the Android version and has to be looked up using a system property.
I've only tested this branch on one phone, the Redmi Note 7 (MIUI 12). It's possible that the system property holding the MIUI version is missing or has a different format on other devices. If we can't parse the system property we default to showing the instructions for MIUI < 10.
It's possible that some users are running MIUI < 6 on Android 4. I haven't been able to find out whether the lock feature exists on MIUI < 6. Checking the system property for a version < 6 doesn't seem very useful, as we don't know if the system property exists on those versions. So users running those versions may see instructions that don't apply to their device, but they can still continue with setup.
Closes #2009
![device-2021-05-05-130002](/uploads/1889610cc2c0833716b07a4314e70934/device-2021-05-05-130002.png) ![device-2021-05-05-130017](/uploads/533a8c7eb33bb044768d3bf65f823977/device-2021-05-05-130017.png)Adapt to changes in the Android platformhttps://code.briarproject.org/briar/briar/-/merge_requests/1441Add button for opening Huawei battery settings during setup2021-04-23T13:54:56ZakwizgranAdd button for opening Huawei battery settings during setupThis branch adds a button to the power management setup screen for Huawei devices running EMUI 8 or higher. The button opens the battery section of the system settings, as we can't open the App Launch screen directly.
I've tested the br...This branch adds a button to the power management setup screen for Huawei devices running EMUI 8 or higher. The button opens the battery section of the system settings, as we can't open the App Launch screen directly.
I've tested the branch on devices running EMUI 9 and 10. I don't have a device running EMUI 8, but [this Huawei Community post](https://consumer.huawei.com/en/community/details/%5BBattery-Tips%5D-Understanding-Huawei%26apos%3Bs-App-Launch/topicId_3858/) says that the App Launch screen exists on EMUI 8.
Part of #1743Adapt to changes in the Android platformhttps://code.briarproject.org/briar/briar/-/merge_requests/1277Add connections screen with information about transports2020-09-04T12:27:53ZakwizgranAdd connections screen with information about transportsThis branch adds a new "Connections" screen that's launched by tapping on the transport indicators in the nav drawer. The new screen shows information about the status of the transports and has toggles for enabling/disabling the transpor...This branch adds a new "Connections" screen that's launched by tapping on the transport indicators in the nav drawer. The new screen shows information about the status of the transports and has toggles for enabling/disabling the transports. An onboarding tap target is shown the first time the user opens the nav drawer.
![device-2020-08-14-153141](/uploads/28cee460b940a3c0edb5f9e380879b35/device-2020-08-14-153141.webm)
The short-term changes proposed in https://code.briarproject.org/briar/briar/-/issues/1748#note_41539 have been implemented:
* A single clickable area covers all three transport indicators, to avoid confusion about why they all lead to the same screen
* A summary has been added to the Tor toggle, with the same text as the summary in the settings screen
* The settings icon in the toolbar has been replaced with a help icon that shows a short explanation
![device-2020-08-14-152825](/uploads/1d4f261531a0e2177e858b8f21312803/device-2020-08-14-152825.webm)
![device-2020-08-14-152745](/uploads/86241f7e176347549f59e88cd9aeb3b6/device-2020-08-14-152745.png)
![device-2020-08-14-152753](/uploads/989b59a471b177d376fc1b18b9d4e0fe/device-2020-08-14-152753.png)
I'll open separate tickets for the long-term changes.
Closes #185https://code.briarproject.org/briar/briar/-/merge_requests/1271Hold a wake lock during app startup and shutdown2020-08-13T15:33:11ZakwizgranHold a wake lock during app startup and shutdownThis branch holds wake locks during application startup and shutdown. This ensures that when the user signs in, we schedule any wakeful tasks (such as polling) before the device goes to sleep, and when the user signs out or hits a panic ...This branch holds wake locks during application startup and shutdown. This ensures that when the user signs in, we schedule any wakeful tasks (such as polling) before the device goes to sleep, and when the user signs out or hits a panic button, we finish signing out before the device goes to sleep.
Sixth part of #1142https://code.briarproject.org/briar/briar/-/merge_requests/1267Share a single wake lock among all holders2020-08-12T16:03:48ZakwizgranShare a single wake lock among all holdersThis branch refactors the use of Android wake locks so all holders share a single OS wake lock. Each holder accesses the shared wake lock through an idempotent acquire/release interface. This will be useful later when we have lots of sho...This branch refactors the use of Android wake locks so all holders share a single OS wake lock. Each holder accesses the shared wake lock through an idempotent acquire/release interface. This will be useful later when we have lots of short-lived locks with overlapping lifetimes.
The branch also refactors the creation of Bluetooth connections, adding a factory so we don't have to pass all the dependencies for connections via the plugin and plugin factory constructors.
Second part of #1142https://code.briarproject.org/briar/briar/-/merge_requests/1268Hold a wake lock while running scheduled tasks2020-08-12T16:03:39ZakwizgranHold a wake lock while running scheduled tasksThis branch acquires a wake lock when checking for scheduled tasks for run, and holds it until the tasks have run. The TaskScheduler rather than the caller becomes responsible for submitting tasks to the executors on which they run. This...This branch acquires a wake lock when checking for scheduled tasks for run, and holds it until the tasks have run. The TaskScheduler rather than the caller becomes responsible for submitting tasks to the executors on which they run. This allows the scheduler to manage the wake lock on the caller's behalf.
The wake lock factory becomes a wake lock manager, with a couple of helper methods for doing work while holding wake locks.
The branch also adds a tag to AndroidWakeLock, which is used for logging. The tag of the underlying OS wake lock is unaffected.
Third part of #1142https://code.briarproject.org/briar/briar/-/merge_requests/1269Hold a wake lock while polling2020-08-12T15:59:21ZakwizgranHold a wake lock while pollingThis branch adds a "wakeful IO executor" that can be used to run IO tasks while holding a wake lock. Plugins use the executor for asynchronous polling tasks so that we can continue to poll contacts in parallel as we did before.
Most of ...This branch adds a "wakeful IO executor" that can be used to run IO tasks while holding a wake lock. Plugins use the executor for asynchronous polling tasks so that we can continue to poll contacts in parallel as we did before.
Most of this MR is constructor churn. The next MR will use injection to reduce the constructor churn caused by future changes.
Fourth part of #1142https://code.briarproject.org/briar/briar/-/merge_requests/1270Use injection to create plugin factories2020-08-12T15:46:04ZakwizgranUse injection to create plugin factoriesThis branch refactors the plugin factories to use dependency injection, so that when a plugin's dependencies change we don't have to pass them through quite so many layers of constructors.
Plugins that received a Context (meant to be ...This branch refactors the plugin factories to use dependency injection, so that when a plugin's dependencies change we don't have to pass them through quite so many layers of constructors.
Plugins that received a Context (meant to be the application context) now receive an Application instead. Application implements Context so this shouldn't make a difference.
The only functional change is that the Tor directory is now created at injection time, rather than at plugin creation time. But since the plugin creates the directory if necessary when the plugin's started, this shouldn't make a difference. (I've tested this with a fresh account and an existing account.)
Fifth part of #1142https://code.briarproject.org/briar/briar/-/merge_requests/1266Use TaskScheduler for scheduling tasks2020-08-10T10:36:59ZakwizgranUse TaskScheduler for scheduling tasksThis branch adds a TaskScheduler interface, which replaces most uses of ScheduledExecutorService for scheduling tasks. The default implementation delegates to a ScheduledExecutorService. The Android implementation uses a combination of a...This branch adds a TaskScheduler interface, which replaces most uses of ScheduledExecutorService for scheduling tasks. The default implementation delegates to a ScheduledExecutorService. The Android implementation uses a combination of a periodic ticker that runs every 10 seconds when the device is awake, and an alarm that fires approximately every 15 minutes whether awake, asleep or dozing.
Later MRs will add wake locks to ensure that tasks aren't interrupted by sleep or doze.
First part of #1142https://code.briarproject.org/briar/briar/-/merge_requests/1077Use an appropriate wake lock tag for the device2019-04-06T14:18:18ZakwizgranUse an appropriate wake lock tag for the deviceTested on the following devices to ensure there's no regression for Huawei devices:
* Nokia 3.1 (Android 8.1)
* Huawei Honor 8A (Android 9.0)
* Huawei P8 Lite 2017 (Android 7.0)
* Huawei P8 Lite 2015 (Android 5.0.1)
* Huawei Ascend Y330 ...Tested on the following devices to ensure there's no regression for Huawei devices:
* Nokia 3.1 (Android 8.1)
* Huawei Honor 8A (Android 9.0)
* Huawei P8 Lite 2017 (Android 7.0)
* Huawei P8 Lite 2015 (Android 5.0.1)
* Huawei Ascend Y330 (Android 4.4.2)
Closes #1504https://code.briarproject.org/briar/briar/-/merge_requests/1041Add FOREGROUND_SERVICE permission (needed when targeting higher API level)2019-02-21T10:30:11ZTorsten GroteAdd FOREGROUND_SERVICE permission (needed when targeting higher API level)Part of #1497Part of #1497Android 1.1https://code.briarproject.org/briar/briar/-/merge_requests/1032Add a setting to disable Tor when running on battery2019-02-06T14:46:34ZTorsten GroteAdd a setting to disable Tor when running on batteryCloses #978Closes #978Android 1.1