Struct ApplicationPolicy

Source
pub struct ApplicationPolicy {
Show 20 fields pub accessible_track_ids: Option<Vec<String>>, pub always_on_vpn_lockdown_exemption: Option<String>, pub auto_update_mode: Option<String>, pub connected_work_and_personal_app: Option<String>, pub credential_provider_policy: Option<String>, pub default_permission_policy: Option<String>, pub delegated_scopes: Option<Vec<String>>, pub disabled: Option<bool>, pub extension_config: Option<ExtensionConfig>, pub install_constraint: Option<Vec<InstallConstraint>>, pub install_priority: Option<i32>, pub install_type: Option<String>, pub lock_task_allowed: Option<bool>, pub managed_configuration: Option<HashMap<String, Value>>, pub managed_configuration_template: Option<ManagedConfigurationTemplate>, pub minimum_version_code: Option<i32>, pub package_name: Option<String>, pub permission_grants: Option<Vec<PermissionGrant>>, pub user_control_settings: Option<String>, pub work_profile_widgets: Option<String>,
}
Expand description

Policy for an individual app. Note: Application availability on a given device cannot be changed using this policy if installAppsDisabled is enabled. The maximum number of applications that you can specify per policy is 3,000.

This type is not used in any activity, and only used as part of another schema.

Fields§

§accessible_track_ids: Option<Vec<String>>

List of the app’s track IDs that a device belonging to the enterprise can access. If the list contains multiple track IDs, devices receive the latest version among all accessible tracks. If the list contains no track IDs, devices only have access to the app’s production track. More details about each track are available in AppTrackInfo.

§always_on_vpn_lockdown_exemption: Option<String>

Specifies whether the app is allowed networking when the VPN is not connected and alwaysOnVpnPackage.lockdownEnabled is enabled. If set to VPN_LOCKDOWN_ENFORCED, the app is not allowed networking, and if set to VPN_LOCKDOWN_EXEMPTION, the app is allowed networking. Only supported on devices running Android 10 and above. If this is not supported by the device, the device will contain a NonComplianceDetail with non_compliance_reason set to API_LEVEL and a fieldPath. If this is not applicable to the app, the device will contain a NonComplianceDetail with non_compliance_reason set to UNSUPPORTED and a fieldPath. The fieldPath is set to applications[i].alwaysOnVpnLockdownExemption, where i is the index of the package in the applications policy.

§auto_update_mode: Option<String>

Controls the auto-update mode for the app.

§connected_work_and_personal_app: Option<String>

Controls whether the app can communicate with itself across a device’s work and personal profiles, subject to user consent.

§credential_provider_policy: Option<String>

Optional. Whether the app is allowed to act as a credential provider on Android 14 and above.

§default_permission_policy: Option<String>

The default policy for all permissions requested by the app. If specified, this overrides the policy-level default_permission_policy which applies to all apps. It does not override the permission_grants which applies to all apps.

§delegated_scopes: Option<Vec<String>>

The scopes delegated to the app from Android Device Policy. These provide additional privileges for the applications they are applied to.

§disabled: Option<bool>

Whether the app is disabled. When disabled, the app data is still preserved.

§extension_config: Option<ExtensionConfig>

Configuration to enable this app as an extension app, with the capability of interacting with Android Device Policy offline.This field can be set for at most one app.

§install_constraint: Option<Vec<InstallConstraint>>

Optional. The constraints for installing the app. You can specify a maximum of one InstallConstraint. Multiple constraints are rejected.

§install_priority: Option<i32>

Optional. Amongst apps with installType set to: FORCE_INSTALLED PREINSTALLEDthis controls the relative priority of installation. A value of 0 (default) means this app has no priority over other apps. For values between 1 and 10,000, a lower value means a higher priority. Values outside of the range 0 to 10,000 inclusive are rejected.

§install_type: Option<String>

The type of installation to perform.

§lock_task_allowed: Option<bool>

Whether the app is allowed to lock itself in full-screen mode. DEPRECATED. Use InstallType KIOSK or kioskCustomLauncherEnabled to configure a dedicated device.

§managed_configuration: Option<HashMap<String, Value>>

Managed configuration applied to the app. The format for the configuration is dictated by the ManagedProperty values supported by the app. Each field name in the managed configuration must match the key field of the ManagedProperty. The field value must be compatible with the type of the ManagedProperty: type JSON value BOOL true or false STRING string INTEGER number CHOICE string MULTISELECT array of strings HIDDEN string BUNDLE_ARRAY array of objects

§managed_configuration_template: Option<ManagedConfigurationTemplate>

The managed configurations template for the app, saved from the managed configurations iframe. This field is ignored if managed_configuration is set.

§minimum_version_code: Option<i32>

The minimum version of the app that runs on the device. If set, the device attempts to update the app to at least this version code. If the app is not up-to-date, the device will contain a NonComplianceDetail with non_compliance_reason set to APP_NOT_UPDATED. The app must already be published to Google Play with a version code greater than or equal to this value. At most 20 apps may specify a minimum version code per policy.

§package_name: Option<String>

The package name of the app. For example, com.google.android.youtube for the YouTube app.

§permission_grants: Option<Vec<PermissionGrant>>

Explicit permission grants or denials for the app. These values override the default_permission_policy and permission_grants which apply to all apps.

§user_control_settings: Option<String>

Optional. Specifies whether user control is permitted for the app. User control includes user actions like force-stopping and clearing app data. Supported on Android 11 and above.

§work_profile_widgets: Option<String>

Specifies whether the app installed in the work profile is allowed to add widgets to the home screen.

Trait Implementations§

Source§

impl Clone for ApplicationPolicy

Source§

fn clone(&self) -> ApplicationPolicy

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ApplicationPolicy

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ApplicationPolicy

Source§

fn default() -> ApplicationPolicy

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ApplicationPolicy

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ApplicationPolicy

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Part for ApplicationPolicy

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,