* Remove legacy whiteboard settings from prefs
* Remove black strokes setting from UI
* Remove monochrome refs
* Hide pen color based on night mode
* Fix typo
* Update Whiteboard Foreground test
* Add missing annotation import
Co-authored-by: Mike Hardy <github@mikehardy.net>
I don't know why this is the only if case that was not properly changed in 38ab1ea7ad
In this case, it would mean the media db corruption was not catched
Each time in Connection a generic error is returned, it is quite similar.
Furthermore, 38ab1ea7ad moved result to resultType, which was mostly correct. However, for
the sake of consistency, it should have left a 0-length array in result. This repair it
It was correctly done in f8512af52fcae210a92f34c360f9ecb4db33c8ac, however rebasing over
47dd6596f3 seems to have fail. This is regretful because using sync actually helped made
the change simpler.
The very wrong line was
```java
private static class UpdateCardHandler<Result extends BooleanGetter> extends
ListenerWithProgressBarCloseOnFalse<Pair<Card, String>, Result> {
```
`UpdateCardHandler` should not have taken a parameter, and especially, no variable of this type should have been
declared without parameters. This stopped typechecking to work, and lead to #7862.
The remaining changes are the one detected by the correction of this first line.
The irony is that the whole point of using Task was to ensure type safety
Material design states we should have 16dp padding to the sides if in full screen.
OnePlus 7 Pro phones truncated the "new count", so this fixes the issue
Fixes 7854
According to Mike:
> lots of devices crashing in the automated robotest from google on the alpha release
> > FATAL EXCEPTION: Thread-6
> > Process: com.ichi2.anki, PID: 9642
> > java.lang.NullPointerException: Attempt to invoke virtual method 'com.ichi2.libanki.Decks com.ichi2.libanki.Collection.getDecks()' on a null object reference
> > at com.ichi2.anki.widgets.DeckAdapter$DeckFilter.<init>(DeckAdapter.java:4)
> > at com.ichi2.anki.widgets.DeckAdapter$DeckFilter.<init>(DeckAdapter.java:1)
> > at com.ichi2.anki.widgets.DeckAdapter.getFilter(DeckAdapter.java:1)
> > at com.ichi2.anki.DeckPicker.__renderPage(DeckPicker.java:21)
> > at com.ichi2.anki.DeckPicker$UpdateDeckListListener.actualOnPostExecute(DeckPicker.java:9)
> > at com.ichi2.anki.DeckPicker$UpdateDeckListListener.actualOnPostExecute(DeckPicker.java:1)
> > at com.ichi2.async.TaskListenerWithContext.onPostExecute(TaskListenerWithContext.java:2)
> > at com.ichi2.async.CollectionTask.onPostExecute(CollectionTask.java:4)
> > at com.ichi2.async.CollectionTask.onPostExecute(CollectionTask.java:1)
> > at android.os.AsyncTask.finish(AsyncTask.java:695)
> > at android.os.AsyncTask.-wrap1(Unknown Source:0)
> > at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712)
> > at android.os.Handler.dispatchMessage(Handler.java:105)
This seems to be caused by access to collection before it's loaded. It seems impossible in real use, even when there is
no permission to read data. Moving capacity after constructor is not ideal, but ensure that no resizing copy data and
that it is only done when collection is loaded