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

17474 Commits

Author SHA1 Message Date
Mike Hardy
77adf46330 style: log template preview dummy card error as d not e
this was causing noise in the logs which may be a source of confusion
in our pre-launch reports on play store
2023-05-02 07:19:05 +03:00
Sanjaykumar Sargam
121a808811 replace EditTextPreference with AutoFocusEditTextPreference 2023-05-01 13:02:03 -05:00
Sanjaykumar Sargam
b6e097ae24 SearchBox must appear when clicking on the search icon 2023-05-01 12:10:43 -05:00
Sanjaykumar Sargam
c66b08b708 set verticalPadding to true in CustomStudyDialog.kt 2023-05-01 07:38:19 +03:00
Mike Hardy
23c7ee61ec Bumped version to 2.16.0beta1 2023-04-30 22:54:52 +00:00
Mike Hardy
566b935a9b
prepare for 2.16.0beta1 release w/version track switch 2023-04-30 16:59:02 -05:00
AnkiDroid Translations
5118628a3c Updated strings from Crowdin 2023-04-30 16:56:03 -05:00
pratyaksh1610
12729742cd fix custom study dialog language bug 2023-04-30 12:37:10 +01:00
Ashish Yadav
116e52f9a9 Setting the namespace via a source 2023-04-30 08:36:07 -03:00
Muhammad Nayeem
7e376dbb52
Dismiss all Dialog Fragment only when needed (#13750) 2023-04-29 14:43:04 -05:00
AnkiDroid Translations
70ca477fb6 Updated strings from Crowdin 2023-04-29 14:41:27 -05:00
oakkitten
44144516e4 Resolve TODOs regarding ongoing migration button title 2023-04-28 12:06:40 -05:00
oakkitten
d1f8672e2f Resolve TODO regarding migration transferring more bytes than initially calculated 2023-04-28 11:26:25 -05:00
oakkitten
99accf37b1 Add notes on behavior in MigrationService 2023-04-28 11:26:25 -05:00
AnkiDroid Translations
2e2a635ab9 Updated strings from Crowdin 2023-04-28 11:20:52 -05:00
David Allison
70151c563e fix: automated sync leads to "collection not open"
Lots of threading bugs here, this is sloppy code and needs to be
cleaned up ASAP

* Add a lock when closing the collection
* Use 'safe' collection methods inside DeckAdapter to respect the lock
* Add a mutex to stop 'duplicated' decks appearing

Fixes 13429
2023-04-28 09:09:33 -05:00
AnkiDroid Translations
f6b1382dea Updated strings from Crowdin 2023-04-27 10:01:55 -05:00
nayeemdv
ac57c0997f DeckPickerMenuOption Bug fix 2023-04-27 14:54:41 +01:00
David Allison
0e4deefbd9 fix: nullability issues in FileUtils
Uses a number of methods which are documented to maybe return `null`

Fixes 13734
2023-04-27 08:06:20 -05:00
Ashish Yadav
de96298baf Changing icon tint to fix the black color issue 2023-04-27 07:55:40 -05:00
lukstbit
d4e8c8d44a Fix SharedDecksDownloadFragment being leaked when app is sent to background
Introduce a check to not touch the view system if the fragment's UI is not available. Also increases the polling for
download state to 1 second as it isn't very efficient/wise to query the system DownloadManager every 100ms.
2023-04-27 07:53:42 -05:00
Ashish Yadav
7e7931bd8d
Use toList first on mAllTags for collections tag (#13730)
* sortedWith extension function provided by Kotlin for collections that will allows us to sort a list with a custom comparator

* sortedWith extension function provided by Kotlin for collections that will allows us to sort a list with a custom comparator

* mAllTags to list() then calling the sort method
2023-04-27 06:39:59 +01:00
David Allison
a0fe79cbae fix: moving to note type with fewer sticky fields
IndexOutOfBoundsException when moving from
'Basic (optional reversed card)' to 'Basic (and reversed card)'
after setting 'Toggle Sticky' for all fields

This is due to 'toggle sticky' being present, but the field not
existing

Fixes 13719

Quick fix to stop a crash. Needs more thought and testing
2023-04-26 21:46:56 -05:00
David Allison
2ecaf6079a fix: crash importing decks on SDK 24
jackson-databind incompatibility: https://github.com/FasterXML/jackson-databind#compatibility

> Android
 2.13: Android SDK 24+
 2.14: Android SDK 26+

Would also have crashed on lower APIs

* Tested on SDK 21 and SDK 24

Fixes 13729
2023-04-26 20:21:05 -03:00
AnkiDroid Translations
fa54e3c8ba Updated strings from Crowdin 2023-04-26 10:09:21 -05:00
Mike Hardy
d00e8eac39
Dependency updates 20230425 (#13721)
* build(deps): bump kotlin_version from 1.8.20 to 1.8.21

Bumps `kotlin_version` from 1.8.20 to 1.8.21.

Updates `org.jetbrains.kotlin:kotlin-gradle-plugin` from 1.8.20 to 1.8.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.8.21/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.8.20...v1.8.21)

Updates `org.jetbrains.kotlin:kotlin-stdlib` from 1.8.20 to 1.8.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.8.21/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.8.20...v1.8.21)

Updates `org.jetbrains.kotlin:kotlin-test` from 1.8.20 to 1.8.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.8.21/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.8.20...v1.8.21)

