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

17492 Commits

Author SHA1 Message Date
David Allison
ca4ba96709 extract: userIsPromptedToDeleteCollectionOnUninstall 2023-05-10 20:55:01 -03:00
Sanjaykumar Sargam
149c4b303b fix item getting bold 2023-05-10 19:46:04 -03:00
AnkiDroid Translations
8e17b08ee5 Updated strings from Crowdin 2023-05-10 20:38:30 +03:00
Ashish Yadav
0c31df5fe7 Added remember settings to your connection is metered dialog 2023-05-10 19:38:30 +03:00
AnkiDroid Translations
c5a05db1bd Updated strings from Crowdin 2023-05-10 19:04:38 +03:00
David Allison
e603d75745 fix: make lint run in CI/gradle
reverts lint to 30.4.2

lint was updated in 8e4b6d17a5

But this stopped lint working in via 'gradlew'
https://github.com/ankidroid/Anki-Android/issues/13786#issuecomment-1534189784

tested with `/gradlew lintFullRelease`

Fixes 13786
2023-05-10 06:25:13 +03:00
Arthur Milchior
456b9caa42 NF. make safeEndInTransaction a SupportSQLiteDatabase method 2023-05-08 23:17:48 +01:00
Arthur Milchior
644d32f74c NF: make safeEndInTransaction a method 2023-05-08 23:17:48 +01:00
Tomek Garbus
8a93414e89
Resolve NeedsTests annotations in LoginActivity.kt (#13780)
* Resolve one NeedsTest occurrence

* Update LoginActivityTest.kt and add one more scenario

* Add GPL block, apply suggestions from PR review

* Remove blank line

---------

Co-authored-by: Tomasz Garbus <tomasz.garrbus1@gmail.com>
2023-05-07 08:17:41 +03:00
Sanjaykumar Sargam
9574dac1be cursor to end 2023-05-07 07:22:35 +03:00
yellowjello
20a8394b42 Re-enable support for custom text selection actions 2023-05-06 20:58:37 -03:00
David Allison
be7bb3ea8e
Improve Diagnostics for issue 13807 (files not equal: .nomedia) (#13809)
* vendor FileUtils.contentEquals

We're going to need to modify the code to provide more information.
So bring the code into the app

* requireFile was private so needed to be extracted

* convert `contentEquals` to `throwIfContentUnequal`

This provides a better error message for diagnostics

Related: 13807 - we had `.nomedia` throw here, and we want to know why
2023-05-06 08:06:55 +03:00
David Allison
0fa6e76ea8 manual revert "Use fragments resources on AsyncDialogFragment"
This reverts commit 6ea36860a8

I performed the revert by hand as there were conflicts

This caused issue 13795
2023-05-06 07:07:27 +03:00
David Allison
351a889e82 Revert "fixed the crash that occured due to getResources() error (#13086)"
This reverts commit 385afba7

Issue 13795 raised additional concerns and we should resolve this correctly
2023-05-06 07:07:27 +03:00
AnkiDroid Translations
d329a89b5d Updated strings from Crowdin 2023-05-05 09:51:13 -05:00
AnkiDroid Translations
e7a9acfd76 Updated strings from Crowdin 2023-05-03 19:05:39 -05:00
Mike Hardy
8e4b6d17a5
Dependency updates 20230503 (#13790)
* build(deps): bump junit_version from 5.9.2 to 5.9.3

Bumps `junit_version` from 5.9.2 to 5.9.3.

Updates `org.junit.jupiter:junit-jupiter` from 5.9.2 to 5.9.3
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.9.2...r5.9.3)

Updates `org.junit.vintage:junit-vintage-engine` from 5.9.2 to 5.9.3
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.9.2...r5.9.3)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.9.2 to 5.9.3
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.9.2...r5.9.3)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.junit.vintage:junit-vintage-engine
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* build(deps): bump org.jlleitschuh.gradle:ktlint-gradle

Bumps org.jlleitschuh.gradle:ktlint-gradle from 11.3.1 to 11.3.2.

---
updated-dependencies:
- dependency-name: org.jlleitschuh.gradle:ktlint-gradle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* build(deps): bump com.github.triplet.play from 3.8.1 to 3.8.2

Bumps com.github.triplet.play from 3.8.1 to 3.8.2.

---
updated-dependencies:
- dependency-name: com.github.triplet.play
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* build(deps): bump org.jsoup:jsoup from 1.15.4 to 1.16.1

Bumps [org.jsoup:jsoup](https://github.com/jhy/jsoup) from 1.15.4 to 1.16.1.
- [Release notes](https://github.com/jhy/jsoup/releases)
- [Changelog](https://github.com/jhy/jsoup/blob/master/CHANGES)
- [Commits](https://github.com/jhy/jsoup/compare/jsoup-1.15.4...jsoup-1.16.1)

---
updated-dependencies:
- dependency-name: org.jsoup:jsoup
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* build(deps): bump lint_version from 31.0.0 to 31.0.1

Bumps `lint_version` from 31.0.0 to 31.0.1.

Updates `com.android.tools.lint:lint-api` from 31.0.0 to 31.0.1

Updates `com.android.tools.lint:lint` from 31.0.0 to 31.0.1

Updates `com.android.tools.lint:lint-tests` from 31.0.0 to 31.0.1

---
updated-dependencies:
- dependency-name: com.android.tools.lint:lint-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.android.tools.lint:lint
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.android.tools.lint:lint-tests
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* build(deps): bump org.robolectric:robolectric from 4.9.2 to 4.10.1

Bumps [org.robolectric:robolectric](https://github.com/robolectric/robolectric) from 4.9.2 to 4.10.1.
- [Release notes](https://github.com/robolectric/robolectric/releases)
- [Commits](https://github.com/robolectric/robolectric/compare/robolectric-4.9.2...robolectric-4.10.1)

---
updated-dependencies:
- dependency-name: org.robolectric:robolectric
  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-05-03 10:04:48 -05:00
lukstbit
77211b88f2 Fix ConcurrentModificationException in NoteEditor.saveToggleStickyMap()
Made a copy of the original map and used that to iterate over the content.
2023-05-03 08:53:35 -05:00
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