Status Update
Comments
to...@gmail.com <to...@gmail.com> #2
Branch: androidx-main
commit e81f3bda1116a1734ec397f54dd40f8472203294
Author: elifbilgin <elifbilgin@google.com>
Date: Mon Aug 08 12:22:30 2022
Converting `sqlite` related files in `sqlite` from Java to Kotlin (Part 1/3).
Test: Existing tests
Bug: 240707042
Relnote: Converting `sqlite` related files in `sqlite` from Java to Kotlin.
Change-Id: I7bc3574feaacb12bd4aa1c006579ddc52607a3a5
M room/room-runtime/api/restricted_current.txt
M room/room-runtime/src/test/java/androidx/room/RoomSQLiteQueryTest.java
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteProgram.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteCompat.kt
M sqlite/sqlite/src/test/java/androidx/sqlite/db/SimpleSQLiteQueryTest.kt
M sqlite/sqlite/api/current.txt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SimpleSQLiteQuery.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteQuery.kt
M room/room-compiler/build.gradle
M room/room-runtime/src/main/java/androidx/room/RoomSQLiteQuery.kt
M sqlite/sqlite-framework/build.gradle
M sqlite/sqlite/api/public_plus_experimental_current.txt
M sqlite/sqlite/build.gradle
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteStatement.kt
M room/room-runtime/api/restricted_current.ignore
M sqlite/sqlite/api/restricted_current.txt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/QueryInterceptorTest.kt
M room/room-runtime/src/main/java/androidx/room/QueryInterceptorDatabase.kt
lp...@google.com <lp...@google.com>
mo...@google.com <mo...@google.com> #3
Branch: androidx-main
commit 659c2cdeeb8a045b413da4763d1431497592e5cf
Author: elifbilgin <elifbilgin@google.com>
Date: Mon Aug 08 11:07:43 2022
Renaming `sqlite` related files in `sqlite` from Java to Kotlin (Part 1/3).
Test: Existing tests
Bug: 240707042
Relnote: Converting `sqlite` related files in `sqlite` from Java to Kotlin.
Change-Id: I60b041d58430c70c028b91ef8c86a0d64f89fc3a
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteQuery.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteStatement.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteProgram.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteCompat.kt
M sqlite/sqlite/src/test/java/androidx/sqlite/db/SimpleSQLiteQueryTest.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SimpleSQLiteQuery.kt
to...@gmail.com <to...@gmail.com> #4
Branch: androidx-main
commit a55634970cd065189bf9055c9ec5cbbdeeb789fc
Author: elifbilgin <elifbilgin@google.com>
Date: Wed Aug 10 16:44:43 2022
Converting `sqlite-framework` related files in `sqlite-framework` from Java to Kotlin.
Test: Existing tests
Bug: 240707042
Relnote: Converting `sqlite-framework` related files in `sqlite-framework` from Java to Kotlin.
Change-Id: Iaa63a678596118d4d40da7b12a30839166d0bc11
D sqlite/sqlite-framework/src/main/java/androidx/sqlite/util/SneakyThrow.java
M room/room-runtime/src/androidTest/java/androidx/room/AutoClosingRoomOpenHelperTest.kt
M sqlite/sqlite-framework/api/current.txt
M sqlite/sqlite-framework/src/androidTest/java/androidx/sqlite/db/framework/OpenHelperRecoveryTest.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteProgram.kt
M sqlite/sqlite-framework/api/public_plus_experimental_current.txt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/InternalsTest.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/util/ProcessLock.kt
M sqlite/integration-tests/inspection-room-testapp/src/androidTest/java/androidx/sqlite/inspection/RoomInvalidationHookTest.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelper.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteStatement.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelperFactory.kt
M sqlite/sqlite-framework/api/restricted_current.txt
mo...@google.com <mo...@google.com> #5
Branch: androidx-main
commit d6fc345225a1546cdb00a8a2728dfb5adcddb762
Author: elifbilgin <elifbilgin@google.com>
Date: Wed Aug 10 12:55:32 2022
Initial code check-in for renaming `sqlite-framework` related files in `sqlite` from *.java to *.kt.
Test: N/A
Bug: 240707042
Relnote: Initial code check-in for renaming `sqlite-framework` related files in `sqlite` from *.java to *.kt.
Change-Id: I2ecd06a8122751ae46765a8a354a6c1e191e2149
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/util/ProcessLock.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteProgram.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelper.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteStatement.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelperFactory.kt
to...@gmail.com <to...@gmail.com> #6
Branch: androidx-main
commit 5e2fab48d7c66ec49ae8c1fff52bd0999c94fe05
Author: elifbilgin <elifbilgin@google.com>
Date: Thu Aug 18 10:27:53 2022
Converting `sqlite` related files in `sqlite` from Java to Kotlin (Part 2/3).
Test: Existing tests
Bug: 240707042
Relnote: Converting `sqlite` related files in `sqlite` from Java to Kotlin.
Change-Id: I1d635ae1b6e7ef76de9c626b2088266a6a094a4d
M work/work-runtime/build.gradle
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/SuspendingQueryTest.kt
M room/room-runtime/src/main/java/androidx/room/AutoClosingRoomOpenHelper.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteQueryBuilder.kt
M work/work-gcm/build.gradle
M sqlite/sqlite/api/current.txt
M work/work-testing/build.gradle
M work/work-runtime/src/androidTest/java/androidx/work/impl/utils/ForceStopRunnableTest.java
M room/room-runtime/src/main/java/androidx/room/SQLiteCopyOpenHelper.kt
M sqlite/sqlite/api/public_plus_experimental_current.txt
M work/work-runtime-ktx/build.gradle
M work/work-inspection/build.gradle
M room/room-runtime/src/main/java/androidx/room/QueryInterceptorOpenHelper.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelper.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteOpenHelper.kt
M work/work-multiprocess/build.gradle
M sqlite/sqlite/api/restricted_current.txt
M work/work-benchmark/build.gradle
M work/integration-tests/testapp/build.gradle
mo...@google.com <mo...@google.com> #7
Branch: androidx-main
commit 751e9ba511b3263cab58bd877afe2dd7dc77b891
Author: elifbilgin <elifbilgin@google.com>
Date: Wed Aug 17 16:31:25 2022
Renaming `sqlite` related files in `sqlite` from Java to Kotlin (Part 2/3).
Test: Existing tests
Bug: 240707042
Relnote: Renaming `sqlite` related files in `sqlite` from Java to Kotlin.
Change-Id: I0c0558046191bd05621ae39988b4b7cd5b9459c5
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteQueryBuilder.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteOpenHelper.kt
to...@gmail.com <to...@gmail.com> #8
Branch: androidx-main
commit 684e629ec17072ea31aae485492b4fd2b10043f6
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Aug 30 18:47:45 2022
Converting SupportSQLiteDatabase from *.java to *.kt.
Test: N/A
Bug: 240707042
Relnote: Converting SupportSQLiteDatabase from *.java to *.kt.
Change-Id: I251619c5d7a0869b89fe23217abd768c295f5e1f
M room/room-runtime/src/androidTest/java/androidx/room/AutoClosingRoomOpenHelperFactoryTest.kt
M sqlite/sqlite-ktx/build.gradle
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.kt
M sqlite/sqlite-ktx/src/main/java/androidx/sqlite/db/SupportSQLiteDatabaseExt.kt
A sqlite/sqlite/api/current.ignore
A sqlite/sqlite/api/restricted_current.ignore
M room/room-runtime/src/main/java/androidx/room/AutoClosingRoomOpenHelper.kt
M sqlite/integration-tests/inspection-sqldelight-testapp/build.gradle
M sqlite/sqlite-inspection/build.gradle
M sqlite/sqlite/api/current.txt
M sqlite/integration-tests/inspection-room-testapp/build.gradle
M room/room-ktx/src/test/java/androidx/room/MigrationTest.kt
M room/room-runtime/src/test/java/androidx/room/InvalidationTrackerTest.kt
M sqlite/sqlite-framework/build.gradle
M sqlite/sqlite/api/public_plus_experimental_current.txt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteDatabase.kt
M work/work-runtime/src/main/java/androidx/work/impl/WorkDatabaseMigrations.kt
M sqlite/sqlite/build.gradle
M sqlite/sqlite/api/restricted_current.txt
M room/room-runtime/src/main/java/androidx/room/QueryInterceptorDatabase.kt
mo...@google.com <mo...@google.com> #9
Branch: androidx-main
commit 89bfc918a0bfe3237470262b75fd4a71c4048a1e
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Aug 30 18:07:34 2022
Initial code check-in for renaming SupportSQLiteDatabase from *.java to *.kt.
Test: N/A
Bug: 240707042
Relnote: Initial code check-in for renaming SupportSQLiteDatabase from *.java to *.kt.
Change-Id: I5627dba94bad99b1110778cd3e770c1f2a996294
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteDatabase.kt
to...@gmail.com <to...@gmail.com> #10
This bug was linked in a change in the following release(s):
androidx.room:room-ktx:2.5.0-beta01
androidx.room:room-runtime:2.5.0-beta01
androidx.sqlite:sqlite:2.3.0-beta01
androidx.sqlite:sqlite-framework:2.3.0-beta01
androidx.sqlite:sqlite-ktx:2.3.0-beta01
androidx.work:work-gcm:2.8.0-beta01
androidx.work:work-multiprocess:2.8.0-beta01
androidx.work:work-runtime:2.8.0-beta01
androidx.work:work-runtime-ktx:2.8.0-beta01
androidx.work:work-testing:2.8.0-beta01
mo...@google.com <mo...@google.com> #11
Have you tried using the DialogWindowProvider?
:
fun findDialogWindowProviderInParent(view: View): DialogWindowProvider? {
if (view is DialogWindowProvider) {
return view
}
val parent = view.parent ?: return null
if (parent is View) {
return findDialogWindowProviderInParent(parent)
}
return null
}
@Composable
MyDialogContent() {
val dialogWindowProvider = findDialogWindowProviderInParent(LocalView.current)
dialogWindowProvider?.window?.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN)
...
}
to...@gmail.com <to...@gmail.com> #12
Not at all I always failed at finding the proper window, this works perfectly thanks a lot.
val dialogWindowProvider = findDialogWindowProviderInParent(LocalView.current)
val window = dialogWindowProvider?.window
if (window != null) {
WindowCompat.getInsetsController(window, window.decorView).apply {
hide(WindowInsetsCompat.Type.statusBars())
systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
}
}
to...@gmail.com <to...@gmail.com> #13
Returning to the 2nd issue about the lag and your solution.
Using a .fillMaxSize()
breaks the second .fillMaxWidth(0.8f)
. In my case since only the height change I can use a .fillMaxHeight()
but I do not really understand what is happening. See attached screenshots.
I can just return to usePlatformDefaultWidth = true
since your workaround fixes the lag and then it behave as expected.
So just reporting in case there's something else about measurement that changes and was not expected.
to...@gmail.com <to...@gmail.com> #14
Ok and now the memories slowly comes back :(
usePlatformDefaultWidth = true
and dialog resizing issues.
Use the following dialog content with the content from #4 and usePlatformDefaultWidth = true
Surface(
modifier = modifier
.safeContentPadding()
.fillMaxWidth(0.8f),
shape = shape,
color = backgroundColor,
contentColor = contentColor,
) {
dialogNavigator.SaveableState("currentDialog") {
dialogContent(dialogNavigator)
}
}
It gives the result plaformnoanimate.png attached.
With
Surface(
modifier = modifier
.safeContentPadding()
.animateContentSize(),
shape = shape,
color = backgroundColor,
contentColor = contentColor,
) {
dialogNavigator.SaveableState("currentDialog") {
dialogContent(dialogNavigator)
}
}
It gives the result platformanimate.png
Both are wrong as the dialog does not properly resized on content change, strangely I can't find the issue on the tracker but I'm pretty sure there was one opened about that since ages and the reasons we had to migrate to use usePlatformDefaultWidth = false
.
Those hacks are so old on my side that I have an hard time remembering all the details :(
.fillMaxSize()
breaks the dismissOnClickOutside
As per this item title, adding the fillMaxSize prevent click outside to dismiss the dialog so it not really a proper workaround.
All those tests are made with alpha 4 that contains the CL.
to...@gmail.com <to...@gmail.com> #15
Adding a final note if anyone reads and needs a solution.
Box(
modifier = Modifier
.safeDrawingPadding()
.fillMaxSize()
.padding(horizontal = 32.dp)
.clickable {
if (dialogState.canDismiss.value) {
dialogNavigator.hide()
}
}
) {
Surface(
modifier = modifier
.align(Alignment.Center)
.sizeIn(maxWidth = 640.dp)
.clickable(enabled = false) {}
.animateContentSize(),
shape = shape,
color = backgroundColor,
contentColor = contentColor,
) {
dialogNavigator.SaveableState("currentDialog") {
dialogContent(dialogNavigator)
}
}
}
Beware that this still only works properly with usePlatformDefaultWidth = false
See resulting video "works"
With usePlatformDefaultWidth = true
this will give the result "notwork" where the dialog width animate (while it should not, the actual width never changes) but the content does not seems to react so the title is on 2 lines. (The title is a simple Text() present on first display, not a later change)
I think I covered most of the issues with dialogs here. Some very old that where workarounded via usePlatformDefaultWidth=false
and some that are now also present in usePlatformDefaultWidth=false
due to window resizing (But working better than the other case)
ap...@google.com <ap...@google.com> #16
Project: platform/frameworks/support
Branch: androidx-main
Author: George Mount <
Link:
Set default Gravity for Dialogs to CENTER
Expand for full commit details
Set default Gravity for Dialogs to CENTER
Fixes: 373093006
On some devices, the default gravity for dialogs is not CENTER.
This changes the default gravity for Compose dialogs to CENTER.
Test: new test, manual testing on broken device
Change-Id: Ia2ec9f6edc2705cb8a13201d5e05a859a6bb9571
Files:
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/window/DialogTest.kt
- M
compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/window/AndroidDialog.android.kt
Hash: 97468d483b698d637162d50a4549ac0f2d8257ca
Date: Wed Oct 16 15:34:47 2024
to...@gmail.com <to...@gmail.com> #17
Can we discuss the other issues too?
to...@gmail.com <to...@gmail.com> #18
I guess that's a no and I documented all the issues for nothing.
pr...@google.com <pr...@google.com> #19
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.ui:ui:1.8.0-alpha05
androidx.compose.ui:ui-android:1.8.0-alpha05
androidx.compose.ui:ui-jvmstubs:1.8.0-alpha05
androidx.compose.ui:ui-linuxx64stubs:1.8.0-alpha05
Description
Jetpack Compose version: 1.8 SNAPSHOT : 12425984
The CLhttps://android-review.googlesource.com/c/platform/frameworks/support/+/3272334 have broken dialogs shown from BottomSheets on Samsung Android 14 devices at least.
Snapshot 12425888 does not exhibit this behavior.
Repo: Show a Dialog/AlertDialog from a ModalBottomSheet from a recent M3 (So after the popup rewrite).
While this is probably a Samsung Bug (See the SAF confirmation screenshot that have the dialog at the bottom too), this is problematic as the M3 alert dialogs does not allow to pass a modifier to at least set contentSafePadding().
So if you consider that this is fully Samsung bug, it would be nice that this was reaffected to M3 to ensure the dialog can have safe paddings.