0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 12:02:16 +02:00
Commit Graph

8835 Commits

Author SHA1 Message Date
Mike Hardy
d751ae8f79 Wildplot de-lint / de-deprecation 2018-10-06 10:32:24 +09:00
Mike Hardy
6e857716c2 Migrate to beta test APIs from alpha 2018-10-06 08:38:41 +09:00
Timothy Rae
2c556d07a6 Bumped version to 2.9alpha41
@branch-specific
2018-10-05 22:36:36 +09:00
Mike Hardy
e0b45d7a3b Fix coverage on JDK>=9
Remove config options that are actually defaults, simplifies the config
at the same time that it works correctly with higher JDKs, win/win
2018-10-05 15:21:33 +09:00
Mike Hardy
19e92c14de Reload Note.model after template editing, Fixes #5011
The template editor edits the model template live in the database
which bleeds into Note.model, if you discard the template edits and
return to the NoteEditor the Note.model.templates state was still the
edited + reverted state. This hook and call allow for the Note.model
object to be loaded from the database where the template editor left
the correct state as it was closing down
2018-10-05 15:21:33 +09:00
Mike Hardy
7065293eff Related to #5011 - add logging/acra in fixIntegrity() 2018-10-05 15:21:33 +09:00
Mike Hardy
c0a48f5cb8 Issue #5011 causes database corruption, check on upgrade 2018-10-05 15:21:33 +09:00
Timothy Rae
4ca1f4778c Bumped version to 2.9alpha40
@branch-specific
2018-10-04 10:26:23 +09:00
Mike Hardy
5515abeb85 Don't ignore ResultCode on image selection
PR #5004 was complaining of an empty if:
https://github.com/ankidroid/Anki-Android/pull/5004/files#diff-097a1b08d60abe4a789cc6394b0dbf27L173

I thought it was collapsible but missed that it was two different objects - this first if
was needed but could return immediately. If you ignore that it was cancelled you'll take a NullPointerException
when you try to access the non-existent image
2018-10-03 16:40:05 -05:00
Mike Hardy
4262abae71 Update requery/sqlite deps
Should have been able to remove the ABI filter but requery packaging had a problem:
https://github.com/requery/sqlite-android/issues/78
2018-10-03 14:17:47 -05:00
Timothy Rae
bf438446a5 Bumped version to 2.9alpha38
@branch-specific
2018-10-03 21:08:28 +09:00
Mike Hardy
d21954ee8f De-lint / Codacy-clean multimediacard hierarchy 2018-10-03 20:37:28 +09:00
Mike Hardy
aafa5155ae Re-create options menu after audio load, Fixes #5002
The multimedia field editor is set up as a text editor to start, but if you
use it to start an Activity that fetches audio for a translation, it needs
to re-draw the options menu with an audio config when the activity result
returns, otherwise there are state issues with media recorder
2018-10-03 00:29:12 -05:00
Mike Hardy
a6dde67b2d Allow HTTP connections even in API28 w/default change
API28 changed the default network policy and unless you rework
your appś networking code you have to compensate with a manifest entry
(or a full network security XML file):

https://developer.android.com/training/articles/security-config#CleartextTrafficPermitted
https://developer.android.com/guide/topics/manifest/application-element#usesCleartextTraffic

