briar issueshttps://code.briarproject.org/briar/briar/-/issues2018-06-12T11:32:19Zhttps://code.briarproject.org/briar/briar/-/issues/621NavDrawerActivity reads disk on UI thread, violating strict mode2018-06-12T11:32:19ZakwizgranNavDrawerActivity reads disk on UI thread, violating strict mode```
08-28 22:33:05.384 D/StrictMode(24991): StrictMode policy violation; ~duration=36 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=31 violation=2
08-28 22:33:05.384 D/StrictMode(24991): at android.os.StrictMode...```
08-28 22:33:05.384 D/StrictMode(24991): StrictMode policy violation; ~duration=36 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=31 violation=2
08-28 22:33:05.384 D/StrictMode(24991): at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1151)
08-28 22:33:05.384 D/StrictMode(24991): at android.app.SharedPreferencesImpl.awaitLoadedLocked(SharedPreferencesImpl.java:202)
08-28 22:33:05.384 D/StrictMode(24991): at android.app.SharedPreferencesImpl.getBoolean(SharedPreferencesImpl.java:259)
08-28 22:33:05.384 D/StrictMode(24991): at org.briarproject.android.NavDrawerActivity.welcomeMessageCheck(NavDrawerActivity.java:137)
08-28 22:33:05.384 D/StrictMode(24991): at org.briarproject.android.NavDrawerActivity.onCreate(NavDrawerActivity.java:124)
```Milestone FTorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/622Transactional database interface2018-06-12T11:32:19ZakwizgranTransactional database interfaceCurrently the DB is guarded by a read-write lock: read-only transactions acquire the read lock and read-write transactions acquire the write lock. This ensures that we never get lock timeouts from the DB, so clients don't need to worry a...Currently the DB is guarded by a read-write lock: read-only transactions acquire the read lock and read-write transactions acquire the write lock. This ensures that we never get lock timeouts from the DB, so clients don't need to worry about rolling back and retrying transactions if there's a lock timeout. However, if a transaction performs long-running work such as verifying a signature, other transactions are prevented from accessing the database in the meantime.
We can avoid this by creating a transactional interface to the database, which encapsulates each transaction in a task object. Users of the database submit tasks, and the database is responsible for rolling back and retrying any tasks that time out. This allows us to remove the global read-write lock.
```
interface TransactionTask {
boolean run(Transaction txn) throws DbException;
}
```
The task's `run()` method performs DB operations using the provided transaction and returns true if the transaction should be committed or false if it should be aborted. If the `run()` method throws an exception, the transaction is aborted.
The DB has a method for running database tasks:
```
boolean runTask(TransactionTask task) throws DbException;
```
The database's `runTask()` method starts a transaction, passes it to the task, and commits or aborts it as required. The method returns true if the transaction was committed, false if it was aborted, or rethrows an exception thrown by the task.
We can remove the DB's `startTransaction()` and `endTransaction()` methods, along with the transaction's `setComplete()` method, since the DB itself will handle starting, committing and aborting transactions. It will no longer be necessary to specify whether a transaction is read-only or read-write.
Depends on #319.https://code.briarproject.org/briar/briar/-/issues/623Clean up progress bar handling in BlogActivity2018-06-12T11:32:19ZakwizgranClean up progress bar handling in BlogActivityBlogActivity uses a ViewPager with two FragmentStatePagerAdapters, one of which contains a single BlogFragment (which in turn contains its own RecyclerView adapter) and the other a series of BlogPostFragments. The two adapters allow the ...BlogActivity uses a ViewPager with two FragmentStatePagerAdapters, one of which contains a single BlogFragment (which in turn contains its own RecyclerView adapter) and the other a series of BlogPostFragments. The two adapters allow the blog to be viewed either as a feed or one post at a time.
The BlogFragment uses the RecyclerView's progress bar, whereas the BlogPostFragments rely on a progress bar in the BlogActivity. This complicates the interaction between the components and leads to a small bug when the BlogPostFragments are loading their posts: the progress bar is hidden when the first fragment finishes loading, even if the currently visible fragment is still loading.
Clean this up by moving the progress bar into the BlogPostFragment.
We should investigate other code that uses `BaseFragmentListener#show/hideLoadingScreen()` for similar problems. We may be able to simplify the interaction between components by making each component responsible for showing its own progress bar.Milestone ETorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/625Avoid repeated author status lookups2018-06-12T11:32:19ZakwizgranAvoid repeated author status lookupsWhen loading all post headers in a forum or blog, the author status is looked up for each post individually. The number of lookups could be reduced, especially for blogs, by first creating a set of authors and then looking up each author...When loading all post headers in a forum or blog, the author status is looked up for each post individually. The number of lookups could be reduced, especially for blogs, by first creating a set of authors and then looking up each author's status once.Milestone ETorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/627Tests for Introduction Security Properties2018-06-12T11:32:19ZTorsten GroteTests for Introduction Security PropertiesWhen testing the introduction protocol, it makes sense to use a real MAC and signature, otherwise we're just testing that verification detects an invalid signature/MAC, rather than testing that modifying the response makes the signature/...When testing the introduction protocol, it makes sense to use a real MAC and signature, otherwise we're just testing that verification detects an invalid signature/MAC, rather than testing that modifying the response makes the signature/MAC invalid.
It would be good to have tests for the security properties we're trying to provide:
1. If the introducer replaces the ephemeral public key, transport properties and/or timestamp and doesn't modify the ack, the protocol is aborted because the MAC fails
2. If the introducer replaces the ephemeral public key (and optionally the transport properties and/or timestamp) and modifies the ack to use a nonce and MAC key that match the new ephemeral public key, the protocol is aborted because the signature is invalid
Milestone ETorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/630Introduction Protocol does not abort once in FINISHED state2018-06-12T11:32:19ZTorsten GroteIntroduction Protocol does not abort once in FINISHED stateWhile writing introduction protocol attacks for #627 I noticed that introducees do not handle `ABORT` messages once they are in the `FINISHED` state.
This can lead to a situation where the protocol is aborted by Bob due to an invalid MA...While writing introduction protocol attacks for #627 I noticed that introducees do not handle `ABORT` messages once they are in the `FINISHED` state.
This can lead to a situation where the protocol is aborted by Bob due to an invalid MAC, but Alice has not only added Bob already, but also notified the UI of the successful addition of Bob. Do we also forcefully remove a contact that has already been added *and* activated? If so, do we need to introduce a new event to inform the user about that.Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/632BadTokenException if RSS error dialog is show after activity is destroyed2018-06-12T11:32:19ZakwizgranBadTokenException if RSS error dialog is show after activity is destroyedI got this crash when trying to add an RSS feed with a mistyped hostname. I backed out of the feed import activity rather than waiting for the connection to fail, and the app tried to show the error dialog after the activity had been des...I got this crash when trying to add an RSS feed with a mistyped hostname. I backed out of the feed import activity rather than waiting for the connection to fail, and the app tried to show the error dialog after the activity had been destroyed.
```
09-01 22:49:07.851 15929-15929/org.briarproject E/ACRA: ACRA caught a BadTokenException for org.briarproject
android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@13b88199 is not valid; is your activity running?
at android.view.ViewRootImpl.setView(ViewRootImpl.java:579)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:282)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
at android.app.Dialog.show(Dialog.java:298)
at org.briarproject.android.blogs.RssFeedImportActivity$5.run(RssFeedImportActivity.java:172)
```Milestone ETorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/633Blog posts from other users sometimes have bold nicknames2018-06-12T11:32:19ZakwizgranBlog posts from other users sometimes have bold nicknamesThis is a screenshot from the Sony Xperia Tipo (nickname Sony, Moto is the nickname of a contact).
![device-2016-09-02-120010](/uploads/271d983a3dda8e15532f93bdf503db6a/device-2016-09-02-120010.png)This is a screenshot from the Sony Xperia Tipo (nickname Sony, Moto is the nickname of a contact).
![device-2016-09-02-120010](/uploads/271d983a3dda8e15532f93bdf503db6a/device-2016-09-02-120010.png)Milestone ETorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/634Blog title is not set when opening a blog by touching the author2018-06-12T11:32:19ZakwizgranBlog title is not set when opening a blog by touching the authorWhen navigating to a blog by touching the author, the title of the activity is "Briar" rather than the title of the blog.
![device-2016-09-02-120010](/uploads/c8b993bcfc6cf786f6c8ea9b86854518/device-2016-09-02-120010.png)When navigating to a blog by touching the author, the title of the activity is "Briar" rather than the title of the blog.
![device-2016-09-02-120010](/uploads/c8b993bcfc6cf786f6c8ea9b86854518/device-2016-09-02-120010.png)Milestone ETorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/635Touching the author of the currently open blog opens another copy2018-06-12T11:32:19ZakwizgranTouching the author of the currently open blog opens another copyTouching the author of the currently open blog opens another activity showing the same blog.
There are two ways we could handle this: replace the current activity if the author is the same, or replace the current activity in all cases (...Touching the author of the currently open blog opens another activity showing the same blog.
There are two ways we could handle this: replace the current activity if the author is the same, or replace the current activity in all cases (so that pressing the back button once takes us back to the combined feed, however many blogs we've browsed through). I can see arguments for either solution and I don't mind which one we choose.Milestone ETorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/636BlogPostFragment should use the same layout as the blog feed2018-06-12T11:32:19ZakwizgranBlogPostFragment should use the same layout as the blog feedBlogPostFragment's layout needs to be updated to handle reblogging and comments. Currently it shows the latest reblogger as the author of the post, and doesn't show comments.BlogPostFragment's layout needs to be updated to handle reblogging and comments. Currently it shows the latest reblogger as the author of the post, and doesn't show comments.Milestone ETorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/637Effect of touching a post is inconsistent2018-06-12T11:32:19ZakwizgranEffect of touching a post is inconsistent* In the combined feed, touching a post does nothing
* In the single blog feed, touching an ordinary post opens BlogPostFragment
* In the single blog feed, touching an imported RSS post does nothing (I know this sounds implausible, but t...* In the combined feed, touching a post does nothing
* In the single blog feed, touching an ordinary post opens BlogPostFragment
* In the single blog feed, touching an imported RSS post does nothing (I know this sounds implausible, but try it)Milestone ETorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/638IllegalStateException when navigating out of combined feed and back in2018-06-12T11:32:19ZakwizgranIllegalStateException when navigating out of combined feed and back inSteps to reproduce:
* Sign into Briar
* Open combined blog feed via nav drawer
* Return to contact list via back button
* Open combined blog feed via nav drawer
Apparently the controller instance is being reused, and it doesn't expect ...Steps to reproduce:
* Sign into Briar
* Open combined blog feed via nav drawer
* Return to contact list via back button
* Open combined blog feed via nav drawer
Apparently the controller instance is being reused, and it doesn't expect to have a new listener attached.
```
09-02 12:34:44.543 20694-20694/? E/ACRA: ACRA caught a IllegalStateException for org.briarproject
java.lang.IllegalStateException: Listener was already set
at org.briarproject.android.blogs.BaseControllerImpl.setOnBlogPostAddedListener(BaseControllerImpl.java:89)
at org.briarproject.android.blogs.FeedControllerImpl.setOnBlogPostAddedListener(FeedControllerImpl.java:20)
at org.briarproject.android.blogs.FeedFragment.injectFragment(FeedFragment.java:85)
at org.briarproject.android.fragment.BaseFragment.onActivityCreated(BaseFragment.java:39)
at android.support.v4.app.Fragment.performActivityCreated(Fragment.java:1983)
```Milestone ETorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/639Reblogger and author look similar, their roles are unclear2018-06-12T11:32:19ZakwizgranReblogger and author look similar, their roles are unclearIt's not obvious why a reblogged post has two identities at the top, especially if the post is short: the reblogger and author have similar size avatars and the reblog badge on the reblogger's avatar is easy to miss because it's a simila...It's not obvious why a reblogged post has two identities at the top, especially if the post is short: the reblogger and author have similar size avatars and the reblog badge on the reblogger's avatar is easy to miss because it's a similar colour to the avatar background.
Maybe it would help to make the author's avatar smaller (perhaps the same size as the commenters' avatars), and/or add a divider between the reblogger and the author?
![device-2016-09-02-120010](/uploads/f6fd33c115170f86220d8b26976e057c/device-2016-09-02-120010.png)Milestone FTorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/641RSS Feed Entry Comparator wrongly assumes existing date2018-06-12T11:32:19ZTorsten GroteRSS Feed Entry Comparator wrongly assumes existing dateThe `EntryComparator` in the `FeedManager` can cause a crash when run on a feed with entries that do not have dates at all.The `EntryComparator` in the `FeedManager` can cause a crash when run on a feed with entries that do not have dates at all.Milestone ETorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/642Remove loading screen callbacks from BaseFragmentListener2018-06-12T11:32:19ZakwizgranRemove loading screen callbacks from BaseFragmentListenerFragments should be responsible for their own progress bars.Fragments should be responsible for their own progress bars.Milestone Ehttps://code.briarproject.org/briar/briar/-/issues/643Allow messages to be deleted in the delivery hook2018-06-12T11:32:19ZakwizgranAllow messages to be deleted in the delivery hookIf a client deletes a message in the delivery hook, the validation manager treats the message as invalid. Clients may want to delete messages they've finished handlng without having them invalidated, so we should provide some other way f...If a client deletes a message in the delivery hook, the validation manager treats the message as invalid. Clients may want to delete messages they've finished handlng without having them invalidated, so we should provide some other way for the delivery hook to signal that a message is invalid, such as throwing an InvalidMessageException.Milestone FTorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/644Header not visible after account creation2018-06-12T11:32:19ZErnir ErlingssonHeader not visible after account creation1. Run Briar for the first time
2. Perform the necessary step to create an account.
3. The Contact list is displayed in an empty state, notice that the header is not visible, rendering all user interaction is impossible.
The issue c...1. Run Briar for the first time
2. Perform the necessary step to create an account.
3. The Contact list is displayed in an empty state, notice that the header is not visible, rendering all user interaction is impossible.
The issue corrects itself if I close the app (via the home button) and re-enter it.
This problem might be affected by #642Milestone ETorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/646UX for groups that are synced with contacts who are all offline2018-06-12T11:32:19ZakwizgranUX for groups that are synced with contacts who are all offlineDecide how to display blogs, forums and private groups that are synced with contacts who are all offline (thus no messages will be sent or received until one of those contacts comes online).
"Do nothing" may be an acceptable solution.Decide how to display blogs, forums and private groups that are synced with contacts who are all offline (thus no messages will be sent or received until one of those contacts comes online).
"Do nothing" may be an acceptable solution.Milestone FTorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/648UX design for creating a private group2018-06-12T11:32:18ZakwizgranUX design for creating a private groupSubtask of #127.Subtask of #127.Milestone E