public class ProtectedPackages extends Object
Constructor and Description |
---|
ProtectedPackages(Context context) |
Modifier and Type | Method and Description |
---|---|
boolean |
isPackageDataProtected(int userId,
String packageName)
Returns
true if a given package's data is protected. |
boolean |
isPackageStateProtected(int userId,
String packageName)
Returns
true if a given package's state is protected. |
void |
setDeviceAndProfileOwnerPackages(int deviceOwnerUserId,
String deviceOwnerPackage,
SparseArray<String> profileOwnerPackages)
Sets the device/profile owner information.
|
public ProtectedPackages(Context context)
public void setDeviceAndProfileOwnerPackages(int deviceOwnerUserId, String deviceOwnerPackage, SparseArray<String> profileOwnerPackages)
public boolean isPackageStateProtected(int userId, String packageName)
true
if a given package's state is protected. Otherwise, returns
false
.
This is not applicable if the caller is the package owner.
public boolean isPackageDataProtected(int userId, String packageName)
true
if a given package's data is protected. Otherwise, returns
false
.