codingtosh
f084f6984c
[Kotlin Migration] MediaSyncer
...
package: com.ichi2.libanki.sync
2022-02-05 11:21:24 -05:00
codingtosh
2c7ead0758
Rename MediaSyncer.java to .kt
...
package: com.ichi2.libanki.sync
2022-02-05 11:21:24 -05:00
Akshay
612e42439c
[Kotlin Migration] CompatV23
2022-02-05 10:15:50 -05:00
Akshay
d89e1556e5
Rename Compat23.java to Compat23.kt
2022-02-05 10:15:50 -05:00
Akshay Vilas Jadhav
17d80f9653
[Kotlin Migration] BasicImageFieldControllerTest
2022-02-03 14:23:27 +05:30
krmanik
c34dcdcb1a
fix: error when showing toast
2022-02-02 08:20:52 -05:00
codingtosh
52ef757ef3
[Gradle][Ktlint Worker Task] Bump workerMaxHeapSize to 2048m
...
Task: org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction
Fixes: https://github.com/ankidroid/Anki-Android/issues/10242
2022-02-01 11:54:18 -05:00
Mike Hardy
fd8e047002
Bumped version to 2.16alpha41
2022-02-01 16:38:20 +00:00
Akshay
2bc64ed43a
[Kotlin Migration] CardTest
2022-02-01 11:14:38 -05:00
Akshay
1bc8d9b7a1
Renamed CardTest.java to CardTest.kt
2022-02-01 11:14:38 -05:00
Akshay
93ab582830
[Kotlin Migration] CardTemplateEditorTest
2022-02-01 11:03:57 -05:00
Akshay
a0b1c04178
Renamed CardTemplateEditorTest.java to CardTemplateEditorTest.kt
2022-02-01 11:03:57 -05:00
Akshay
c9ccd64061
[Kotlin Migration] AudioRecorderTest
2022-02-01 10:36:57 -05:00
Akshay
5b7427af74
Renamed AudioRecorderTest.java to AudioRecorderTest.kt
2022-02-01 10:36:57 -05:00
Akshay
be32e5d672
[Kotlin Migration] CardTemplatePreviewer
2022-02-01 10:29:31 -05:00
Akshay
3cdb0e5548
Renamed CardTemplatePreviewer.java to CardTemplatePreviewer.kt
2022-02-01 10:29:31 -05:00
David Allison
9b0296610f
feat(Compat): add deleteFile ( #10295 )
...
Use `Files.delete` which provides a useful exception if on V26 or later
https://docs.oracle.com/javase/7/docs/api/java/io/File.html#delete()
https://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html#delete-java.nio.file.Path-
2022-02-01 10:09:44 -05:00
David Allison
921e772bb7
test: add "editPreferences" helper function
...
Nicer to read + type than `getPreferences().edit { }`
Currently unused, to be used in scoped storage changes
2022-02-01 09:48:32 -05:00
murugu-21
7ada532c5c
Disable "html_javascript_debugging" for unit/android tests ( #10288 )
...
* check junit class
* refactor to adaption util
* refactor with docs
Co-authored-by: David Allison <62114487+david-allison-1@users.noreply.github.com>
2022-02-01 09:27:37 -05:00
Akshay
9376133952
[Kotlin Migration] WidgetStatus
2022-02-01 08:53:18 -05:00
Akshay
a5b1e1fe84
Renamed WidgetStatus.java to WidgetStatus.kt
2022-02-01 08:53:18 -05:00
Mike Hardy
b430879e54
Dependency updates 20220201 ( #10296 )
...
* Bump mockito-inline from 4.3.0 to 4.3.1
Bumps [mockito-inline](https://github.com/mockito/mockito ) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/mockito/mockito/releases )
- [Commits](https://github.com/mockito/mockito/compare/v4.3.0...v4.3.1 )
---
updated-dependencies:
- dependency-name: org.mockito:mockito-inline
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* test(lint): only run default TestModes for prefer is empty check
if the extra whitespace mode runs, it perturbs the diff and the check fails
* Bump lint_version from 30.0.4 to 30.1.0
Bumps `lint_version` from 30.0.4 to 30.1.0.
Updates `lint-api` from 30.0.4 to 30.1.0
Updates `lint` from 30.0.4 to 30.1.0
Updates `lint-tests` from 30.0.4 to 30.1.0
---
updated-dependencies:
- dependency-name: com.android.tools.lint:lint-api
dependency-type: direct:production
update-type: version-update:semver-minor
- dependency-name: com.android.tools.lint:lint
dependency-type: direct:production
update-type: version-update:semver-minor
- dependency-name: com.android.tools.lint:lint-tests
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump fragment-testing from 1.4.0 to 1.4.1
Bumps fragment-testing from 1.4.0 to 1.4.1.
---
updated-dependencies:
- dependency-name: androidx.fragment:fragment-testing
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump preference-ktx from 1.1.1 to 1.2.0
Bumps preference-ktx from 1.1.1 to 1.2.0.
---
updated-dependencies:
- dependency-name: androidx.preference:preference-ktx
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* test(layout): do not attempt to inflate preference_category_material
* Bump fragment-ktx from 1.4.0 to 1.4.1
Bumps fragment-ktx from 1.4.0 to 1.4.1.
---
updated-dependencies:
- dependency-name: androidx.fragment:fragment-ktx
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump protobuf-java from 3.19.3 to 3.19.4
Bumps [protobuf-java](https://github.com/protocolbuffers/protobuf ) from 3.19.3 to 3.19.4.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases )
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/master/generate_changelog.py )
- [Commits](https://github.com/protocolbuffers/protobuf/compare/v3.19.3...v3.19.4 )
---
updated-dependencies:
- dependency-name: com.google.protobuf:protobuf-java
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-01 08:43:44 -05:00
AnkiDroid Translations
d47ac331b4
Updated strings from Crowdin
2022-02-01 08:25:41 -05:00
David Allison
dddac58078
feat(tests): printDirectoryTree
...
From StackOverflow: https://stackoverflow.com/a/13130974/
Used to print a directory tree to the console to allow for easy
comparison of directories
2022-01-30 12:30:23 -05:00
David Allison
cb15433b86
clean(DeckPicker): extract countCardsInDeckTree
...
Extract helper method to focus on DeckPicker logic
2022-01-30 12:21:07 -05:00
David Allison
1b3ad5936c
feat(DeckPicker): confirm deleting filtered deck
...
A filtered deck has its options embedded. Deletion causes frustration
So show a deletion confirmation in this case.
This reads "Send all cards in {deckName} back to their original decks?"
Fixes 10283
2022-01-30 12:21:07 -05:00
David Allison
cb360a0f08
docs(DeckPicker): deck deletion
2022-01-30 12:11:12 -05:00
David Allison
686a63f779
lint(BundleUtils): fix javadoc
2022-01-30 12:11:12 -05:00
David Allison
7eba3a832d
test(DeckPickerContextMenu): Ensure arguments set
...
This removes the possibility that `getLong()` returns 0L
if the argument was not set.
2022-01-30 12:11:12 -05:00
David Allison
02cbfff3cb
refactor(DeckPicker): remove mContextMenuDid
...
This should be handled by the DeckPickerContextMenu
2022-01-30 12:11:12 -05:00
David Allison
4a21ef6454
refactor(DeckPickerMenu): add deckId getter
...
Reduces code duplication
2022-01-30 12:11:12 -05:00
David Allison
ca250be580
fix(DeckPickerMenu): de-prioritise "Delete deck"
...
"Delete deck" was close to "Custom study" which caused misclicks
Moving it under "Create shortcut" makes misclicks less likely
Fixes 10283
2022-01-30 12:11:12 -05:00
David Allison
034d90d4db
fix(DeckPickerContextMenu): allow testing
...
* Allow unit testing the fragment via ExtendedFragmentFactory
* Removes a dependency on `CollectionHelper` from the context menu
This also allows for more complex instantiation of
data to be passed in the fragment. For example: further
decoupling of the Activity and the Menu
For now this extra instantiation isn't necessary
2022-01-30 12:11:12 -05:00
David Allison
9ccad7e6f0
refactor: DeckPickerContextMenu
...
* Change to use Kotlin's hashMapOf() for readability
* Fix length of array
2022-01-30 12:11:12 -05:00
Akshay
ff8595fb9f
[Kotlin Migration] BackupManager
2022-01-30 12:00:08 -05:00
Akshay
dd1a37e6b0
Renamed BackupManager.java to BackupManager.kt
2022-01-30 12:00:08 -05:00
codingtosh
bb810dd604
[Kotlin Migration] CustomStudyDialog
...
package: com.ichi2.anki.dialogs.customstudy
2022-01-30 11:48:16 -05:00
codingtosh
c57206b790
Rename CustomStudyDialog.java to .kt
...
package: com.ichi2.anki.dialogs.customstudy
2022-01-30 11:48:16 -05:00
David Allison
ae0911d35c
lint: CompatV21
...
* Fix copyright header
* Fix imports
* Fix "'new File' is redundant"
* Fix erroneous warning saying "deprecated" is redundant
* Add KotlinCleanup for remaining issues
2022-01-28 10:35:42 -05:00
David Allison
a0dea229bc
fix: nullability of Preference classes
...
preference-ktx 1.2.0 adds new nullability annotations which breaks
our Kotlin code
Unblocks issue 10278
2022-01-28 10:23:39 -05:00
Mike Hardy
6260cd6e25
build(deps): bump android gradle plugin to 7.1
...
- bcprov gradle.properties setting no longer needed, fix released in AGP7.1
- androidx.core resolution strategy no longer needed (actually was in fragment 1.4)
- opt in to api component publishing new regime to quiet warning
- disable certain lints that were not providing value or are already tracked
2022-01-26 15:01:40 -05:00
Mike Hardy
cac673b874
fix: repair use of wrong constant types for schedulers
...
verified that the actual constant values were the same as I switched type definition
this WrongConstant usage was flagged by AGP7.1 which appears to do more thorough linting
2022-01-26 15:01:40 -05:00
Mike Hardy
0f3bf11ef9
lint: use requireContext/requireArguments/requireActivity
...
vs the !! versions of enforcing context / arguments / activity are there for use
flagged by enhanced AGP7.1+ lint checking
2022-01-26 15:01:40 -05:00
Mike Hardy
05cdd6e6b3
lint: remove redundant scheme from data filter
...
if there is no scheme in a mimeType data filter, the scheme is by default
the same scheme we were setting it to here
https://developer.android.com/guide/topics/manifest/data-element --> attributes --> android:scheme
flagged with enhanced lint in AGP7.1
2022-01-26 15:01:40 -05:00
Mike Hardy
88554159ca
lint: remove redundant name from activities
...
flagged by lint in AGP7.1+, these activity names are same as app name, ergo redundant
2022-01-26 15:01:40 -05:00
dependabot[bot]
c641a7243e
Bump mockito-inline from 4.2.0 to 4.3.0
...
Bumps [mockito-inline](https://github.com/mockito/mockito ) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/mockito/mockito/releases )
- [Commits](https://github.com/mockito/mockito/compare/v4.2.0...v4.3.0 )
---
updated-dependencies:
- dependency-name: org.mockito:mockito-inline
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-01-26 15:01:40 -05:00
puranjayK
dbd63ff69f
Migrate CardBrowserSearchView to Kotlin
2022-01-25 18:02:26 -05:00
puranjayK
462a063704
Rename .java to .kt
2022-01-25 18:02:26 -05:00
puranjayK
3d2af0eff3
Migrate TextInputEditField to Kotlin
2022-01-23 20:27:52 -05:00
puranjayK
ae0765ad08
Rename .java to .kt
2022-01-23 20:27:52 -05:00