Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
- androidx.slice.SliceManager
- androidx.startup.Initializer
Version used:
- androidx.slice:slice-core:1.1.0-alpha01
- androidx.startup:startup-runtime:1.0.0-alpha02
Devices/Android versions reproduced on:
- Google Pixel, Android 9.0
- Xiaomi Redmi Note 7, Android 9.0
- Huawai P90 lite, Android 9.0
Reproducible in this branch:
Description:
When attempting to grant slice permissions for a URI from an Initializer (from the androidx startup lib) on Android 9.0, the app hangs indefinitely (on Pixel), or crashes with a SecurityException (Xiaomi, Huawai).
`SliceManager.getInstance(context).grantSlicePermission(assistantPackage, sliceProviderUri)` is the call which causes the issue.
The issue does not occur on Android 10, nor Android 8.1.0. Moving the `grantSlicePermission()` call to Application's `onCreate()` resolves the issue.