Fixed
Status Update
Comments
ub...@gmail.com <ub...@gmail.com> #2
Or, even better, it would actually detect if we're running a system app and let the call through, while also adding the needed permission automagically.
ba...@gmail.com <ba...@gmail.com> #3
open projects
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.