-
Notifications
You must be signed in to change notification settings - Fork 26
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
chore: enable penalty death on strict mode #2251
Conversation
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.
Not really sure the BulletHoleImagePreview.kt
changes should be in this PR
app/src/main/kotlin/com/wire/android/ui/common/imagepreview/BulletHoleImagePreview.kt
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## develop #2251 +/- ##
==========================================
Coverage 40.38% 40.38%
Complexity 1007 1007
==========================================
Files 318 318
Lines 11617 11617
Branches 1539 1539
==========================================
Hits 4691 4691
Misses 6487 6487
Partials 439 439
Continue to review full report in Codecov by Sentry.
|
…lletHoleImagePreview.kt Co-authored-by: Alexandre Ferris <[email protected]>
app/src/main/kotlin/com/wire/android/ui/common/imagepreview/BulletHoleImagePreview.kt
Outdated
Show resolved
Hide resolved
APKs built during tests are available here. Scroll down to Artifacts! |
Build 873 succeeded. The build produced the following APK's: |
.penaltyDeath() | ||
.build() | ||
) | ||
StrictMode.setVmPolicy( |
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.
Just out of curiosity, what's the VM policy for? emulators or images run in CI??
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.
No no nothing related to CI..We are just setting in Virtual Machine what actions should be detected.
Build 874 succeeded. The build produced the following APK's: |
import kotlinx.coroutines.launch | ||
|
||
@Composable | ||
private fun loadBiMap(imageUri: Uri): State<Bitmap?> { |
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.
Can we set this as an extension function annotated with stable?
@Stable
suspend fun Context.loadBitMap(imageUri: Uri): State<Bitmap?> {
return produceState<Bitmap?>(initialValue = null, imageUri) {
withContext(Dispatchers.IO) {
value = imageUri.toBitmap(this)
}
}
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.
It will be hard to pass the returned value from this suspend function to the composable as a param
APKs built during tests are available here. Scroll down to Artifacts! |
Build 878 succeeded. The build produced the following APK's: |
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
This PR will enable
penaltyDeath
ofStrictMode
on ThreadPolicy, which means the app will crash if we run operations on Main thread instead of worker thread.This is only on DEBUG build
Needs #2075 to be merged
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.