code cleanup in FilteredDeckOptins.kt and AppcompatPreferenceActivity.kt#20047
Closed
ialwaysbeatmywifi wants to merge 1 commit intoankidroid:mainfrom
Closed
Conversation
Author
|
@david-allison when time permits please approve |
Member
|
Thanks!!!! It's been 3 minutes, no need for a ping |
Member
|
both files are being replaced at #19669, so no need to review this |
Author
|
thanx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose / Description
This PR addresses Android Studio IDE warnings about unnecessary wrapper class usage.
Fixes
Approach
Replaced unnecessary Java wrapper class calls with native Kotlin methods:
FilteredDeckOptions.kt:
java.lang.Boolean.toString(true)→true.toString()java.lang.Boolean.toString(false)→false.toString()java.lang.Boolean.toString(deck.getBoolean(...))→deck.getBoolean(...).toString()AppCompatPreferenceActivity.kt:
java.lang.Boolean.parseBoolean(this.getString(key, java.lang.Boolean.toString(defValue)))tothis.getString(key, defValue.toString()).toBoolean()How Has This Been Tested?
./gradlew ktlintFormat and ./gradlew Libanki:test do the work
Learning (optional, can help others)
mentioned in the issue itself no any knowledge req
Checklist