AppOpsManagerMode Enum

Definition

Enumerates values returned by several types.

public enum AppOpsManagerMode
type AppOpsManagerMode = 
Inheritance
AppOpsManagerMode

Fields

Name Value Description
Allowed 0

Result from checkOp(String, int, String), noteOp(String, int, String), startOp(String, int, String): the given caller is allowed to perform the given operation.

Ignored 1

Result from checkOp(String, int, String), noteOp(String, int, String), startOp(String, int, String): the given caller is not allowed to perform the given operation, and this attempt should silently fail (it should not cause the app to crash).

Errored 2

Result from checkOpNoThrow(String, int, String), noteOpNoThrow(String, int, String), startOpNoThrow(String, int, String): the given caller is not allowed to perform the given operation, and this attempt should cause it to have a fatal error, typically a SecurityException.

Default 3

Result from checkOp(String, int, String), noteOp(String, int, String), startOp(String, int, String): the given caller should use its default security check.

Foreground 4

Special mode that means "allow only when app is in foreground." This is not returned from unsafeCheckOp(String, int, String), noteOp(String, int, String), startOp(String, int, String).

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to