public class ESNCondition
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
ESN |
private static int |
ESN_LENGTH |
private static java.lang.String |
ORG_OSGI_UTIL_CDMA_ESN |
Modifier | Constructor and Description |
---|---|
private |
ESNCondition() |
Modifier and Type | Method and Description |
---|---|
static org.osgi.service.condpermadmin.Condition |
getCondition(org.osgi.framework.Bundle bundle,
org.osgi.service.condpermadmin.ConditionInfo conditionInfo)
Creates an ESNCondition object.
|
private static final java.lang.String ORG_OSGI_UTIL_CDMA_ESN
private static final java.lang.String ESN
private static final int ESN_LENGTH
public static org.osgi.service.condpermadmin.Condition getCondition(org.osgi.framework.Bundle bundle, org.osgi.service.condpermadmin.ConditionInfo conditionInfo)
bundle
- This parameter is ignored, as the ESN number is the
property of the mobile device, and thus the same for all bundles.conditionInfo
- Contains the ESN value against which to match the
device's ESN. Its ConditionInfo.getArgs()
method should
return a String array with one value, the ESN string. The ESN is 8
hexadecimal digits (32 bits) without hyphens. Limited pattern
matching is allowed: the string is 0 to 7 digits, followed by an
asterisk(*
).*
), then the beginning of the ESN is
compared to the pattern.java.lang.IllegalArgumentException
- If the ESN is not a string of 8
hexadecimal digits, or 0 to 7 hexadecimal digits with an
*
at the end.