-
Notifications
You must be signed in to change notification settings - Fork 742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android12 #4433
Merged
Merged
Android12 #4433
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
aa3f36b
Target API 31 - Android 12 - #4262
bmarty 31809a5
Temporary fix for Android 12. android:exported has to be explicitly s…
bmarty f7b2059
Target API 31 - Handle deprecated API
bmarty f1e1729
Bump work-runtime-ktx from 2.6.0 to 2.7.0
dependabot[bot] 540a1b5
Bump lifecycle-livedata-ktx from 2.3.1 to 2.4.0
dependabot[bot] 2880798
Bump core-ktx from 1.6.0 to 1.7.0
dependabot[bot] 56776ae
Bump browser from 1.3.0 to 1.4.0
dependabot[bot] 756f846
android:exported has to be explicitly set when targeting Android 12
bmarty a1c8835
Same version for all lifecycle deps
bmarty a1630b5
androidx.lifecycle:lifecycle-extensions is deprecated
bmarty 7e59c18
Add dep for ProcessLifecycleOwner
bmarty 9429b03
androidx.lifecycle:lifecycle-common-java8 -> androidx.lifecycle:lifec…
bmarty 0a9845a
@OnLifecycleEvent is deprecated, use DefaultLifecycleObserver instead
bmarty e9f53f6
InputConnectionCompat.createWrapper is deprecated
bmarty f25c178
Fix crash on Android 12
bmarty f88a477
Fix crash on Android 12: PendingIntent.FLAG_IMMUTABLE has to be set
bmarty 453e6da
Make the Cursor extensions public
bmarty 03019fd
Fix lint issue "Outside Range"
bmarty 1082771
Fix lint issue "Incorrect constant"
bmarty 96de0f8
Fix lint issue "NullSafeMutableLiveData"
bmarty b26ea75
ktlint
bmarty 60d75ff
Fix crash on Android 12.
bmarty 5a19533
Use correct value, but I do not see any effect on emulator with API 12
bmarty fb8b720
Add comment to run on Android 12
bmarty eb39b37
Fix warning after rebase (it's for test, so OK to suppress warning)
bmarty 8d8565c
Quick fix on this file
bmarty dddcbfb
Fix "PendingIntents attached to actions with remote inputs must be mu…
bmarty File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
23 changes: 23 additions & 0 deletions
23
multipicker/src/main/java/im/vector/lib/multipicker/utils/CursorExtensions.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright (c) 2021 New Vector Ltd | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package im.vector.lib.multipicker.utils | ||
|
||
import android.database.Cursor | ||
|
||
fun Cursor.getColumnIndexOrNull(column: String): Int? { | ||
return getColumnIndex(column).takeIf { it != -1 } | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is my first time seeing
inner@{
, what does it do?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"inner" is just a label, it could be anything else. It allows to use
return@inner
below (lines 77 and 78). Using classicalreturn@use
is not possible there since we are in 2 nesteduse
blocks, so is ambiguous.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah thanks for explaining