This would have affected anyone using our embedded WebView to HTTP
sites as well, as WebView honors this flag
2018-10-03 00:29:12 -05:00
Timothy Rae
d0076bc877 Bumped version to 2.9alpha37
@branch-specific
2018-10-03 07:24:01 +09:00
lucwastiaux
c9b0f56917 Add API support for burying and suspending (#4993)
with tests and javadoc. added API test for updating tags
2018-10-03 07:06:11 +09:00
Mike Hardy
086e129754 Isolate UI tests and ignore in CI, test CardBrowser 2018-10-02 00:01:46 -05:00
Mike Hardy
d035d8debb Hide Preview option if no cards, remember search
- Previously Preview was always available, fixes #4987 crash when no cards
- Previously if you went to another Activity with an active search, it was forgotten
2018-10-02 00:01:46 -05:00
Mike Hardy
26239766fe Fix Previewer cycling
- don't display a back arrow when we first display
- while going back, don't skip answer states (back is same as forward now)
2018-10-02 00:01:46 -05:00
Mike Hardy
aa39b62ecf Add ApacheHttp Manifest entry for API28 Fixes #5000
API28 requires you to specify in the manifest if you need Apache HTTP:
https://developers.google.com/maps/documentation/android-sdk/config#specify_requirement_for_apache_http_legacy_library
2018-09-30 18:26:20 -05:00
Mike Hardy
03387ef42b Test Connection.login, invalid login only right now
This starts the process of exercising HTTP features
prior to any contemplated move to OkHttp. More
importantly it makes sure basic HTTP works to guard against
things like issue #5000
2018-09-30 18:26:20 -05:00
Mike Hardy
4b3794a8c6 Removing comment referencing issue that can't be found
I looked in the source anki source code, and they perform no
sanity checking on authentication (the referenced issue) so I
see no need to wait another 3 years to do it here...the referenced
issue is not available any long either, so I think deleting the
comment is appropriate
2018-09-30 18:26:20 -05:00
Mike Hardy
b27593361b Noting thread protection for class load has API sunset 2018-09-30 18:26:20 -05:00
Mike Hardy
b0554964da Tagging wake lock per API docs w/namespace+colon 2018-09-30 18:26:20 -05:00
Mike Hardy
a5ac35ed93 Add note about static-typing interaction with androidx 2018-09-27 22:04:30 -05:00
Mike Hardy
646de8556e Upgrade build tools 28.0.2->28.0.3 2018-09-27 22:57:34 +09:00
Mike Hardy
c25f86027c Refactor->Migrate to AndroidX 2018-09-27 22:57:34 +09:00
Mike Hardy
1cd3c3b64d Dependency updates, and UI test works on API28 2018-09-27 22:57:34 +09:00
Timothy Rae
13139ad50b Bumped version to 2.9alpha36
@branch-specific
2018-09-20 23:15:10 +09:00
Mike Hardy
3fd0ebb3fd Add debug aides (HTML + remote debug), fix typos 2018-09-20 23:12:54 +09:00
Mike Hardy
ffaad85a10 Filter @LargeTest (like Robolectric) out of Travis
Travis is flaky at best on emulators, and adding UI tests with
all of their inherent timing issues to Travis would make it
unreliable. These @LargeTest ones work well locally though
2018-09-20 23:12:05 +09:00
Mike Hardy
b804991cbc Add Robolectric test that opens each Activity 2018-09-20 23:12:05 +09:00
Mike Hardy
dd4e7aa52c Emulator tooling to allow for robolectric tests 2018-09-20 23:12:05 +09:00
Mike Hardy
7c4878bcff Don't rely on onCreateOptionsMenu items in onCreate, Fixes #4977
This may not be related to 27.0.2->27.1.1 support lib lifecycle changes,
and it may be present in other objects or have a better solution but this
fixes crash on opening CardBrowser with an empty collection
2018-09-20 23:12:05 +09:00
Mike Hardy
da1f19c75d Brand crash dialog, add crash trigger if debug
Previously I've been relying on a personal collection of
crash bugs to test the crash dialog, but that's a poor testing
experience - now we have an advanced preference area to just crash

During the ACRA upgrade some branding was already broken, and
the rest was lost, when I finally saw the dialog again with
fresh eyes it was terrible so this puts the icon and title back
2018-09-20 16:06:00 +09:00
Mike Hardy
ffd3bb2a96 Handle all ZipEntry exceptions not just IO, Fixes #4978
Calling code handles null return values already and silently moves on,
and called library method will immediately throw NPE if the requested
entry name doesn't exist, so any media database / file de-synchronization
blocks us from importing otherwise. This allows us to successfully import
exports that have media db / file discrepancies
2018-09-18 23:15:32 -05:00
Mike Hardy
c21426108e Ask to reinit options menu after permissions, Fixes #4951
The DeckPicker options menu wasn't being initialized correctly
during the first run of the application after install when all
the dialogs popped up.

The correct thing to do is invalidate it, the system will re-init
https://stackoverflow.com/a/41631514/9910298
2018-09-18 22:57:21 -05:00
Mike Hardy
a6f7d42611 Bump SDK for API so it may be published 2018-09-18 22:02:06 -05:00
Timothy Rae
dfa8585030 Bumped version to 2.9alpha35
@branch-specific
2018-09-17 23:34:42 +09:00
Timothy Rae
1ed9053669 Make sure startLoadingCollection() is called at end of onCreate
The new behavior of CollectionLoader is to immediately call onCollectionLoaded() if the collection is already open,
so the function must be called after all the initialization is complete, Also we need to call the super function
in order for the progress bar to be cleared.
2018-09-17 23:31:55 +09:00
Timothy Rae
2176e9fbdb Bumped version to 2.9alpha34
@branch-specific
2018-09-17 11:24:59 +09:00
Timothy Rae
3c5cfe35c1 Clean up warnings 2018-09-17 11:23:06 +09:00
Timothy Rae
469cd8a7e3 Don't override back button logic in preferences
We used to call finish() here but that no longer works on newer versions of Android, as we get kicked back to the DeckPicker.
It seems the following change to PreferenceActivity addresses our use case for newer versions of Android:

6af15ebcfe%5E%21/core/java/android/preference/PreferenceActivity.java

So I've ported that over so that we get the correct behavior on all versions of Android
2018-09-17 11:23:06 +09:00
Timothy Rae
870357371a Bumped version to 2.9alpha33
@branch-specific
2018-09-17 11:10:30 +09:00
Mike Hardy
db681c36fc Use new 27.1.1 support libraries 2018-09-17 11:07:25 +09:00
Timothy Rae
37bbdd92e7 Use AsyncTask plus Lifecycle object instead of Loader
Loaders have now been deprecated in favor of the lifecycle support library
2018-09-17 11:07:25 +09:00
Timothy Rae
21fb449379 Move the checklists in the templates to the bottom
These are primarily to help first-time reporters/contributors, and I find they get in the way when I'm creating issues/prs
Moving to the bottom seems like a reasonable compromise to me
2018-09-16 22:43:47 +09:00
Timothy Rae
fe1f03e96d Bumped version to 2.9alpha32
@branch-specific
2018-09-15 13:27:35 +09:00
Mike Hardy
119538c4bd Use correct context in getResources() (#4965)
Fixes #4960 introduced by #4928
2018-09-15 11:07:57 +09:00
Mike Hardy
a0218814da Bump junit point release 5.3.0 -> 5.3.1 2018-09-14 13:31:28 -05:00