Class Overview
This class provides APIs to control the behavior of Knox Platform for Critical Communication (KPCC).
KPCC capabilities only work with pre-approved PS-LTE devices.
Summary
[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
DRX_1280_MSEC
Since: API level 29
Constant Value:
3
(0x00000003)
public
static
final
int
DRX_2560_MSEC
Since: API level 29
Constant Value:
4
(0x00000004)
public
static
final
int
DRX_320_MSEC
Since: API level 29
Constant Value:
1
(0x00000001)
public
static
final
int
DRX_640_MSEC
Since: API level 29
Constant Value:
2
(0x00000002)
public
static
final
int
DRX_DEFAULT
Since: API level 29
Constant Value:
0
(0x00000000)
public
static
final
int
ERROR_ADMIN_ALREADY_SET
Since: API level 29
Indicates that another admin has already set the policy.
Constant Value:
-3
(0xfffffffd)
public
static
final
int
ERROR_FAIL
Since: API level 29
Indicates that the operation failed.
Constant Value:
-1
(0xffffffff)
public
static
final
int
ERROR_INVALID_VALUE
Since: API level 29
Indicates that one of the values for the operation is invalid.
Constant Value:
-4
(0xfffffffc)
public
static
final
int
ERROR_NOT_SUPPORTED
Since: API level 29
Indicates that this operation is not supported on this device.
Constant Value:
-2
(0xfffffffe)
public
static
final
int
KEYCODE_EMERGENCY
Since: API level 29
Constant Value:
1079
(0x00000437)
public
static
final
int
KEYCODE_PTT
Since: API level 29
Constant Value:
1015
(0x000003f7)
public
static
final
int
OFF
Since: API level 29
Constant Value:
0
(0x00000000)
public
static
final
int
ON
Since: API level 29
Constant Value:
1
(0x00000001)
public
static
final
int
SUCCESS
Since: API level 29
Indicates that the operation was successful.
Constant Value:
0
(0x00000000)
Public Methods
public
int
allowRestrictedNetworkCapability
(int state, String packageName, int networkType)
This method allows a package to use restricted network capabilities.
Parameters
state
| ON to allow access, OFF to prevent access. |
packageName
| The package name that will be allowed to access the restricted network |
networkType
| The restricted network capability being requested. Currently, only
NetworkCapabilities.NET_CAPABILITY_CBS is allowed
|
Usage
try {
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
KPCCManager kpcc = edm.getKPCCManager();
kpcc.allowRestrictedNetworkCapability(KPCCManager.ON, "com.example.application", NetworkCapabilities.NET_CAPABILITY_CBS);
} catch(SecurityException e) {
Log.w(TAG, "SecurityException:" + e);
}
|
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CRITICAL_COMMUNICATIONS" permission. |
public
int
getDrxValue
()
Usage
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
KPCCManager kpcc = edm.getKPCCManager();
if(kpcc.getDrxValue() == KPCCManager.DRX_DEFAULT) {
Log.d(TAG, "Default DRX value is being used");
}
|
public
int
getTelephonyDrxValue
()
This method gets the DRX value in the Telephony (RIL).
This value may or may not be the same of getDrxValue(), as Telephony can change it depending on network parameters.
Usage
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
KPCCManager kpcc = edm.getKPCCManager();
Log.d(TAG, "Current DRX value is " + kpcc.getTelephonyDrxValue());
|
public
List<Integer>
getUnrestrictedNetworkCapabilities
(String packageName)
This method returns a list of restricted network capabilities that were allowed via
allowRestrictedNetworkCapability, to a given package.
Parameters
packageName
| The name of the package to fetch restricted network capabilities that were previously allowed. |
Returns
- List of allowed network capabilities to a given package.
null
if some error occurs
Usage
try {
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
KPCCManager kpcc = edm.getKPCCManager();
List list = kpcc.getUnrestrictedNetworkCapabilities("com.example.application");
if( list.contains(NetworkCapabilities.NET_CAPABILITY_CBS)) {
Log.d(TAG, "The package has unrestricted access to CBS");
}
} catch(SecurityException e) {
Log.w(TAG, "SecurityException:" + e);
}
|
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CRITICAL_COMMUNICATIONS" permission. |
public
int
setDrxValue
(int drxValue)
This method sets the DRX interval in the RIL. This changes the DRX cycle so that the device can be more
or less responsive when PTT calls are active.
Usage
try {
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
KPCCManager kpcc = edm.getKPCCManager();
kpcc.setDrxValue(KPCCManager.DRX_320_MSEC);
} catch(SecurityException e) {
Log.w(TAG, "SecurityException:" + e);
}
|
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_CRITICAL_COMMUNICATIONS" permission. |