pub struct PackageManager { /* private fields */ }
Expand description
用于检索与设备上当前安装的应用程序包相关的各种信息的类。您可以通过 Context.getPackageManager 找到此类。 注意:如果您的应用以 Android 11(API 级别 30)或更高版本为目标,则此类中的方法均会返回经过筛选的应用列表。
Implementations§
Source§impl PackageManager
impl PackageManager
Sourcepub const PERMISSION_GRANTED: i32 = 0i32
pub const PERMISSION_GRANTED: i32 = 0i32
权限检查结果:如果权限已被授予给定的包,则由 checkPermission 返回此结果。
Sourcepub const PERMISSION_DENIED: i32 = -1i32
pub const PERMISSION_DENIED: i32 = -1i32
权限检查结果:如果尚未授予给定包权限,则由 checkPermission 返回此结果。
Trait Implementations§
Source§impl Debug for PackageManager
impl Debug for PackageManager
Source§impl Deref for PackageManager
impl Deref for PackageManager
Source§impl From<&GlobalRef> for PackageManager
impl From<&GlobalRef> for PackageManager
Source§impl Into<GlobalRef> for &PackageManager
impl Into<GlobalRef> for &PackageManager
Source§impl JObjNew for PackageManager
impl JObjNew for PackageManager
Source§impl JType for PackageManager
impl JType for PackageManager
Source§impl PartialEq for PackageManager
impl PartialEq for PackageManager
Auto Trait Implementations§
impl Freeze for PackageManager
impl RefUnwindSafe for PackageManager
impl Send for PackageManager
impl Sync for PackageManager
impl Unpin for PackageManager
impl UnwindSafe for PackageManager
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
Mutably borrows from an owned value. Read more