PolicyIdentifier
open class PolicyIdentifier<T : Any!>
| kotlin.Any | |
| ↳ | android.app.admin.PolicyIdentifier |
Represents a type safe identifier for a policy. Use it as a key for setPolicy and related APIs.
Policies should be structured as:
<code>{ @}TypePolicyDefinition private static final PolicyIdentifier<Type> POLICY_NAME = new SimplePolicyIdentifier<>("POLICY_NAME"); </code>
Currently policy definitions are restricted to the android.app.admin.policy namespace. This restriction might be lifted in the future.
Summary
| Public methods | |
|---|---|
| open static PolicyIdentifier<U> |
createForTesting(id: String)Create an instance of PolicyIdentifier for testing purposes. |
Public methods
createForTesting
open static fun <U : Any!>createForTesting(id: String): PolicyIdentifier<U>
Deprecated: Use android.app.admin.PolicyIdentifier.SimplePolicyIdentifier#createForTesting(java.lang.String) instead.
Create an instance of PolicyIdentifier for testing purposes. This must NOT be used in any real production code.
| Parameters | |
|---|---|
id |
String: This value cannot be null. |
| Return | |
|---|---|
PolicyIdentifier<U> |
This value cannot be null. |