Updates `org.jetbrains.kotlin:kotlin-reflect` from 1.8.20 to 1.8.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.8.21/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.8.20...v1.8.21)

Updates `org.jetbrains.kotlin:kotlin-test-junit5` from 1.8.20 to 1.8.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.8.21/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.8.20...v1.8.21)

Updates `org.jetbrains.kotlin:kotlin-test-junit` from 1.8.20 to 1.8.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.8.21/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.8.20...v1.8.21)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-test
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-reflect
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-test-junit5
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-test-junit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump com.squareup.okhttp3:okhttp from 4.10.0 to 4.11.0

Bumps [com.squareup.okhttp3:okhttp](https://github.com/square/okhttp) from 4.10.0 to 4.11.0.
- [Release notes](https://github.com/square/okhttp/releases)
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-4.10.0...parent-4.11.0)

---
updated-dependencies:
- dependency-name: com.squareup.okhttp3:okhttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump com.fasterxml.jackson.core:jackson-databind

Bumps [com.fasterxml.jackson.core:jackson-databind](https://github.com/FasterXML/jackson) from 2.14.2 to 2.15.0.
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 21:22:07 -05:00
Brayan Oliveira
7fa5c9d00a fix: always have a single dot at idSuffix start for parallel builds
not needed for setting a applicationIdSuffix, but necessary to build the "applicationId" resValue
2023-04-25 21:01:41 -05:00
David Allison
0f9948b0d9 fix: NullPointerException on isLegacyStorage
The documentation on `getExternalFilesDirs` states:

> Some individual paths may be {@code null} if that
> shared storage is not currently available

Fixes 13705
2023-04-25 20:56:53 -05:00
David Allison
f420f29e8b fix: crash if exporting deck name containing "'"
Fixes 13717
2023-04-25 20:55:35 -05:00
David Allison
f091091839 Android Tests: fail if 'All files' is needed
and not granted. Otherwise there are unexpected errors which are harder to diagnose.

Fixes 13677
2023-04-25 11:29:38 -05:00
David Allison
82eb28df46 dev: better document user crash reports
In the ACRA interface, we only see the title of the exception
unless we dig into the exception message.

Show developers that manually reported exceptions have more information
2023-04-25 11:28:34 -05:00
David Allison
1f1b670fc8
fix: storage permission checks on 'full' builds (#13703)
Previously imports via clicking a deck in 'Files' failed
with intent_handler_failed_no_storage_permission:

"Missing required storage permission.
Please grant storage permission then retry your action"

Co-authored-by: lukstbit <52494258+lukstbit@users.noreply.github.com>
2023-04-25 18:32:21 +03:00
Brayan Oliveira
8f0887b971 fix: Make the settings screen use a Coordinator layout
In order to enable snackbar animations
2023-04-25 17:10:39 +03:00
Brayan Oliveira
62643543df fix: make unsuccessful import dialog not cancelable
In order to avoid having to double tap to leave the IntentHandler activity
2023-04-25 16:25:22 +03:00
Brayan Oliveira
34fca11f20 fix: Import error dialog not being styled 2023-04-25 16:25:22 +03:00
Brayan Oliveira
177a2b819f NF: IDE-lint on IntentHandler 2023-04-25 16:25:22 +03:00
David Allison
0bbf66ec63 fix: "Failed to load deck '<DeckId>'" error
This occurred when a user selected a deck.

If the user was using the V1 scheduler then `schedVer` is not set

`get_config_int` threw an exception if this was the case.

Fixes 13003

a06e727f60/AnkiDroid/src/test/java/com/ichi2/libanki/sched/SchedUpgradeTest.kt (L49-L51)
2023-04-25 08:03:48 +03:00
David Allison
bf52c41534 add: "Not In LibAnki" annotation 2023-04-25 08:03:48 +03:00
David Allison
fbc82a5698 chore: remove 'MEDIA_CODEC_LIST' from crash reports
I've never used the information, and it makes navigation of the crash log
more difficult than it should be

I'll face the consequences if I'm incorrect here.
2023-04-24 21:56:17 -05:00
David Allison
80106c2e09 chore(DeckDownload): Remove crash report
Getting broadcasts for other downloads is a known case which we handle
, so no need to send a report
2023-04-24 21:38:07 -03:00
David Allison
c2b46f315c fix(DeckDownload): validation stops processing
Previously, getting a broadcast for a download which wasn't ours
would log an error and then attempt to import the file

Fixes 13686
Fixes 13688
2023-04-24 21:38:07 -03:00
David Allison
e614de0312 Revert "Replace MaterialDialog with AlertDialog in SharedDecksDownloadFragment class (#13621)"
This reverts commit 5b0a690790.

Caused the 'YES/NO' buttons to be invisible

Fixes 13690
2023-04-24 21:38:07 -03:00
jDaowy
cc77070631
Fix Warnings in ScopedStorageService.kt (#13642)
* Update ScopedStorageService.kt

Fixed warnings in ScopedStorageService.kt.
issue: #13282

* Removed lines in ScopedStorageService.kt

Deleted the code that was commented out.
2023-04-24 17:21:10 -03:00
David Allison
fc008f0620 build: revert emulator to API 30
API 31 was unstable in CI.

Related: 13695
2023-04-24 16:38:43 +01:00
Mike Hardy
5c9a08b5ea Bumped version to 2.16alpha98 2023-04-23 16:05:50 +00:00
Mike Hardy
1bcf737e97 re-enable play store upload attempts
- will abort (like before) if play store rejects us or play build fails
- will only commit/push build tag if play store works
- universal builds happen after play upload so universal doesn't upload
2023-04-23 10:32:58 -05:00
AnkiDroid Translations
86060f6340 Updated strings from Crowdin 2023-04-23 10:31:29 -05:00
oakkitten
5660104163
Add dialogs for successful & failed storage migration (#13651)
- migration completion notification and dialog
- added showAsyncDialogFragment to show the alert dialog/notification
- added callback in application to get current activity

--- 

* Refactor MigrationSuccessDialogFragment & add MigrationFailedDialogFragment

First of all, this moves MigrationSuccessDialogFragment to
com/ichi2/anki/ui/dialogs/ActivityAgnosticDialogs.kt along with the
related code that tracks the started activities and runs code on start
of any of them.

This also adds MigrationFailedDialogFragment. As we currently lack the
knowledge about what exactly can realistically fail and how, it just
shows the exception text and allows copying the debug info in the same
way as the notification does. It would be nice to try to account for
the most common errors here.

Also this:

  * makes the above dialogs not cancellable on touch outside;

  * adds DefaultActivityLifecycleCallbacks--same as
    Application.ActivityLifecycleCallbacks but with all methods having
    default implementations--for simplicity;

  * adds Activity.canProperlyShowSnackbars() to determine if a
    snackbar, if shown in an activity, will animate properly, or if
    a toast should be shown instead;

  * fixes a slight issue in Snackbars.kt where an activity with a view
    with the ID root_layout would be treated as one that can properly
    show a snackbar--the code wasn't checking whether or not the view
    was CoordinatorLayout so it could produce the wrong result.

* Extract & change strings related to migration success or failure

* Dismiss migration progress dialog when done

* add real URL to storage migration error doc

---------

Co-authored-by: Ashish Yadav <48384865+criticalAY@users.noreply.github.com>
Co-authored-by: Mike Hardy <github@mikehardy.net>
2023-04-23 09:41:53 -05:00
AnkiDroid Translations
6d7b6c8af3 Updated strings from Crowdin 2023-04-23 09:31:00 -05:00
Ashish Yadav
067a5131b0
added a Help button in the notification if the migration fails (#13636) 2023-04-23 09:08:17 -05:00