Previously we were calling TASK_TYPE_RENDER_BROWSER_QA with the first 1000 cards in the result from mSearchCardsHandler.onPostExecute().
Since mRenderQAHandler does a notifyDataSetChanged() for EVERY card in the list as they're updated, this was effectively blocking the long-click listener for the cards, so I moved that initial card rendering code into the first DeckTask and dropped it from 1000 to 500.
I also did some tidying up to use the List and Map interfaces polymorphically instead of the ArrayList and HashMap implementations.
Fixes#4191
* Throw exception if filtered deck specified as deck in insert(), update()
* Throw exception if deck insert for a name that already exists
* Use query() instead of rawQuery() in the notes database
* Change DECK_DYN to Boolean
* Add javadoc for missing fields in FlashCardsContract
* Compat V1 was only adding first duplicate to output array
* Compat V2 now clones NoteInfo objects before adding to multiple positions
* Made NoteInfo final to prevent subclasses breaking encapsulation
* Made NoteInfo constructor private so that it's only used as a container
* Also improved the javadoc and comments in some places
* Simplify the logic for dynamic permission checking
* Add a fallback method to get calling package name on all APIs
* Set "exported" property to False in all Activities other than IntentHandler, as these are possible attack points. Currently only NoteEditor was actually exported due to inclusion of an IntentFilter.
Note: While it would be possible to allow the provider to work even from its own process, this is not considered good practice, so we keep it disabled on production builds until such time as it becomes explicitly required.
One reason that it is not recommended to allow this is to prevent accidental calling of checkCallingOrSelfPermission() after a call to Binder.clearCallingIdentity()
Decouple the URIs for libanki style querying vs. direct SQL querying.
This has the advantage of being more intuitive, and less susceptible to SQL injection attacks
Commit 8273eb8e2c fixed a mistake in
the way custom sync server URLs are assembled, but at the same time it
broke the generation of the media server URL.