Skip to content

Commit

Permalink
Reset one-time permission on app storage clear
Browse files Browse the repository at this point in the history
Test: Manual
Fixes: 151941017
Change-Id: I11b2125bf2a31927e3ef4aec66db94b38ef90761
  • Loading branch information
Evan Severson committed Mar 19, 2020
1 parent 3a18890 commit f21a09a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import static android.content.pm.PackageManager.FLAGS_PERMISSION_RESTRICTION_ANY_EXEMPT;
import static android.content.pm.PackageManager.FLAG_PERMISSION_APPLY_RESTRICTION;
import static android.content.pm.PackageManager.FLAG_PERMISSION_GRANTED_BY_DEFAULT;
import static android.content.pm.PackageManager.FLAG_PERMISSION_ONE_TIME;
import static android.content.pm.PackageManager.FLAG_PERMISSION_POLICY_FIXED;
import static android.content.pm.PackageManager.FLAG_PERMISSION_REVIEW_REQUIRED;
import static android.content.pm.PackageManager.FLAG_PERMISSION_REVOKED_COMPAT;
Expand Down Expand Up @@ -1587,7 +1588,8 @@ private void resetRuntimePermissionsInternal(final AndroidPackage pkg,
final int userSettableMask = FLAG_PERMISSION_USER_SET
| FLAG_PERMISSION_USER_FIXED
| FLAG_PERMISSION_REVOKED_COMPAT
| FLAG_PERMISSION_REVIEW_REQUIRED;
| FLAG_PERMISSION_REVIEW_REQUIRED
| FLAG_PERMISSION_ONE_TIME;

final int policyOrSystemFlags = FLAG_PERMISSION_SYSTEM_FIXED
| FLAG_PERMISSION_POLICY_FIXED;
Expand Down

0 comments on commit f21a09a

Please sign in to comment.