diff options
| author | Philip P. Moltmann <moltmann@google.com> | 2019-01-25 16:42:36 -0800 |
|---|---|---|
| committer | Philip P. Moltmann <moltmann@google.com> | 2019-01-27 20:47:02 -0800 |
| commit | dde07852280b8ea2ae40d366816aae11f194d2bd (patch) | |
| tree | f386b953a8e126c0cf3650d27b4f9a46425a628d /core/java/android | |
| parent | 3abecb462bc7642f184c45d2a157af8aa5836add (diff) | |
Reset per-pkg app-ops for runtime permissions
... on every boot.
These should never have been set, but we allow settings them via the
shell.
- Also previously a bug set per-pkg app-ops.
- Also set the app-op correctly when a fg/bg permission looses it's bg
permission.
Test: Set per-pkg app-opp. Rebooted and saw log message.
atest --test-mapping frameworks/base/services/core/java/com/android/server/pm/permission/:presubmit
Change-Id: If3b56fc08783ea99b4dba70c5fa275b94411ce94
Fixes: 123177944
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/AppOpsManagerInternal.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/java/android/app/AppOpsManagerInternal.java b/core/java/android/app/AppOpsManagerInternal.java index b5560331e7aa..da45054cbe51 100644 --- a/core/java/android/app/AppOpsManagerInternal.java +++ b/core/java/android/app/AppOpsManagerInternal.java @@ -78,7 +78,7 @@ public abstract class AppOpsManagerInternal { /** * Sets the app-ops mode for a certain app-op and uid. * - * <p>Similar as {@link AppOpsManager#setMode} but does not require the package manager to be + * <p>Similar as {@link AppOpsManager#setUidMode} but does not require the package manager to be * working. Hence this can be used very early during boot. * * <p>Only for internal callers. Does <u>not</u> verify that package name belongs to uid. @@ -88,4 +88,12 @@ public abstract class AppOpsManagerInternal { * @param mode The new mode to set. */ public abstract void setUidMode(int code, int uid, int mode); + + /** + * Set all {@link #setMode (package) modes} for this uid to the default value. + * + * @param code The app-op + * @param uid The uid + */ + public abstract void setAllPkgModesToDefault(int code, int uid); } |
