Deprecated
in API level 27
Class Overview
This class provides APIs to control Security policy updates on device.
Summary
Constants |
int |
SPD_ENFORCE_NONE |
Security policy automatic updates option is ON/OFF(default) and UI is enabled |
int |
SPD_ENFORCE_OFF |
Security policy automatic updates option is OFF and UI is disabled |
int |
SPD_ENFORCE_ON |
Security policy automatic updates option is ON and UI is disabled |
int |
SPD_FAILED |
Denoting that there was an error retrieving the automatic SPD update mode |
int |
SPD_OFF |
Security policy automatic updates option is OFF and UI is enabled |
int |
SPD_ON |
Security policy automatic updates option is OFF and UI is disabled. |
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Constants
public
static
final
int
SPD_ENFORCE_NONE
Since: API level 19
Security policy automatic updates option is ON/OFF(default) and UI is enabled
Constant Value:
0
(0x00000000)
public
static
final
int
SPD_ENFORCE_OFF
Since: API level 19
Security policy automatic updates option is OFF and UI is disabled
Constant Value:
2
(0x00000002)
public
static
final
int
SPD_ENFORCE_ON
Since: API level 19
Security policy automatic updates option is ON and UI is disabled
Constant Value:
1
(0x00000001)
public
static
final
int
SPD_FAILED
Since: API level 19
Denoting that there was an error retrieving the automatic SPD update mode
Constant Value:
-1
(0xffffffff)
public
static
final
int
SPD_OFF
Since: API level 19
Security policy automatic updates option is OFF and UI is enabled
Constant Value:
4
(0x00000004)
public
static
final
int
SPD_ON
Since: API level 19
Security policy automatic updates option is OFF and UI is disabled.
In addition, Check for updates option UI is disabled.
Constant Value:
3
(0x00000003)
Public Constructors
public
SPDControlPolicy
()
Public Methods
public
int
getAutoSecurityPolicyUpdateMode
()
Deprecated
in API level 27
API to get Security policy automatic updates mode.
Usage
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
SPDControlPolicy spdControlPolicy = edm.SPDControlPolicy();
try {
int mode = spdControlPolicy.getAutoSecurityPolicyUpdateMode();
} catch (SecurityException e) {
Log.e(TAG, "SecurityException:" + e);
}
|
public
boolean
setAutoSecurityPolicyUpdateMode
(int mode)
Deprecated
in API level 27
API to set Security policy automatic updates mode.
Returns
true
on success otherwise false
.
Usage
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
SPDControlPolicy spdControlPolicy = edm.SPDControlPolicy();
try {
// Enable automatic policy update
boolean result = spdControlPolicy.setAutoSecurityPolicyUpdateMode(SPD_ENFORCE_ON);
} catch (SecurityException e) {
Log.e(TAG, "SecurityException:" + e);
}
|
Permission
The caller should have the
"com.samsung.android.knox.permission.KNOX_SPDCONTROL" permission,
which has a protection level of "signature" |