mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
3c0f30a2bbf0dd353e180005657d6dbf64aceb0d
And call initCompose() in Launcher.java. Therefore there is no behavior change for BaseActivity, or other ActivityContext subtypes that don't call initCompose(). This should work for non-activity subtypes of ActivityContext. It's likely that the Launcher activity will require more complete supoort for Lifecycle and SavedState. Note: In order to test the ComposeView, need to build this CL together with ag/22461463. 1. `ViewTreeLifecycleOwner.set(..., ...);` is necessary to fix the following crash: java.lang.IllegalStateException: ViewTreeLifecycleOwner not found This error comes from WindowRecomposer.android.kt - http://cs/androidx-platform-dev/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/WindowRecomposer.android.kt;l=351-354;rcl=5673af1441ebe04c776f528193dfc5f85c0c9a66 2. `ViewTreeSavedStateRegistryOwner.set(..., ...);` is necessary to fix the following crash: java.lang.IllegalStateException: Composed into the View which doesn't propagateViewTreeSavedStateRegistryOwner! This error comes from AndroidComposeView.android.kt. - http://cs/androidx-platform-dev/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt;l=1178-1183;rcl=5673af1441ebe04c776f528193dfc5f85c0c9a66 3. The lifecycle needs to be STARTED. Otherwise the ComposeView doesn't show up in its parent (i.e., isn't drawn). - In ComponentActivity, `onSaveInstanceState` starts the lifecycle. - In ComposeInitializeImpl (from SystemUI), ViewLifecycleOwner.updateState() starts the lifecycle when the window is visible and in focus. The implementation in this CL does the same thing as the ComposeInitializeImpl. Bug: 275905704 Test: on device, trigger a card such as the timer Test: RUN_ERROR_PRONE=True m out/soong/.intermediates/packages/apps/Launcher3/Launcher3/android_common/lint/lint-report.xml Test: RUN_ERROR_PRONE=True m out/soong/.intermediates/vendor/google/gms/packages/SearchLauncher/SearchLauncher/android_common/lint/lint-report.html Test: Presubmit Change-Id: Ieced66ad5238916a82ea13c01f69146bbdcf287a
Merge "Use global color extraction in widgets for wallpaper preview" into sc-v2-dev am:
9b3ef3e638 am: df311603e9
Languages
Java
73.1%
Kotlin
26.5%
AIDL
0.3%
Python
0.1%