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 void onRemovalError(Face face, int errMsgId, CharSequence errString) {
} |
Called when the given face can't be removed.
@param face The face that the call attempted to remove
@param errMsgId An associated error message id
@param errString An error message indicating why the face id can't be removed
| RemovalCallback::onRemovalError | java | Reginer/aosp-android-jar | android-31/src/android/hardware/face/FaceManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/hardware/face/FaceManager.java | MIT |
public void onRemovalSucceeded(@Nullable Face face, int remaining) {
} |
Called when a given face is successfully removed.
@param face The face template that was removed.
| RemovalCallback::onRemovalSucceeded | java | Reginer/aosp-android-jar | android-31/src/android/hardware/face/FaceManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/hardware/face/FaceManager.java | MIT |
public void onLockoutReset(int sensorId) {
} |
Called when lockout period expired and clients are allowed to listen for face
authentication
again.
| LockoutResetCallback::onLockoutReset | java | Reginer/aosp-android-jar | android-31/src/android/hardware/face/FaceManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/hardware/face/FaceManager.java | MIT |
public ZipError(String s) {
super(s);
} |
Constructs a ZipError with the given detail message.
@param s the {@code String} containing a detail message
| ZipError::ZipError | java | Reginer/aosp-android-jar | android-33/src/java/util/zip/ZipError.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/zip/ZipError.java | MIT |
public void setTerminate(boolean v)
{
m_terminate = v;
} |
Set the "terminate" attribute.
If the terminate attribute has the value yes, then the
XSLT transformer should terminate processing after sending
the message. The default value is no.
@param v Value to set for "terminate" attribute.
| ElemMessage::setTerminate | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/templates/ElemMessage.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/templates/ElemMessage.java | MIT |
public boolean getTerminate()
{
return m_terminate;
} |
Get the "terminate" attribute.
If the terminate attribute has the value yes, then the
XSLT transformer should terminate processing after sending
the message. The default value is no.
@return value of "terminate" attribute.
| ElemMessage::getTerminate | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/templates/ElemMessage.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/templates/ElemMessage.java | MIT |
public int getXSLToken()
{
return Constants.ELEMNAME_MESSAGE;
} |
Get an int constant identifying the type of element.
@see org.apache.xalan.templates.Constants
@return The token ID for this element
| ElemMessage::getXSLToken | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/templates/ElemMessage.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/templates/ElemMessage.java | MIT |
public String getNodeName()
{
return Constants.ELEMNAME_MESSAGE_STRING;
} |
Return the node name.
@return name of the element
| ElemMessage::getNodeName | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/templates/ElemMessage.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/templates/ElemMessage.java | MIT |
public void execute(
TransformerImpl transformer)
throws TransformerException
{
String data = transformer.transformToString(this);
transformer.getMsgMgr().message(this, data, m_terminate);
if(m_terminate)
transformer.getErrorListener().fatalError(new TransformerException(XSLMessages.createMessage(XSLTErrorResources.ER_STYLESHEET_DIRECTED_TERMINATION, null))); //"Stylesheet directed termination"));
} |
Send a message to diagnostics.
The xsl:message instruction sends a message in a way that
is dependent on the XSLT transformer. The content of the xsl:message
instruction is a template. The xsl:message is instantiated by
instantiating the content to create an XML fragment. This XML
fragment is the content of the message.
@param transformer non-null reference to the the current transform-time state.
@throws TransformerException
| ElemMessage::execute | java | Reginer/aosp-android-jar | android-35/src/org/apache/xalan/templates/ElemMessage.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xalan/templates/ElemMessage.java | MIT |
public static void sendBackupOnUpdate(IBackupObserver observer, String packageName,
BackupProgress progress) {
if (observer != null) {
try {
observer.onUpdate(packageName, progress);
} catch (RemoteException e) {
if (DEBUG) {
Slog.w(TAG, "Backup observer went away: onUpdate");
}
}
}
} |
Wraps {@link IBackupObserver#onUpdate(String, BackupProgress)} to handle RemoteException,
so that the caller doesn't have to.
| BackupObserverUtils::sendBackupOnUpdate | java | Reginer/aosp-android-jar | android-33/src/com/android/server/backup/utils/BackupObserverUtils.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/server/backup/utils/BackupObserverUtils.java | MIT |
public static void sendBackupOnPackageResult(IBackupObserver observer, String packageName,
int status) {
if (observer != null) {
try {
observer.onResult(packageName, status);
} catch (RemoteException e) {
if (DEBUG) {
Slog.w(TAG, "Backup observer went away: onResult");
}
}
}
} |
Wraps {@link IBackupObserver#onResult(String, int)} to handle RemoteException, so that the
caller doesn't have to.
| BackupObserverUtils::sendBackupOnPackageResult | java | Reginer/aosp-android-jar | android-33/src/com/android/server/backup/utils/BackupObserverUtils.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/server/backup/utils/BackupObserverUtils.java | MIT |
public static void sendBackupFinished(IBackupObserver observer, int status) {
if (observer != null) {
try {
observer.backupFinished(status);
} catch (RemoteException e) {
if (DEBUG) {
Slog.w(TAG, "Backup observer went away: backupFinished");
}
}
}
} |
Wraps {@link IBackupObserver#backupFinished(int)} to handle RemoteException, so that the
caller doesn't have to.
| BackupObserverUtils::sendBackupFinished | java | Reginer/aosp-android-jar | android-33/src/com/android/server/backup/utils/BackupObserverUtils.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/server/backup/utils/BackupObserverUtils.java | MIT |
public Authorization() {
super(AuthorizationHeader.NAME);
} | Default constructor.
| Authorization::Authorization | java | Reginer/aosp-android-jar | android-35/src/gov/nist/javax/sip/header/Authorization.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/gov/nist/javax/sip/header/Authorization.java | MIT |
public DoubleDigitManager(long timeoutInMillis, CallBack callBack) {
this.timeoutInMillis = timeoutInMillis;
mCallBack = callBack;
} |
@param timeoutInMillis How long after the first digit is pressed does
the user have to press the second digit?
@param callBack The callback to indicate what's going on with the user.
| DoubleDigitManager::DoubleDigitManager | java | Reginer/aosp-android-jar | android-31/src/android/widget/DoubleDigitManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/widget/DoubleDigitManager.java | MIT |
public void reportDigit(int digit) {
if (intermediateDigit == null) {
intermediateDigit = digit;
new Handler().postDelayed(new Runnable() {
public void run() {
if (intermediateDigit != null) {
mCallBack.singleDigitFinal(intermediateDigit);
intermediateDigit = null;
}
}
}, timeoutInMillis);
if (!mCallBack.singleDigitIntermediate(digit)) {
// this wasn't a good candidate for the intermediate digit,
// make it the final digit (since there is no opportunity to
// reject the final digit).
intermediateDigit = null;
mCallBack.singleDigitFinal(digit);
}
} else if (mCallBack.twoDigitsFinal(intermediateDigit, digit)) {
intermediateDigit = null;
}
} |
Report to this manager that a digit was pressed.
@param digit
| DoubleDigitManager::reportDigit | java | Reginer/aosp-android-jar | android-31/src/android/widget/DoubleDigitManager.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/widget/DoubleDigitManager.java | MIT |
default void setVisibleState(@StatusBarIconView.VisibleState int state) {
setVisibleState(state, false);
} | /*
Copyright (C) 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
package com.android.systemui.statusbar;
import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver;
public interface StatusIconDisplayable extends DarkReceiver {
String getSlot();
void setStaticDrawableColor(int color);
void setDecorColor(int color);
/** Sets the visible state that this displayable should be. | setVisibleState | java | Reginer/aosp-android-jar | android-34/src/com/android/systemui/statusbar/StatusIconDisplayable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/systemui/statusbar/StatusIconDisplayable.java | MIT |
public void setCallingPidUid(int pid, int uid) {
mCallingPid = pid;
mCallingUid = uid;
} |
To be called by system_server to keep track which pid and uid is running this animation.
| RemoteAnimationAdapter::setCallingPidUid | java | Reginer/aosp-android-jar | android-33/src/android/view/RemoteAnimationAdapter.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/view/RemoteAnimationAdapter.java | MIT |
public int getCallingPid() {
return mCallingPid;
} |
@return The pid of the process running the animation.
| RemoteAnimationAdapter::getCallingPid | java | Reginer/aosp-android-jar | android-33/src/android/view/RemoteAnimationAdapter.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/view/RemoteAnimationAdapter.java | MIT |
public int getCallingUid() {
return mCallingUid;
} |
@return The uid of the process running the animation.
| RemoteAnimationAdapter::getCallingUid | java | Reginer/aosp-android-jar | android-33/src/android/view/RemoteAnimationAdapter.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/view/RemoteAnimationAdapter.java | MIT |
public IApplicationThread getCallingApplication() {
return mCallingApplication;
} |
Gets the ApplicationThread that will run the animation. Instead it is intended to pass the
calling information among client processes (eg. shell + launcher) through one-way binder
calls (where binder itself doesn't track calling information).
| RemoteAnimationAdapter::getCallingApplication | java | Reginer/aosp-android-jar | android-33/src/android/view/RemoteAnimationAdapter.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/view/RemoteAnimationAdapter.java | MIT |
protected SAXTransformerFactory() {} |
The default constructor is protected on purpose.
| SAXTransformerFactory::SAXTransformerFactory | java | Reginer/aosp-android-jar | android-33/src/javax/xml/transform/sax/SAXTransformerFactory.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/javax/xml/transform/sax/SAXTransformerFactory.java | MIT |
private void reset() {
NativeCrypto.EVP_CipherInit_ex(cipherCtx, 0, encodedKey, iv, isEncrypting());
calledUpdate = false;
} |
Reset this Cipher instance state to process a new chunk of data.
| OpenSSLEvpCipher::reset | java | Reginer/aosp-android-jar | android-35/src/com/android/org/conscrypt/OpenSSLEvpCipher.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/org/conscrypt/OpenSSLEvpCipher.java | MIT |
private HealthStats() {
throw new RuntimeException("unsupported");
} |
HealthStats empty constructor not implemented because this
class is read-only.
| HealthStats::HealthStats | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public String getDataType() {
return mDataType;
} |
Get a name representing the contents of this object.
@see UidHealthStats
@see PackageHealthStats
@see PidHealthStats
@see ProcessHealthStats
@see ServiceHealthStats
| HealthStats::getDataType | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public boolean hasTimer(int key) {
return getIndex(mTimerKeys, key) >= 0;
} |
Return whether this object contains a TimerStat for the supplied key.
| HealthStats::hasTimer | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public TimerStat getTimer(int key) {
final int index = getIndex(mTimerKeys, key);
if (index < 0) {
throw new IndexOutOfBoundsException("Bad timer key dataType=" + mDataType
+ " key=" + key);
}
return new TimerStat(mTimerCounts[index], mTimerTimes[index]);
} |
Return a TimerStat object for the given key.
This will allocate a new {@link TimerStat} object, which may be wasteful. Instead, use
{@link #getTimerCount} and {@link #getTimerTime}.
@throws IndexOutOfBoundsException When the key is not present in this object.
@see #hasTimer hasTimer(int) To check if a value for the given key is present.
| HealthStats::getTimer | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public int getTimerCount(int key) {
final int index = getIndex(mTimerKeys, key);
if (index < 0) {
throw new IndexOutOfBoundsException("Bad timer key dataType=" + mDataType
+ " key=" + key);
}
return mTimerCounts[index];
} |
Get the count for the timer for the given key.
@throws IndexOutOfBoundsException When the key is not present in this object.
@see #hasTimer hasTimer(int) To check if a value for the given key is present.
| HealthStats::getTimerCount | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public long getTimerTime(int key) {
final int index = getIndex(mTimerKeys, key);
if (index < 0) {
throw new IndexOutOfBoundsException("Bad timer key dataType=" + mDataType
+ " key=" + key);
}
return mTimerTimes[index];
} |
Get the time for the timer for the given key, in milliseconds.
@throws IndexOutOfBoundsException When the key is not present in this object.
@see #hasTimer hasTimer(int) To check if a value for the given key is present.
| HealthStats::getTimerTime | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public int getTimerKeyCount() {
return mTimerKeys.length;
} |
Get the number of timer values in this object. Can be used to iterate through
the available timers.
@see #getTimerKeyAt
| HealthStats::getTimerKeyCount | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public int getTimerKeyAt(int index) {
return mTimerKeys[index];
} |
Get the key for the timer at the given index. Index must be between 0 and the result
of {@link #getTimerKeyCount getTimerKeyCount()}.
@see #getTimerKeyCount
| HealthStats::getTimerKeyAt | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public boolean hasMeasurement(int key) {
return getIndex(mMeasurementKeys, key) >= 0;
} |
Return whether this object contains a measurement for the supplied key.
| HealthStats::hasMeasurement | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public long getMeasurement(int key) {
final int index = getIndex(mMeasurementKeys, key);
if (index < 0) {
throw new IndexOutOfBoundsException("Bad measurement key dataType=" + mDataType
+ " key=" + key);
}
return mMeasurementValues[index];
} |
Get the measurement for the given key.
@throws IndexOutOfBoundsException When the key is not present in this object.
@see #hasMeasurement hasMeasurement(int) To check if a value for the given key is present.
| HealthStats::getMeasurement | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public int getMeasurementKeyCount() {
return mMeasurementKeys.length;
} |
Get the number of measurement values in this object. Can be used to iterate through
the available measurements.
@see #getMeasurementKeyAt
| HealthStats::getMeasurementKeyCount | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public int getMeasurementKeyAt(int index) {
return mMeasurementKeys[index];
} |
Get the key for the measurement at the given index. Index must be between 0 and the result
of {@link #getMeasurementKeyCount getMeasurementKeyCount()}.
@see #getMeasurementKeyCount
| HealthStats::getMeasurementKeyAt | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public boolean hasStats(int key) {
return getIndex(mStatsKeys, key) >= 0;
} |
Return whether this object contains a HealthStats map for the supplied key.
| HealthStats::hasStats | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public Map<String,HealthStats> getStats(int key) {
final int index = getIndex(mStatsKeys, key);
if (index < 0) {
throw new IndexOutOfBoundsException("Bad stats key dataType=" + mDataType
+ " key=" + key);
}
return mStatsValues[index];
} |
Get the HealthStats map for the given key.
@throws IndexOutOfBoundsException When the key is not present in this object.
@see #hasStats hasStats(int) To check if a value for the given key is present.
| HealthStats::getStats | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public int getStatsKeyCount() {
return mStatsKeys.length;
} |
Get the number of HealthStat map values in this object. Can be used to iterate through
the available measurements.
@see #getMeasurementKeyAt
| HealthStats::getStatsKeyCount | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public int getStatsKeyAt(int index) {
return mStatsKeys[index];
} |
Get the key for the timer at the given index. Index must be between 0 and the result
of {@link #getStatsKeyCount getStatsKeyCount()}.
@see #getStatsKeyCount
| HealthStats::getStatsKeyAt | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public boolean hasTimers(int key) {
return getIndex(mTimersKeys, key) >= 0;
} |
Return whether this object contains a timers map for the supplied key.
| HealthStats::hasTimers | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public Map<String,TimerStat> getTimers(int key) {
final int index = getIndex(mTimersKeys, key);
if (index < 0) {
throw new IndexOutOfBoundsException("Bad timers key dataType=" + mDataType
+ " key=" + key);
}
return mTimersValues[index];
} |
Get the TimerStat map for the given key.
@throws IndexOutOfBoundsException When the key is not present in this object.
@see #hasTimers hasTimers(int) To check if a value for the given key is present.
| HealthStats::getTimers | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public int getTimersKeyCount() {
return mTimersKeys.length;
} |
Get the number of timer map values in this object. Can be used to iterate through
the available timer maps.
@see #getTimersKeyAt
| HealthStats::getTimersKeyCount | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public int getTimersKeyAt(int index) {
return mTimersKeys[index];
} |
Get the key for the timer map at the given index. Index must be between 0 and the result
of {@link #getTimersKeyCount getTimersKeyCount()}.
@see #getTimersKeyCount
| HealthStats::getTimersKeyAt | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public boolean hasMeasurements(int key) {
return getIndex(mMeasurementsKeys, key) >= 0;
} |
Return whether this object contains a measurements map for the supplied key.
| HealthStats::hasMeasurements | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public Map<String,Long> getMeasurements(int key) {
final int index = getIndex(mMeasurementsKeys, key);
if (index < 0) {
throw new IndexOutOfBoundsException("Bad measurements key dataType=" + mDataType
+ " key=" + key);
}
return mMeasurementsValues[index];
} |
Get the measurements map for the given key.
@throws IndexOutOfBoundsException When the key is not present in this object.
@see #hasMeasurements To check if a value for the given key is present.
| HealthStats::getMeasurements | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public int getMeasurementsKeyCount() {
return mMeasurementsKeys.length;
} |
Get the number of measurement map values in this object. Can be used to iterate through
the available measurement maps.
@see #getMeasurementsKeyAt
| HealthStats::getMeasurementsKeyCount | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public int getMeasurementsKeyAt(int index) {
return mMeasurementsKeys[index];
} |
Get the key for the measurement map at the given index.
Index must be between 0 and the result
of {@link #getMeasurementsKeyCount getMeasurementsKeyCount()}.
@see #getMeasurementsKeyCount
| HealthStats::getMeasurementsKeyAt | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
private static int getIndex(int[] keys, int key) {
return Arrays.binarySearch(keys, key);
} |
Get the index in keys of key.
| HealthStats::getIndex | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
private static ArrayMap<String,HealthStats> createHealthStatsMap(Parcel in) {
final int count = in.readInt();
final ArrayMap<String,HealthStats> result = new ArrayMap<String,HealthStats>(count);
for (int i=0; i<count; i++) {
result.put(in.readString(), new HealthStats(in));
}
return result;
} |
Create an ArrayMap<String,HealthStats> from the given Parcel.
| HealthStats::createHealthStatsMap | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
private static <T extends Parcelable> ArrayMap<String,T> createParcelableMap(Parcel in,
Parcelable.Creator<T> creator) {
final int count = in.readInt();
final ArrayMap<String,T> result = new ArrayMap<String,T>(count);
for (int i=0; i<count; i++) {
result.put(in.readString(), creator.createFromParcel(in));
}
return result;
} |
Create an ArrayMap<String,T extends Parcelable> from the given Parcel using
the given Parcelable.Creator.
| HealthStats::createParcelableMap | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
private static ArrayMap<String,Long> createLongsMap(Parcel in) {
final int count = in.readInt();
final ArrayMap<String,Long> result = new ArrayMap<String,Long>(count);
for (int i=0; i<count; i++) {
result.put(in.readString(), in.readLong());
}
return result;
} |
Create an ArrayMap<String,Long> from the given Parcel.
| HealthStats::createLongsMap | java | Reginer/aosp-android-jar | android-34/src/android/os/health/HealthStats.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/os/health/HealthStats.java | MIT |
public void onToolbarShowTimeout(int callingUid) {
// no-op
} |
Called when showing the selection toolbar for a specific timeout. This avoids the client
forgot to call dismiss to clean the state.
| SelectionToolbarRenderService::onToolbarShowTimeout | java | Reginer/aosp-android-jar | android-34/src/android/service/selectiontoolbar/SelectionToolbarRenderService.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/service/selectiontoolbar/SelectionToolbarRenderService.java | MIT |
public static String modeToString(int mode) {
switch (mode) {
case MODE_CURRENT: return "MODE_CURRENT";
case MODE_IN_CALL: return "MODE_IN_CALL";
case MODE_IN_COMMUNICATION: return "MODE_IN_COMMUNICATION";
case MODE_INVALID: return "MODE_INVALID";
case MODE_NORMAL: return "MODE_NORMAL";
case MODE_RINGTONE: return "MODE_RINGTONE";
case MODE_CALL_SCREENING: return "MODE_CALL_SCREENING";
case MODE_CALL_REDIRECT: return "MODE_CALL_REDIRECT";
case MODE_COMMUNICATION_REDIRECT: return "MODE_COMMUNICATION_REDIRECT";
default: return "unknown mode (" + mode + ")";
}
} |
@hide
Checks whether the microphone mute is on or off.
@return true if microphone is muted, false if it's not
@UnsupportedAppUsage
public static native boolean isMicrophoneMuted();
/* modes for setPhoneState, must match AudioSystem.h audio_mode
/** @hide
public static final int MODE_INVALID = -2;
/** @hide
public static final int MODE_CURRENT = -1;
/** @hide
public static final int MODE_NORMAL = 0;
/** @hide
public static final int MODE_RINGTONE = 1;
/** @hide
public static final int MODE_IN_CALL = 2;
/** @hide
public static final int MODE_IN_COMMUNICATION = 3;
/** @hide
public static final int MODE_CALL_SCREENING = 4;
/** @hide
public static final int MODE_CALL_REDIRECT = 5;
/** @hide
public static final int MODE_COMMUNICATION_REDIRECT = 6;
/** @hide
public static final int NUM_MODES = 7;
/** @hide | AudioSystem::modeToString | java | Reginer/aosp-android-jar | android-33/src/android/media/AudioSystem.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/media/AudioSystem.java | MIT |
public static int audioFormatToBluetoothSourceCodec(
@AudioFormatNativeEnumForBtCodec int audioFormat) {
switch (audioFormat) {
case AUDIO_FORMAT_AAC: return BluetoothCodecConfig.SOURCE_CODEC_TYPE_AAC;
case AUDIO_FORMAT_SBC: return BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC;
case AUDIO_FORMAT_APTX: return BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX;
case AUDIO_FORMAT_APTX_HD: return BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_HD;
case AUDIO_FORMAT_LDAC: return BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC;
case AUDIO_FORMAT_LC3: return BluetoothCodecConfig.SOURCE_CODEC_TYPE_LC3;
default:
Log.e(TAG, "Unknown audio format 0x" + Integer.toHexString(audioFormat)
+ " for conversion to BT codec");
return BluetoothCodecConfig.SOURCE_CODEC_TYPE_INVALID;
}
} |
@hide
Convert audio format enum values to Bluetooth codec values
| AudioSystem::audioFormatToBluetoothSourceCodec | java | Reginer/aosp-android-jar | android-33/src/android/media/AudioSystem.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/media/AudioSystem.java | MIT |
public static int audioFormatToBluetoothLeAudioSourceCodec(
@AudioFormatNativeEnumForBtLeAudioCodec int audioFormat) {
switch (audioFormat) {
case AUDIO_FORMAT_LC3: return BluetoothLeAudioCodecConfig.SOURCE_CODEC_TYPE_LC3;
default:
Log.e(TAG, "Unknown audio format 0x" + Integer.toHexString(audioFormat)
+ " for conversion to BT LE audio codec");
return BluetoothLeAudioCodecConfig.SOURCE_CODEC_TYPE_INVALID;
}
} |
@hide
Convert audio format enum values to Bluetooth LE audio codec values
| AudioSystem::audioFormatToBluetoothLeAudioSourceCodec | java | Reginer/aosp-android-jar | android-33/src/android/media/AudioSystem.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/media/AudioSystem.java | MIT |
public static @AudioFormatNativeEnumForBtCodec int bluetoothCodecToAudioFormat(int btCodec) {
switch (btCodec) {
case BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC:
return AudioSystem.AUDIO_FORMAT_SBC;
case BluetoothCodecConfig.SOURCE_CODEC_TYPE_AAC:
return AudioSystem.AUDIO_FORMAT_AAC;
case BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX:
return AudioSystem.AUDIO_FORMAT_APTX;
case BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_HD:
return AudioSystem.AUDIO_FORMAT_APTX_HD;
case BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC:
return AudioSystem.AUDIO_FORMAT_LDAC;
case BluetoothCodecConfig.SOURCE_CODEC_TYPE_LC3:
return AudioSystem.AUDIO_FORMAT_LC3;
default:
Log.e(TAG, "Unknown BT codec 0x" + Integer.toHexString(btCodec)
+ " for conversion to audio format");
// TODO returning DEFAULT is the current behavior, should this return INVALID?
return AudioSystem.AUDIO_FORMAT_DEFAULT;
}
} |
@hide
Convert a Bluetooth codec to an audio format enum
@param btCodec the codec to convert.
@return the audio format, or {@link #AUDIO_FORMAT_DEFAULT} if unknown
| AudioSystem::bluetoothCodecToAudioFormat | java | Reginer/aosp-android-jar | android-33/src/android/media/AudioSystem.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/media/AudioSystem.java | MIT |
public static String audioFormatToString(int audioFormat) {
switch (audioFormat) {
case /* AUDIO_FORMAT_INVALID */ 0xFFFFFFFF:
return "AUDIO_FORMAT_INVALID";
case /* AUDIO_FORMAT_DEFAULT */ 0:
return "AUDIO_FORMAT_DEFAULT";
case /* AUDIO_FORMAT_MP3 */ 0x01000000:
return "AUDIO_FORMAT_MP3";
case /* AUDIO_FORMAT_AMR_NB */ 0x02000000:
return "AUDIO_FORMAT_AMR_NB";
case /* AUDIO_FORMAT_AMR_WB */ 0x03000000:
return "AUDIO_FORMAT_AMR_WB";
case /* AUDIO_FORMAT_AAC */ 0x04000000:
return "AUDIO_FORMAT_AAC";
case /* AUDIO_FORMAT_HE_AAC_V1 */ 0x05000000:
return "AUDIO_FORMAT_HE_AAC_V1";
case /* AUDIO_FORMAT_HE_AAC_V2 */ 0x06000000:
return "AUDIO_FORMAT_HE_AAC_V2";
case /* AUDIO_FORMAT_VORBIS */ 0x07000000:
return "AUDIO_FORMAT_VORBIS";
case /* AUDIO_FORMAT_OPUS */ 0x08000000:
return "AUDIO_FORMAT_OPUS";
case /* AUDIO_FORMAT_AC3 */ 0x09000000:
return "AUDIO_FORMAT_AC3";
case /* AUDIO_FORMAT_E_AC3 */ 0x0A000000:
return "AUDIO_FORMAT_E_AC3";
case /* AUDIO_FORMAT_DTS */ 0x0B000000:
return "AUDIO_FORMAT_DTS";
case /* AUDIO_FORMAT_DTS_HD */ 0x0C000000:
return "AUDIO_FORMAT_DTS_HD";
case /* AUDIO_FORMAT_IEC61937 */ 0x0D000000:
return "AUDIO_FORMAT_IEC61937";
case /* AUDIO_FORMAT_DOLBY_TRUEHD */ 0x0E000000:
return "AUDIO_FORMAT_DOLBY_TRUEHD";
case /* AUDIO_FORMAT_EVRC */ 0x10000000:
return "AUDIO_FORMAT_EVRC";
case /* AUDIO_FORMAT_EVRCB */ 0x11000000:
return "AUDIO_FORMAT_EVRCB";
case /* AUDIO_FORMAT_EVRCWB */ 0x12000000:
return "AUDIO_FORMAT_EVRCWB";
case /* AUDIO_FORMAT_EVRCNW */ 0x13000000:
return "AUDIO_FORMAT_EVRCNW";
case /* AUDIO_FORMAT_AAC_ADIF */ 0x14000000:
return "AUDIO_FORMAT_AAC_ADIF";
case /* AUDIO_FORMAT_WMA */ 0x15000000:
return "AUDIO_FORMAT_WMA";
case /* AUDIO_FORMAT_WMA_PRO */ 0x16000000:
return "AUDIO_FORMAT_WMA_PRO";
case /* AUDIO_FORMAT_AMR_WB_PLUS */ 0x17000000:
return "AUDIO_FORMAT_AMR_WB_PLUS";
case /* AUDIO_FORMAT_MP2 */ 0x18000000:
return "AUDIO_FORMAT_MP2";
case /* AUDIO_FORMAT_QCELP */ 0x19000000:
return "AUDIO_FORMAT_QCELP";
case /* AUDIO_FORMAT_DSD */ 0x1A000000:
return "AUDIO_FORMAT_DSD";
case /* AUDIO_FORMAT_FLAC */ 0x1B000000:
return "AUDIO_FORMAT_FLAC";
case /* AUDIO_FORMAT_ALAC */ 0x1C000000:
return "AUDIO_FORMAT_ALAC";
case /* AUDIO_FORMAT_APE */ 0x1D000000:
return "AUDIO_FORMAT_APE";
case /* AUDIO_FORMAT_AAC_ADTS */ 0x1E000000:
return "AUDIO_FORMAT_AAC_ADTS";
case /* AUDIO_FORMAT_SBC */ 0x1F000000:
return "AUDIO_FORMAT_SBC";
case /* AUDIO_FORMAT_APTX */ 0x20000000:
return "AUDIO_FORMAT_APTX";
case /* AUDIO_FORMAT_APTX_HD */ 0x21000000:
return "AUDIO_FORMAT_APTX_HD";
case /* AUDIO_FORMAT_AC4 */ 0x22000000:
return "AUDIO_FORMAT_AC4";
case /* AUDIO_FORMAT_LDAC */ 0x23000000:
return "AUDIO_FORMAT_LDAC";
case /* AUDIO_FORMAT_MAT */ 0x24000000:
return "AUDIO_FORMAT_MAT";
case /* AUDIO_FORMAT_AAC_LATM */ 0x25000000:
return "AUDIO_FORMAT_AAC_LATM";
case /* AUDIO_FORMAT_CELT */ 0x26000000:
return "AUDIO_FORMAT_CELT";
case /* AUDIO_FORMAT_APTX_ADAPTIVE */ 0x27000000:
return "AUDIO_FORMAT_APTX_ADAPTIVE";
case /* AUDIO_FORMAT_LHDC */ 0x28000000:
return "AUDIO_FORMAT_LHDC";
case /* AUDIO_FORMAT_LHDC_LL */ 0x29000000:
return "AUDIO_FORMAT_LHDC_LL";
case /* AUDIO_FORMAT_APTX_TWSP */ 0x2A000000:
return "AUDIO_FORMAT_APTX_TWSP";
case /* AUDIO_FORMAT_LC3 */ 0x2B000000:
return "AUDIO_FORMAT_LC3";
/* Aliases */
case /* AUDIO_FORMAT_PCM_16_BIT */ 0x1:
return "AUDIO_FORMAT_PCM_16_BIT"; // (PCM | PCM_SUB_16_BIT)
case /* AUDIO_FORMAT_PCM_8_BIT */ 0x2:
return "AUDIO_FORMAT_PCM_8_BIT"; // (PCM | PCM_SUB_8_BIT)
case /* AUDIO_FORMAT_PCM_32_BIT */ 0x3:
return "AUDIO_FORMAT_PCM_32_BIT"; // (PCM | PCM_SUB_32_BIT)
case /* AUDIO_FORMAT_PCM_8_24_BIT */ 0x4:
return "AUDIO_FORMAT_PCM_8_24_BIT"; // (PCM | PCM_SUB_8_24_BIT)
case /* AUDIO_FORMAT_PCM_FLOAT */ 0x5:
return "AUDIO_FORMAT_PCM_FLOAT"; // (PCM | PCM_SUB_FLOAT)
case /* AUDIO_FORMAT_PCM_24_BIT_PACKED */ 0x6:
return "AUDIO_FORMAT_PCM_24_BIT_PACKED"; // (PCM | PCM_SUB_24_BIT_PACKED)
case /* AUDIO_FORMAT_AAC_MAIN */ 0x4000001:
return "AUDIO_FORMAT_AAC_MAIN"; // (AAC | AAC_SUB_MAIN)
case /* AUDIO_FORMAT_AAC_LC */ 0x4000002:
return "AUDIO_FORMAT_AAC_LC"; // (AAC | AAC_SUB_LC)
case /* AUDIO_FORMAT_AAC_SSR */ 0x4000004:
return "AUDIO_FORMAT_AAC_SSR"; // (AAC | AAC_SUB_SSR)
case /* AUDIO_FORMAT_AAC_LTP */ 0x4000008:
return "AUDIO_FORMAT_AAC_LTP"; // (AAC | AAC_SUB_LTP)
case /* AUDIO_FORMAT_AAC_HE_V1 */ 0x4000010:
return "AUDIO_FORMAT_AAC_HE_V1"; // (AAC | AAC_SUB_HE_V1)
case /* AUDIO_FORMAT_AAC_SCALABLE */ 0x4000020:
return "AUDIO_FORMAT_AAC_SCALABLE"; // (AAC | AAC_SUB_SCALABLE)
case /* AUDIO_FORMAT_AAC_ERLC */ 0x4000040:
return "AUDIO_FORMAT_AAC_ERLC"; // (AAC | AAC_SUB_ERLC)
case /* AUDIO_FORMAT_AAC_LD */ 0x4000080:
return "AUDIO_FORMAT_AAC_LD"; // (AAC | AAC_SUB_LD)
case /* AUDIO_FORMAT_AAC_HE_V2 */ 0x4000100:
return "AUDIO_FORMAT_AAC_HE_V2"; // (AAC | AAC_SUB_HE_V2)
case /* AUDIO_FORMAT_AAC_ELD */ 0x4000200:
return "AUDIO_FORMAT_AAC_ELD"; // (AAC | AAC_SUB_ELD)
case /* AUDIO_FORMAT_AAC_XHE */ 0x4000300:
return "AUDIO_FORMAT_AAC_XHE"; // (AAC | AAC_SUB_XHE)
case /* AUDIO_FORMAT_AAC_ADTS_MAIN */ 0x1e000001:
return "AUDIO_FORMAT_AAC_ADTS_MAIN"; // (AAC_ADTS | AAC_SUB_MAIN)
case /* AUDIO_FORMAT_AAC_ADTS_LC */ 0x1e000002:
return "AUDIO_FORMAT_AAC_ADTS_LC"; // (AAC_ADTS | AAC_SUB_LC)
case /* AUDIO_FORMAT_AAC_ADTS_SSR */ 0x1e000004:
return "AUDIO_FORMAT_AAC_ADTS_SSR"; // (AAC_ADTS | AAC_SUB_SSR)
case /* AUDIO_FORMAT_AAC_ADTS_LTP */ 0x1e000008:
return "AUDIO_FORMAT_AAC_ADTS_LTP"; // (AAC_ADTS | AAC_SUB_LTP)
case /* AUDIO_FORMAT_AAC_ADTS_HE_V1 */ 0x1e000010:
return "AUDIO_FORMAT_AAC_ADTS_HE_V1"; // (AAC_ADTS | AAC_SUB_HE_V1)
case /* AUDIO_FORMAT_AAC_ADTS_SCALABLE */ 0x1e000020:
return "AUDIO_FORMAT_AAC_ADTS_SCALABLE"; // (AAC_ADTS | AAC_SUB_SCALABLE)
case /* AUDIO_FORMAT_AAC_ADTS_ERLC */ 0x1e000040:
return "AUDIO_FORMAT_AAC_ADTS_ERLC"; // (AAC_ADTS | AAC_SUB_ERLC)
case /* AUDIO_FORMAT_AAC_ADTS_LD */ 0x1e000080:
return "AUDIO_FORMAT_AAC_ADTS_LD"; // (AAC_ADTS | AAC_SUB_LD)
case /* AUDIO_FORMAT_AAC_ADTS_HE_V2 */ 0x1e000100:
return "AUDIO_FORMAT_AAC_ADTS_HE_V2"; // (AAC_ADTS | AAC_SUB_HE_V2)
case /* AUDIO_FORMAT_AAC_ADTS_ELD */ 0x1e000200:
return "AUDIO_FORMAT_AAC_ADTS_ELD"; // (AAC_ADTS | AAC_SUB_ELD)
case /* AUDIO_FORMAT_AAC_ADTS_XHE */ 0x1e000300:
return "AUDIO_FORMAT_AAC_ADTS_XHE"; // (AAC_ADTS | AAC_SUB_XHE)
case /* AUDIO_FORMAT_AAC_LATM_LC */ 0x25000002:
return "AUDIO_FORMAT_AAC_LATM_LC"; // (AAC_LATM | AAC_SUB_LC)
case /* AUDIO_FORMAT_AAC_LATM_HE_V1 */ 0x25000010:
return "AUDIO_FORMAT_AAC_LATM_HE_V1"; // (AAC_LATM | AAC_SUB_HE_V1)
case /* AUDIO_FORMAT_AAC_LATM_HE_V2 */ 0x25000100:
return "AUDIO_FORMAT_AAC_LATM_HE_V2"; // (AAC_LATM | AAC_SUB_HE_V2)
case /* AUDIO_FORMAT_E_AC3_JOC */ 0xA000001:
return "AUDIO_FORMAT_E_AC3_JOC"; // (E_AC3 | E_AC3_SUB_JOC)
case /* AUDIO_FORMAT_MAT_1_0 */ 0x24000001:
return "AUDIO_FORMAT_MAT_1_0"; // (MAT | MAT_SUB_1_0)
case /* AUDIO_FORMAT_MAT_2_0 */ 0x24000002:
return "AUDIO_FORMAT_MAT_2_0"; // (MAT | MAT_SUB_2_0)
case /* AUDIO_FORMAT_MAT_2_1 */ 0x24000003:
return "AUDIO_FORMAT_MAT_2_1"; // (MAT | MAT_SUB_2_1)
case /* AUDIO_FORMAT_DTS_UHD */ 0x2E000000:
return "AUDIO_FORMAT_DTS_UHD";
case /* AUDIO_FORMAT_DRA */ 0x2F000000:
return "AUDIO_FORMAT_DRA";
default:
return "AUDIO_FORMAT_(" + audioFormat + ")";
}
} |
@hide
Convert a native audio format integer constant to a string.
| AudioSystem::audioFormatToString | java | Reginer/aosp-android-jar | android-33/src/android/media/AudioSystem.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/media/AudioSystem.java | MIT |
protected int getWrongPasswordStringId() {
return R.string.kg_wrong_password;
} |
Base class for PIN and password unlock screens.
public abstract class KeyguardAbsKeyInputView extends KeyguardInputView {
protected View mEcaView;
// To avoid accidental lockout due to events while the device in in the pocket, ignore
// any passwords with length less than or equal to this length.
protected static final int MINIMUM_PASSWORD_LENGTH_BEFORE_REPORT = 3;
private KeyDownListener mKeyDownListener;
public KeyguardAbsKeyInputView(Context context) {
this(context, null);
}
public KeyguardAbsKeyInputView(Context context, AttributeSet attrs) {
super(context, attrs);
}
protected abstract int getPasswordTextViewId();
protected abstract void resetState();
@Override
@CallSuper
protected void onFinishInflate() {
super.onFinishInflate();
mEcaView = findViewById(R.id.keyguard_selector_fade_container);
}
/*
Override this if you have a different string for "wrong password"
Note that PIN/PUK have their own implementation of verifyPasswordAndUnlock and so don't need this
| KeyguardAbsKeyInputView::getWrongPasswordStringId | java | Reginer/aosp-android-jar | android-34/src/com/android/keyguard/KeyguardAbsKeyInputView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/keyguard/KeyguardAbsKeyInputView.java | MIT |
default void onError(Throwable t) {} |
Invoked if {@link #run(IBinder)} could not be invoked because there was no current
binding, or if {@link #run(IBinder)} threw an exception ({@link RemoteException} or
{@link RuntimeException}). This callback is only intended for resource deallocation and
cleanup in response to a single binder operation, it should not be used to propagate
errors further. Run on the ServiceWatcher thread.
| onError | java | Reginer/aosp-android-jar | android-34/src/com/android/server/servicewatcher/ServiceWatcher.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/servicewatcher/ServiceWatcher.java | MIT |
public @Nullable String getAction() {
return mAction;
} |
Information on the service selected as the best option for binding.
class BoundServiceInfo {
protected final @Nullable String mAction;
protected final int mUid;
protected final ComponentName mComponentName;
protected BoundServiceInfo(String action, ResolveInfo resolveInfo) {
this(action, resolveInfo.serviceInfo.applicationInfo.uid,
resolveInfo.serviceInfo.getComponentName());
}
protected BoundServiceInfo(String action, int uid, ComponentName componentName) {
mAction = action;
mUid = uid;
mComponentName = Objects.requireNonNull(componentName);
}
/** Returns the action associated with this bound service. | BoundServiceInfo::getAction | java | Reginer/aosp-android-jar | android-34/src/com/android/server/servicewatcher/ServiceWatcher.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/servicewatcher/ServiceWatcher.java | MIT |
public ComponentName getComponentName() {
return mComponentName;
} |
Information on the service selected as the best option for binding.
class BoundServiceInfo {
protected final @Nullable String mAction;
protected final int mUid;
protected final ComponentName mComponentName;
protected BoundServiceInfo(String action, ResolveInfo resolveInfo) {
this(action, resolveInfo.serviceInfo.applicationInfo.uid,
resolveInfo.serviceInfo.getComponentName());
}
protected BoundServiceInfo(String action, int uid, ComponentName componentName) {
mAction = action;
mUid = uid;
mComponentName = Objects.requireNonNull(componentName);
}
/** Returns the action associated with this bound service.
public @Nullable String getAction() {
return mAction;
}
/** Returns the component of this bound service. | BoundServiceInfo::getComponentName | java | Reginer/aosp-android-jar | android-34/src/com/android/server/servicewatcher/ServiceWatcher.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/servicewatcher/ServiceWatcher.java | MIT |
public @UserIdInt int getUserId() {
return UserHandle.getUserId(mUid);
} |
Information on the service selected as the best option for binding.
class BoundServiceInfo {
protected final @Nullable String mAction;
protected final int mUid;
protected final ComponentName mComponentName;
protected BoundServiceInfo(String action, ResolveInfo resolveInfo) {
this(action, resolveInfo.serviceInfo.applicationInfo.uid,
resolveInfo.serviceInfo.getComponentName());
}
protected BoundServiceInfo(String action, int uid, ComponentName componentName) {
mAction = action;
mUid = uid;
mComponentName = Objects.requireNonNull(componentName);
}
/** Returns the action associated with this bound service.
public @Nullable String getAction() {
return mAction;
}
/** Returns the component of this bound service.
public ComponentName getComponentName() {
return mComponentName;
}
/** Returns the user id for this bound service. | BoundServiceInfo::getUserId | java | Reginer/aosp-android-jar | android-34/src/com/android/server/servicewatcher/ServiceWatcher.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/servicewatcher/ServiceWatcher.java | MIT |
static <TBoundServiceInfo extends BoundServiceInfo> ServiceWatcher create(
Context context,
String tag,
ServiceSupplier<TBoundServiceInfo> serviceSupplier,
@Nullable ServiceListener<? super TBoundServiceInfo> serviceListener) {
return create(context, FgThread.getHandler(), tag, serviceSupplier, serviceListener);
} |
Creates a new ServiceWatcher instance.
| BoundServiceInfo::create | java | Reginer/aosp-android-jar | android-34/src/com/android/server/servicewatcher/ServiceWatcher.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/servicewatcher/ServiceWatcher.java | MIT |
static <TBoundServiceInfo extends BoundServiceInfo> ServiceWatcher create(
Context context,
Handler handler,
String tag,
ServiceSupplier<TBoundServiceInfo> serviceSupplier,
@Nullable ServiceListener<? super TBoundServiceInfo> serviceListener) {
return new ServiceWatcherImpl<>(context, handler, tag, serviceSupplier, serviceListener);
} |
Creates a new ServiceWatcher instance that runs on the given handler.
| BoundServiceInfo::create | java | Reginer/aosp-android-jar | android-34/src/com/android/server/servicewatcher/ServiceWatcher.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/servicewatcher/ServiceWatcher.java | MIT |
public void setCountryListener(CountryListener listener) {
mListener = listener;
} |
Register a listener to receive the notification when the country is detected or changed.
<p>
The previous listener will be replaced if it exists.
| CountryDetectorBase::setCountryListener | java | Reginer/aosp-android-jar | android-34/src/com/android/server/location/countrydetector/CountryDetectorBase.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/location/countrydetector/CountryDetectorBase.java | MIT |
public static void assertAllInstancesDestroyedForTesting() throws LifetimeAssertException {
if (!BuildConfig.ENABLE_ASSERTS) {
return;
}
// Synchronized set requires manual synchronization when iterating over it.
synchronized (WrappedReference.sActiveWrappers) {
try {
for (WrappedReference ref : WrappedReference.sActiveWrappers) {
if (!ref.mSafeToGc) {
String msg = String.format(
"Object of type %s was not destroyed after test completed. "
+ "Refer to \"Caused by\" for where object was created.",
ref.mTargetClass.getName());
throw new LifetimeAssertException(msg, ref.mCreationException);
}
}
} finally {
WrappedReference.sActiveWrappers.clear();
}
}
} |
Asserts that the remaining objects used with LifetimeAssert do not need to be destroyed and
can be garbage collected. Always clears the set of tracked object, so consecutive invocations
won't throw with the same cause.
| WrappedReference::assertAllInstancesDestroyedForTesting | java | Reginer/aosp-android-jar | android-34/src/org/chromium/base/LifetimeAssert.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/chromium/base/LifetimeAssert.java | MIT |
public static void resetForTesting() {
if (!BuildConfig.ENABLE_ASSERTS) {
return;
}
WrappedReference.sActiveWrappers.clear();
} |
Asserts that the remaining objects used with LifetimeAssert do not need to be destroyed and
can be garbage collected. Always clears the set of tracked object, so consecutive invocations
won't throw with the same cause.
public static void assertAllInstancesDestroyedForTesting() throws LifetimeAssertException {
if (!BuildConfig.ENABLE_ASSERTS) {
return;
}
// Synchronized set requires manual synchronization when iterating over it.
synchronized (WrappedReference.sActiveWrappers) {
try {
for (WrappedReference ref : WrappedReference.sActiveWrappers) {
if (!ref.mSafeToGc) {
String msg = String.format(
"Object of type %s was not destroyed after test completed. "
+ "Refer to \"Caused by\" for where object was created.",
ref.mTargetClass.getName());
throw new LifetimeAssertException(msg, ref.mCreationException);
}
}
} finally {
WrappedReference.sActiveWrappers.clear();
}
}
}
/** Clears the set of tracked references. | WrappedReference::resetForTesting | java | Reginer/aosp-android-jar | android-34/src/org/chromium/base/LifetimeAssert.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/chromium/base/LifetimeAssert.java | MIT |
public void engineDeleteEntry(
String alias)
throws KeyStoreException
{
Key k = (Key)keys.remove(alias);
Certificate c = (Certificate)certs.remove(alias);
if (c != null)
{
chainCerts.remove(new CertId(c.getPublicKey()));
}
if (k != null)
{
String id = (String)localIds.remove(alias);
if (id != null)
{
c = (Certificate)keyCerts.remove(id);
}
if (c != null)
{
chainCerts.remove(new CertId(c.getPublicKey()));
}
}
} |
this is not quite complete - we should follow up on the chain, a bit
tricky if a certificate appears in more than one chain... the store method
now prunes out unused certificates from the chain map if they are present.
| CertId::engineDeleteEntry | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/org/bouncycastle/jcajce/provider/keystore/pkcs12/PKCS12KeyStoreSpi.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/org/bouncycastle/jcajce/provider/keystore/pkcs12/PKCS12KeyStoreSpi.java | MIT |
public Certificate engineGetCertificate(
String alias)
{
if (alias == null)
{
throw new IllegalArgumentException("null alias passed to getCertificate.");
}
Certificate c = (Certificate)certs.get(alias);
//
// look up the key table - and try the local key id
//
if (c == null)
{
String id = (String)localIds.get(alias);
if (id != null)
{
c = (Certificate)keyCerts.get(id);
}
else
{
c = (Certificate)keyCerts.get(alias);
}
}
return c;
} |
simply return the cert for the private key
| CertId::engineGetCertificate | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/org/bouncycastle/jcajce/provider/keystore/pkcs12/PKCS12KeyStoreSpi.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/org/bouncycastle/jcajce/provider/keystore/pkcs12/PKCS12KeyStoreSpi.java | MIT |
protected void handleExitEmergencyCallbackMode() {
} |
This method is invoked when the Phone exits Emergency Callback Mode.
| Phone::handleExitEmergencyCallbackMode | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/telephony/Phone.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/telephony/Phone.java | MIT |
public String getActionDetached() {
return mActionDetached;
} |
Return the ActionDetached string. When this action is received by components
they are to simulate detaching from the network.
@return com.android.internal.telephony.{mName}.action_detached
{mName} is GSM, CDMA ...
| SilentRedialParam::getActionDetached | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/telephony/Phone.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/telephony/Phone.java | MIT |
public String getActionAttached() {
return mActionAttached;
} |
Return the ActionAttached string. When this action is received by components
they are to simulate attaching to the network.
@return com.android.internal.telephony.{mName}.action_detached
{mName} is GSM, CDMA ...
| SilentRedialParam::getActionAttached | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/telephony/Phone.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/telephony/Phone.java | MIT |
protected Phone(String name, PhoneNotifier notifier, Context context, CommandsInterface ci,
boolean unitTestMode, FeatureFlags featureFlags) {
this(name, notifier, context, ci, unitTestMode, SubscriptionManager.DEFAULT_PHONE_INDEX,
TelephonyComponentFactory.getInstance(), featureFlags);
} |
Constructs a Phone in normal (non-unit test) mode.
@param name a name for this phone object
@param notifier An instance of DefaultPhoneNotifier,
@param context Context object from hosting application
unless unit testing.
@param ci is CommandsInterface
@param unitTestMode when true, prevents notifications
of state change events
@param featureFlags an instance of the FeatureFlags set
| SilentRedialParam::Phone | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/telephony/Phone.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/telephony/Phone.java | MIT |
public ContentSelection(@NonNull String selectionId, @NonNull Bundle extras) {
mSelectionId = selectionId;
mExtras = extras;
} |
Default constructor.
@param selectionId implementation specific id for the selection.
@param extras containing the data that represents the selection.
| ContentSelection::ContentSelection | java | Reginer/aosp-android-jar | android-32/src/android/app/contentsuggestions/ContentSelection.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/app/contentsuggestions/ContentSelection.java | MIT |
public @NonNull String getId() {
return mSelectionId;
} |
Return the selection id.
| ContentSelection::getId | java | Reginer/aosp-android-jar | android-32/src/android/app/contentsuggestions/ContentSelection.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/app/contentsuggestions/ContentSelection.java | MIT |
public @NonNull Bundle getExtras() {
return mExtras;
} |
Return the selection extras.
| ContentSelection::getExtras | java | Reginer/aosp-android-jar | android-32/src/android/app/contentsuggestions/ContentSelection.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/app/contentsuggestions/ContentSelection.java | MIT |
public void onReportTrace(@NonNull TraceParams args) {
} |
Called when a trace is reported and sent to this class.
Note: the trace file descriptor should not be persisted beyond the lifetime of this
function as it is owned by the framework and will be closed immediately after this function
returns: if future use of the fd is needed, it should be duped.
| TraceParams::onReportTrace | java | Reginer/aosp-android-jar | android-35/src/android/service/tracing/TraceReportService.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/service/tracing/TraceReportService.java | MIT |
private boolean onMessage(@NonNull Message msg) {
if (msg.what == MSG_REPORT_TRACE) {
if (!(msg.obj instanceof TraceReportParams)) {
Log.e(TAG, "Received invalid type for report trace message.");
return false;
}
TraceParams params = new TraceParams((TraceReportParams) msg.obj);
try {
onReportTrace(params);
} finally {
try {
params.getFd().close();
} catch (IOException ignored) {
}
}
return true;
}
return false;
} |
Handles binder calls from system_server.
| TraceParams::onMessage | java | Reginer/aosp-android-jar | android-35/src/android/service/tracing/TraceReportService.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/service/tracing/TraceReportService.java | MIT |
public InputConfiguration(int width, int height, int format) {
mWidth = width;
mHeight = height;
mFormat = format;
mIsMultiResolution = false;
} |
Create an input configuration with the width, height, and user-defined format.
<p>Images of a user-defined format are accessible by applications. Use
{@link android.hardware.camera2.CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP}
to query supported input formats</p>
@param width Width of the input buffers.
@param height Height of the input buffers.
@param format Format of the input buffers. One of ImageFormat or PixelFormat constants.
@see android.graphics.ImageFormat
@see android.graphics.PixelFormat
@see android.hardware.camera2.CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
| InputConfiguration::InputConfiguration | java | Reginer/aosp-android-jar | android-33/src/android/hardware/camera2/params/InputConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/hardware/camera2/params/InputConfiguration.java | MIT |
public InputConfiguration(@NonNull Collection<MultiResolutionStreamInfo> multiResolutionInputs,
@Format int format) {
checkCollectionNotEmpty(multiResolutionInputs, "Input multi-resolution stream info");
MultiResolutionStreamInfo info = multiResolutionInputs.iterator().next();
mWidth = info.getWidth();
mHeight = info.getHeight();
mFormat = format;
mIsMultiResolution = true;
} |
Create an input configuration with the format and a list of multi-resolution input stream
info.
<p>Use {@link
android.hardware.camera2.CameraCharacteristics#SCALER_MULTI_RESOLUTION_STREAM_CONFIGURATION_MAP}
to query supported multi-resolution input formats.</p>
<p>To do reprocessing with variable resolution input, the application calls
{@link android.media.ImageWriter#queueInputImage ImageWriter.queueInputImage}
using an image from an {@link android.media.ImageReader ImageReader} or {@link
android.hardware.camera2.MultiResolutionImageReader MultiResolutionImageReader}. See
{@link android.hardware.camera2.CameraDevice#createReprocessCaptureRequest} for more
details on camera reprocessing.
</p>
@param multiResolutionInputs A group of multi-resolution input info for the specified format.
@param format Format of the input buffers. One of ImageFormat or PixelFormat constants.
@see android.graphics.ImageFormat
@see android.graphics.PixelFormat
@see
android.hardware.camera2.CameraCharacteristics#SCALER_MULTI_RESOLUTION_STREAM_CONFIGURATION_MAP
| InputConfiguration::InputConfiguration | java | Reginer/aosp-android-jar | android-33/src/android/hardware/camera2/params/InputConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/hardware/camera2/params/InputConfiguration.java | MIT |
public InputConfiguration(int width, int height, int format, boolean isMultiResolution) {
mWidth = width;
mHeight = height;
mFormat = format;
mIsMultiResolution = isMultiResolution;
} |
@hide
| InputConfiguration::InputConfiguration | java | Reginer/aosp-android-jar | android-33/src/android/hardware/camera2/params/InputConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/hardware/camera2/params/InputConfiguration.java | MIT |
public int getWidth() {
return mWidth;
} |
Get the width of this input configuration.
@return width of this input configuration.
| InputConfiguration::getWidth | java | Reginer/aosp-android-jar | android-33/src/android/hardware/camera2/params/InputConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/hardware/camera2/params/InputConfiguration.java | MIT |
public int getHeight() {
return mHeight;
} |
Get the height of this input configuration.
@return height of this input configuration.
| InputConfiguration::getHeight | java | Reginer/aosp-android-jar | android-33/src/android/hardware/camera2/params/InputConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/hardware/camera2/params/InputConfiguration.java | MIT |
public int getFormat() {
return mFormat;
} |
Get the format of this input configuration.
@return format of this input configuration.
| InputConfiguration::getFormat | java | Reginer/aosp-android-jar | android-33/src/android/hardware/camera2/params/InputConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/hardware/camera2/params/InputConfiguration.java | MIT |
public boolean isMultiResolution() {
return mIsMultiResolution;
} |
Whether this input configuration is of multi-resolution.
<p>An multi-resolution InputConfiguration means that the reprocessing session created from it
allows input images of different sizes.</p>
@return this input configuration is multi-resolution or not.
| InputConfiguration::isMultiResolution | java | Reginer/aosp-android-jar | android-33/src/android/hardware/camera2/params/InputConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/hardware/camera2/params/InputConfiguration.java | MIT |
public NotificationRankingUpdate(NotificationListenerService.Ranking[] rankings) {
mRankingMap = new NotificationListenerService.RankingMap(rankings);
} |
@hide
| NotificationRankingUpdate::NotificationRankingUpdate | java | Reginer/aosp-android-jar | android-35/src/android/service/notification/NotificationRankingUpdate.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/service/notification/NotificationRankingUpdate.java | MIT |
public CharSequence getTransformation(CharSequence source, View v) {
char[] original = getOriginal();
char[] replacement = getReplacement();
/*
* Short circuit for faster display if the text will never change.
*/
if (!(source instanceof Editable)) {
/*
* Check whether the text does not contain any of the
* source characters so can be used unchanged.
*/
boolean doNothing = true;
int n = original.length;
for (int i = 0; i < n; i++) {
if (TextUtils.indexOf(source, original[i]) >= 0) {
doNothing = false;
break;
}
}
if (doNothing) {
return source;
}
if (!(source instanceof Spannable)) {
/*
* The text contains some of the source characters,
* but they can be flattened out now instead of
* at display time.
*/
if (source instanceof Spanned) {
return new SpannedString(new SpannedReplacementCharSequence(
(Spanned) source,
original, replacement));
} else {
return new ReplacementCharSequence(source,
original,
replacement).toString();
}
}
}
if (source instanceof Spanned) {
return new SpannedReplacementCharSequence((Spanned) source,
original, replacement);
} else {
return new ReplacementCharSequence(source, original, replacement);
}
} |
Returns a CharSequence that will mirror the contents of the
source CharSequence but with the characters in {@link #getOriginal}
replaced by ones from {@link #getReplacement}.
| ReplacementTransformationMethod::getTransformation | java | Reginer/aosp-android-jar | android-32/src/android/text/method/ReplacementTransformationMethod.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/text/method/ReplacementTransformationMethod.java | MIT |
public namednodemapremovenameditemns06(final DOMTestDocumentBuilderFactory factory) throws org.w3c.domts.DOMTestIncompatibleException {
org.w3c.domts.DocumentBuilderSetting[] settings =
new org.w3c.domts.DocumentBuilderSetting[] {
org.w3c.domts.DocumentBuilderSetting.namespaceAware
};
DOMTestDocumentBuilderFactory testFactory = factory.newInstance(settings);
setFactory(testFactory);
//
// 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
| namednodemapremovenameditemns06::namednodemapremovenameditemns06 | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level2/core/namednodemapremovenameditemns06.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level2/core/namednodemapremovenameditemns06.java | MIT |
public void runTest() throws Throwable {
Document doc;
NamedNodeMap attributes;
Node element;
Attr attribute;
NodeList elementList;
doc = (Document) load("staffNS", true);
elementList = doc.getElementsByTagNameNS("http://www.nist.gov", "employee");
element = elementList.item(1);
attributes = element.getAttributes();
{
boolean success = false;
try {
attribute = (Attr) attributes.removeNamedItemNS("http://www.Nist.gov", "domestic");
} catch (DOMException ex) {
success = (ex.code == DOMException.NOT_FOUND_ERR);
}
assertTrue("throw_NOT_FOUND_ERR", success);
}
} |
Runs the test case.
@throws Throwable Any uncaught exception causes test to fail
| namednodemapremovenameditemns06::runTest | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level2/core/namednodemapremovenameditemns06.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level2/core/namednodemapremovenameditemns06.java | MIT |
public String getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/namednodemapremovenameditemns06";
} |
Gets URI that identifies the test.
@return uri identifier of test
| namednodemapremovenameditemns06::getTargetURI | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level2/core/namednodemapremovenameditemns06.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level2/core/namednodemapremovenameditemns06.java | MIT |
public static void main(final String[] args) {
DOMTestCase.doMain(namednodemapremovenameditemns06.class, args);
} |
Runs this test from the command line.
@param args command line arguments
| namednodemapremovenameditemns06::main | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level2/core/namednodemapremovenameditemns06.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level2/core/namednodemapremovenameditemns06.java | MIT |
public static TimeZoneDetectorStrategyImpl create(
@NonNull Context context, @NonNull Handler handler,
@NonNull ServiceConfigAccessor serviceConfigAccessor) {
Environment environment = new EnvironmentImpl(context, handler, serviceConfigAccessor);
return new TimeZoneDetectorStrategyImpl(environment);
} |
Creates a new instance of {@link TimeZoneDetectorStrategyImpl}.
| TimeZoneDetectorStrategyImpl::create | java | Reginer/aosp-android-jar | android-32/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImpl.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImpl.java | MIT |
public static BigInteger unsignedHexStringToBigInteger(String hexString) {
return new BigInteger(hexString, 16);
} |
Converts the unsigned Hex String to a positive BigInteger.
@param hexString Hex representation of an unsigned value
@return the argument converted to BigInteger by an unsigned conversion
| BigIntegerUtils::unsignedHexStringToBigInteger | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/net/utils/BigIntegerUtils.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/net/utils/BigIntegerUtils.java | MIT |
public static BigInteger unsignedByteArrayToBigInteger(byte[] byteArray) {
return new BigInteger(1/** positive */, byteArray);
} |
Converts the unsigned byte array to a positive BigInteger.
@param byteArray byte array that represents an unsigned value
@return the argument converted to BigInteger by an unsigned conversion
| BigIntegerUtils::unsignedByteArrayToBigInteger | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/net/utils/BigIntegerUtils.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/net/utils/BigIntegerUtils.java | MIT |
public static byte[] bigIntegerToUnsignedByteArray(BigInteger bigInteger, int size) {
byte[] byteArrayWithSignBit = bigInteger.toByteArray();
int len = byteArrayWithSignBit.length;
byte[] output = new byte[size];
// {@link BigInteger} provides method {@link toByteArray} that returns a byte array
// containing the two's-complement representation of this BigInteger (minimum number of
// bytes required to represent this BigInteger, including at least one sign bit). This
// method first remove additional byte that caused by this sign bit and zero-pad on the left
// of byte array to desired size.
if (bigInteger.bitLength() % 8 == 0) {
len = len - 1;
System.arraycopy(byteArrayWithSignBit, 1, output, size - len, len);
} else {
System.arraycopy(byteArrayWithSignBit, 0, output, size - len, len);
}
return output;
} |
Returns a byte array containing the unsigned representation of this BigInteger. Zero-pad on
the left of byte array to desired size.
@param bigInteger input BigInteger
@param size size of the output byte array
@return the byte array containing the unsigned representation of this BigInteger.
| BigIntegerUtils::bigIntegerToUnsignedByteArray | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/net/utils/BigIntegerUtils.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/net/utils/BigIntegerUtils.java | MIT |
public HardwareRendererObserver(@NonNull OnFrameMetricsAvailableListener listener,
@NonNull long[] frameMetrics, @NonNull Handler handler, boolean waitForPresentTime) {
if (handler == null || handler.getLooper() == null) {
throw new NullPointerException("handler and its looper cannot be null");
}
if (handler.getLooper().getQueue() == null) {
throw new IllegalStateException("invalid looper, null message queue\n");
}
mFrameMetrics = frameMetrics;
mHandler = handler;
mListener = listener;
mNativePtr = new VirtualRefBasePtr(nCreateObserver(
new WeakReference<>(this), waitForPresentTime));
} |
Creates a FrameMetricsObserver
@param frameMetrics the available metrics. This array is reused on every call to the listener
and thus <strong>this reference should only be used within the scope of the listener callback
as data is not guaranteed to be valid outside the scope of that method</strong>.
@param handler the Handler to use when invoking callbacks
| HardwareRendererObserver::HardwareRendererObserver | java | Reginer/aosp-android-jar | android-33/src/android/graphics/HardwareRendererObserver.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/graphics/HardwareRendererObserver.java | MIT |
static boolean invokeDataAvailable(WeakReference<HardwareRendererObserver> weakObserver) {
HardwareRendererObserver observer = weakObserver.get();
if (observer != null) {
observer.notifyDataAvailable();
return true;
}
return false;
} |
called by native
@hide
@return true to keep listening, false if this is a dead observer
| HardwareRendererObserver::invokeDataAvailable | java | Reginer/aosp-android-jar | android-33/src/android/graphics/HardwareRendererObserver.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/graphics/HardwareRendererObserver.java | MIT |
public TelephonyNetworkRequest(@NonNull NetworkRequest request, @NonNull Phone phone,
@NonNull FeatureFlags featureFlags) {
mPhone = phone;
mNativeNetworkRequest = request;
mFeatureFlags = featureFlags;
int capabilitiesAttributes = CAPABILITY_ATTRIBUTE_NONE;
for (int networkCapability : mNativeNetworkRequest.getCapabilities()) {
capabilitiesAttributes |= CAPABILITY_ATTRIBUTE_MAP.getOrDefault(
networkCapability, CAPABILITY_ATTRIBUTE_NONE);
}
mCapabilitiesAttributes = capabilitiesAttributes;
mPriority = 0;
mAttachedDataNetwork = null;
// When the request was first created, it is in active state so we can actively attempt
// to satisfy it.
mState = REQUEST_STATE_UNSATISFIED;
mCreatedTimeMillis = SystemClock.elapsedRealtime();
mDataConfigManager = phone.getDataNetworkController().getDataConfigManager();
updatePriority();
} |
Constructor
@param request The native network request from the clients.
@param phone The phone instance
@param featureFlags The feature flag
| TelephonyNetworkRequest::TelephonyNetworkRequest | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/telephony/data/TelephonyNetworkRequest.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/telephony/data/TelephonyNetworkRequest.java | MIT |
public @Nullable NetworkSpecifier getNetworkSpecifier() {
return mNativeNetworkRequest.getNetworkSpecifier();
} |
@see NetworkRequest#getNetworkSpecifier()
| TelephonyNetworkRequest::getNetworkSpecifier | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/telephony/data/TelephonyNetworkRequest.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/telephony/data/TelephonyNetworkRequest.java | MIT |
public @NonNull @NetCapability int[] getCapabilities() {
return mNativeNetworkRequest.getCapabilities();
} |
@see NetworkRequest#getCapabilities()
| TelephonyNetworkRequest::getCapabilities | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/telephony/data/TelephonyNetworkRequest.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/telephony/data/TelephonyNetworkRequest.java | MIT |
public boolean hasCapability(@NetCapability int capability) {
return mNativeNetworkRequest.hasCapability(capability);
} |
@see NetworkRequest#hasCapability(int)
| TelephonyNetworkRequest::hasCapability | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/telephony/data/TelephonyNetworkRequest.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/telephony/data/TelephonyNetworkRequest.java | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.