Android permission requests with one-time permissions in mind
A change of the meaning of shared preferences starting with "HasRequestedAndroidPermission::" Without one-time permissions it was enough to remember *if* the user was asked for an Android permission. But now, we need to remember user's response. A permission that at first was granted can be later denied without any user action. This change is tested using the newest methods provided by Robolectric and androidx.test Robolectric.buildActivity is a low-level tool for managing Activity lifetime and Robolectric.setupActivity is deprecated in favor of androidx.test.core.app.ActivityScenario For the ActivityScenario to work, the Activity used in test must be declared in the AndroidManifest Change-Id: I2f809e43dd4790a09cdac08cc0e0803a6fed086e Bug: 1096085 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2285470 Commit-Queue: who/bttk <bttk@chromium.org> Reviewed-by:Patrick Noland <pnoland@chromium.org> Reviewed-by:
Ted Choc <tedchoc@chromium.org> Cr-Commit-Position: refs/heads/master@{#790189}
Showing
This diff is collapsed.
Please register or sign in to comment