Android.Content.PackageContextFlags Enumeration
Enumerates values returned by the PackageContextFlags.IgnoreSecurity, PackageContextFlags.IncludeCode, and PackageContextFlags.Restricted members and taken as a parameter of the Context.CreatePackageContext, ContextWrapper.CreatePackageContext, and Android.Test.Mock.MockContext.CreatePackageContext members.

Syntax

[System.Flags]
public enum PackageContextFlags

Remarks

Enumerates values returned by the PackageContextFlags.IgnoreSecurity, PackageContextFlags.IncludeCode, and PackageContextFlags.Restricted members and taken as a parameter of the Context.CreatePackageContext, ContextWrapper.CreatePackageContext, and Android.Test.Mock.MockContext.CreatePackageContext members.

Members

Member NameDescription
IgnoreSecurityFlag for use with Context.CreatePackageContext(string, Android.Content.PackageContextFlags): ignore any security restrictions on the Context being requested, allowing it to always be loaded. For use with PackageContextFlags.IncludeCode to allow code to be loaded into a process even when it isn't safe to do so. Use with extreme care!
IncludeCodeFlag for use with Context.CreatePackageContext(string, Android.Content.PackageContextFlags): include the application code with the context. This means loading code into the caller's process, so that Context.ClassLoader can be used to instantiate the application's classes. Setting this flags imposes security restrictions on what application context you can access; if the requested application can not be safely loaded into your process, java.lang.SecurityException will be thrown. If this flag is not set, there will be no restrictions on the packages that can be loaded, but Context.ClassLoader will always return the default system class loader.
RestrictedFlag for use with Context.CreatePackageContext(string, Android.Content.PackageContextFlags): a restricted context may disable specific features. For instance, a View associated with a restricted context would ignore particular XML attributes.

Requirements

Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0