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 int getPhysicalSlotIndex() {
return mPhysicalSlotIndex;
} |
Gets the physical slot index for the slot that the UICC is currently inserted in.
| UiccCardInfo::getPhysicalSlotIndex | java | Reginer/aosp-android-jar | android-34/src/android/telephony/UiccCardInfo.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/telephony/UiccCardInfo.java | MIT |
public boolean isRemovable() {
return mIsRemovable;
} |
Return whether the UICC or eUICC is removable.
<p>
UICCs are generally removable, but eUICCs may be removable or built in to the device.
@return true if the UICC or eUICC is removable
| UiccCardInfo::isRemovable | java | Reginer/aosp-android-jar | android-34/src/android/telephony/UiccCardInfo.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/telephony/UiccCardInfo.java | MIT |
public boolean isMultipleEnabledProfilesSupported() {
return mIsMultipleEnabledProfilesSupported;
} |
Return whether the UICC or eUICC is removable.
<p>
UICCs are generally removable, but eUICCs may be removable or built in to the device.
@return true if the UICC or eUICC is removable
public boolean isRemovable() {
return mIsRemovable;
}
/*
Whether the UICC card supports multiple enabled profile(MEP)
UICCs are generally MEP disabled, there can be only one active profile on the physical
sim card.
@return {@code true} if the UICC is supporting multiple enabled profile(MEP).
| UiccCardInfo::isMultipleEnabledProfilesSupported | java | Reginer/aosp-android-jar | android-34/src/android/telephony/UiccCardInfo.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/telephony/UiccCardInfo.java | MIT |
public @NonNull Collection<UiccPortInfo> getPorts() {
return Collections.unmodifiableList(mPortList);
} |
Get information regarding port, ICCID and its active status.
For device which support {@link PackageManager#FEATURE_TELEPHONY_EUICC_MEP}, it should return
more than one {@link UiccPortInfo} object if the card is eUICC.
@return Collection of {@link UiccPortInfo}
| UiccCardInfo::getPorts | java | Reginer/aosp-android-jar | android-34/src/android/telephony/UiccCardInfo.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/telephony/UiccCardInfo.java | MIT |
public void setIccIdAccessRestricted(boolean iccIdAccessRestricted) {
this.mIccIdAccessRestricted = iccIdAccessRestricted;
} |
if the flag is set to {@code true} the calling app is not allowed to access deprecated
{@link #getIccId()}
@param iccIdAccessRestricted is the flag to check if app is allowed to access ICCID
@hide
| UiccCardInfo::setIccIdAccessRestricted | java | Reginer/aosp-android-jar | android-34/src/android/telephony/UiccCardInfo.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/telephony/UiccCardInfo.java | MIT |
public NoConnectionPendingException() { } |
Constructs an instance of this class.
| NoConnectionPendingException::NoConnectionPendingException | java | Reginer/aosp-android-jar | android-34/src/java/nio/channels/NoConnectionPendingException.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/java/nio/channels/NoConnectionPendingException.java | MIT |
public nodeelementnodeattributes(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
| nodeelementnodeattributes::nodeelementnodeattributes | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level1/core/nodeelementnodeattributes.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level1/core/nodeelementnodeattributes.java | MIT |
public void runTest() throws Throwable {
Document doc;
NodeList elementList;
Element testAddr;
NamedNodeMap addrAttr;
Node attrNode;
String attrName;
java.util.Collection attrList = new java.util.ArrayList();
java.util.Collection expected = new java.util.ArrayList();
expected.add("domestic");
expected.add("street");
doc = (Document) load("staff", false);
elementList = doc.getElementsByTagName("address");
testAddr = (Element) elementList.item(2);
addrAttr = testAddr.getAttributes();
for (int indexN1005C = 0; indexN1005C < addrAttr.getLength(); indexN1005C++) {
attrNode = (Node) addrAttr.item(indexN1005C);
attrName = attrNode.getNodeName();
attrList.add(attrName);
}
assertEquals("nodeElementNodeValueAssert1", expected, attrList);
} |
Runs the test case.
@throws Throwable Any uncaught exception causes test to fail
| nodeelementnodeattributes::runTest | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level1/core/nodeelementnodeattributes.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level1/core/nodeelementnodeattributes.java | MIT |
public String getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodeelementnodeattributes";
} |
Gets URI that identifies the test.
@return uri identifier of test
| nodeelementnodeattributes::getTargetURI | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level1/core/nodeelementnodeattributes.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level1/core/nodeelementnodeattributes.java | MIT |
public static void main(final String[] args) {
DOMTestCase.doMain(nodeelementnodeattributes.class, args);
} |
Runs this test from the command line.
@param args command line arguments
| nodeelementnodeattributes::main | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level1/core/nodeelementnodeattributes.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level1/core/nodeelementnodeattributes.java | MIT |
@NonNull public Instant getTime() {
return Instant.ofEpochMilli(getTimeMillis());
} |
Returns the timestamp of this record.
| RequestLogRecord::getTime | java | Reginer/aosp-android-jar | android-35/src/android/adservices/ondevicepersonalization/RequestLogRecord.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/adservices/ondevicepersonalization/RequestLogRecord.java | MIT |
public @NonNull RequestLogRecord build() {
checkNotUsed();
mBuilderFieldsSet |= 0x8; // Mark builder used
if ((mBuilderFieldsSet & 0x1) == 0) {
mRows = Collections.emptyList();
}
if ((mBuilderFieldsSet & 0x2) == 0) {
mRequestId = 0;
}
if ((mBuilderFieldsSet & 0x4) == 0) {
mTimeMillis = 0;
}
RequestLogRecord o = new RequestLogRecord(
mRows,
mRequestId,
mTimeMillis);
return o;
} |
Time of the request in milliseconds
@hide
@DataClass.Generated.Member
@Override
public @NonNull Builder setTimeMillis(long value) {
checkNotUsed();
mBuilderFieldsSet |= 0x4;
mTimeMillis = value;
return this;
}
/** Builds the instance. This builder should not be touched after calling this! | Builder::build | java | Reginer/aosp-android-jar | android-35/src/android/adservices/ondevicepersonalization/RequestLogRecord.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/adservices/ondevicepersonalization/RequestLogRecord.java | MIT |
public ResultReceiver adoptResultReceiver() {
ResultReceiver rr = mResultReceiver;
mResultReceiver = null;
return rr;
} |
Adopt the ResultReceiver that was given to this shell command from it, taking
it over. Primarily used to dispatch to another shell command. Once called,
this shell command will no longer return its own result when done.
| ShellCommand::adoptResultReceiver | java | Reginer/aosp-android-jar | android-31/src/android/os/ShellCommand.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/os/ShellCommand.java | MIT |
public ParcelFileDescriptor openFileForSystem(String path, String mode) {
if (DEBUG) Slog.d(TAG, "openFileForSystem: " + path + " mode=" + mode);
try {
ParcelFileDescriptor pfd = getShellCallback().openFile(path,
"u:r:system_server:s0", mode);
if (pfd != null) {
if (DEBUG) Slog.d(TAG, "Got file: " + pfd);
return pfd;
}
} catch (RuntimeException e) {
if (DEBUG) Slog.d(TAG, "Failure opening file: " + e.getMessage());
getErrPrintWriter().println("Failure opening file: " + e.getMessage());
}
if (DEBUG) Slog.d(TAG, "Error: Unable to open file: " + path);
getErrPrintWriter().println("Error: Unable to open file: " + path);
String suggestedPath = "/data/local/tmp/";
if (path == null || !path.startsWith(suggestedPath)) {
getErrPrintWriter().println("Consider using a file under " + suggestedPath);
}
return null;
} |
Helper for just system services to ask the shell to open an output file.
@hide
| ShellCommand::openFileForSystem | java | Reginer/aosp-android-jar | android-31/src/android/os/ShellCommand.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/os/ShellCommand.java | MIT |
public ShellCallback getShellCallback() {
return mShellCallback;
} |
Return the {@link ShellCallback} for communicating back with the calling shell.
| ShellCommand::getShellCallback | java | Reginer/aosp-android-jar | android-31/src/android/os/ShellCommand.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/os/ShellCommand.java | MIT |
public void onAttached(WifiAwareSession session) {
/* empty */
} |
Called when Aware attach operation
{@link WifiAwareManager#attach(AttachCallback, android.os.Handler)}
is completed and that we can now start discovery sessions or connections.
@param session The Aware object on which we can execute further Aware operations - e.g.
discovery, connections.
| AttachCallback::onAttached | java | Reginer/aosp-android-jar | android-32/src/android/net/wifi/aware/AttachCallback.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/net/wifi/aware/AttachCallback.java | MIT |
public void onAttachFailed() {
/* empty */
} |
Called when Aware attach operation
{@link WifiAwareManager#attach(AttachCallback, android.os.Handler)} failed.
| AttachCallback::onAttachFailed | java | Reginer/aosp-android-jar | android-32/src/android/net/wifi/aware/AttachCallback.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/net/wifi/aware/AttachCallback.java | MIT |
public void setPercentShowMode(@BatteryPercentMode int mode) {
if (mode == mShowPercentMode) return;
mShowPercentMode = mode;
updateShowPercent();
} |
Force a particular mode of showing percent
0 - No preference
1 - Force on
2 - Force off
3 - Estimate
@param mode desired mode (none, on, off)
| BatteryMeterView::setPercentShowMode | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/battery/BatteryMeterView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/battery/BatteryMeterView.java | MIT |
public void updatePercentView() {
if (mBatteryPercentView != null) {
removeView(mBatteryPercentView);
mBatteryPercentView = null;
}
updateShowPercent();
} |
Updates percent view by removing old one and reinflating if necessary
| BatteryMeterView::updatePercentView | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/battery/BatteryMeterView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/battery/BatteryMeterView.java | MIT |
void setBatteryEstimateFetcher(BatteryEstimateFetcher fetcher) {
mBatteryEstimateFetcher = fetcher;
} |
Sets the fetcher that should be used to get the estimated time remaining for the user's
battery.
| BatteryMeterView::setBatteryEstimateFetcher | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/battery/BatteryMeterView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/battery/BatteryMeterView.java | MIT |
void scaleBatteryMeterViews() {
Resources res = getContext().getResources();
TypedValue typedValue = new TypedValue();
res.getValue(R.dimen.status_bar_icon_scale_factor, typedValue, true);
float iconScaleFactor = typedValue.getFloat();
int batteryHeight = res.getDimensionPixelSize(R.dimen.status_bar_battery_icon_height);
int batteryWidth = res.getDimensionPixelSize(R.dimen.status_bar_battery_icon_width);
int marginBottom = res.getDimensionPixelSize(R.dimen.battery_margin_bottom);
LinearLayout.LayoutParams scaledLayoutParams = new LinearLayout.LayoutParams(
(int) (batteryWidth * iconScaleFactor), (int) (batteryHeight * iconScaleFactor));
scaledLayoutParams.setMargins(0, 0, 0, marginBottom);
mBatteryIconView.setLayoutParams(scaledLayoutParams);
} |
Looks up the scale factor for status bar icons and scales the battery view by that amount.
| BatteryMeterView::scaleBatteryMeterViews | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/battery/BatteryMeterView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/battery/BatteryMeterView.java | MIT |
public void updateColors(int foregroundColor, int backgroundColor, int singleToneColor) {
mDrawable.setColors(foregroundColor, backgroundColor, singleToneColor);
mTextColor = singleToneColor;
if (mBatteryPercentView != null) {
mBatteryPercentView.setTextColor(singleToneColor);
}
if (mUnknownStateDrawable != null) {
mUnknownStateDrawable.setTint(singleToneColor);
}
} |
Sets icon and text colors. This will be overridden by {@code onDarkChanged} events,
if registered.
@param foregroundColor
@param backgroundColor
@param singleToneColor
| BatteryMeterView::updateColors | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/battery/BatteryMeterView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/battery/BatteryMeterView.java | MIT |
public SHA512Digest()
{
} |
Standard constructor
| SHA512Digest::SHA512Digest | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/crypto/digests/SHA512Digest.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/crypto/digests/SHA512Digest.java | MIT |
public SHA512Digest(SHA512Digest t)
{
super(t);
} |
Copy constructor. This will copy the state of the provided
message digest.
| SHA512Digest::SHA512Digest | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/crypto/digests/SHA512Digest.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/crypto/digests/SHA512Digest.java | MIT |
public SHA512Digest(byte[] encodedState)
{
restoreState(encodedState);
} |
State constructor - create a digest initialised with the state of a previous one.
@param encodedState the encoded state from the originating digest.
| SHA512Digest::SHA512Digest | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/crypto/digests/SHA512Digest.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/crypto/digests/SHA512Digest.java | MIT |
public void reset()
{
super.reset();
/* SHA-512 initial hash value
* The first 64 bits of the fractional parts of the square roots
* of the first eight prime numbers
*/
H1 = 0x6a09e667f3bcc908L;
H2 = 0xbb67ae8584caa73bL;
H3 = 0x3c6ef372fe94f82bL;
H4 = 0xa54ff53a5f1d36f1L;
H5 = 0x510e527fade682d1L;
H6 = 0x9b05688c2b3e6c1fL;
H7 = 0x1f83d9abfb41bd6bL;
H8 = 0x5be0cd19137e2179L;
} |
reset the chaining variables
| SHA512Digest::reset | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/crypto/digests/SHA512Digest.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/crypto/digests/SHA512Digest.java | MIT |
public Builder addExcludedCerts(Set<X509Certificate> excludedCerts)
{
this.excludedCerts.addAll(excludedCerts);
return this;
} |
Adds excluded certificates which are not used for building a
certification path.
<p>
The given set is cloned to protect it against subsequent modifications.
@param excludedCerts The excluded certificates to set.
| Builder::addExcludedCerts | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/org/bouncycastle/jcajce/PKIXExtendedBuilderParameters.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/org/bouncycastle/jcajce/PKIXExtendedBuilderParameters.java | MIT |
public Builder setMaxPathLength(int maxPathLength)
{
if (maxPathLength < -1)
{
throw new InvalidParameterException("The maximum path "
+ "length parameter can not be less than -1.");
}
this.maxPathLength = maxPathLength;
return this;
} |
Sets the maximum number of intermediate non-self-issued certificates in a
certification path. The PKIX <code>CertPathBuilder</code> must not
build paths longer then this length.
<p>
A value of 0 implies that the path can only contain a single certificate.
A value of -1 does not limit the length. The default length is 5.
<p>
The basic constraints extension of a CA certificate overrides this value
if smaller.
@param maxPathLength the maximum number of non-self-issued intermediate
certificates in the certification path
@throws InvalidParameterException if <code>maxPathLength</code> is set
to a value less than -1
@see #getMaxPathLength
| Builder::setMaxPathLength | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/org/bouncycastle/jcajce/PKIXExtendedBuilderParameters.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/org/bouncycastle/jcajce/PKIXExtendedBuilderParameters.java | MIT |
public Set getExcludedCerts()
{
return excludedCerts;
} |
Excluded certificates are not used for building a certification path.
<p>
The returned set is immutable.
@return Returns the excluded certificates.
| Builder::getExcludedCerts | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/org/bouncycastle/jcajce/PKIXExtendedBuilderParameters.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/org/bouncycastle/jcajce/PKIXExtendedBuilderParameters.java | MIT |
public int getMaxPathLength()
{
return maxPathLength;
} |
Returns the value of the maximum number of intermediate non-self-issued
certificates in the certification path.
@return the maximum number of non-self-issued intermediate certificates
in the certification path, or -1 if no limit exists.
| Builder::getMaxPathLength | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/org/bouncycastle/jcajce/PKIXExtendedBuilderParameters.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/org/bouncycastle/jcajce/PKIXExtendedBuilderParameters.java | MIT |
public Object clone()
{
return this;
} |
@return this object
| Builder::clone | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/org/bouncycastle/jcajce/PKIXExtendedBuilderParameters.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/org/bouncycastle/jcajce/PKIXExtendedBuilderParameters.java | MIT |
@NonNull public CharSequence getTextValue() {
Preconditions.checkState(isText(), "value must be a text value, not type=%d", mType);
return (CharSequence) mValue;
} |
Gets the value to autofill a text field.
<p>See {@link View#AUTOFILL_TYPE_TEXT} for more info.</p>
@throws IllegalStateException if the value is not a text value
| AutofillValue::getTextValue | java | Reginer/aosp-android-jar | android-35/src/android/view/autofill/AutofillValue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/view/autofill/AutofillValue.java | MIT |
public boolean isText() {
return mType == AUTOFILL_TYPE_TEXT;
} |
Checks if this is a text value.
<p>See {@link View#AUTOFILL_TYPE_TEXT} for more info.</p>
| AutofillValue::isText | java | Reginer/aosp-android-jar | android-35/src/android/view/autofill/AutofillValue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/view/autofill/AutofillValue.java | MIT |
public boolean getToggleValue() {
Preconditions.checkState(isToggle(), "value must be a toggle value, not type=%d", mType);
return (Boolean) mValue;
} |
Gets the value to autofill a toggable field.
<p>See {@link View#AUTOFILL_TYPE_TOGGLE} for more info.</p>
@throws IllegalStateException if the value is not a toggle value
| AutofillValue::getToggleValue | java | Reginer/aosp-android-jar | android-35/src/android/view/autofill/AutofillValue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/view/autofill/AutofillValue.java | MIT |
public boolean isToggle() {
return mType == AUTOFILL_TYPE_TOGGLE;
} |
Checks if this is a toggle value.
<p>See {@link View#AUTOFILL_TYPE_TOGGLE} for more info.</p>
| AutofillValue::isToggle | java | Reginer/aosp-android-jar | android-35/src/android/view/autofill/AutofillValue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/view/autofill/AutofillValue.java | MIT |
public int getListValue() {
Preconditions.checkState(isList(), "value must be a list value, not type=%d", mType);
return (Integer) mValue;
} |
Gets the value to autofill a selection list field.
<p>See {@link View#AUTOFILL_TYPE_LIST} for more info.</p>
@throws IllegalStateException if the value is not a list value
| AutofillValue::getListValue | java | Reginer/aosp-android-jar | android-35/src/android/view/autofill/AutofillValue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/view/autofill/AutofillValue.java | MIT |
public boolean isList() {
return mType == AUTOFILL_TYPE_LIST;
} |
Checks if this is a list value.
<p>See {@link View#AUTOFILL_TYPE_LIST} for more info.</p>
| AutofillValue::isList | java | Reginer/aosp-android-jar | android-35/src/android/view/autofill/AutofillValue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/view/autofill/AutofillValue.java | MIT |
public long getDateValue() {
Preconditions.checkState(isDate(), "value must be a date value, not type=%d", mType);
return (Long) mValue;
} |
Gets the value to autofill a date field.
<p>See {@link View#AUTOFILL_TYPE_DATE} for more info.</p>
@throws IllegalStateException if the value is not a date value
| AutofillValue::getDateValue | java | Reginer/aosp-android-jar | android-35/src/android/view/autofill/AutofillValue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/view/autofill/AutofillValue.java | MIT |
public boolean isDate() {
return mType == AUTOFILL_TYPE_DATE;
} |
Checks if this is a date value.
<p>See {@link View#AUTOFILL_TYPE_DATE} for more info.</p>
| AutofillValue::isDate | java | Reginer/aosp-android-jar | android-35/src/android/view/autofill/AutofillValue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/view/autofill/AutofillValue.java | MIT |
public boolean isEmpty() {
return isText() && ((CharSequence) mValue).length() == 0;
} |
Used to define whether a field is empty so it's not sent to service on save.
<p>Only applies to some types, like text.
@hide
| AutofillValue::isEmpty | java | Reginer/aosp-android-jar | android-35/src/android/view/autofill/AutofillValue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/view/autofill/AutofillValue.java | MIT |
public static AutofillValue forText(@Nullable CharSequence value) {
if (sVerbose && !Looper.getMainLooper().isCurrentThread()) {
Log.v(TAG, "forText() not called on main thread: " + Thread.currentThread());
}
return value == null ? null : new AutofillValue(AUTOFILL_TYPE_TEXT,
TextUtils.trimNoCopySpans(value));
} |
Creates a new {@link AutofillValue} to autofill a {@link View} representing a text field.
<p>See {@link View#AUTOFILL_TYPE_TEXT} for more info.
<p><b>Note:</b> This method is not thread safe and can throw an exception if the
{@code value} is modified by a different thread before it returns.
| AutofillValue::forText | java | Reginer/aosp-android-jar | android-35/src/android/view/autofill/AutofillValue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/view/autofill/AutofillValue.java | MIT |
public static AutofillValue forToggle(boolean value) {
return new AutofillValue(AUTOFILL_TYPE_TOGGLE, value);
} |
Creates a new {@link AutofillValue} to autofill a {@link View} representing a toggable
field.
<p>See {@link View#AUTOFILL_TYPE_TOGGLE} for more info.
| AutofillValue::forToggle | java | Reginer/aosp-android-jar | android-35/src/android/view/autofill/AutofillValue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/view/autofill/AutofillValue.java | MIT |
public static AutofillValue forList(int value) {
return new AutofillValue(AUTOFILL_TYPE_LIST, value);
} |
Creates a new {@link AutofillValue} to autofill a {@link View} representing a selection
list.
<p>See {@link View#AUTOFILL_TYPE_LIST} for more info.
| AutofillValue::forList | java | Reginer/aosp-android-jar | android-35/src/android/view/autofill/AutofillValue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/view/autofill/AutofillValue.java | MIT |
public static AutofillValue forDate(long value) {
return new AutofillValue(AUTOFILL_TYPE_DATE, value);
} |
Creates a new {@link AutofillValue} to autofill a {@link View} representing a date.
<p>See {@link View#AUTOFILL_TYPE_DATE} for more info.
| AutofillValue::forDate | java | Reginer/aosp-android-jar | android-35/src/android/view/autofill/AutofillValue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/view/autofill/AutofillValue.java | MIT |
public IllegalAccessError() {
super();
} |
Constructs an <code>IllegalAccessError</code> with no detail message.
| IllegalAccessError::IllegalAccessError | java | Reginer/aosp-android-jar | android-33/src/java/lang/IllegalAccessError.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/lang/IllegalAccessError.java | MIT |
public IllegalAccessError(String s) {
super(s);
} |
Constructs an <code>IllegalAccessError</code> with the specified
detail message.
@param s the detail message.
| IllegalAccessError::IllegalAccessError | java | Reginer/aosp-android-jar | android-33/src/java/lang/IllegalAccessError.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/lang/IllegalAccessError.java | MIT |
public nodenormalize01(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
| nodenormalize01::nodenormalize01 | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level2/core/nodenormalize01.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level2/core/nodenormalize01.java | MIT |
public void runTest() throws Throwable {
Document doc;
Document newDoc;
DOMImplementation domImpl;
DocumentType docType;
DocumentType docTypeNull = null;
Element documentElement;
Element element1;
Element element2;
Element element3;
Element element4;
Element element5;
Element element6;
Element element7;
Text text1;
Text text2;
Text text3;
ProcessingInstruction pi;
CDATASection cData;
Comment comment;
EntityReference entRef;
NodeList elementList;
Node appendedChild;
doc = (Document) load("staffNS", true);
domImpl = doc.getImplementation();
newDoc = domImpl.createDocument("http://www.w3.org/DOM/Test", "dom:root", docTypeNull);
element1 = newDoc.createElement("element1");
element2 = newDoc.createElement("element2");
element3 = newDoc.createElement("element3");
element4 = newDoc.createElement("element4");
element5 = newDoc.createElement("element5");
element6 = newDoc.createElement("element6");
element7 = newDoc.createElement("element7");
text1 = newDoc.createTextNode("text1");
text2 = newDoc.createTextNode("text2");
text3 = newDoc.createTextNode("text3");
cData = newDoc.createCDATASection("Cdata");
comment = newDoc.createComment("comment");
pi = newDoc.createProcessingInstruction("PITarget", "PIData");
entRef = newDoc.createEntityReference("EntRef");
assertNotNull("createdEntRefNotNull", entRef);
documentElement = newDoc.getDocumentElement();
appendedChild = documentElement.appendChild(element1);
appendedChild = element2.appendChild(text1);
appendedChild = element2.appendChild(text2);
appendedChild = element2.appendChild(text3);
appendedChild = element1.appendChild(element2);
text1 = (Text) text1.cloneNode(false);
text2 = (Text) text2.cloneNode(false);
appendedChild = element3.appendChild(entRef);
appendedChild = element3.appendChild(text1);
appendedChild = element3.appendChild(text2);
appendedChild = element1.appendChild(element3);
text1 = (Text) text1.cloneNode(false);
text2 = (Text) text2.cloneNode(false);
appendedChild = element4.appendChild(cData);
appendedChild = element4.appendChild(text1);
appendedChild = element4.appendChild(text2);
appendedChild = element1.appendChild(element4);
text2 = (Text) text2.cloneNode(false);
text3 = (Text) text3.cloneNode(false);
appendedChild = element5.appendChild(comment);
appendedChild = element5.appendChild(text2);
appendedChild = element5.appendChild(text3);
appendedChild = element1.appendChild(element5);
text2 = (Text) text2.cloneNode(false);
text3 = (Text) text3.cloneNode(false);
appendedChild = element6.appendChild(pi);
appendedChild = element6.appendChild(text2);
appendedChild = element6.appendChild(text3);
appendedChild = element1.appendChild(element6);
entRef = (EntityReference) entRef.cloneNode(false);
text1 = (Text) text1.cloneNode(false);
text2 = (Text) text2.cloneNode(false);
text3 = (Text) text3.cloneNode(false);
appendedChild = element7.appendChild(entRef);
appendedChild = element7.appendChild(text1);
appendedChild = element7.appendChild(text2);
appendedChild = element7.appendChild(text3);
appendedChild = element1.appendChild(element7);
elementList = element1.getChildNodes();
assertSize("nodeNormalize01_1Bef", 6, elementList);
elementList = element2.getChildNodes();
assertSize("nodeNormalize01_2Bef", 3, elementList);
elementList = element3.getChildNodes();
assertSize("nodeNormalize01_3Bef", 3, elementList);
elementList = element4.getChildNodes();
assertSize("nodeNormalize01_4Bef", 3, elementList);
elementList = element5.getChildNodes();
assertSize("nodeNormalize01_5Bef", 3, elementList);
elementList = element6.getChildNodes();
assertSize("nodeNormalize01_6Bef", 3, elementList);
elementList = element7.getChildNodes();
assertSize("nodeNormalize01_7Bef", 4, elementList);
newDoc.normalize();
elementList = element1.getChildNodes();
assertSize("nodeNormalize01_1Aft", 6, elementList);
elementList = element2.getChildNodes();
assertSize("nodeNormalize01_2Aft", 1, elementList);
elementList = element3.getChildNodes();
assertSize("nodeNormalize01_3Aft", 2, elementList);
elementList = element4.getChildNodes();
assertSize("nodeNormalize01_4Aft", 2, elementList);
elementList = element5.getChildNodes();
assertSize("nodeNormalize01_5Aft", 2, elementList);
elementList = element6.getChildNodes();
assertSize("nodeNormalize01_6Aft", 2, elementList);
elementList = element7.getChildNodes();
assertSize("nodeNormalize01_7Aft", 2, elementList);
} |
Runs the test case.
@throws Throwable Any uncaught exception causes test to fail
| nodenormalize01::runTest | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level2/core/nodenormalize01.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level2/core/nodenormalize01.java | MIT |
public String getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/nodenormalize01";
} |
Gets URI that identifies the test.
@return uri identifier of test
| nodenormalize01::getTargetURI | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level2/core/nodenormalize01.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level2/core/nodenormalize01.java | MIT |
public static void main(final String[] args) {
DOMTestCase.doMain(nodenormalize01.class, args);
} |
Runs this test from the command line.
@param args command line arguments
| nodenormalize01::main | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level2/core/nodenormalize01.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level2/core/nodenormalize01.java | MIT |
public void bridgeSetValue(int index, String name, ResourceNamespace namespace, int resourceId,
ResourceValue value) {
mResourceId[index] = resourceId;
mResourceData[index] = value;
mNames[index] = name;
mNamespaces[index] = namespace;
} |
A bridge-specific method that sets a value in the type array
@param index the index of the value in the TypedArray
@param name the name of the attribute
@param namespace namespace of the attribute
@param resourceId the reference id of this resource
@param value the value of the attribute
| BridgeTypedArray::bridgeSetValue | java | Reginer/aosp-android-jar | android-32/src/android/content/res/BridgeTypedArray.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/content/res/BridgeTypedArray.java | MIT |
public void sealArray() {
// fills TypedArray.mIndices which is used to implement getIndexCount/getIndexAt
// first count the array size
int count = 0;
ArrayList<Integer> emptyIds = null;
for (int i = 0; i < mResourceData.length; i++) {
ResourceValue data = mResourceData[i];
if (data != null) {
String dataValue = data.getValue();
if (REFERENCE_NULL.equals(dataValue) || REFERENCE_UNDEFINED.equals(dataValue)) {
mResourceData[i] = null;
} else if (REFERENCE_EMPTY.equals(dataValue)) {
mResourceData[i] = null;
if (emptyIds == null) {
emptyIds = new ArrayList<>(4);
}
emptyIds.add(i);
} else {
count++;
}
}
}
if (emptyIds != null) {
mEmptyIds = new int[emptyIds.size()];
for (int i = 0; i < emptyIds.size(); i++) {
mEmptyIds[i] = emptyIds.get(i);
}
}
// allocate the table with an extra to store the size
mIndices = new int[count+1];
mIndices[0] = count;
// fill the array with the indices.
int index = 1;
for (int i = 0 ; i < mResourceData.length ; i++) {
if (mResourceData[i] != null) {
mIndices[index++] = i;
}
}
} |
Seals the array after all calls to
{@link #bridgeSetValue(int, String, ResourceNamespace, int, ResourceValue)} have been done.
<p/>This allows to compute the list of non default values, permitting
{@link #getIndexCount()} to return the proper value.
| BridgeTypedArray::sealArray | java | Reginer/aosp-android-jar | android-32/src/android/content/res/BridgeTypedArray.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/content/res/BridgeTypedArray.java | MIT |
public void setTheme(Theme theme) {
mTheme = theme;
} |
Set the theme to be used for inflating drawables.
| BridgeTypedArray::setTheme | java | Reginer/aosp-android-jar | android-32/src/android/content/res/BridgeTypedArray.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/content/res/BridgeTypedArray.java | MIT |
private Integer resolveEnumAttribute(int index) {
// Get the map of attribute-constant -> IntegerValue
Map<String, Integer> map = null;
if (mNamespaces[index] == ResourceNamespace.ANDROID) {
map = Bridge.getEnumValues(mNames[index]);
} else {
// get the styleable matching the resolved name
RenderResources res = mContext.getRenderResources();
ResourceValue attr = res.getResolvedResource(
ResourceReference.attr(mNamespaces[index], mNames[index]));
if (attr instanceof AttrResourceValue) {
map = ((AttrResourceValue) attr).getAttributeValues();
}
}
if (map != null && !map.isEmpty()) {
// Accumulator to store the value of the 1+ constants.
int result = 0;
boolean found = false;
String value = mResourceData[index].getValue();
if (!value.isEmpty()) {
// Check if the value string is already representing an integer and return it if so.
// Resources coming from res.apk in an AAR may have flags and enums in integer form.
char c = value.charAt(0);
if (Character.isDigit(c) || c == '-' || c == '+') {
try {
return convertValueToInt(value, 0);
} catch (NumberFormatException e) {
// Ignore and continue.
}
}
// Split the value in case it is a mix of several flags.
String[] keywords = value.split("\\|");
for (String keyword : keywords) {
Integer i = map.get(keyword.trim());
if (i != null) {
result |= i;
found = true;
}
// TODO: We should act smartly and log a warning for incorrect keywords. However,
// this method is currently called even if the resourceValue is not an enum.
}
if (found) {
return result;
}
}
}
return null;
} |
Searches for the string in the attributes (flag or enums) and returns the integer.
If found, it will return an integer matching the value.
@param index Index of attribute to retrieve.
@return Attribute int value, or null if not defined.
| BridgeTypedArray::resolveEnumAttribute | java | Reginer/aosp-android-jar | android-32/src/android/content/res/BridgeTypedArray.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/content/res/BridgeTypedArray.java | MIT |
private static int convertValueToInt(@Nullable String charSeq, int defValue) {
if (null == charSeq || charSeq.isEmpty())
return defValue;
int sign = 1;
int index = 0;
int len = charSeq.length();
int base = 10;
if ('-' == charSeq.charAt(0)) {
sign = -1;
index++;
}
if ('0' == charSeq.charAt(index)) {
// Quick check for a zero by itself
if (index == (len - 1))
return 0;
char c = charSeq.charAt(index + 1);
if ('x' == c || 'X' == c) {
index += 2;
base = 16;
} else {
index++;
// Leave the base as 10. aapt removes the preceding zero, and thus when framework
// sees the value, it only gets the decimal value.
}
} else if ('#' == charSeq.charAt(index)) {
return ResourceHelper.getColor(charSeq) * sign;
} else if ("true".equals(charSeq) || "TRUE".equals(charSeq)) {
return -1;
} else if ("false".equals(charSeq) || "FALSE".equals(charSeq)) {
return 0;
}
// Use Long, since we want to handle hex ints > 80000000.
return ((int)Long.parseLong(charSeq.substring(index), base)) * sign;
} |
Copied from {@link XmlUtils#convertValueToInt(CharSequence, int)}, but adapted to account
for aapt, and the fact that host Java VM's Integer.parseInt("XXXXXXXX", 16) cannot handle
"XXXXXXXX" > 80000000.
| BridgeTypedArray::convertValueToInt | java | Reginer/aosp-android-jar | android-32/src/android/content/res/BridgeTypedArray.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/content/res/BridgeTypedArray.java | MIT |
public Signature getSignature() {
return super.getSignature();
} |
Get {@link Signature} object.
@return {@link Signature} object or null if this doesn't contain one.
| CryptoObject::getSignature | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public Cipher getCipher() {
return super.getCipher();
} |
Get {@link Cipher} object.
@return {@link Cipher} object or null if this doesn't contain one.
| CryptoObject::getCipher | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public Mac getMac() {
return super.getMac();
} |
Get {@link Mac} object.
@return {@link Mac} object or null if this doesn't contain one.
| CryptoObject::getMac | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public IdentityCredential getIdentityCredential() {
return super.getIdentityCredential();
} |
Get {@link IdentityCredential} object.
@return {@link IdentityCredential} object or null if this doesn't contain one.
@hide
| CryptoObject::getIdentityCredential | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public AuthenticationResult(CryptoObject crypto, Fingerprint fingerprint, int userId,
boolean isStrongBiometric) {
mCryptoObject = crypto;
mFingerprint = fingerprint;
mUserId = userId;
mIsStrongBiometric = isStrongBiometric;
} |
Authentication result
@param crypto the crypto object
@param fingerprint the recognized fingerprint data, if allowed.
@hide
| AuthenticationResult::AuthenticationResult | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public CryptoObject getCryptoObject() { return mCryptoObject; } |
Obtain the crypto object associated with this transaction
@return crypto object provided to {@link FingerprintManager#authenticate(CryptoObject,
CancellationSignal, int, AuthenticationCallback, Handler)}.
| AuthenticationResult::getCryptoObject | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public int getUserId() { return mUserId; } |
Obtain the userId for which this fingerprint was authenticated.
@hide
| AuthenticationResult::getUserId | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public boolean isStrongBiometric() {
return mIsStrongBiometric;
} |
Check whether the strength of the fingerprint modality associated with this operation is
strong (i.e. not weak or convenience).
@hide
| AuthenticationResult::isStrongBiometric | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public void onAuthenticationSucceeded(AuthenticationResult result) { } |
Called when a fingerprint is recognized.
@param result An object containing authentication-related data
| AuthenticationCallback::onAuthenticationSucceeded | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public void onUdfpsPointerDown(int sensorId) {} |
Invoked for under-display fingerprint sensors when a touch has been detected on the
sensor area.
@hide
| AuthenticationCallback::onUdfpsPointerDown | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public void onUdfpsPointerUp(int sensorId) {} |
Invoked for under-display fingerprint sensors when a touch has been removed from the
sensor area.
@hide
| AuthenticationCallback::onUdfpsPointerUp | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public void onEnrollmentError(int errMsgId, CharSequence errString) { } |
Called when an unrecoverable error has been encountered and the operation is complete.
No further callbacks will be made on this object.
@param errMsgId An integer identifying the error message
@param errString A human-readable error string that can be shown in UI
| EnrollmentCallback::onEnrollmentError | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public void onEnrollmentHelp(int helpMsgId, CharSequence helpString) { } |
Called when a recoverable error has been encountered during enrollment. The help
string is provided to give the user guidance for what went wrong, such as
"Sensor dirty, please clean it" or what they need to do next, such as
"Touch sensor again."
@param helpMsgId An integer identifying the error message
@param helpString A human-readable string that can be shown in UI
| EnrollmentCallback::onEnrollmentHelp | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public void onEnrollmentProgress(int remaining) { } |
Called as each enrollment step progresses. Enrollment is considered complete when
remaining reaches 0. This function will not be called if enrollment fails. See
{@link EnrollmentCallback#onEnrollmentError(int, CharSequence)}
@param remaining The number of remaining steps
| EnrollmentCallback::onEnrollmentProgress | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public void onRemovalError(Fingerprint fp, int errMsgId, CharSequence errString) { } |
Called when the given fingerprint can't be removed.
@param fp The fingerprint that the call attempted to remove
@param errMsgId An associated error message id
@param errString An error message indicating why the fingerprint id can't be removed
| RemovalCallback::onRemovalError | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public void onRemovalSucceeded(@Nullable Fingerprint fp, int remaining) { } |
Called when a given fingerprint is successfully removed.
@param fp The fingerprint template that was removed.
@param remaining The number of fingerprints yet to be removed in this operation. If
{@link #remove} is called on one fingerprint, this should be 0. If
{@link #remove} is called on a group, this should be the number of remaining
fingerprints in the group, and 0 after the last fingerprint is removed.
| RemovalCallback::onRemovalSucceeded | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public void onLockoutReset(int sensorId) { } |
Called when lockout period expired and clients are allowed to listen for fingerprint
again.
| LockoutResetCallback::onLockoutReset | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
private void useHandler(Handler handler) {
if (handler != null) {
mHandler = new MyHandler(handler.getLooper());
} else if (mHandler.getLooper() != mContext.getMainLooper()) {
mHandler = new MyHandler(mContext.getMainLooper());
}
} |
Use the provided handler thread for events.
@param handler
| LockoutResetCallback::useHandler | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public boolean hasEnrolledTemplates() {
return hasEnrolledFingerprints();
} |
@hide
| LockoutResetCallback::hasEnrolledTemplates | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public boolean hasEnrolledTemplates(int userId) {
return hasEnrolledFingerprints(userId);
} |
@hide
| LockoutResetCallback::hasEnrolledTemplates | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public void registerFingerprintStateListener(@NonNull FingerprintStateListener listener) {
try {
mService.registerFingerprintStateListener(listener);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
} |
Forwards FingerprintStateListener to FingerprintService
@param listener new FingerprintStateListener being added
@hide
| LockoutResetCallback::registerFingerprintStateListener | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public boolean isPowerbuttonFps() {
final FingerprintSensorPropertiesInternal sensorProps = getFirstFingerprintSensor();
return sensorProps.sensorType == TYPE_POWER_BUTTON;
} |
Returns whether the device has a power button fingerprint sensor.
@return boolean indicating whether power button is fingerprint sensor
@hide
| LockoutResetCallback::isPowerbuttonFps | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public void addLockoutResetCallback(final LockoutResetCallback callback) {
if (mService != null) {
try {
final PowerManager powerManager = mContext.getSystemService(PowerManager.class);
mService.addLockoutResetCallback(
new IBiometricServiceLockoutResetCallback.Stub() {
@Override
public void onLockoutReset(int sensorId, IRemoteCallback serverCallback)
throws RemoteException {
try {
final PowerManager.WakeLock wakeLock = powerManager.newWakeLock(
PowerManager.PARTIAL_WAKE_LOCK, "lockoutResetCallback");
wakeLock.acquire();
mHandler.post(() -> {
try {
callback.onLockoutReset(sensorId);
} finally {
wakeLock.release();
}
});
} finally {
serverCallback.sendResult(null /* data */);
}
}
}, mContext.getOpPackageName());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
} else {
Slog.w(TAG, "addLockoutResetCallback(): Service not connected!");
}
} |
@hide
| LockoutResetCallback::addLockoutResetCallback | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public FingerprintManager(Context context, IFingerprintService service) {
mContext = context;
mService = service;
if (mService == null) {
Slog.v(TAG, "FingerprintService was null");
}
mHandler = new MyHandler(context);
} |
@hide
| MyHandler::FingerprintManager | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public int getEnrollStageCount() {
if (mEnrollStageThresholds == null) {
mEnrollStageThresholds = createEnrollStageThresholds(mContext);
}
return mEnrollStageThresholds.length + 1;
} |
@hide
| MyHandler::getEnrollStageCount | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public float getEnrollStageThreshold(int index) {
if (mEnrollStageThresholds == null) {
mEnrollStageThresholds = createEnrollStageThresholds(mContext);
}
if (index < 0 || index > mEnrollStageThresholds.length) {
Slog.w(TAG, "Unsupported enroll stage index: " + index);
return index < 0 ? 0f : 1f;
}
// The implicit threshold for the final stage is always 1.
return index == mEnrollStageThresholds.length ? 1f : mEnrollStageThresholds[index];
} |
@hide
| MyHandler::getEnrollStageThreshold | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public static String getErrorString(Context context, int errMsg, int vendorCode) {
switch (errMsg) {
case FINGERPRINT_ERROR_HW_UNAVAILABLE:
return context.getString(
com.android.internal.R.string.fingerprint_error_hw_not_available);
case FINGERPRINT_ERROR_UNABLE_TO_PROCESS:
return context.getString(
com.android.internal.R.string.fingerprint_error_unable_to_process);
case FINGERPRINT_ERROR_TIMEOUT:
return context.getString(com.android.internal.R.string.fingerprint_error_timeout);
case FINGERPRINT_ERROR_NO_SPACE:
return context.getString(
com.android.internal.R.string.fingerprint_error_no_space);
case FINGERPRINT_ERROR_CANCELED:
return context.getString(com.android.internal.R.string.fingerprint_error_canceled);
case FINGERPRINT_ERROR_LOCKOUT:
return context.getString(com.android.internal.R.string.fingerprint_error_lockout);
case FINGERPRINT_ERROR_LOCKOUT_PERMANENT:
return context.getString(
com.android.internal.R.string.fingerprint_error_lockout_permanent);
case FINGERPRINT_ERROR_USER_CANCELED:
return context.getString(
com.android.internal.R.string.fingerprint_error_user_canceled);
case FINGERPRINT_ERROR_NO_FINGERPRINTS:
return context.getString(
com.android.internal.R.string.fingerprint_error_no_fingerprints);
case FINGERPRINT_ERROR_HW_NOT_PRESENT:
return context.getString(
com.android.internal.R.string.fingerprint_error_hw_not_present);
case BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED:
return context.getString(
com.android.internal.R.string.fingerprint_error_security_update_required);
case FINGERPRINT_ERROR_BAD_CALIBRATION:
return context.getString(
com.android.internal.R.string.fingerprint_error_bad_calibration);
case FINGERPRINT_ERROR_VENDOR: {
String[] msgArray = context.getResources().getStringArray(
com.android.internal.R.array.fingerprint_error_vendor);
if (vendorCode < msgArray.length) {
return msgArray[vendorCode];
}
}
}
// This is used as a last resort in case a vendor string is missing
// It should not happen for anything other than FINGERPRINT_ERROR_VENDOR, but
// warn and use the default if all else fails.
Slog.w(TAG, "Invalid error message: " + errMsg + ", " + vendorCode);
return context.getString(
com.android.internal.R.string.fingerprint_error_vendor_unknown);
} |
@hide
| MyHandler::getErrorString | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public static String getAcquiredString(Context context, int acquireInfo, int vendorCode) {
switch (acquireInfo) {
case FINGERPRINT_ACQUIRED_GOOD:
return null;
case FINGERPRINT_ACQUIRED_PARTIAL:
return context.getString(
com.android.internal.R.string.fingerprint_acquired_partial);
case FINGERPRINT_ACQUIRED_INSUFFICIENT:
return context.getString(
com.android.internal.R.string.fingerprint_acquired_insufficient);
case FINGERPRINT_ACQUIRED_IMAGER_DIRTY:
return context.getString(
com.android.internal.R.string.fingerprint_acquired_imager_dirty);
case FINGERPRINT_ACQUIRED_TOO_SLOW:
return context.getString(
com.android.internal.R.string.fingerprint_acquired_too_slow);
case FINGERPRINT_ACQUIRED_TOO_FAST:
return context.getString(
com.android.internal.R.string.fingerprint_acquired_too_fast);
case FINGERPRINT_ACQUIRED_IMMOBILE:
return context.getString(
com.android.internal.R.string.fingerprint_acquired_immobile);
case FINGERPRINT_ACQUIRED_TOO_BRIGHT:
return context.getString(
com.android.internal.R.string.fingerprint_acquired_too_bright);
case FINGERPRINT_ACQUIRED_VENDOR: {
String[] msgArray = context.getResources().getStringArray(
com.android.internal.R.array.fingerprint_acquired_vendor);
if (vendorCode < msgArray.length) {
return msgArray[vendorCode];
}
}
break;
case FINGERPRINT_ACQUIRED_START:
return null;
}
Slog.w(TAG, "Invalid acquired message: " + acquireInfo + ", " + vendorCode);
return null;
} |
@hide
| MyHandler::getAcquiredString | java | Reginer/aosp-android-jar | android-32/src/android/hardware/fingerprint/FingerprintManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/hardware/fingerprint/FingerprintManager.java | MIT |
public boolean checkCallingCanSendText(
boolean persistMessageForNonDefaultSmsApp, String callingPackage,
String callingAttributionTag, String message) {
// TODO(b/75978989): Should we allow IMS/carrier apps for persisted messages as well?
if (!persistMessageForNonDefaultSmsApp) {
try {
enforceCallerIsImsAppOrCarrierApp(message);
// No need to also check SEND_SMS.
return true;
} catch (SecurityException e) {
mContext.enforceCallingPermission(
android.Manifest.permission.MODIFY_PHONE_STATE, message);
}
}
return checkCallingCanSendSms(callingPackage, callingAttributionTag, message);
} |
Check that the caller can send text messages.
For persisted messages, the caller just needs the SEND_SMS permission. For unpersisted
messages, the caller must either be the IMS app or a carrier-privileged app, or they must
have both the MODIFY_PHONE_STATE and SEND_SMS permissions.
@throws SecurityException if the caller is missing all necessary permission declaration or
has had a necessary runtime permission revoked.
@return true unless the caller has all necessary permissions but has a revoked AppOps bit.
| SmsPermissions::checkCallingCanSendText | java | Reginer/aosp-android-jar | android-32/src/com/android/internal/telephony/SmsPermissions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/internal/telephony/SmsPermissions.java | MIT |
public void enforceCallerIsImsAppOrCarrierApp(String message) {
String imsRcsPackage = CarrierSmsUtils.getImsRcsPackageForIntent(mContext,
mPhone, new Intent(CarrierMessagingService.SERVICE_INTERFACE));
if (imsRcsPackage != null && packageNameMatchesCallingUid(imsRcsPackage)) {
return;
}
TelephonyPermissions.enforceCallingOrSelfCarrierPrivilege(
mContext, mPhone.getSubId(), message);
} |
Enforces that the caller is one of the following apps:
<ul>
<li> IMS App determined by telephony to implement RCS features
<li> Carrier App
</ul>
| SmsPermissions::enforceCallerIsImsAppOrCarrierApp | java | Reginer/aosp-android-jar | android-32/src/com/android/internal/telephony/SmsPermissions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/internal/telephony/SmsPermissions.java | MIT |
public boolean checkCallingCanSendSms(String callingPackage, String callingAttributionTag,
String message) {
mContext.enforceCallingPermission(Manifest.permission.SEND_SMS, message);
return mAppOps.noteOp(AppOpsManager.OPSTR_SEND_SMS, Binder.getCallingUid(), callingPackage,
callingAttributionTag, null) == AppOpsManager.MODE_ALLOWED;
} |
Check that the caller has SEND_SMS permissions. Can only be called during an IPC.
@throws SecurityException if the caller is missing the permission declaration or has had the
permission revoked at runtime.
@return whether the caller has the OP_SEND_SMS AppOps bit.
| SmsPermissions::checkCallingCanSendSms | java | Reginer/aosp-android-jar | android-32/src/com/android/internal/telephony/SmsPermissions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/internal/telephony/SmsPermissions.java | MIT |
public boolean checkCallingOrSelfCanSendSms(String callingPackage, String callingAttributionTag,
String message) {
mContext.enforceCallingOrSelfPermission(Manifest.permission.SEND_SMS, message);
return mAppOps.noteOp(AppOpsManager.OPSTR_SEND_SMS, Binder.getCallingUid(), callingPackage,
callingAttributionTag, null)
== AppOpsManager.MODE_ALLOWED;
} |
Check that the caller (or self, if this is not an IPC) has SEND_SMS permissions.
@throws SecurityException if the caller is missing the permission declaration or has had the
permission revoked at runtime.
@return whether the caller has the OP_SEND_SMS AppOps bit.
| SmsPermissions::checkCallingOrSelfCanSendSms | java | Reginer/aosp-android-jar | android-32/src/com/android/internal/telephony/SmsPermissions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/internal/telephony/SmsPermissions.java | MIT |
public boolean checkCallingOrSelfCanGetSmscAddress(String callingPackage, String message) {
// Allow it to the default SMS app always.
if (!isCallerDefaultSmsPackage(callingPackage)) {
TelephonyPermissions
.enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
mContext, mPhone.getSubId(), message);
}
return true;
} |
Check that the caller (or self, if this is not an IPC) can get SMSC address from (U)SIM.
The default SMS application can get SMSC address, otherwise the caller must have
{@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE} or carrier privileges.
@return true if the caller is default SMS app or has the required permission and privileges.
Otherwise, false;
| SmsPermissions::checkCallingOrSelfCanGetSmscAddress | java | Reginer/aosp-android-jar | android-32/src/com/android/internal/telephony/SmsPermissions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/internal/telephony/SmsPermissions.java | MIT |
public boolean checkCallingOrSelfCanSetSmscAddress(String callingPackage, String message) {
// Allow it to the default SMS app always.
if (!isCallerDefaultSmsPackage(callingPackage)) {
// Allow it with MODIFY_PHONE_STATE or Carrier Privileges
TelephonyPermissions.enforceCallingOrSelfModifyPermissionOrCarrierPrivilege(
mContext, mPhone.getSubId(), message);
}
return true;
} |
Check that the caller (or self, if this is not an IPC) can set SMSC address on (U)SIM.
The default SMS application can set SMSC address, otherwise the caller must have
{@link android.Manifest.permission#MODIFY_PHONE_STATE} or carrier privileges.
@return true if the caller is default SMS app or has the required permission and privileges.
Otherwise, false.
| SmsPermissions::checkCallingOrSelfCanSetSmscAddress | java | Reginer/aosp-android-jar | android-32/src/com/android/internal/telephony/SmsPermissions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/internal/telephony/SmsPermissions.java | MIT |
public static boolean isPhoneNumber(String number) {
// TODO: replace this function with libphonenumber's isPossibleNumber (see
// PhoneNumberUtil). One complication is that it requires the sender's region which
// comes from the CurrentCountryIso. For now, let's just do this simple match.
if (TextUtils.isEmpty(number)) {
return false;
}
Matcher match = PHONE_PATTERN.matcher(number);
return match.matches();
} |
Returns true if the string is a phone number.
| PhoneUtil::isPhoneNumber | java | Reginer/aosp-android-jar | android-32/src/com/android/ex/chips/PhoneUtil.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/ex/chips/PhoneUtil.java | MIT |
public void delete(String whereClause, String[] whereArgs) {
if (mIgnoreWrites) {
return;
}
try {
mOpenHelper.getWritableDatabase().delete(mTableName, whereClause, whereArgs);
} catch (SQLiteFullException e) {
onDiskFull(e);
} catch (SQLiteException e) {
Log.d(TAG, "Ignoring sqlite exception", e);
}
} |
@see SQLiteDatabase#delete(String, String, String[])
| SQLiteCacheHelper::delete | java | Reginer/aosp-android-jar | android-32/src/com/android/launcher3/util/SQLiteCacheHelper.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/launcher3/util/SQLiteCacheHelper.java | MIT |
public void insertOrReplace(ContentValues values) {
if (mIgnoreWrites) {
return;
}
try {
mOpenHelper.getWritableDatabase().insertWithOnConflict(
mTableName, null, values, SQLiteDatabase.CONFLICT_REPLACE);
} catch (SQLiteFullException e) {
onDiskFull(e);
} catch (SQLiteException e) {
Log.d(TAG, "Ignoring sqlite exception", e);
}
} |
@see SQLiteDatabase#insertWithOnConflict(String, String, ContentValues, int)
| SQLiteCacheHelper::insertOrReplace | java | Reginer/aosp-android-jar | android-32/src/com/android/launcher3/util/SQLiteCacheHelper.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/launcher3/util/SQLiteCacheHelper.java | MIT |
public Cursor query(String[] columns, String selection, String[] selectionArgs) {
return mOpenHelper.getReadableDatabase().query(
mTableName, columns, selection, selectionArgs, null, null, null);
} |
@see SQLiteDatabase#query(String, String[], String, String[], String, String, String)
| SQLiteCacheHelper::query | java | Reginer/aosp-android-jar | android-32/src/com/android/launcher3/util/SQLiteCacheHelper.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/launcher3/util/SQLiteCacheHelper.java | MIT |
public static String readCmdlineFromProcfs(int pid) {
String[] cmdline = new String[1];
if (!Process.readProcFile("/proc/" + pid + "/cmdline", CMDLINE_OUT, cmdline, null, null)) {
return "";
}
return cmdline[0];
} |
Reads cmdline of a process from procfs.
Returns content of /proc/pid/cmdline (e.g. /system/bin/statsd) or an empty string
if the file is not available.
| ProcfsMemoryUtil::readCmdlineFromProcfs | java | Reginer/aosp-android-jar | android-35/src/com/android/server/stats/pull/ProcfsMemoryUtil.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/server/stats/pull/ProcfsMemoryUtil.java | MIT |
public static SparseArray<String> getProcessCmdlines() {
int[] pids = new int[1024];
pids = Process.getPids("/proc", pids);
SparseArray<String> cmdlines = new SparseArray<>(pids.length);
for (int pid : pids) {
if (pid < 0) {
break;
}
String cmdline = readCmdlineFromProcfs(pid);
if (cmdline.isEmpty()) {
continue;
}
cmdlines.append(pid, cmdline);
}
return cmdlines;
} |
Scans all /proc/pid/cmdline entries and returns a mapping between pid and cmdline.
| ProcfsMemoryUtil::getProcessCmdlines | java | Reginer/aosp-android-jar | android-35/src/com/android/server/stats/pull/ProcfsMemoryUtil.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/server/stats/pull/ProcfsMemoryUtil.java | MIT |
public String getFeatureTag() {
return mFeatureTag;
} |
Gets the feature tag.
@hide
| PresTupleInfo::getFeatureTag | java | Reginer/aosp-android-jar | android-35/src/com/android/ims/internal/uce/presence/PresTupleInfo.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/ims/internal/uce/presence/PresTupleInfo.java | MIT |
public String getContactUri() {
return mContactUri;
} |
Gets the contact URI.
@hide
| PresTupleInfo::getContactUri | java | Reginer/aosp-android-jar | android-35/src/com/android/ims/internal/uce/presence/PresTupleInfo.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/ims/internal/uce/presence/PresTupleInfo.java | MIT |
public String getTimestamp() {
return mTimestamp;
} |
Gets the timestamp.
@hide
| PresTupleInfo::getTimestamp | java | Reginer/aosp-android-jar | android-35/src/com/android/ims/internal/uce/presence/PresTupleInfo.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/ims/internal/uce/presence/PresTupleInfo.java | MIT |
public String getVersion() {
return mVersion;
} |
Gets the version.
@hide
| PresTupleInfo::getVersion | java | Reginer/aosp-android-jar | android-35/src/com/android/ims/internal/uce/presence/PresTupleInfo.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/ims/internal/uce/presence/PresTupleInfo.java | MIT |
public void setVersion(String version) {
this.mVersion = version;
} |
Sets the version.
@hide
| PresTupleInfo::setVersion | java | Reginer/aosp-android-jar | android-35/src/com/android/ims/internal/uce/presence/PresTupleInfo.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/ims/internal/uce/presence/PresTupleInfo.java | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.