briar issueshttps://code.briarproject.org/groups/briar/-/issues2023-03-15T13:04:32Zhttps://code.briarproject.org/briar/briar/-/issues/2Allow existing contacts to be re-added2023-03-15T13:04:32ZakwizgranAllow existing contacts to be re-addedRe-adding an existing contact currently throws a ContactExistsException. But re-adding a contact may be necessary if transport properties get out of sync, making it impossible to connect via BTP. If we re-add a contact we should keep any...Re-adding an existing contact currently throws a ContactExistsException. But re-adding a contact may be necessary if transport properties get out of sync, making it impossible to connect via BTP. If we re-add a contact we should keep any existing private messages and group subscriptions.
If one contact uses the same identity as last time and the other doesn't, they'll disagree about whether it's a re-add, so we can't re-derive the same transport keys. Can we reuse the contact ID (if any), import the new transport properties, delete the old transport keys (if any), and create new transport keys?https://code.briarproject.org/briar/briar/-/issues/689Line breaks entered in blog posts aren't displayed2022-11-23T14:44:51ZakwizgranLine breaks entered in blog posts aren't displayedWhen writing a blog post, I can use the enter key to create line breaks that are shown in the composition window. But they aren't shown when the blog post appears in the feed (presumably because it's rendered as HTML).When writing a blog post, I can use the enter key to create line breaks that are shown in the composition window. But they aren't shown when the blog post appears in the feed (presumably because it's rendered as HTML).https://code.briarproject.org/briar/briar/-/issues/9Support copy and paste2022-10-27T21:53:59ZakwizgranSupport copy and pastehttps://code.briarproject.org/briar/briar/-/issues/1696Crash when trying to load key from keystore2022-06-13T15:00:45ZakwizgranCrash when trying to load key from keystoreI got the following crash while signing into an existing account on the API 26 emulator:
```
java.lang.RuntimeException: java.security.UnrecoverableKeyException: Failed to obtain information about key
at org.briarproject.bri...I got the following crash while signing into an existing account on the API 26 emulator:
```
java.lang.RuntimeException: java.security.UnrecoverableKeyException: Failed to obtain information about key
at org.briarproject.briar.android.AndroidKeyStrengthener.isInitialised(AndroidKeyStrengthener.java:83)
at org.briarproject.bramble.crypto.CryptoComponentImpl.decryptWithPassword(CryptoComponentImpl.java:397)
at org.briarproject.bramble.account.AccountManagerImpl.loadAndDecryptDatabaseKey(AccountManagerImpl.java:215)
at org.briarproject.bramble.account.AccountManagerImpl.signIn(AccountManagerImpl.java:198)
at org.briarproject.briar.android.login.StartupViewModel.lambda$validatePassword$0$StartupViewModel(StartupViewModel.java:108)
at org.briarproject.briar.android.login.-$$Lambda$StartupViewModel$g7VDyWGXbuZadVRd8U1dRkICyWk.run(Unknown Source:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.security.UnrecoverableKeyException: Failed to obtain information about key
at android.security.keystore.AndroidKeyStoreProvider.loadAndroidKeyStoreSecretKeyFromKeystore(AndroidKeyStoreProvider.java:282)
at android.security.keystore.AndroidKeyStoreSpi.engineGetKey(AndroidKeyStoreSpi.java:98)
at java.security.KeyStoreSpi.engineGetEntry(KeyStoreSpi.java:474)
at java.security.KeyStore.getEntry(KeyStore.java:1560)
at org.briarproject.briar.android.AndroidKeyStrengthener.isInitialised(AndroidKeyStrengthener.java:75)
at org.briarproject.bramble.crypto.CryptoComponentImpl.decryptWithPassword(CryptoComponentImpl.java:397)
at org.briarproject.bramble.account.AccountManagerImpl.loadAndDecryptDatabaseKey(AccountManagerImpl.java:215)
at org.briarproject.bramble.account.AccountManagerImpl.signIn(AccountManagerImpl.java:198)
at org.briarproject.briar.android.login.StartupViewModel.lambda$validatePassword$0$StartupViewModel(StartupViewModel.java:108)
at org.briarproject.briar.android.login.-$$Lambda$StartupViewModel$g7VDyWGXbuZadVRd8U1dRkICyWk.run(Unknown Source:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: android.security.KeyStoreException: Invalid key blob
at android.security.KeyStore.getKeyStoreException(KeyStore.java:695)
at android.security.keystore.AndroidKeyStoreProvider.loadAndroidKeyStoreSecretKeyFromKeystore(AndroidKeyStoreProvider.java:283)
at android.security.keystore.AndroidKeyStoreSpi.engineGetKey(AndroidKeyStoreSpi.java:98)
at java.security.KeyStoreSpi.engineGetEntry(KeyStoreSpi.java:474)
at java.security.KeyStore.getEntry(KeyStore.java:1560)
at org.briarproject.briar.android.AndroidKeyStrengthener.isInitialised(AndroidKeyStrengthener.java:75)
at org.briarproject.bramble.crypto.CryptoComponentImpl.decryptWithPassword(CryptoComponentImpl.java:397)
at org.briarproject.bramble.account.AccountManagerImpl.loadAndDecryptDatabaseKey(AccountManagerImpl.java:215)
at org.briarproject.bramble.account.AccountManagerImpl.signIn(AccountManagerImpl.java:198)
at org.briarproject.briar.android.login.StartupViewModel.lambda$validatePassword$0$StartupViewModel(StartupViewModel.java:108)
at org.briarproject.briar.android.login.-$$Lambda$StartupViewModel$g7VDyWGXbuZadVRd8U1dRkICyWk.run(Unknown Source:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
```
Looks like we can get a GeneralSecurityException instead of a clean failure when trying to load the key. We should handle this like a clean failure instead of crashing.https://code.briarproject.org/briar/briar/-/issues/2312Briar fails to start if clock was unreasonably wrong on first run2022-05-11T14:23:37ZakwizgranBriar fails to start if clock was unreasonably wrong on first runSteps to reproduce:
* If a Briar account exists, delete it
* Set the system clock to a date before 1 Jan 2021
* Launch Briar and create an account
* Briar will show the startup failure screen due to the clock being wrong
* Set the system...Steps to reproduce:
* If a Briar account exists, delete it
* Set the system clock to a date before 1 Jan 2021
* Launch Briar and create an account
* Briar will show the startup failure screen due to the clock being wrong
* Set the system clock to the right date
* Launch Briar again
* The password screen will be shown
* Enter the password
* Briar will show the startup failure screen, saying the database is corrupt
Log snippet from the second run (after correcting the clock):
```
2022-04-27 08:54:55.872 22506-22542/org.briarproject.briar.android.debug I/H2Database: Contents of account directory before opening DB:
2022-04-27 08:54:55.872 22506-22542/org.briarproject.briar.android.debug I/H2Database: D /data/data/org.briarproject.briar.android.debug 4096
2022-04-27 08:54:55.872 22506-22542/org.briarproject.briar.android.debug I/H2Database: D /data/data/org.briarproject.briar.android.debug/lib 4096
2022-04-27 08:54:55.882 22506-22542/org.briarproject.briar.android.debug I/H2Database: F /data/data/org.briarproject.briar.android.debug/lib/libobfs4proxy.so 6481961
2022-04-27 08:54:55.882 22506-22542/org.briarproject.briar.android.debug I/H2Database: F /data/data/org.briarproject.briar.android.debug/lib/libtor.so 5957620
2022-04-27 08:54:55.882 22506-22542/org.briarproject.briar.android.debug I/H2Database: D /data/data/org.briarproject.briar.android.debug/cache 4096
2022-04-27 08:54:55.882 22506-22542/org.briarproject.briar.android.debug I/H2Database: D /data/data/org.briarproject.briar.android.debug/cache/com.android.renderscript.cache 4096
2022-04-27 08:54:55.882 22506-22542/org.briarproject.briar.android.debug I/H2Database: D /data/data/org.briarproject.briar.android.debug/shared_prefs 4096
2022-04-27 08:54:55.892 22506-22542/org.briarproject.briar.android.debug I/H2Database: F /data/data/org.briarproject.briar.android.debug/shared_prefs/org.briarproject.briar.android.debug_preferences.xml 115
2022-04-27 08:54:55.892 22506-22542/org.briarproject.briar.android.debug I/H2Database: F /data/data/org.briarproject.briar.android.debug/shared_prefs/_has_set_default_values.xml 126
2022-04-27 08:54:55.892 22506-22542/org.briarproject.briar.android.debug I/H2Database: F /data/data/org.briarproject.briar.android.debug/shared_prefs/db.xml 65
2022-04-27 08:54:55.892 22506-22542/org.briarproject.briar.android.debug I/H2Database: D /data/data/org.briarproject.briar.android.debug/app_key 4096
2022-04-27 08:54:55.892 22506-22542/org.briarproject.briar.android.debug I/H2Database: F /data/data/org.briarproject.briar.android.debug/app_key/db.key.bak 218
2022-04-27 08:54:55.892 22506-22542/org.briarproject.briar.android.debug I/H2Database: F /data/data/org.briarproject.briar.android.debug/app_key/db.key 218
2022-04-27 08:54:55.902 22506-22542/org.briarproject.briar.android.debug I/H2Database: D /data/data/org.briarproject.briar.android.debug/app_db 4096
2022-04-27 08:54:55.902 22506-22542/org.briarproject.briar.android.debug I/H2Database: D /data/data/org.briarproject.briar.android.debug/app_tor 4096
2022-04-27 08:54:55.902 22506-22542/org.briarproject.briar.android.debug I/H2Database: Reopening DB: false
```
Stacktrace:
```
2022-04-27 08:55:00.046 22506-22542/org.briarproject.briar.android.debug W/LifecycleManagerImpl: org.briarproject.bramble.api.db.DbException
org.briarproject.bramble.api.db.DbException
at org.briarproject.bramble.identity.IdentityManagerImpl.loadIdentityWithKeyPair(IdentityManagerImpl.java:159)
at org.briarproject.bramble.identity.IdentityManagerImpl.getCachedIdentity(IdentityManagerImpl.java:147)
at org.briarproject.bramble.identity.IdentityManagerImpl.onDatabaseOpened(IdentityManagerImpl.java:95)
at org.briarproject.bramble.lifecycle.LifecycleManagerImpl.lambda$startServices$0(LifecycleManagerImpl.java:129)
at org.briarproject.bramble.lifecycle.LifecycleManagerImpl.$r8$lambda$R30tTgoiROvN8ROsUbPogFK9rjY(LifecycleManagerImpl.java)
at org.briarproject.bramble.lifecycle.LifecycleManagerImpl$$ExternalSyntheticLambda0.run(Unknown Source)
at org.briarproject.bramble.db.DatabaseComponentImpl.transaction(DatabaseComponentImpl.java:200)
at org.briarproject.bramble.lifecycle.LifecycleManagerImpl.startServices(LifecycleManagerImpl.java:123)
at org.briarproject.briar.android.BriarService.lambda$onCreate$0(BriarService.java:141)
at org.briarproject.briar.android.BriarService.$r8$lambda$HDU85pNkqbcIvjlH9WM8JDDv2bo(BriarService.java)
at org.briarproject.briar.android.BriarService$$ExternalSyntheticLambda5.run(Unknown Source)
at org.briarproject.bramble.system.AndroidWakeLockManagerImpl.lambda$executeWakefully$1(AndroidWakeLockManagerImpl.java:95)
at org.briarproject.bramble.system.AndroidWakeLockManagerImpl.$r8$lambda$HU3N-m0ADiLNH1gKAKkCiyTw2fM(AndroidWakeLockManagerImpl.java)
at org.briarproject.bramble.system.AndroidWakeLockManagerImpl$$ExternalSyntheticLambda0.run(Unknown Source)
at java.lang.Thread.run(Thread.java:856)
```
It looks like the DB key was saved on the first run but the DB wasn't created. On the second run we assumed an identity had already been created so we didn't store one, and then we got an exception when trying to load an identity from the newly created DB.Android 1.4https://code.briarproject.org/briar/briar/-/issues/1147Support Bluetooth discovery for adding contacts2022-01-26T13:50:35ZakwizgranSupport Bluetooth discovery for adding contactsThe local Bluetooth address is no longer available on the Nexus 5X running Android 8.1. `BluetoothAdapter#getAddress()` returns the fake address 02:00:00:00:00:00, and `Settings.Secure.getString(ctx, "bluetooth_address")` returns null.
...The local Bluetooth address is no longer available on the Nexus 5X running Android 8.1. `BluetoothAdapter#getAddress()` returns the fake address 02:00:00:00:00:00, and `Settings.Secure.getString(ctx, "bluetooth_address")` returns null.
This means we can no longer include our Bluetooth address in the QR code when adding a contact. Instead we'll need to make the device temporarily discoverable, and indicate in the QR code that the contact should use discovery to find us. The contact will need the ACCESS_COARSE_LOCATION permission for discovery.
The contact will need to store our Bluetooth address for future connection attempts. We don't currently have a way for plugins to store local per-contact information, but we can add one.https://code.briarproject.org/briar/briar/-/issues/62Reduce information leaked by polling2022-01-26T13:47:24ZakwizgranReduce information leaked by pollingPolling for connections to contacts may reveal the number of contacts and their identities to a local observer. For example, anyone monitoring Bluetooth traffic near a Briar device will see periodic bursts of connection attempts from the...Polling for connections to contacts may reveal the number of contacts and their identities to a local observer. For example, anyone monitoring Bluetooth traffic near a Briar device will see periodic bursts of connection attempts from the device's MAC address to certain other MAC addresses. The observer will learn how many contacts the device has, and if the observer knows who owns any of the other MAC addresses then contact relationships will be revealed.
There are several techniques we can use to reduce information leaks.
1) Poll at random intervals
Instead of polling all contacts at regular intervals, poll each contact at exponentially distributed intervals.
This should reduce the information about contacts leaked to a local observer. The shorter the observation period, the less likely it is that connection attempts to all contacts will be observed.
2) Don't poll unreachable contacts
Plugins should store contextual information to help them decide which contacts may be reachable, and contacts who are unreachable should not be polled. Contacts who are rarely reachable via a given transport may be polled less frequently.
3) Don't poll at all
Polling probably contributes to Briar's battery and bandwidth consumption, and for short-range transports it may not be the most efficient way of connecting to nearby contacts. The user knows when contacts are nearby, and may be able to connect to them more quickly by triggering a scan manually than by waiting for the next poll.
To reduce the amount of information leaked by a manual or automatic scan, the scan should detect nearby contacts and then try to connect to any that are nearby, as opposed to the current approach of trying to connect to all contacts. The rationale for the current approach is that we can't make an Android device permanently discoverable via Bluetooth, and making the device temporarily discoverable requires confirmation from the user each time. But if the scan is triggered manually, user confirmation may be acceptable. It may be possible to make a device permanently discoverable via Bluetooth LE or Wi-Fi Direct, in which case we could scan multiple transports with a single manual trigger.https://code.briarproject.org/briar/briar/-/issues/1003RSS feeds served by Cloudflare fail to import due to captcha page2021-11-24T17:04:00ZakwizgranRSS feeds served by Cloudflare fail to import due to captcha pageA user reported that the following feed fails to import: https://blog.fefe.de/rss.xml
A quick test confirms that there's no error message, but no posts appear. The RSS feed appears in the list of feeds, with the expected title. Maybe th...A user reported that the following feed fails to import: https://blog.fefe.de/rss.xml
A quick test confirms that there's no error message, but no posts appear. The RSS feed appears in the list of feeds, with the expected title. Maybe there's an issue with parsing the feed? The items have no dates.
(Note: The issue of feeds without dates has been moved to #1708.)https://code.briarproject.org/briar/briar/-/issues/1674NPE in ContactListFragment2021-11-04T11:03:44ZakwizgranNPE in ContactListFragment* Android version: 10
* Phone model: Google Pixel 2 XL (taimen)
* Briar version: 1.2.4 (75dfa80)
* User feedback: "Opened the app after many messages were sent."
Stacktrace:
```
java.lang.NullPointerException: Attempt to read from field...* Android version: 10
* Phone model: Google Pixel 2 XL (taimen)
* Briar version: 1.2.4 (75dfa80)
* User feedback: "Opened the app after many messages were sent."
Stacktrace:
```
java.lang.NullPointerException: Attempt to read from field 'android.widget.ImageView org.briarproject.briar.android.contact.ContactItemViewHolder.avatar' on a null object reference
at org.briarproject.briar.android.contact.ContactListFragment.lambda$onCreateView$0$ContactListFragment(ContactListFragment.java:140)
at org.briarproject.briar.android.contact.-$$Lambda$ContactListFragment$DvpyzIeg2gO44NHGy22U4l_irhw.onItemClick(Unknown Source:4)
at org.briarproject.briar.android.contact.ContactItemViewHolder.lambda$bind$0$ContactItemViewHolder(ContactItemViewHolder.java:58)
at org.briarproject.briar.android.contact.-$$Lambda$ContactItemViewHolder$M1B1WNtK1OEXOZpZndUVONB779k.onClick(Unknown Source:6)
at android.view.View.performClick(View.java:7140)
at android.view.View.performClickInternal(View.java:7117)
at android.view.View.access$3500(View.java:801)
at android.view.View$PerformClick.run(View.java:27351)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
```
Edited log:
```
11-26 19:32:16.943 I/AndroidNetworkManager: Received broadcast android.intent.action.SCREEN_OFF
11-26 19:32:25.628 I/BaseActivity: Starting ConversationActivity
11-26 19:32:25.674 I/BaseActivity: Starting UnlockActivity
11-26 19:32:25.697 I/BaseActivity: Stopping UnlockActivity
11-26 19:32:25.698 I/BaseActivity: Stopping ConversationActivity
11-26 19:32:25.751 I/BaseActivity: Starting UnlockActivity
11-26 19:32:25.776 I/AndroidNetworkManager: Received broadcast android.intent.action.SCREEN_ON
11-26 19:32:25.997 I/BaseActivity: Starting NavDrawerActivity
11-26 19:32:26.025 I/BaseActivity: Starting UnlockActivity
11-26 19:32:26.103 I/BaseActivity: Stopping NavDrawerActivity
11-26 19:32:26.207 I/BaseActivity: Stopping UnlockActivity
11-26 19:32:26.830 I/BaseActivity: Starting NavDrawerActivity
11-26 19:32:27.387 I/BaseActivity: Stopping UnlockActivity
11-26 19:32:29.054 I/ConversationActivity: Eagerly loading text for latest message
11-26 19:32:29.108 I/ContactListFragment: Concurrent update, reloading
11-26 19:32:30.076 I/ContactListFragment: Conversation message received, updating item
```
There are some odd things about this log:
1. ConversationActivity and UnlockActivity seem to be started while the screen is off. I'm guessing this isn't really the case, it's just that the SCREEN_ON broadcast was received a while after the screen was actually turned on.
2. ConversationActivity is stopped at 19:32:25 and not subsequently started. But at 19:32:29 it eagerly loads the text for a new message.
* It shouldn't be doing any work while stopped.
* If we show the contact list after unlocking then we should clear the stack down to the existing instance of NavDrawerActivity, if any, which should destroy any existing instance of ConversationActivity.
3. A message arrives while ContactListFragment is loading the contact list, which presumably started at 19:32:26 when NavDrawerActivity was started. This causes ContactListFragment to reload the contact list. It's not clear whether the reload has completed before we try to update the item, triggering the crash.Android 1.4https://code.briarproject.org/briar/briar/-/issues/834Optionally sign out when battery is low or power saving mode is enabled2021-10-27T14:09:40ZakwizgranOptionally sign out when battery is low or power saving mode is enabledListen for power manager events (ACTION_BATTERY_LOW, ACTION_POWER_SAVE_MODE_CHANGED) and [manufacturer-specific events](http://stackoverflow.com/a/25103642) and optionally sign out if the battery is low or power saving mode is enabled an...Listen for power manager events (ACTION_BATTERY_LOW, ACTION_POWER_SAVE_MODE_CHANGED) and [manufacturer-specific events](http://stackoverflow.com/a/25103642) and optionally sign out if the battery is low or power saving mode is enabled and the user's not currently interacting with Briar.https://code.briarproject.org/briar/briar/-/issues/780Temporarily leaked Activities on orientation changes2021-04-26T14:01:29ZErnir ErlingssonTemporarily leaked Activities on orientation changesWhile working on #725, I noticed something: we're leaking Activities temporarily.
We are using anonymous inner classes as callbacks for asynchronous tasks, during their execution it's possible that an orientation change occurs that des...While working on #725, I noticed something: we're leaking Activities temporarily.
We are using anonymous inner classes as callbacks for asynchronous tasks, during their execution it's possible that an orientation change occurs that destroys the old Activity/Fragment. The task stores a reference to the callback, and therefore implicitly to the Activity. This means that the initial Activity will be kept alive until the task finishes execution. Multiple orientation changes will might result in multiple Activities being temporarily leaked, although !415 relieves some of that by ensuring there is only one leaked Activity maximum.
Not sure what the best course of action here is, we could try to handle the orientation changes ourselves which re-uses the initial Activity but will require careful programming.
https://developer.android.com/guide/topics/resources/runtime-changes.html#HandlingTheChangehttps://code.briarproject.org/briar/briar/-/issues/1523RuntimeException: Camera is being used after Camera.release() was called2021-03-24T16:26:51ZakwizgranRuntimeException: Camera is being used after Camera.release() was called* Android version: 6.0.1
* Briar version: 1.1.5 (8f4c3c4)
* Phone models: Samsung GT-I9100 and GT-I9300 (m0xx)
* User feedback: "I could not scan other device. They could scan me. I have Replicant 6.003."
Stacktrace:
```
java.lang.Runti...* Android version: 6.0.1
* Briar version: 1.1.5 (8f4c3c4)
* Phone models: Samsung GT-I9100 and GT-I9300 (m0xx)
* User feedback: "I could not scan other device. They could scan me. I have Replicant 6.003."
Stacktrace:
```
java.lang.RuntimeException: Camera is being used after Camera.release() was called
at android.hardware.Camera.native_getParameters(Native Method)
at android.hardware.Camera.getParameters(Camera.java:1999)
at android.hardware.Camera$EventHandler.handleMessage(Camera.java:1152)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5461)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
```
We have four reports of this crash, one on the GT-I9100 (running Replicant) and three on the GT-I9300 (probably also running Replicant, as it's the same Android version as the GT-I9100, and the version's too high to be a factory ROM).
This looks like a Replicant bug: camera calls are being made asynchronously. I'll report it upstream. I'm not adding it to the current milestone as there doesn't seem to be anything we can do.https://code.briarproject.org/briar/briar-gtk/-/issues/48Reliably scroll down for new messages2021-01-23T13:40:26ZNicoReliably scroll down for new messagesAs of now, every time a new message arrives in a private chat the list should scroll down. This doesn't work reliably because the message needs to be rendered before adjustment has effects; the used `idle_add()` does not always work to w...As of now, every time a new message arrives in a private chat the list should scroll down. This doesn't work reliably because the message needs to be rendered before adjustment has effects; the used `idle_add()` does not always work to wait for the rendering.
This may become unnecessary with #40.GTK Nexthttps://code.briarproject.org/briar/briar/-/issues/753Listener interfaces have mixed responsibilities2021-01-20T12:34:20ZakwizgranListener interfaces have mixed responsibilitiesThe UI makes heavy use of listener interfaces that inherit from either DestroyableContext or BaseFragmentListener. These are used for various purposes:
* Callbacks from a controller to the UI (e.g. `TransportStateListener#stateUpdate()`...The UI makes heavy use of listener interfaces that inherit from either DestroyableContext or BaseFragmentListener. These are used for various purposes:
* Callbacks from a controller to the UI (e.g. `TransportStateListener#stateUpdate()`)
* Injecting dependencies into fragments (`BaseFragmentListener#getActivityComponent()`)
* Manipulating other parts of the UI (e.g. `CreateGroupListener#showSoftKeyboard()`)
* Running tasks (`DestroyableContext#runOnUiThreadUnlessDestroyed()`, `BaseFragmentListener#runOnDbThread()` (deprecated))
These different purposes would ideally be separated into different interfaces. Maybe it would clarify things if communication from controllers back to the UI used the "listener" name and communication between fragments and their activities used some other name.
Listeners are usually provided by casting an Activity or Context (passed to `ActivityLifecycleController#onActivityCreate()` or `Fragment#onAttach()`) to an arbitrary listener interface. This is a bit of a hack - it would be nice if we could provide listeners in a type-safe way, for example by injection.
Related to #752.https://code.briarproject.org/briar/briar/-/issues/22Build external dependencies from source2020-11-21T20:31:32ZakwizgranBuild external dependencies from sourceCreate a build script for building the external dependencies from source. Code should be cloned from git rather than bundled - create a repo on code.briarproject.org if no suitable upstream repo is available.
For Java libraries, ensure ...Create a build script for building the external dependencies from source. Code should be cloned from git rather than bundled - create a repo on code.briarproject.org if no suitable upstream repo is available.
For Java libraries, ensure the target version is set to 6 for Android compatibility.https://code.briarproject.org/briar/briar/-/issues/319Distinguish between transient, recoverable and permanent DB exceptions2020-11-21T19:08:20ZakwizgranDistinguish between transient, recoverable and permanent DB exceptionsThis would be useful for message delivery hooks and any other operation that should be retried if the failure is temporary, or cancelled if it's permanent.This would be useful for message delivery hooks and any other operation that should be retried if the failure is temporary, or cancelled if it's permanent.https://code.briarproject.org/briar/briar/-/issues/473Private messages: Notification for new message while message screen was open2020-11-21T18:43:10ZMegaloxPrivate messages: Notification for new message while message screen was openA tester noticed that he got a notification about a new message while the screen where this message appeared was open. He tapped the open message and the message screen reloaded.A tester noticed that he got a notification about a new message while the screen where this message appeared was open. He tapped the open message and the message screen reloaded.https://code.briarproject.org/briar/briar/-/issues/479High background data traffic2020-11-21T18:42:17ZMegaloxHigh background data trafficA tester complained that he had briar running over the weekend without communicating (briar mostly in the background) and had a data traffic of 20 MB (17 background, 3 foreground).A tester complained that he had briar running over the weekend without communicating (briar mostly in the background) and had a data traffic of 20 MB (17 background, 3 foreground).https://code.briarproject.org/briar/briar/-/issues/540Sync messages in dependency order2020-11-21T17:43:08ZakwizgranSync messages in dependency orderMessages should be synced in dependency order (i.e. dependencies before their dependents) so they can be delivered to the client as soon as possible.
This can be done by recording the dependency depth of each message in the DB. A messag...Messages should be synced in dependency order (i.e. dependencies before their dependents) so they can be delivered to the client as soon as possible.
This can be done by recording the dependency depth of each message in the DB. A message with no dependencies has a depth of 0. A message with dependencies has a depth one greater than the greatest depth of its dependencies.https://code.briarproject.org/briar/briar/-/issues/550Move timestamps from sync layer to client layer2020-11-21T17:40:50ZakwizgranMove timestamps from sync layer to client layerClients have different requirements for representing time: some don't need timestamps at all, some can use simple timestamps like we currently provide, and in future others may need more complex representations of time, incorporating tim...Clients have different requirements for representing time: some don't need timestamps at all, some can use simple timestamps like we currently provide, and in future others may need more complex representations of time, incorporating timezones, for example. Timestamps should be moved up to the client layer so each client can represent time in its own way.