• bttk's avatar
    Android permission requests with one-time permissions in mind · c81c441f
    bttk authored
    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: default avatarPatrick Noland <pnoland@chromium.org>
    Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#790189}
    c81c441f
AndroidManifest.xml 709 Bytes