Fixed
Status Update
Comments
ub...@gmail.com <ub...@gmail.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 4945dfa31180f343697de5810b99ec80a48dc386
Author: Andrei Shikov <ashikov@google.com>
Date: Mon Jun 20 16:09:06 2022
Prevent removing derived state from composition when it is read in other scopes
Derived state observations were previously unconditionally removed from the recompose scope and composition together, which broke other scopes which might be still observing derived state.
This change only removes derived state instances if it is no longer observed by other scopes.
Fixes: 236618362
Test: CompositionAndDerivedStateTests#observingDerivedStateInMultipleScopes
Change-Id: I92e7c8702efecb33bea3ea3effe9ec47e2a6ae5b
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composition.kt
M compose/runtime/runtime/src/commonTest/kotlin/androidx/compose/runtime/CompositionAndDerivedStateTests.kt
https://android-review.googlesource.com/2131915
Branch: androidx-main
commit 4945dfa31180f343697de5810b99ec80a48dc386
Author: Andrei Shikov <ashikov@google.com>
Date: Mon Jun 20 16:09:06 2022
Prevent removing derived state from composition when it is read in other scopes
Derived state observations were previously unconditionally removed from the recompose scope and composition together, which broke other scopes which might be still observing derived state.
This change only removes derived state instances if it is no longer observed by other scopes.
Fixes: 236618362
Test: CompositionAndDerivedStateTests#observingDerivedStateInMultipleScopes
Change-Id: I92e7c8702efecb33bea3ea3effe9ec47e2a6ae5b
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composition.kt
M compose/runtime/runtime/src/commonTest/kotlin/androidx/compose/runtime/CompositionAndDerivedStateTests.kt
ba...@gmail.com <ba...@gmail.com> #3
The following release(s) address this bug:
androidx.compose.runtime:runtime:1.3.0
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit fa01cd0596c5a6caa1e4e4677d33d2318755bfdc
Author: Simon Schiller <simonschiller@users.noreply.github.com>
Date: Tue Dec 08 12:50:50 2020
[GH] Avoid exception when calling Activity.reportFullyDrawn()
## Proposed Changes
- Avoid a bug on API 19 when calling `Activity.reportFullyDrawn()`
I'm not quite sure if this class is the right place for this workaround, the code could also live in other places, e.g.:
- `androidx.core.app.ComponentActivity`
- `androidx.activity.ComponentActivity`
- `androidx.appcompat.app.AppCompatActivity`
## Testing
Test: Manually tested. If your test harness is also executed on devices with API 19, I could write an automated test for this change if you want.
## Issues Fixed
Fixes: 163239764
This is an imported pull request fromhttps://github.com/androidx/androidx/pull/103 .
Resolves #103
Github-Pr-Head-Sha: 78894ac5325a26c9e69715540bb6a6d1d97e3429
GitOrigin-RevId: 9ef8e3e0bd9d2bed208c784f5157aaa7dc6c3845
Change-Id: Ie4cd0f421b4ac69a3420a553f930fde6253392f0
M activity/activity/src/androidTest/AndroidManifest.xml
A activity/activity/src/androidTest/java/androidx/activity/ComponentActivityReportFullyDrawnTest.kt
M activity/activity/src/main/java/androidx/activity/ComponentActivity.java
https://android-review.googlesource.com/1520920
Branch: androidx-master-dev
commit fa01cd0596c5a6caa1e4e4677d33d2318755bfdc
Author: Simon Schiller <simonschiller@users.noreply.github.com>
Date: Tue Dec 08 12:50:50 2020
[GH] Avoid exception when calling Activity.reportFullyDrawn()
## Proposed Changes
- Avoid a bug on API 19 when calling `Activity.reportFullyDrawn()`
I'm not quite sure if this class is the right place for this workaround, the code could also live in other places, e.g.:
- `androidx.core.app.ComponentActivity`
- `androidx.activity.ComponentActivity`
- `androidx.appcompat.app.AppCompatActivity`
## Testing
Test: Manually tested. If your test harness is also executed on devices with API 19, I could write an automated test for this change if you want.
## Issues Fixed
Fixes: 163239764
This is an imported pull request from
Resolves #103
Github-Pr-Head-Sha: 78894ac5325a26c9e69715540bb6a6d1d97e3429
GitOrigin-RevId: 9ef8e3e0bd9d2bed208c784f5157aaa7dc6c3845
Change-Id: Ie4cd0f421b4ac69a3420a553f930fde6253392f0
M activity/activity/src/androidTest/AndroidManifest.xml
A activity/activity/src/androidTest/java/androidx/activity/ComponentActivityReportFullyDrawnTest.kt
M activity/activity/src/main/java/androidx/activity/ComponentActivity.java
il...@google.com <il...@google.com> #5
This has been fixed and will be part of the upcoming Activity 1.2.0-rc01 release.
Description
Version used: 1.1.0
Devices/Android versions reproduced on: Emulator API 19
Activity.reportFullyDrawn() was introduced in API 19 but has a bug at that API level requiring the system permission UPDATE_DEVICE_STATS, which is not available to non-system apps. FragmentActivity could override the method and do nothing on API 19 and below. This avoids running into the unfixable bug, and also avoids having to do API-specific code wrapping for API 18 and below where the method does not exist.