Skip to content
Commit 81870658 authored by shafik's avatar shafik Committed by Zimuzo Ezeozue
Browse files

Add API for apps to query whether they have All Files Access

This is a fix in response to developers' feedback on DP1.
Add Environment API that enables apps to check whether they have All
Files Access special app access. The API encapsulates the actual
mechanics of the check, which are as follows:
    * First check MANAGE_EXTERNAL_STORAGE app-op,
      if it's allowed, return true. If it's denied (ignored or errored),
      return false.
    * If the mode is default, then check for MANAGE_EXTERNAL_STORAGE
      permission, if it's GRANTED (not just declared), then return true,
      else return false.

Also add test.

Test: atest EnvironmentTest # not CTS
Fix: 150115615
Merged-In: I0574827c22960bf8f074313d983f289be7142149
Change-Id: I0574827c22960bf8f074313d983f289be7142149
parent bed09965
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment