pub struct AdbShellDpm { /* private fields */ }
Implementations§
Source§impl AdbShellDpm
impl AdbShellDpm
pub fn new() -> Self
pub fn name(&mut self, name: String) -> &mut Self
pub fn user_id(&mut self, user_id: String) -> &mut Self
Sourcepub fn set_active_admin(&mut self, set_active_admin: bool) -> &mut Self
pub fn set_active_admin(&mut self, set_active_admin: bool) -> &mut Self
Sets component as active admin.
Options are:
--user
user_id: Specify the target user. You can also pass--user current
to select the current user.
Sourcepub fn set_profile_owner(&mut self, set_profile_owner: bool) -> &mut Self
pub fn set_profile_owner(&mut self, set_profile_owner: bool) -> &mut Self
Sets component as active admin and its package as profile owner for an existing user.
Options are:
--user user_id
: Specify the target user. You can also pass –user current to select the current user.--name name
: Specify the human-readable organization name.
Sourcepub fn set_device_owner(&mut self, set_device_owner: bool) -> &mut Self
pub fn set_device_owner(&mut self, set_device_owner: bool) -> &mut Self
Sets component as active admin and its package as device owner.
Options are:
--user user_id
: Specify the target user. You can also pass –user current to select the current user.--name name
: Specify the human-readable organization name.
Sourcepub fn remove_active_admin(&mut self, remove_active_admin: bool) -> &mut Self
pub fn remove_active_admin(&mut self, remove_active_admin: bool) -> &mut Self
Disables an active admin. The app must declare android:testOnly
in the
manifest. This command also removes device and profile owners.
Options are:
--user user_id
: Specify the target user. You can also pass –user current to select the current user.
Sourcepub fn clear_freeze_period_record(
&mut self,
clear_freeze_period_record: bool,
) -> &mut Self
pub fn clear_freeze_period_record( &mut self, clear_freeze_period_record: bool, ) -> &mut Self
Clears the device’s record of previously-set freeze periods for system OTA
updates. This is useful to avoid the device’s scheduling restrictions when
developing apps that manage freeze-periods. See [Manage system updates
].
Supported on devices running Android 9.0 (API level 28) and higher.
Sourcepub fn force_network_logs(&mut self, force_network_logs: bool) -> &mut Self
pub fn force_network_logs(&mut self, force_network_logs: bool) -> &mut Self
Forces the system to make any existing network logs ready for retrieval by a DPC. If there are connection or DNS logs available, the DPC receives the onNetworkLogsAvailable() callback. See Network activity logging.
This command is rate-limited. Supported on devices running Android 9.0 (API level 28) and higher.
Sourcepub fn force_security_logs(&mut self, force_security_logs: bool) -> &mut Self
pub fn force_security_logs(&mut self, force_security_logs: bool) -> &mut Self
Forces the system to make any existing security logs available to the DPC. If there are logs available, the DPC receives the onSecurityLogsAvailable() callback. See Log enterprise device activity.
This command is rate-limited. Supported on devices running Android 9.0 (API level 28) and higher.
pub fn run(&self) -> Result<()>
Trait Implementations§
Source§impl Clone for AdbShellDpm
impl Clone for AdbShellDpm
Source§fn clone(&self) -> AdbShellDpm
fn clone(&self) -> AdbShellDpm
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for AdbShellDpm
impl Default for AdbShellDpm
Source§fn default() -> AdbShellDpm
fn default() -> AdbShellDpm
Auto Trait Implementations§
impl Freeze for AdbShellDpm
impl RefUnwindSafe for AdbShellDpm
impl Send for AdbShellDpm
impl Sync for AdbShellDpm
impl Unpin for AdbShellDpm
impl UnwindSafe for AdbShellDpm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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