code
stringlengths
11
173k
docstring
stringlengths
2
593k
func_name
stringlengths
2
189
language
stringclasses
1 value
repo
stringclasses
844 values
path
stringlengths
11
294
url
stringlengths
60
339
license
stringclasses
4 values
public String getTargetURI() { return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/namespaceURI02"; }
Gets URI that identifies the test. @return uri identifier of test
namespaceURI02::getTargetURI
java
Reginer/aosp-android-jar
android-32/src/org/w3c/domts/level2/core/namespaceURI02.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/org/w3c/domts/level2/core/namespaceURI02.java
MIT
public static void main(final String[] args) { DOMTestCase.doMain(namespaceURI02.class, args); }
Runs this test from the command line. @param args command line arguments
namespaceURI02::main
java
Reginer/aosp-android-jar
android-32/src/org/w3c/domts/level2/core/namespaceURI02.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/org/w3c/domts/level2/core/namespaceURI02.java
MIT
public Attribute get( ASN1ObjectIdentifier oid) { Object value = attributes.get(oid); if (value instanceof Vector) { return (Attribute)((Vector)value).elementAt(0); } return (Attribute)value; }
Return the first attribute matching the OBJECT IDENTIFIER oid. @param oid type of attribute required. @return first attribute found of type oid.
AttributeTable::get
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/org/bouncycastle/asn1/cms/AttributeTable.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/asn1/cms/AttributeTable.java
MIT
public ASN1EncodableVector getAll( ASN1ObjectIdentifier oid) { ASN1EncodableVector v = new ASN1EncodableVector(); Object value = attributes.get(oid); if (value instanceof Vector) { Enumeration e = ((Vector)value).elements(); while (e.hasMoreElements()) { v.add((Attribute)e.nextElement()); } } else if (value != null) { v.add((Attribute)value); } return v; }
Return all the attributes matching the OBJECT IDENTIFIER oid. The vector will be empty if there are no attributes of the required type present. @param oid type of attribute required. @return a vector of all the attributes found of type oid.
AttributeTable::getAll
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/org/bouncycastle/asn1/cms/AttributeTable.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/asn1/cms/AttributeTable.java
MIT
public AttributeTable add(ASN1ObjectIdentifier attrType, ASN1Encodable attrValue) { AttributeTable newTable = new AttributeTable(attributes); newTable.addAttribute(attrType, new Attribute(attrType, new DERSet(attrValue))); return newTable; }
Return a new table with the passed in attribute added. @param attrType the type of the attribute to add. @param attrValue the value corresponding to the attribute (will be wrapped in a SET). @return a new table with the extra attribute in it.
AttributeTable::add
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/org/bouncycastle/asn1/cms/AttributeTable.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/asn1/cms/AttributeTable.java
MIT
public XObject operate(XObject left, XObject right) throws javax.xml.transform.TransformerException { return new XNumber(left.num() + right.num()); }
Apply the operation to two operands, and return the result. @param left non-null reference to the evaluated left operand. @param right non-null reference to the evaluated right operand. @return non-null reference to the XObject that represents the result of the operation. @throws javax.xml.transform.TransformerException
Plus::operate
java
Reginer/aosp-android-jar
android-35/src/org/apache/xpath/operations/Plus.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xpath/operations/Plus.java
MIT
public double num(XPathContext xctxt) throws javax.xml.transform.TransformerException { return (m_right.num(xctxt) + m_left.num(xctxt)); }
Evaluate this operation directly to a double. @param xctxt The runtime execution context. @return The result of the operation as a double. @throws javax.xml.transform.TransformerException
Plus::num
java
Reginer/aosp-android-jar
android-35/src/org/apache/xpath/operations/Plus.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xpath/operations/Plus.java
MIT
public int configure(Sensor sensor, @RateLevel int rateLevel) { return mManager.configureDirectChannelImpl(this, sensor, rateLevel); }
Configure sensor rate or stop sensor report. To start event report of a sensor, or change rate of existing report, call this function with rateLevel other than {@link android.hardware.SensorDirectChannel#RATE_STOP}. Sensor events will be added into a queue formed by the shared memory used in creation of direction channel. Each element of the queue has size of 104 bytes and represents a sensor event. Data structure of an element (all fields in little-endian): <pre> offset type name ------------------------------------------------------------------------ 0x0000 int32_t size (always 104) 0x0004 int32_t sensor report token 0x0008 int32_t type (see SensorType) 0x000C uint32_t atomic counter 0x0010 int64_t timestamp (see Event) 0x0018 float[16]/int64_t[8] data (data type depends on sensor type) 0x0058 int32_t[4] reserved (set to zero) </pre> There are no head or tail pointers. The sequence and frontier of new sensor events is determined by the atomic counter, which counts from 1 after creation of direct channel and increments 1 for each new event. Atomic counter will wrap back to 1 after it reaches UINT32_MAX, skipping value 0 to avoid confusion with uninitialized memory. The writer in sensor system will wrap around from the start of shared memory region when it reaches the end. If size of memory region is not a multiple of size of element (104 bytes), the residual is not used at the end. Function returns a positive sensor report token on success. This token can be used to differentiate sensor events from multiple sensor of the same type. For example, if there are two accelerometers in the system A and B, it is guaranteed different report tokens will be returned when starting sensor A and B. To stop a sensor, call this function with rateLevel equal {@link android.hardware.SensorDirectChannel#RATE_STOP}. If the sensor parameter is left to be null, this will stop all active sensor report associated with the direct channel specified. Function return 1 on success or 0 on failure. @param sensor A {@link android.hardware.Sensor} object to denote sensor to be operated. @param rateLevel rate level defined in {@link android.hardware.SensorDirectChannel}. @return * starting report or changing rate: positive sensor report token on success, 0 on failure; * stopping report: 1 on success, 0 on failure. @throws NullPointerException when channel is null.
SensorDirectChannel::configure
java
Reginer/aosp-android-jar
android-32/src/android/hardware/SensorDirectChannel.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/SensorDirectChannel.java
MIT
SensorDirectChannel(SensorManager manager, int id, int type, long size) { mManager = manager; mNativeHandle = id; mType = type; mSize = size; mCloseGuard.open("SensorDirectChannel"); }
Configure sensor rate or stop sensor report. To start event report of a sensor, or change rate of existing report, call this function with rateLevel other than {@link android.hardware.SensorDirectChannel#RATE_STOP}. Sensor events will be added into a queue formed by the shared memory used in creation of direction channel. Each element of the queue has size of 104 bytes and represents a sensor event. Data structure of an element (all fields in little-endian): <pre> offset type name ------------------------------------------------------------------------ 0x0000 int32_t size (always 104) 0x0004 int32_t sensor report token 0x0008 int32_t type (see SensorType) 0x000C uint32_t atomic counter 0x0010 int64_t timestamp (see Event) 0x0018 float[16]/int64_t[8] data (data type depends on sensor type) 0x0058 int32_t[4] reserved (set to zero) </pre> There are no head or tail pointers. The sequence and frontier of new sensor events is determined by the atomic counter, which counts from 1 after creation of direct channel and increments 1 for each new event. Atomic counter will wrap back to 1 after it reaches UINT32_MAX, skipping value 0 to avoid confusion with uninitialized memory. The writer in sensor system will wrap around from the start of shared memory region when it reaches the end. If size of memory region is not a multiple of size of element (104 bytes), the residual is not used at the end. Function returns a positive sensor report token on success. This token can be used to differentiate sensor events from multiple sensor of the same type. For example, if there are two accelerometers in the system A and B, it is guaranteed different report tokens will be returned when starting sensor A and B. To stop a sensor, call this function with rateLevel equal {@link android.hardware.SensorDirectChannel#RATE_STOP}. If the sensor parameter is left to be null, this will stop all active sensor report associated with the direct channel specified. Function return 1 on success or 0 on failure. @param sensor A {@link android.hardware.Sensor} object to denote sensor to be operated. @param rateLevel rate level defined in {@link android.hardware.SensorDirectChannel}. @return * starting report or changing rate: positive sensor report token on success, 0 on failure; * stopping report: 1 on success, 0 on failure. @throws NullPointerException when channel is null. public int configure(Sensor sensor, @RateLevel int rateLevel) { return mManager.configureDirectChannelImpl(this, sensor, rateLevel); } /** @hide
SensorDirectChannel::SensorDirectChannel
java
Reginer/aosp-android-jar
android-32/src/android/hardware/SensorDirectChannel.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/SensorDirectChannel.java
MIT
int getNativeHandle() { return mNativeHandle; }
Configure sensor rate or stop sensor report. To start event report of a sensor, or change rate of existing report, call this function with rateLevel other than {@link android.hardware.SensorDirectChannel#RATE_STOP}. Sensor events will be added into a queue formed by the shared memory used in creation of direction channel. Each element of the queue has size of 104 bytes and represents a sensor event. Data structure of an element (all fields in little-endian): <pre> offset type name ------------------------------------------------------------------------ 0x0000 int32_t size (always 104) 0x0004 int32_t sensor report token 0x0008 int32_t type (see SensorType) 0x000C uint32_t atomic counter 0x0010 int64_t timestamp (see Event) 0x0018 float[16]/int64_t[8] data (data type depends on sensor type) 0x0058 int32_t[4] reserved (set to zero) </pre> There are no head or tail pointers. The sequence and frontier of new sensor events is determined by the atomic counter, which counts from 1 after creation of direct channel and increments 1 for each new event. Atomic counter will wrap back to 1 after it reaches UINT32_MAX, skipping value 0 to avoid confusion with uninitialized memory. The writer in sensor system will wrap around from the start of shared memory region when it reaches the end. If size of memory region is not a multiple of size of element (104 bytes), the residual is not used at the end. Function returns a positive sensor report token on success. This token can be used to differentiate sensor events from multiple sensor of the same type. For example, if there are two accelerometers in the system A and B, it is guaranteed different report tokens will be returned when starting sensor A and B. To stop a sensor, call this function with rateLevel equal {@link android.hardware.SensorDirectChannel#RATE_STOP}. If the sensor parameter is left to be null, this will stop all active sensor report associated with the direct channel specified. Function return 1 on success or 0 on failure. @param sensor A {@link android.hardware.Sensor} object to denote sensor to be operated. @param rateLevel rate level defined in {@link android.hardware.SensorDirectChannel}. @return * starting report or changing rate: positive sensor report token on success, 0 on failure; * stopping report: 1 on success, 0 on failure. @throws NullPointerException when channel is null. public int configure(Sensor sensor, @RateLevel int rateLevel) { return mManager.configureDirectChannelImpl(this, sensor, rateLevel); } /** @hide SensorDirectChannel(SensorManager manager, int id, int type, long size) { mManager = manager; mNativeHandle = id; mType = type; mSize = size; mCloseGuard.open("SensorDirectChannel"); } /** @hide
SensorDirectChannel::getNativeHandle
java
Reginer/aosp-android-jar
android-32/src/android/hardware/SensorDirectChannel.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/SensorDirectChannel.java
MIT
static long[] encodeData(MemoryFile ashmem) { int fd; try { fd = ashmem.getFileDescriptor().getInt$(); } catch (IOException e) { fd = -1; } return new long[] { 1 /*numFds*/, 0 /*numInts*/, fd }; }
This function encode handle information in {@link android.os.MemoryFile} into a long array to be passed down to native methods. * @hide
SensorDirectChannel::encodeData
java
Reginer/aosp-android-jar
android-32/src/android/hardware/SensorDirectChannel.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/SensorDirectChannel.java
MIT
public nodegetnextsiblingnull(final DOMTestDocumentBuilderFactory factory) throws org.w3c.domts.DOMTestIncompatibleException { super(factory); // // check if loaded documents are supported for content type // String contentType = getContentType(); preload(contentType, "staff", false); }
Constructor. @param factory document factory, may not be null @throws org.w3c.domts.DOMTestIncompatibleException Thrown if test is not compatible with parser configuration
nodegetnextsiblingnull::nodegetnextsiblingnull
java
Reginer/aosp-android-jar
android-34/src/org/w3c/domts/level1/core/nodegetnextsiblingnull.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/w3c/domts/level1/core/nodegetnextsiblingnull.java
MIT
public void runTest() throws Throwable { Document doc; NodeList elementList; Node employeeNode; Node lcNode; Node nsNode; doc = (Document) load("staff", false); elementList = doc.getElementsByTagName("employee"); employeeNode = elementList.item(1); lcNode = employeeNode.getLastChild(); nsNode = lcNode.getNextSibling(); assertNull("nodeGetNextSiblingNullAssert1", nsNode); }
Runs the test case. @throws Throwable Any uncaught exception causes test to fail
nodegetnextsiblingnull::runTest
java
Reginer/aosp-android-jar
android-34/src/org/w3c/domts/level1/core/nodegetnextsiblingnull.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/w3c/domts/level1/core/nodegetnextsiblingnull.java
MIT
public String getTargetURI() { return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodegetnextsiblingnull"; }
Gets URI that identifies the test. @return uri identifier of test
nodegetnextsiblingnull::getTargetURI
java
Reginer/aosp-android-jar
android-34/src/org/w3c/domts/level1/core/nodegetnextsiblingnull.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/w3c/domts/level1/core/nodegetnextsiblingnull.java
MIT
public static void main(final String[] args) { DOMTestCase.doMain(nodegetnextsiblingnull.class, args); }
Runs this test from the command line. @param args command line arguments
nodegetnextsiblingnull::main
java
Reginer/aosp-android-jar
android-34/src/org/w3c/domts/level1/core/nodegetnextsiblingnull.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/w3c/domts/level1/core/nodegetnextsiblingnull.java
MIT
/* package */ static long parseSpliceTime(ParsableByteArray sectionData, long ptsAdjustment) { long firstByte = sectionData.readUnsignedByte(); long ptsTime = C.TIME_UNSET; if ((firstByte & 0x80) != 0 /* time_specified_flag */) { // See SCTE35 9.2.1 for more information about pts adjustment. ptsTime = (firstByte & 0x01) << 32 | sectionData.readUnsignedInt(); ptsTime += ptsAdjustment; ptsTime &= 0x1FFFFFFFFL; } return ptsTime; }
Parses pts_time from splice_time(), defined in Section 9.4.1. Returns {@link C#TIME_UNSET}, if time_specified_flag is false. @param sectionData The section data from which the pts_time is parsed. @param ptsAdjustment The pts adjustment provided by the splice info section header. @return The pts_time defined by splice_time(), or {@link C#TIME_UNSET}, if time_specified_flag is false.
TimeSignalCommand::parseSpliceTime
java
Reginer/aosp-android-jar
android-35/src/com/google/android/exoplayer2/metadata/scte35/TimeSignalCommand.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/google/android/exoplayer2/metadata/scte35/TimeSignalCommand.java
MIT
public int getProvisionedValue(int item) throws ImsException { return getConfigInt(item); }
@deprecated see {@link #getConfigInt(int)} instead.
WfcModeFeatureValueConstants::getProvisionedValue
java
Reginer/aosp-android-jar
android-34/src/com/android/ims/ImsConfig.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/ims/ImsConfig.java
MIT
public int getConfigInt(int item) throws ImsException { int ret = 0; try { ret = miConfig.getConfigInt(item); } catch (RemoteException e) { throw new ImsException("getInt()", e, ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); } if (DBG) Rlog.d(TAG, "getInt(): item = " + item + ", ret =" + ret); return ret; }
Gets the configuration value for IMS service/capabilities parameters used by IMS stack. @param item, as defined in com.android.ims.ImsConfig#ConfigConstants. @return the value in Integer format. @throws ImsException if the ImsService is unavailable.
WfcModeFeatureValueConstants::getConfigInt
java
Reginer/aosp-android-jar
android-34/src/com/android/ims/ImsConfig.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/ims/ImsConfig.java
MIT
public String getProvisionedStringValue(int item) throws ImsException { return getConfigString(item); }
@deprecated see {@link #getConfigString(int)} instead
WfcModeFeatureValueConstants::getProvisionedStringValue
java
Reginer/aosp-android-jar
android-34/src/com/android/ims/ImsConfig.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/ims/ImsConfig.java
MIT
public String getConfigString(int item) throws ImsException { String ret = "Unknown"; try { ret = miConfig.getConfigString(item); } catch (RemoteException e) { throw new ImsException("getConfigString()", e, ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); } if (DBG) Rlog.d(TAG, "getConfigString(): item = " + item + ", ret =" + ret); return ret; }
Gets the configuration value for IMS service/capabilities parameters used by IMS stack. @param item, as defined in com.android.ims.ImsConfig#ConfigConstants. @return value in String format. @throws ImsException if the ImsService is unavailable.
WfcModeFeatureValueConstants::getConfigString
java
Reginer/aosp-android-jar
android-34/src/com/android/ims/ImsConfig.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/ims/ImsConfig.java
MIT
public int setProvisionedValue(int item, int value) throws ImsException { return setConfig(item, value); }
@deprecated see {@link #setConfig(int, int)} instead.
WfcModeFeatureValueConstants::setProvisionedValue
java
Reginer/aosp-android-jar
android-34/src/com/android/ims/ImsConfig.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/ims/ImsConfig.java
MIT
public int setProvisionedStringValue(int item, String value) throws ImsException { return setConfig(item, value); }
@deprecated see {@link #setConfig(int, String)} instead.
WfcModeFeatureValueConstants::setProvisionedStringValue
java
Reginer/aosp-android-jar
android-34/src/com/android/ims/ImsConfig.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/ims/ImsConfig.java
MIT
public int setConfig(int item, int value) throws ImsException { int ret = OperationStatusConstants.UNKNOWN; if (DBG) { Rlog.d(TAG, "setConfig(): item = " + item + "value = " + value); } try { ret = miConfig.setConfigInt(item, value); } catch (RemoteException e) { throw new ImsException("setConfig()", e, ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); } if (DBG) { Rlog.d(TAG, "setConfig(): item = " + item + " value = " + value + " ret = " + ret); } return ret; }
Sets the value for ImsService configuration item. @param item, as defined in com.android.ims.ImsConfig#ConfigConstants. @param value in Integer format. @return as defined in com.android.ims.ImsConfig#OperationStatusConstants @throws ImsException if the ImsService is unavailable.
WfcModeFeatureValueConstants::setConfig
java
Reginer/aosp-android-jar
android-34/src/com/android/ims/ImsConfig.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/ims/ImsConfig.java
MIT
public int setConfig(int item, String value) throws ImsException { int ret = OperationStatusConstants.UNKNOWN; if (DBG) { Rlog.d(TAG, "setConfig(): item = " + item + "value = " + value); } try { ret = miConfig.setConfigString(item, value); } catch (RemoteException e) { throw new ImsException("setConfig()", e, ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); } if (DBG) { Rlog.d(TAG, "setConfig(): item = " + item + " value = " + value + " ret = " + ret); } return ret; }
Sets the value for ImsService configuration item. @param item, as defined in com.android.ims.ImsConfig#ConfigConstants. @param value in Integer format. @return as defined in com.android.ims.ImsConfig#OperationStatusConstants @throws ImsException if the ImsService is unavailable.
WfcModeFeatureValueConstants::setConfig
java
Reginer/aosp-android-jar
android-34/src/com/android/ims/ImsConfig.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/ims/ImsConfig.java
MIT
public void addConfigCallback(ProvisioningManager.Callback callback) throws ImsException { callback.setExecutor(getThreadExecutor()); addConfigCallback(callback.getBinder()); }
Adds a {@link ProvisioningManager.Callback} to the ImsService to notify when a Configuration item has changed. Make sure to call {@link #removeConfigCallback(IImsConfigCallback)} when finished using this callback.
WfcModeFeatureValueConstants::addConfigCallback
java
Reginer/aosp-android-jar
android-34/src/com/android/ims/ImsConfig.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/ims/ImsConfig.java
MIT
public void addConfigCallback(IImsConfigCallback callback) throws ImsException { if (DBG) Rlog.d(TAG, "addConfigCallback: " + callback); try { miConfig.addImsConfigCallback(callback); } catch (RemoteException e) { throw new ImsException("addConfigCallback()", e, ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); } }
Adds a {@link IImsConfigCallback} to the ImsService to notify when a Configuration item has changed. Make sure to call {@link #removeConfigCallback(IImsConfigCallback)} when finished using this callback.
WfcModeFeatureValueConstants::addConfigCallback
java
Reginer/aosp-android-jar
android-34/src/com/android/ims/ImsConfig.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/ims/ImsConfig.java
MIT
public void removeConfigCallback(IImsConfigCallback callback) throws ImsException { if (DBG) Rlog.d(TAG, "removeConfigCallback: " + callback); try { miConfig.removeImsConfigCallback(callback); } catch (RemoteException e) { throw new ImsException("removeConfigCallback()", e, ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE); } }
Removes an existing {@link IImsConfigCallback} from the ImsService.
WfcModeFeatureValueConstants::removeConfigCallback
java
Reginer/aosp-android-jar
android-34/src/com/android/ims/ImsConfig.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/ims/ImsConfig.java
MIT
public boolean isBinderAlive() { return miConfig.asBinder().isBinderAlive(); }
@return true if the binder connection is alive, false otherwise.
WfcModeFeatureValueConstants::isBinderAlive
java
Reginer/aosp-android-jar
android-34/src/com/android/ims/ImsConfig.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/ims/ImsConfig.java
MIT
public static boolean isEnabled(String flag) { final long token = Binder.clearCallingIdentity(); try { return DeviceConfig.getBoolean(NAMESPACE_COMPANION, flag, /* defaultValue= */ false); } finally { Binder.restoreCallingIdentity(token); } }
Returns whether the given flag is currently enabled, with a default value of {@code false}.
CompanionDeviceConfig::isEnabled
java
Reginer/aosp-android-jar
android-34/src/com/android/server/companion/CompanionDeviceConfig.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/companion/CompanionDeviceConfig.java
MIT
public static boolean isEnabled(String flag, boolean defaultValue) { return DeviceConfig.getBoolean(NAMESPACE_COMPANION, flag, defaultValue); }
Returns whether the given flag is currently enabled.
CompanionDeviceConfig::isEnabled
java
Reginer/aosp-android-jar
android-34/src/com/android/server/companion/CompanionDeviceConfig.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/companion/CompanionDeviceConfig.java
MIT
public namednodemapnumberofnodes(final DOMTestDocumentBuilderFactory factory) throws org.w3c.domts.DOMTestIncompatibleException { super(factory); // // check if loaded documents are supported for content type // String contentType = getContentType(); preload(contentType, "staff", true); }
Constructor. @param factory document factory, may not be null @throws org.w3c.domts.DOMTestIncompatibleException Thrown if test is not compatible with parser configuration
namednodemapnumberofnodes::namednodemapnumberofnodes
java
Reginer/aosp-android-jar
android-34/src/org/w3c/domts/level1/core/namednodemapnumberofnodes.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/w3c/domts/level1/core/namednodemapnumberofnodes.java
MIT
public void runTest() throws Throwable { Document doc; NodeList elementList; Node testEmployee; NamedNodeMap attributes; int length; doc = (Document) load("staff", true); elementList = doc.getElementsByTagName("address"); testEmployee = elementList.item(2); attributes = testEmployee.getAttributes(); length = (int) attributes.getLength(); assertEquals("length", 2, length); }
Runs the test case. @throws Throwable Any uncaught exception causes test to fail
namednodemapnumberofnodes::runTest
java
Reginer/aosp-android-jar
android-34/src/org/w3c/domts/level1/core/namednodemapnumberofnodes.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/w3c/domts/level1/core/namednodemapnumberofnodes.java
MIT
public String getTargetURI() { return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/namednodemapnumberofnodes"; }
Gets URI that identifies the test. @return uri identifier of test
namednodemapnumberofnodes::getTargetURI
java
Reginer/aosp-android-jar
android-34/src/org/w3c/domts/level1/core/namednodemapnumberofnodes.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/w3c/domts/level1/core/namednodemapnumberofnodes.java
MIT
public static void main(final String[] args) { DOMTestCase.doMain(namednodemapnumberofnodes.class, args); }
Runs this test from the command line. @param args command line arguments
namednodemapnumberofnodes::main
java
Reginer/aosp-android-jar
android-34/src/org/w3c/domts/level1/core/namednodemapnumberofnodes.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/w3c/domts/level1/core/namednodemapnumberofnodes.java
MIT
public void requestCustomPrinterIcon(@NonNull PrinterId printerId) { Handler.getMain().sendMessage(obtainMessage( RemotePrintService::handleRequestCustomPrinterIcon, this, printerId)); }
Queue a request for a custom printer icon for a printer. @param printerId the id of the printer the icon should be loaded for @see android.print.PrinterInfo.Builder#setHasCustomPrinterIcon
RemotePrintService::requestCustomPrinterIcon
java
Reginer/aosp-android-jar
android-31/src/com/android/server/print/RemotePrintService.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/server/print/RemotePrintService.java
MIT
private void handleRequestCustomPrinterIcon(@NonNull PrinterId printerId) { if (!isBound()) { ensureBound(); mPendingCommands.add(() -> handleRequestCustomPrinterIcon(printerId)); } else { if (DEBUG) { Slog.i(LOG_TAG, "[user: " + mUserId + "] requestCustomPrinterIcon()"); } try { mPrintService.requestCustomPrinterIcon(printerId); } catch (RemoteException re) { Slog.e(LOG_TAG, "Error requesting icon for " + printerId, re); } } }
Request a custom printer icon for a printer. @param printerId the id of the printer the icon should be loaded for @see android.print.PrinterInfo.Builder#setHasCustomPrinterIcon
RemotePrintService::handleRequestCustomPrinterIcon
java
Reginer/aosp-android-jar
android-31/src/com/android/server/print/RemotePrintService.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/server/print/RemotePrintService.java
MIT
public nodesetprefix07(final DOMTestDocumentBuilderFactory factory) throws org.w3c.domts.DOMTestIncompatibleException { super(factory); // // check if loaded documents are supported for content type // String contentType = getContentType(); preload(contentType, "staffNS", true); }
Constructor. @param factory document factory, may not be null @throws org.w3c.domts.DOMTestIncompatibleException Thrown if test is not compatible with parser configuration
nodesetprefix07::nodesetprefix07
java
Reginer/aosp-android-jar
android-31/src/org/w3c/domts/level2/core/nodesetprefix07.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level2/core/nodesetprefix07.java
MIT
public void runTest() throws Throwable { Document doc; Attr attribute; doc = (Document) load("staffNS", true); attribute = doc.createAttributeNS("http://www.w3.org/DOM/Test/L2", "abc:elem"); { boolean success = false; try { attribute.setPrefix("xmlns"); } catch (DOMException ex) { success = (ex.code == DOMException.NAMESPACE_ERR); } assertTrue("throw_NAMESPACE_ERR", success); } }
Runs the test case. @throws Throwable Any uncaught exception causes test to fail
nodesetprefix07::runTest
java
Reginer/aosp-android-jar
android-31/src/org/w3c/domts/level2/core/nodesetprefix07.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level2/core/nodesetprefix07.java
MIT
public String getTargetURI() { return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/nodesetprefix07"; }
Gets URI that identifies the test. @return uri identifier of test
nodesetprefix07::getTargetURI
java
Reginer/aosp-android-jar
android-31/src/org/w3c/domts/level2/core/nodesetprefix07.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level2/core/nodesetprefix07.java
MIT
public static void main(final String[] args) { DOMTestCase.doMain(nodesetprefix07.class, args); }
Runs this test from the command line. @param args command line arguments
nodesetprefix07::main
java
Reginer/aosp-android-jar
android-31/src/org/w3c/domts/level2/core/nodesetprefix07.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level2/core/nodesetprefix07.java
MIT
public ConcurrentSkipListSet() { m = new ConcurrentSkipListMap<E,Object>(); }
Constructs a new, empty set that orders its elements according to their {@linkplain Comparable natural ordering}.
ConcurrentSkipListSet::ConcurrentSkipListSet
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public ConcurrentSkipListSet(Comparator<? super E> comparator) { m = new ConcurrentSkipListMap<E,Object>(comparator); }
Constructs a new, empty set that orders its elements according to the specified comparator. @param comparator the comparator that will be used to order this set. If {@code null}, the {@linkplain Comparable natural ordering} of the elements will be used.
ConcurrentSkipListSet::ConcurrentSkipListSet
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public ConcurrentSkipListSet(Collection<? extends E> c) { m = new ConcurrentSkipListMap<E,Object>(); addAll(c); }
Constructs a new set containing the elements in the specified collection, that orders its elements according to their {@linkplain Comparable natural ordering}. @param c The elements that will comprise the new set @throws ClassCastException if the elements in {@code c} are not {@link Comparable}, or are not mutually comparable @throws NullPointerException if the specified collection or any of its elements are null
ConcurrentSkipListSet::ConcurrentSkipListSet
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public ConcurrentSkipListSet(SortedSet<E> s) { m = new ConcurrentSkipListMap<E,Object>(s.comparator()); addAll(s); }
Constructs a new set containing the same elements and using the same ordering as the specified sorted set. @param s sorted set whose elements will comprise the new set @throws NullPointerException if the specified sorted set or any of its elements are null
ConcurrentSkipListSet::ConcurrentSkipListSet
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
ConcurrentSkipListSet(ConcurrentNavigableMap<E,Object> m) { this.m = m; }
For use by submaps
ConcurrentSkipListSet::ConcurrentSkipListSet
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public ConcurrentSkipListSet<E> clone() { try { @SuppressWarnings("unchecked") ConcurrentSkipListSet<E> clone = (ConcurrentSkipListSet<E>) super.clone(); clone.setMap(new ConcurrentSkipListMap<E,Object>(m)); return clone; } catch (CloneNotSupportedException e) { throw new InternalError(); } }
Returns a shallow copy of this {@code ConcurrentSkipListSet} instance. (The elements themselves are not cloned.) @return a shallow copy of this set
ConcurrentSkipListSet::clone
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public int size() { return m.size(); }
Returns the number of elements in this set. If this set contains more than {@code Integer.MAX_VALUE} elements, it returns {@code Integer.MAX_VALUE}. <p>Beware that, unlike in most collections, this method is <em>NOT</em> a constant-time operation. Because of the asynchronous nature of these sets, determining the current number of elements requires traversing them all to count them. Additionally, it is possible for the size to change during execution of this method, in which case the returned result will be inaccurate. Thus, this method is typically not very useful in concurrent applications. @return the number of elements in this set
ConcurrentSkipListSet::size
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public boolean isEmpty() { return m.isEmpty(); }
Returns {@code true} if this set contains no elements. @return {@code true} if this set contains no elements
ConcurrentSkipListSet::isEmpty
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public boolean contains(Object o) { return m.containsKey(o); }
Returns {@code true} if this set contains the specified element. More formally, returns {@code true} if and only if this set contains an element {@code e} such that {@code o.equals(e)}. @param o object to be checked for containment in this set @return {@code true} if this set contains the specified element @throws ClassCastException if the specified element cannot be compared with the elements currently in this set @throws NullPointerException if the specified element is null
ConcurrentSkipListSet::contains
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public boolean add(E e) { return m.putIfAbsent(e, Boolean.TRUE) == null; }
Adds the specified element to this set if it is not already present. More formally, adds the specified element {@code e} to this set if the set contains no element {@code e2} such that {@code e.equals(e2)}. If this set already contains the element, the call leaves the set unchanged and returns {@code false}. @param e element to be added to this set @return {@code true} if this set did not already contain the specified element @throws ClassCastException if {@code e} cannot be compared with the elements currently in this set @throws NullPointerException if the specified element is null
ConcurrentSkipListSet::add
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public boolean remove(Object o) { return m.remove(o, Boolean.TRUE); }
Removes the specified element from this set if it is present. More formally, removes an element {@code e} such that {@code o.equals(e)}, if this set contains such an element. Returns {@code true} if this set contained the element (or equivalently, if this set changed as a result of the call). (This set will not contain the element once the call returns.) @param o object to be removed from this set, if present @return {@code true} if this set contained the specified element @throws ClassCastException if {@code o} cannot be compared with the elements currently in this set @throws NullPointerException if the specified element is null
ConcurrentSkipListSet::remove
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public void clear() { m.clear(); }
Removes all of the elements from this set.
ConcurrentSkipListSet::clear
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public Iterator<E> iterator() { return m.navigableKeySet().iterator(); }
Returns an iterator over the elements in this set in ascending order. @return an iterator over the elements in this set in ascending order
ConcurrentSkipListSet::iterator
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public Iterator<E> descendingIterator() { return m.descendingKeySet().iterator(); }
Returns an iterator over the elements in this set in descending order. @return an iterator over the elements in this set in descending order
ConcurrentSkipListSet::descendingIterator
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public boolean equals(Object o) { // Override AbstractSet version to avoid calling size() if (o == this) return true; if (!(o instanceof Set)) return false; Collection<?> c = (Collection<?>) o; try { return containsAll(c) && c.containsAll(this); } catch (ClassCastException unused) { return false; } catch (NullPointerException unused) { return false; } }
Compares the specified object with this set for equality. Returns {@code true} if the specified object is also a set, the two sets have the same size, and every member of the specified set is contained in this set (or equivalently, every member of this set is contained in the specified set). This definition ensures that the equals method works properly across different implementations of the set interface. @param o the object to be compared for equality with this set @return {@code true} if the specified object is equal to this set
ConcurrentSkipListSet::equals
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public boolean removeAll(Collection<?> c) { // Override AbstractSet version to avoid unnecessary call to size() boolean modified = false; for (Object e : c) if (remove(e)) modified = true; return modified; }
Removes from this set all of its elements that are contained in the specified collection. If the specified collection is also a set, this operation effectively modifies this set so that its value is the <i>asymmetric set difference</i> of the two sets. @param c collection containing elements to be removed from this set @return {@code true} if this set changed as a result of the call @throws ClassCastException if the class of an element of this set is incompatible with the specified collection (<a href="../Collection.html#optional-restrictions">optional</a>) @throws NullPointerException if the specified collection or any of its elements are null
ConcurrentSkipListSet::removeAll
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public E lower(E e) { return m.lowerKey(e); }
@throws ClassCastException {@inheritDoc} @throws NullPointerException if the specified element is null
ConcurrentSkipListSet::lower
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public E floor(E e) { return m.floorKey(e); }
@throws ClassCastException {@inheritDoc} @throws NullPointerException if the specified element is null
ConcurrentSkipListSet::floor
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public E ceiling(E e) { return m.ceilingKey(e); }
@throws ClassCastException {@inheritDoc} @throws NullPointerException if the specified element is null
ConcurrentSkipListSet::ceiling
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public E higher(E e) { return m.higherKey(e); }
@throws ClassCastException {@inheritDoc} @throws NullPointerException if the specified element is null
ConcurrentSkipListSet::higher
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public E first() { return m.firstKey(); }
@throws java.util.NoSuchElementException {@inheritDoc}
ConcurrentSkipListSet::first
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public E last() { return m.lastKey(); }
@throws java.util.NoSuchElementException {@inheritDoc}
ConcurrentSkipListSet::last
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) { return new ConcurrentSkipListSet<E> (m.subMap(fromElement, fromInclusive, toElement, toInclusive)); }
@throws ClassCastException {@inheritDoc} @throws NullPointerException if {@code fromElement} or {@code toElement} is null @throws IllegalArgumentException {@inheritDoc}
ConcurrentSkipListSet::subSet
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public NavigableSet<E> headSet(E toElement, boolean inclusive) { return new ConcurrentSkipListSet<E>(m.headMap(toElement, inclusive)); }
@throws ClassCastException {@inheritDoc} @throws NullPointerException if {@code toElement} is null @throws IllegalArgumentException {@inheritDoc}
ConcurrentSkipListSet::headSet
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public NavigableSet<E> tailSet(E fromElement, boolean inclusive) { return new ConcurrentSkipListSet<E>(m.tailMap(fromElement, inclusive)); }
@throws ClassCastException {@inheritDoc} @throws NullPointerException if {@code fromElement} is null @throws IllegalArgumentException {@inheritDoc}
ConcurrentSkipListSet::tailSet
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public NavigableSet<E> subSet(E fromElement, E toElement) { return subSet(fromElement, true, toElement, false); }
@throws ClassCastException {@inheritDoc} @throws NullPointerException if {@code fromElement} or {@code toElement} is null @throws IllegalArgumentException {@inheritDoc}
ConcurrentSkipListSet::subSet
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public NavigableSet<E> headSet(E toElement) { return headSet(toElement, false); }
@throws ClassCastException {@inheritDoc} @throws NullPointerException if {@code toElement} is null @throws IllegalArgumentException {@inheritDoc}
ConcurrentSkipListSet::headSet
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public NavigableSet<E> tailSet(E fromElement) { return tailSet(fromElement, true); }
@throws ClassCastException {@inheritDoc} @throws NullPointerException if {@code fromElement} is null @throws IllegalArgumentException {@inheritDoc}
ConcurrentSkipListSet::tailSet
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public NavigableSet<E> descendingSet() { return new ConcurrentSkipListSet<E>(m.descendingMap()); }
Returns a reverse order view of the elements contained in this set. The descending set is backed by this set, so changes to the set are reflected in the descending set, and vice-versa. <p>The returned set has an ordering equivalent to {@link Collections#reverseOrder(Comparator) Collections.reverseOrder}{@code (comparator())}. The expression {@code s.descendingSet().descendingSet()} returns a view of {@code s} essentially equivalent to {@code s}. @return a reverse order view of this set
ConcurrentSkipListSet::descendingSet
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public Spliterator<E> spliterator() { return (m instanceof ConcurrentSkipListMap) ? ((ConcurrentSkipListMap<E,?>)m).keySpliterator() : ((ConcurrentSkipListMap.SubMap<E,?>)m).new SubMapKeyIterator(); }
Returns a {@link Spliterator} over the elements in this set. <p>The {@code Spliterator} reports {@link Spliterator#CONCURRENT}, {@link Spliterator#NONNULL}, {@link Spliterator#DISTINCT}, {@link Spliterator#SORTED} and {@link Spliterator#ORDERED}, with an encounter order that is ascending order. Overriding implementations should document the reporting of additional characteristic values. <p>The spliterator's comparator (see {@link java.util.Spliterator#getComparator()}) is {@code null} if the set's comparator (see {@link #comparator()}) is {@code null}. Otherwise, the spliterator's comparator is the same as or imposes the same total ordering as the set's comparator. @return a {@code Spliterator} over the elements in this set @since 1.8
ConcurrentSkipListSet::spliterator
java
Reginer/aosp-android-jar
android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/util/concurrent/ConcurrentSkipListSet.java
MIT
public ServiceDiscoveryInfo(PeerHandle peerHandle, int peerCipherSuite, @Nullable byte[] serviceSpecificInfo, @NonNull List<byte[]> matchFilter, @Nullable byte[] scid, String pairingAlias, AwarePairingConfig pairingConfig, @Nullable OuiKeyedData[] vendorData) { mServiceSpecificInfo = serviceSpecificInfo; mMatchFilters = matchFilter; mPeerCipherSuite = peerCipherSuite; mScid = scid; mPeerHandle = peerHandle; mPairingAlias = pairingAlias; mPairingConfig = pairingConfig; mVendorData = vendorData != null ? Arrays.asList(vendorData) : Collections.emptyList(); }
@hide
ServiceDiscoveryInfo::ServiceDiscoveryInfo
java
Reginer/aosp-android-jar
android-35/src/android/net/wifi/aware/ServiceDiscoveryInfo.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/net/wifi/aware/ServiceDiscoveryInfo.java
MIT
public @Characteristics.WifiAwareDataPathCipherSuites int getPeerCipherSuite() { return mPeerCipherSuite; }
Get the cipher suite type specified by the publish session to be used for data-path setup. @return peerCipherSuite An integer represent the cipher suite used to encrypt the data-path.
ServiceDiscoveryInfo::getPeerCipherSuite
java
Reginer/aosp-android-jar
android-35/src/android/net/wifi/aware/ServiceDiscoveryInfo.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/net/wifi/aware/ServiceDiscoveryInfo.java
MIT
public KeyUsage( int usage) { this.bitString = new DERBitString(usage); }
Basic constructor. @param usage - the bitwise OR of the Key Usage flags giving the allowed uses for the key. e.g. (KeyUsage.keyEncipherment | KeyUsage.dataEncipherment)
KeyUsage::KeyUsage
java
Reginer/aosp-android-jar
android-34/src/com/android/org/bouncycastle/asn1/x509/KeyUsage.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/org/bouncycastle/asn1/x509/KeyUsage.java
MIT
public boolean hasUsages(int usages) { return (bitString.intValue() & usages) == usages; }
Return true if a given usage bit is set, false otherwise. @param usages combination of usage flags. @return true if all bits are set, false otherwise.
KeyUsage::hasUsages
java
Reginer/aosp-android-jar
android-34/src/com/android/org/bouncycastle/asn1/x509/KeyUsage.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/org/bouncycastle/asn1/x509/KeyUsage.java
MIT
public void updateAdnBySearch(int efid, AdnRecord oldAdn, AdnRecord newAdn, String pin2, Message response) { int extensionEF; extensionEF = extensionEfForEf(efid); if (extensionEF < 0) { sendErrorResponse(response, "EF is not known ADN-like EF:0x" + Integer.toHexString(efid).toUpperCase()); return; } ArrayList<AdnRecord> oldAdnList; if (efid == EF_PBR) { oldAdnList = mUsimPhoneBookManager.loadEfFilesFromUsim(); } else { oldAdnList = getRecordsIfLoaded(efid); } if (oldAdnList == null) { sendErrorResponse(response, "Adn list not exist for EF:0x" + Integer.toHexString(efid).toUpperCase()); return; } int index = -1; int count = 1; for (Iterator<AdnRecord> it = oldAdnList.iterator(); it.hasNext(); ) { if (oldAdn.isEqual(it.next())) { index = count; break; } count++; } if (index == -1) { sendErrorResponse(response, "Adn record don't exist for " + oldAdn); return; } if (efid == EF_PBR) { AdnRecord foundAdn = oldAdnList.get(index-1); efid = foundAdn.mEfid; extensionEF = foundAdn.mExtRecord; index = foundAdn.mRecordNumber; newAdn.mEfid = efid; newAdn.mExtRecord = extensionEF; newAdn.mRecordNumber = index; } Message pendingResponse = mUserWriteResponse.get(efid); if (pendingResponse != null) { sendErrorResponse(response, "Have pending update for EF:0x" + Integer.toHexString(efid).toUpperCase()); return; } mUserWriteResponse.put(efid, response); new AdnRecordLoader(mFh).updateEF(newAdn, efid, extensionEF, index, pin2, obtainMessage(EVENT_UPDATE_ADN_DONE, efid, index, newAdn)); }
Replace oldAdn with newAdn in ADN-like record in EF The ADN-like records must be read through requestLoadAllAdnLike() before @param efid must be one of EF_ADN, EF_FDN, and EF_SDN @param oldAdn is the adn to be replaced If oldAdn.isEmpty() is ture, it insert the newAdn @param newAdn is the adn to be stored If newAdn.isEmpty() is true, it delete the oldAdn @param pin2 is required to update EF_FDN, otherwise must be null @param response message to be posted when done response.exception hold the exception in error
AdnRecordCache::updateAdnBySearch
java
Reginer/aosp-android-jar
android-33/src/com/android/internal/telephony/uicc/AdnRecordCache.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/internal/telephony/uicc/AdnRecordCache.java
MIT
private static void ensureMemoizedValues() { if (sMemoizedValuesInitialized) { return; } synchronized (sLock) { if (sMemoizedValuesInitialized) { return; } // Read all namespace properties so we get a single snapshot (values // fetched aren't updated in the interim). DeviceConfig.Properties properties = DeviceConfig.getProperties(DeviceConfig.NAMESPACE_TEXTCLASSIFIER); sLocalTextClassifierEnabled = properties.getBoolean( LOCAL_TEXT_CLASSIFIER_ENABLED, LOCAL_TEXT_CLASSIFIER_ENABLED_DEFAULT); sModelDarkLaunchEnabled = properties.getBoolean( MODEL_DARK_LAUNCH_ENABLED, MODEL_DARK_LAUNCH_ENABLED_DEFAULT); sSmartSelectionEnabled = properties.getBoolean( SMART_SELECTION_ENABLED, SMART_SELECTION_ENABLED_DEFAULT); sSmartTextShareEnabled = properties.getBoolean( SMART_TEXT_SHARE_ENABLED, SMART_TEXT_SHARE_ENABLED_DEFAULT); sSmartLinkifyEnabled = properties.getBoolean( SMART_LINKIFY_ENABLED, SMART_LINKIFY_ENABLED_DEFAULT); sSmartSelectAnimationEnabled = properties.getBoolean( SMART_SELECT_ANIMATION_ENABLED, SMART_SELECT_ANIMATION_ENABLED_DEFAULT); sGenerateLinksMaxTextLength = properties.getInt( GENERATE_LINKS_MAX_TEXT_LENGTH, GENERATE_LINKS_MAX_TEXT_LENGTH_DEFAULT); sSystemTextClassifierApiTimeoutInSecond = properties.getLong( SYSTEM_TEXT_CLASSIFIER_API_TIMEOUT_IN_SECOND, SYSTEM_TEXT_CLASSIFIER_API_TIMEOUT_IN_SECOND_DEFAULT); sSmartSelectionTrimDelta = properties.getInt( SMART_SELECTION_TRIM_DELTA, SMART_SELECTION_TRIM_DELTA_DEFAULT); sMemoizedValuesInitialized = true; } }
For DeviceConfig values where we don't care if they change at runtime, fetch them once and memoize their values.
TextClassificationConstants::ensureMemoizedValues
java
Reginer/aosp-android-jar
android-35/src/android/view/textclassifier/TextClassificationConstants.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/view/textclassifier/TextClassificationConstants.java
MIT
public final IBinder onBind(Intent intent) { if (mEngine == null) { mEngine = new JobServiceEngine(this) { @Override public boolean onStartJob(JobParameters params) { return JobService.this.onStartJob(params); } @Override public boolean onStopJob(JobParameters params) { return JobService.this.onStopJob(params); } @Override @BytesLong public long getTransferredDownloadBytes(@NonNull JobParameters params, @Nullable JobWorkItem item) { if (item == null) { return JobService.this.getTransferredDownloadBytes(params); } else { return JobService.this.getTransferredDownloadBytes(params, item); } } @Override @BytesLong public long getTransferredUploadBytes(@NonNull JobParameters params, @Nullable JobWorkItem item) { if (item == null) { return JobService.this.getTransferredUploadBytes(params); } else { return JobService.this.getTransferredUploadBytes(params, item); } } @Override public void onNetworkChanged(@NonNull JobParameters params) { JobService.this.onNetworkChanged(params); } }; } return mEngine.getBinder(); }
Cancel and remove the notification supplied to {@link #setNotification(JobParameters, int, Notification, int)} when the job ends. The notification will be removed from the notification shade. public static final int JOB_END_NOTIFICATION_POLICY_REMOVE = 1; /** @hide @IntDef(prefix = {"JOB_END_NOTIFICATION_POLICY_"}, value = { JOB_END_NOTIFICATION_POLICY_DETACH, JOB_END_NOTIFICATION_POLICY_REMOVE, }) @Retention(RetentionPolicy.SOURCE) public @interface JobEndNotificationPolicy { } private JobServiceEngine mEngine; /** @hide
JobService::onBind
java
Reginer/aosp-android-jar
android-35/src/android/app/job/JobService.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/app/job/JobService.java
MIT
public final void jobFinished(JobParameters params, boolean wantsReschedule) { mEngine.jobFinished(params, wantsReschedule); }
Call this to inform the JobScheduler that the job has finished its work. When the system receives this message, it releases the wakelock being held for the job. This does not need to be called if {@link #onStopJob(JobParameters)} has been called. <p> You can request that the job be scheduled again by passing {@code true} as the <code>wantsReschedule</code> parameter. This will apply back-off policy for the job; this policy can be adjusted through the {@link android.app.job.JobInfo.Builder#setBackoffCriteria(long, int)} method when the job is originally scheduled. The job's initial requirements are preserved when jobs are rescheduled, regardless of backed-off policy. <p class="note"> A job running while the device is dozing will not be rescheduled with the normal back-off policy. Instead, the job will be re-added to the queue and executed again during a future idle maintenance window. </p> <p class="note"> Any {@link JobInfo.Builder#setUserInitiated(boolean) user-initiated job} cannot be rescheduled when the user has asked to stop the app via a system provided affordance (such as the Task Manager). In such situations, the value of {@code wantsReschedule} is always treated as {@code false}. @param params The parameters identifying this job, as supplied to the job in the {@link #onStartJob(JobParameters)} callback. @param wantsReschedule {@code true} if this job should be rescheduled according to the back-off criteria specified when it was first scheduled; {@code false} otherwise. When {@code false} is returned for a periodic job, the job will be rescheduled according to its periodic policy.
JobService::jobFinished
java
Reginer/aosp-android-jar
android-35/src/android/app/job/JobService.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/app/job/JobService.java
MIT
public void onNetworkChanged(@NonNull JobParameters params) { Log.w(TAG, "onNetworkChanged() not implemented in " + getClass().getName() + ". Must override in a subclass."); }
This method is called that for a job that has a network constraint when the network to be used by the job changes. The new network object will be available via {@link JobParameters#getNetwork()}. Any network that results in this method call will match the job's requested network constraints. <p> For example, if a device is on a metered mobile network and then connects to an unmetered WiFi network, and the job has indicated that both networks satisfy its network constraint, then this method will be called to notify the job of the new unmetered WiFi network. @param params The parameters identifying this job, similar to what was supplied to the job in the {@link #onStartJob(JobParameters)} callback, but with an updated network. @see JobInfo.Builder#setRequiredNetwork(android.net.NetworkRequest) @see JobInfo.Builder#setRequiredNetworkType(int)
JobService::onNetworkChanged
java
Reginer/aosp-android-jar
android-35/src/android/app/job/JobService.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/app/job/JobService.java
MIT
public final void updateEstimatedNetworkBytes(@NonNull JobParameters params, @BytesLong long downloadBytes, @BytesLong long uploadBytes) { mEngine.updateEstimatedNetworkBytes(params, null, downloadBytes, uploadBytes); }
Update the amount of data this job is estimated to transfer after the job has started. @see JobInfo.Builder#setEstimatedNetworkBytes(long, long)
JobService::updateEstimatedNetworkBytes
java
Reginer/aosp-android-jar
android-35/src/android/app/job/JobService.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/app/job/JobService.java
MIT
public final void updateEstimatedNetworkBytes(@NonNull JobParameters params, @NonNull JobWorkItem jobWorkItem, @BytesLong long downloadBytes, @BytesLong long uploadBytes) { mEngine.updateEstimatedNetworkBytes(params, jobWorkItem, downloadBytes, uploadBytes); }
Update the amount of data this JobWorkItem is estimated to transfer after the job has started. @see JobInfo.Builder#setEstimatedNetworkBytes(long, long)
JobService::updateEstimatedNetworkBytes
java
Reginer/aosp-android-jar
android-35/src/android/app/job/JobService.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/app/job/JobService.java
MIT
public final void updateTransferredNetworkBytes(@NonNull JobParameters params, @BytesLong long transferredDownloadBytes, @BytesLong long transferredUploadBytes) { mEngine.updateTransferredNetworkBytes(params, null, transferredDownloadBytes, transferredUploadBytes); }
Tell JobScheduler how much data has successfully been transferred for the data transfer job.
JobService::updateTransferredNetworkBytes
java
Reginer/aosp-android-jar
android-35/src/android/app/job/JobService.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/app/job/JobService.java
MIT
public final void updateTransferredNetworkBytes(@NonNull JobParameters params, @NonNull JobWorkItem item, @BytesLong long transferredDownloadBytes, @BytesLong long transferredUploadBytes) { mEngine.updateTransferredNetworkBytes(params, item, transferredDownloadBytes, transferredUploadBytes); }
Tell JobScheduler how much data has been transferred for the data transfer {@link JobWorkItem}.
JobService::updateTransferredNetworkBytes
java
Reginer/aosp-android-jar
android-35/src/android/app/job/JobService.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/app/job/JobService.java
MIT
public final void setNotification(@NonNull JobParameters params, int notificationId, @NonNull Notification notification, @JobEndNotificationPolicy int jobEndNotificationPolicy) { mEngine.setNotification(params, notificationId, notification, jobEndNotificationPolicy); }
Provide JobScheduler with a notification to post and tie to this job's lifecycle. This is only required for those user-initiated jobs which return {@code true} via {@link JobParameters#isUserInitiatedJob()}. If the app does not call this method for a required notification within 10 seconds after {@link #onStartJob(JobParameters)} is called, the system will trigger an ANR and stop this job. The notification must provide an accurate description of the work that the job is doing and, if possible, the state of the work. <p> Note that certain types of jobs (e.g. {@link JobInfo.Builder#setEstimatedNetworkBytes(long, long) data transfer jobs}) may require the notification to have certain characteristics and their documentation will state any such requirements. <p> JobScheduler will not remember this notification after the job has finished running, so apps must call this every time the job is started (if required or desired). <p> If separate jobs use the same notification ID with this API, the most recently provided notification will be shown to the user, and the {@code jobEndNotificationPolicy} of the last job to stop will be applied. @param params The parameters identifying this job, as supplied to the job in the {@link #onStartJob(JobParameters)} callback. @param notificationId The ID for this notification, as per {@link android.app.NotificationManager#notify(int, Notification)}. @param notification The notification to be displayed. @param jobEndNotificationPolicy The policy to apply to the notification when the job stops.
JobService::setNotification
java
Reginer/aosp-android-jar
android-35/src/android/app/job/JobService.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/app/job/JobService.java
MIT
void addPendingLockoutResetForUser(int userId, @NonNull byte[] gatekeeperPassword) { mHandler.post(() -> { if (mFaceManager != null && mFaceManager.hasEnrolledTemplates(userId)) { Slog.d(TAG, "Face addPendingLockoutResetForUser: " + userId); mPendingResetLockoutsForFace.add(new UserAuthInfo(userId, gatekeeperPassword)); } if (mFingerprintManager != null && mFingerprintManager.hasEnrolledFingerprints(userId)) { Slog.d(TAG, "Fingerprint addPendingLockoutResetForUser: " + userId); mPendingResetLockoutsForFingerprint.add(new UserAuthInfo(userId, gatekeeperPassword)); } if (mBiometricManager != null) { Slog.d(TAG, "Fingerprint addPendingLockoutResetForUser: " + userId); mPendingResetLockouts.add(new UserAuthInfo(userId, gatekeeperPassword)); } }); }
Adds a request for resetLockout on all biometric sensors for the user specified. The queue owner must invoke {@link #processPendingLockoutResets()} at some point to kick off the operations. Note that this should only ever be invoked for successful authentications, otherwise it will consume a Gatekeeper authentication attempt and potentially wipe the user/device. @param userId The user that the operation will apply for. @param gatekeeperPassword The Gatekeeper Password
BiometricDeferredQueue::addPendingLockoutResetForUser
java
Reginer/aosp-android-jar
android-34/src/com/android/server/locksettings/BiometricDeferredQueue.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/locksettings/BiometricDeferredQueue.java
MIT
private Runnable mPacDownloader = new Runnable() { @Override @WorkerThread public void run() { String file; final Uri pacUrl = mPacUrl; if (Uri.EMPTY.equals(pacUrl)) return; final int oldTag = TrafficStats.getAndSetThreadStatsTag( TrafficStatsConstants.TAG_SYSTEM_PAC); try { file = get(pacUrl); } catch (IOException ioe) { file = null; Log.w(TAG, "Failed to load PAC file: " + ioe); } finally { TrafficStats.setThreadStatsTag(oldTag); } if (file != null) { synchronized (mProxyLock) { if (!file.equals(mCurrentPac)) { setCurrentProxyScript(file); } } mHasDownloaded = true; sendProxyIfNeeded(); longSchedule(); } else { reschedule(); } } };
Runnable to download PAC script. The behavior relies on the assumption it always runs on mNetThread to guarantee that the latest data fetched from mPacUrl is stored in mProxyService.
PacProxyService::Runnable
java
Reginer/aosp-android-jar
android-33/src/com/android/server/connectivity/PacProxyService.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/server/connectivity/PacProxyService.java
MIT
public AudioRecordRoutingProxy(long nativeRecordInJavaObj) { super(nativeRecordInJavaObj); }
A constructor which explicitly connects a Native (C++) AudioRecord. For use by the AudioRecordRoutingProxy subclass. @param nativeRecordInJavaObj A C/C++ pointer to a native AudioRecord (associated with an OpenSL ES recorder).
AudioRecordRoutingProxy::AudioRecordRoutingProxy
java
Reginer/aosp-android-jar
android-34/src/android/media/AudioRecordRoutingProxy.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/media/AudioRecordRoutingProxy.java
MIT
public AssertionError() { }
Constructs an AssertionError with no detail message.
AssertionError::AssertionError
java
Reginer/aosp-android-jar
android-34/src/java/lang/AssertionError.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/java/lang/AssertionError.java
MIT
private AssertionError(String detailMessage) { super(detailMessage); }
This internal constructor does no processing on its string argument, even if it is a null reference. The public constructors will never call this constructor with a null argument.
AssertionError::AssertionError
java
Reginer/aosp-android-jar
android-34/src/java/lang/AssertionError.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/java/lang/AssertionError.java
MIT
public AssertionError(Object detailMessage) { this(String.valueOf(detailMessage)); if (detailMessage instanceof Throwable) initCause((Throwable) detailMessage); }
Constructs an AssertionError with its detail message derived from the specified object, which is converted to a string as defined in section {@jls 5.1.11} of <cite>The Java Language Specification</cite>. <p> If the specified object is an instance of {@code Throwable}, it becomes the <i>cause</i> of the newly constructed assertion error. @param detailMessage value to be used in constructing detail message @see Throwable#getCause()
AssertionError::AssertionError
java
Reginer/aosp-android-jar
android-34/src/java/lang/AssertionError.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/java/lang/AssertionError.java
MIT
public AssertionError(boolean detailMessage) { this(String.valueOf(detailMessage)); }
Constructs an AssertionError with its detail message derived from the specified {@code boolean}, which is converted to a string as defined in section {@jls 5.1.11} of <cite>The Java Language Specification</cite>. @param detailMessage value to be used in constructing detail message
AssertionError::AssertionError
java
Reginer/aosp-android-jar
android-34/src/java/lang/AssertionError.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/java/lang/AssertionError.java
MIT
public AssertionError(char detailMessage) { this(String.valueOf(detailMessage)); }
Constructs an AssertionError with its detail message derived from the specified {@code char}, which is converted to a string as defined in section {@jls 5.1.11} of <cite>The Java Language Specification</cite>. @param detailMessage value to be used in constructing detail message
AssertionError::AssertionError
java
Reginer/aosp-android-jar
android-34/src/java/lang/AssertionError.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/java/lang/AssertionError.java
MIT
public AssertionError(int detailMessage) { this(String.valueOf(detailMessage)); }
Constructs an AssertionError with its detail message derived from the specified {@code int}, which is converted to a string as defined in section {@jls 5.1.11} of <cite>The Java Language Specification</cite>. @param detailMessage value to be used in constructing detail message
AssertionError::AssertionError
java
Reginer/aosp-android-jar
android-34/src/java/lang/AssertionError.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/java/lang/AssertionError.java
MIT
public AssertionError(long detailMessage) { this(String.valueOf(detailMessage)); }
Constructs an AssertionError with its detail message derived from the specified {@code long}, which is converted to a string as defined in section {@jls 5.1.11} of <cite>The Java Language Specification</cite>. @param detailMessage value to be used in constructing detail message
AssertionError::AssertionError
java
Reginer/aosp-android-jar
android-34/src/java/lang/AssertionError.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/java/lang/AssertionError.java
MIT
public AssertionError(float detailMessage) { this(String.valueOf(detailMessage)); }
Constructs an AssertionError with its detail message derived from the specified {@code float}, which is converted to a string as defined in section {@jls 5.1.11} of <cite>The Java Language Specification</cite>. @param detailMessage value to be used in constructing detail message
AssertionError::AssertionError
java
Reginer/aosp-android-jar
android-34/src/java/lang/AssertionError.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/java/lang/AssertionError.java
MIT
public AssertionError(double detailMessage) { this(String.valueOf(detailMessage)); }
Constructs an AssertionError with its detail message derived from the specified {@code double}, which is converted to a string as defined in section {@jls 5.1.11} of <cite>The Java Language Specification</cite>. @param detailMessage value to be used in constructing detail message
AssertionError::AssertionError
java
Reginer/aosp-android-jar
android-34/src/java/lang/AssertionError.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/java/lang/AssertionError.java
MIT
public AssertionError(String message, Throwable cause) { super(message, cause); }
Constructs a new {@code AssertionError} with the specified detail message and cause. <p>Note that the detail message associated with {@code cause} is <i>not</i> automatically incorporated in this error's detail message. @param message the detail message, may be {@code null} @param cause the cause, may be {@code null} @since 1.7
AssertionError::AssertionError
java
Reginer/aosp-android-jar
android-34/src/java/lang/AssertionError.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/java/lang/AssertionError.java
MIT
Element getElementById(String name) { for (Attr attr : attributes) { if (attr.isId() && name.equals(attr.getValue())) { return this; } } /* * TODO: Remove this behavior. * The spec explicitly says that this is a bad idea. From * Document.getElementById(): "Attributes with the name "ID" * or "id" are not of type ID unless so defined. */ if (name.equals(getAttribute("id"))) { return this; } for (NodeImpl node : children) { if (node.getNodeType() == Node.ELEMENT_NODE) { Element element = ((ElementImpl) node).getElementById(name); if (element != null) { return element; } } } return null; }
This implementation walks the entire document looking for an element with the given ID attribute. We should consider adding an index to speed navigation of large documents.
ElementImpl::getElementById
java
Reginer/aosp-android-jar
android-33/src/org/apache/harmony/xml/dom/ElementImpl.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/org/apache/harmony/xml/dom/ElementImpl.java
MIT
public NfcFServiceInfo(ResolveInfo info, String description, String systemCode, String dynamicSystemCode, String nfcid2, String dynamicNfcid2, int uid, String t3tPmm) { this.mService = info; this.mDescription = description; this.mSystemCode = systemCode; this.mDynamicSystemCode = dynamicSystemCode; this.mNfcid2 = nfcid2; this.mDynamicNfcid2 = dynamicNfcid2; this.mUid = uid; this.mT3tPmm = t3tPmm; }
@hide
NfcFServiceInfo::NfcFServiceInfo
java
Reginer/aosp-android-jar
android-32/src/android/nfc/cardemulation/NfcFServiceInfo.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/nfc/cardemulation/NfcFServiceInfo.java
MIT
public void dumpDebug(ProtoOutputStream proto) { getComponent().dumpDebug(proto, NfcFServiceInfoProto.COMPONENT_NAME); proto.write(NfcFServiceInfoProto.DESCRIPTION, getDescription()); proto.write(NfcFServiceInfoProto.SYSTEM_CODE, getSystemCode()); proto.write(NfcFServiceInfoProto.NFCID2, getNfcid2()); proto.write(NfcFServiceInfoProto.T3T_PMM, getT3tPmm()); }
Dump debugging info as NfcFServiceInfoProto If the output belongs to a sub message, the caller is responsible for wrapping this function between {@link ProtoOutputStream#start(long)} and {@link ProtoOutputStream#end(long)}. @param proto the ProtoOutputStream to write to
NfcFServiceInfo::dumpDebug
java
Reginer/aosp-android-jar
android-32/src/android/nfc/cardemulation/NfcFServiceInfo.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/nfc/cardemulation/NfcFServiceInfo.java
MIT