{ "methods": { "__constructor__(android.content.Context,com.android.internal.app.IAppOpsService)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "context", "service" ], "returnType": "void", "exceptions": [], "minSdk": 19, "name": "__constructor__(android.content.Context,com.android.internal.app.IAppOpsService)" }, "checkOpNoThrow(int,int,java.lang.String)": { "isImplementation": true, "modifiers": [ "public" ], "params": [ "op", "uid", "packageName" ], "returnType": "int", "exceptions": [], "minSdk": 19, "name": "checkOpNoThrow(int,int,java.lang.String)", "documentation": "Like {@link AppOpsManager#checkOp} but instead of throwing a {@link SecurityException} it\nreturns {@link AppOpsManager#MODE_ERRORED}.\n\n\u003cp\u003eMade public for testing {@link #setMode} as the method is {@coe @hide}.\n" }, "checkOpNoThrow(java.lang.String,int,java.lang.String)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "op", "uid", "packageName" ], "returnType": "int", "exceptions": [], "minSdk": 28, "name": "checkOpNoThrow(java.lang.String,int,java.lang.String)" }, "checkPackage(int,java.lang.String)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "uid", "packageName" ], "returnType": "void", "exceptions": [], "minSdk": 19, "name": "checkPackage(int,java.lang.String)" }, "getAudioRestrictionKey(int,int)": { "isImplementation": false, "modifiers": [ "private", "static" ], "params": [ "code", "usage" ], "returnType": "int", "exceptions": [], "name": "getAudioRestrictionKey(int,int)" }, "getInternalKey(int,java.lang.String)": { "isImplementation": false, "modifiers": [ "private", "static" ], "params": [ "uid", "packageName" ], "returnType": "java.lang.String", "exceptions": [], "name": "getInternalKey(int,java.lang.String)" }, "getListenerKey(int,java.lang.String)": { "isImplementation": false, "modifiers": [ "private", "static" ], "params": [ "op", "packageName" ], "returnType": "java.lang.String", "exceptions": [], "name": "getListenerKey(int,java.lang.String)" }, "getOpMapKey(int,java.lang.String,int)": { "isImplementation": false, "modifiers": [ "private", "static" ], "params": [ "uid", "packageName", "opInt" ], "returnType": "java.lang.String", "exceptions": [], "name": "getOpMapKey(int,java.lang.String,int)" }, "getOpsForPackage(int,java.lang.String,int[])": { "isImplementation": true, "modifiers": [ "public" ], "params": [ "uid", "packageName", "ops" ], "returnType": "java.util.List\u003candroid.app.AppOpsManager.PackageOps\u003e", "exceptions": [], "minSdk": 19, "name": "getOpsForPackage(int,java.lang.String,int[])" }, "getRestriction(int,int)": { "isImplementation": false, "modifiers": [ "public" ], "params": [ "code", "usage" ], "returnType": "org.robolectric.shadows.ShadowAppOpsManager.ModeAndException", "exceptions": [], "name": "getRestriction(int,int)" }, "noteOp(int,int,java.lang.String)": { "isImplementation": true, "modifiers": [ "public" ], "params": [ "op", "uid", "packageName" ], "returnType": "int", "exceptions": [], "minSdk": 19, "maxSdk": 29, "name": "noteOp(int,int,java.lang.String)" }, "noteOp(int,int,java.lang.String,java.lang.String)": { "isImplementation": true, "modifiers": [ "public" ], "params": [ "op", "uid", "packageName", "message" ], "returnType": "int", "exceptions": [], "minSdk": 30, "name": "noteOp(int,int,java.lang.String,java.lang.String)" }, "noteProxyOpNoThrow(int,java.lang.String)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "op", "proxiedPackageName" ], "returnType": "int", "exceptions": [], "minSdk": 23, "maxSdk": 29, "name": "noteProxyOpNoThrow(int,java.lang.String)" }, "noteProxyOpNoThrow(int,java.lang.String,int,java.lang.String,java.lang.String)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "op", "proxiedPackageName", "proxiedUid", "featureId", "message" ], "returnType": "int", "exceptions": [], "minSdk": 30, "name": "noteProxyOpNoThrow(int,java.lang.String,int,java.lang.String,java.lang.String)" }, "setMode(int,int,java.lang.String,int)": { "isImplementation": true, "modifiers": [ "public" ], "params": [ "op", "uid", "packageName", "mode" ], "returnType": "void", "exceptions": [], "minSdk": 19, "name": "setMode(int,int,java.lang.String,int)", "documentation": "Int version of {@link #setMode(String, int, String, int)}.\n\n\u003cp\u003eThis method is public for testing {@link #checkOpNoThrow}. If {@link #checkOpNoThrow} is *\ncalled afterwards with the {@code op}, {@code ui}, and {@code packageName} provided, it will *\nreturn the {@code mode} set here.\n" }, "setMode(java.lang.String,int,java.lang.String,int)": { "isImplementation": true, "modifiers": [ "public" ], "params": [ "op", "uid", "packageName", "mode" ], "returnType": "void", "exceptions": [], "minSdk": 28, "name": "setMode(java.lang.String,int,java.lang.String,int)", "documentation": "Change the operating mode for the given op in the given app package. You must pass in both the\nuid and name of the application whose mode is being modified; if these do not match, the\nmodification will not be applied.\n\n\u003cp\u003eThis method is public for testing {@link #checkOpNoThrow}. If {@link #checkOpNoThrow} is\ncalled afterwards with the {@code op}, {@code ui}, and {@code packageName} provided, it will\nreturn the {@code mode} set here.\n\n@param op The operation to modify. One of the OPSTR_* constants.\n@param uid The user id of the application whose mode will be changed.\n@param packageName The name of the application package name whose mode will be changed.\n" }, "setRestriction(int,int,int,java.lang.String[])": { "isImplementation": true, "modifiers": [ "public" ], "params": [ "code", "usage", "mode", "exceptionPackages" ], "returnType": "void", "exceptions": [], "minSdk": 21, "name": "setRestriction(int,int,int,java.lang.String[])", "documentation": "Sets audio restrictions.\n\n\u003cp\u003eThis method is public for testing, as the original method is {@code @hide}.\n" }, "startWatchingMode(int,java.lang.String,android.app.AppOpsManager.OnOpChangedListener)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "op", "packageName", "callback" ], "returnType": "void", "exceptions": [], "minSdk": 19, "name": "startWatchingMode(int,java.lang.String,android.app.AppOpsManager.OnOpChangedListener)" }, "stopWatchingMode(android.app.AppOpsManager.OnOpChangedListener)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "callback" ], "returnType": "void", "exceptions": [], "minSdk": 19, "name": "stopWatchingMode(android.app.AppOpsManager.OnOpChangedListener)" }, "toOpEntry(java.lang.Integer)": { "isImplementation": false, "modifiers": [ "private", "static" ], "params": [ "op" ], "returnType": "android.app.AppOpsManager.OpEntry", "exceptions": [], "name": "toOpEntry(java.lang.Integer)" }, "unsafeCheckOpNoThrow(java.lang.String,int,java.lang.String)": { "isImplementation": true, "modifiers": [ "public" ], "params": [ "op", "uid", "packageName" ], "returnType": "int", "exceptions": [], "minSdk": 29, "name": "unsafeCheckOpNoThrow(java.lang.String,int,java.lang.String)" }, "unsafeCheckOpRawNoThrow(int,int,java.lang.String)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "op", "uid", "packageName" ], "returnType": "int", "exceptions": [], "minSdk": 29, "name": "unsafeCheckOpRawNoThrow(int,int,java.lang.String)", "documentation": "Returns the \u003cem\u003eraw\u003c/em\u003e mode associated with the op.\nDoes not throw a security exception, does not translate {@link AppOpsManager#MODE_FOREGROUND}.\n" }, "unsafeCheckOpRawNoThrow(java.lang.String,int,java.lang.String)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "op", "uid", "packageName" ], "returnType": "int", "exceptions": [], "minSdk": 29, "name": "unsafeCheckOpRawNoThrow(java.lang.String,int,java.lang.String)", "documentation": "Like {@link #unsafeCheckOpNoThrow(String, int, String)} but returns the \u003cem\u003eraw\u003c/em\u003e mode\nassociated with the op. Does not throw a security exception, does not translate {@link\nAppOpsManager#MODE_FOREGROUND}.\n" } }, "imports": [ "android.os.Build.VERSION_CODES.KITKAT", "android.os.Build.VERSION_CODES.LOLLIPOP", "android.os.Build.VERSION_CODES.M", "android.os.Build.VERSION_CODES.P", "android.os.Build.VERSION_CODES.Q", "android.os.Build.VERSION_CODES.R", "org.robolectric.shadow.api.Shadow.invokeConstructor", "android.annotation.Nullable", "android.annotation.RequiresPermission", "android.annotation.SystemApi", "android.app.AppOpsManager", "android.app.AppOpsManager.AttributedOpEntry", "android.app.AppOpsManager.OnOpChangedListener", "android.app.AppOpsManager.OpEntry", "android.app.AppOpsManager.PackageOps", "android.content.Context", "android.content.pm.PackageManager.NameNotFoundException", "android.media.AudioAttributes.AttributeUsage", "android.os.Binder", "android.os.Build", "android.util.LongSparseArray", "android.util.LongSparseLongArray", "com.android.internal.app.IAppOpsService", "com.google.common.collect.BiMap", "com.google.common.collect.HashBiMap", "com.google.common.collect.HashMultimap", "com.google.common.collect.ImmutableList", "com.google.common.collect.Multimap", "java.util.ArrayList", "java.util.Arrays", "java.util.Collections", "java.util.HashMap", "java.util.HashSet", "java.util.List", "java.util.Map", "java.util.Objects", "java.util.Set", "org.robolectric.RuntimeEnvironment", "org.robolectric.annotation.HiddenApi", "org.robolectric.annotation.Implementation", "org.robolectric.annotation.Implements", "org.robolectric.annotation.RealObject", "org.robolectric.shadow.api.Shadow", "org.robolectric.util.ReflectionHelpers", "org.robolectric.util.ReflectionHelpers.ClassParameter", "org.robolectric.shadows.ShadowAppOpsManager.ModeAndException" ], "name": "org.robolectric.shadows.ShadowAppOpsManager" }