public class IMEICondition extends Object
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 IMEI condition object.
|
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 IMEI number is a property
of the mobile device and thus is the same for all bundles.conditionInfo
- Contains the IMEI value against which to match the
device's IMEI. Its ConditionInfo.getArgs()
method should
return a String array with one value: the IMEI string. The IMEI is
15 digits without hyphens. Limited pattern matching is allowed:
the string is 0 to 14 digits, followed by an asterisk (
*
).*
), then the beginning of the IMEI is
compared to the pattern.IllegalArgumentException
- If the IMEI is not a string of 15
digits, or 0 to 14 digits with an *
at the end.Copyright © 2006-2014 OSGi Alliance. All Rights Reserved.