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 activityPaused(IBinder token) {
try {
getActivityClientController().activityPaused(token);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
} |
Reports after {@link Activity#onTopResumedActivityChanged(boolean)} is called for losing the
top most position.
public void activityTopResumedStateLost() {
try {
getActivityClientController().activityTopResumedStateLost();
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
/** Reports {@link Activity#onPause()} is done. | ActivityClient::activityPaused | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityClient.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityClient.java | MIT |
public void activityStopped(IBinder token, Bundle state, PersistableBundle persistentState,
CharSequence description) {
try {
getActivityClientController().activityStopped(token, state, persistentState,
description);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
} |
Reports after {@link Activity#onTopResumedActivityChanged(boolean)} is called for losing the
top most position.
public void activityTopResumedStateLost() {
try {
getActivityClientController().activityTopResumedStateLost();
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
/** Reports {@link Activity#onPause()} is done.
public void activityPaused(IBinder token) {
try {
getActivityClientController().activityPaused(token);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
/** Reports {@link Activity#onStop()} is done. | ActivityClient::activityStopped | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityClient.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityClient.java | MIT |
public void activityDestroyed(IBinder token) {
try {
getActivityClientController().activityDestroyed(token);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
} |
Reports after {@link Activity#onTopResumedActivityChanged(boolean)} is called for losing the
top most position.
public void activityTopResumedStateLost() {
try {
getActivityClientController().activityTopResumedStateLost();
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
/** Reports {@link Activity#onPause()} is done.
public void activityPaused(IBinder token) {
try {
getActivityClientController().activityPaused(token);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
/** Reports {@link Activity#onStop()} is done.
public void activityStopped(IBinder token, Bundle state, PersistableBundle persistentState,
CharSequence description) {
try {
getActivityClientController().activityStopped(token, state, persistentState,
description);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
/** Reports {@link Activity#onDestroy()} is done. | ActivityClient::activityDestroyed | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityClient.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityClient.java | MIT |
public void activityRelaunched(IBinder token) {
try {
getActivityClientController().activityRelaunched(token);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
} |
Reports after {@link Activity#onTopResumedActivityChanged(boolean)} is called for losing the
top most position.
public void activityTopResumedStateLost() {
try {
getActivityClientController().activityTopResumedStateLost();
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
/** Reports {@link Activity#onPause()} is done.
public void activityPaused(IBinder token) {
try {
getActivityClientController().activityPaused(token);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
/** Reports {@link Activity#onStop()} is done.
public void activityStopped(IBinder token, Bundle state, PersistableBundle persistentState,
CharSequence description) {
try {
getActivityClientController().activityStopped(token, state, persistentState,
description);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
/** Reports {@link Activity#onDestroy()} is done.
public void activityDestroyed(IBinder token) {
try {
getActivityClientController().activityDestroyed(token);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
/** Reports the activity has completed relaunched. | ActivityClient::activityRelaunched | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityClient.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityClient.java | MIT |
public void invalidateHomeTaskSnapshot(IBinder homeToken) {
try {
getActivityClientController().invalidateHomeTaskSnapshot(homeToken);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
} |
Reports after {@link Activity#onTopResumedActivityChanged(boolean)} is called for losing the
top most position.
public void activityTopResumedStateLost() {
try {
getActivityClientController().activityTopResumedStateLost();
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
/** Reports {@link Activity#onPause()} is done.
public void activityPaused(IBinder token) {
try {
getActivityClientController().activityPaused(token);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
/** Reports {@link Activity#onStop()} is done.
public void activityStopped(IBinder token, Bundle state, PersistableBundle persistentState,
CharSequence description) {
try {
getActivityClientController().activityStopped(token, state, persistentState,
description);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
/** Reports {@link Activity#onDestroy()} is done.
public void activityDestroyed(IBinder token) {
try {
getActivityClientController().activityDestroyed(token);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
/** Reports the activity has completed relaunched.
public void activityRelaunched(IBinder token) {
try {
getActivityClientController().activityRelaunched(token);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
void reportSizeConfigurations(IBinder token, SizeConfigurationBuckets sizeConfigurations) {
try {
getActivityClientController().reportSizeConfigurations(token, sizeConfigurations);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
public boolean moveActivityTaskToBack(IBinder token, boolean nonRoot) {
try {
return getActivityClientController().moveActivityTaskToBack(token, nonRoot);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
boolean shouldUpRecreateTask(IBinder token, String destAffinity) {
try {
return getActivityClientController().shouldUpRecreateTask(token, destAffinity);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
boolean navigateUpTo(IBinder token, Intent destIntent, int resultCode,
Intent resultData) {
try {
return getActivityClientController().navigateUpTo(token, destIntent, resultCode,
resultData);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
boolean releaseActivityInstance(IBinder token) {
try {
return getActivityClientController().releaseActivityInstance(token);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
public boolean finishActivity(IBinder token, int resultCode, Intent resultData,
int finishTask) {
try {
return getActivityClientController().finishActivity(token, resultCode, resultData,
finishTask);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
boolean finishActivityAffinity(IBinder token) {
try {
return getActivityClientController().finishActivityAffinity(token);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
void finishSubActivity(IBinder token, String resultWho, int requestCode) {
try {
getActivityClientController().finishSubActivity(token, resultWho, requestCode);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
public boolean isTopOfTask(IBinder token) {
try {
return getActivityClientController().isTopOfTask(token);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
boolean willActivityBeVisible(IBinder token) {
try {
return getActivityClientController().willActivityBeVisible(token);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
public int getDisplayId(IBinder token) {
try {
return getActivityClientController().getDisplayId(token);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
public int getTaskForActivity(IBinder token, boolean onlyRoot) {
try {
return getActivityClientController().getTaskForActivity(token, onlyRoot);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
ComponentName getCallingActivity(IBinder token) {
try {
return getActivityClientController().getCallingActivity(token);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
String getCallingPackage(IBinder token) {
try {
return getActivityClientController().getCallingPackage(token);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
public int getLaunchedFromUid(IBinder token) {
try {
return getActivityClientController().getLaunchedFromUid(token);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
public String getLaunchedFromPackage(IBinder token) {
try {
return getActivityClientController().getLaunchedFromPackage(token);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
public void setRequestedOrientation(IBinder token, int requestedOrientation) {
try {
getActivityClientController().setRequestedOrientation(token, requestedOrientation);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
int getRequestedOrientation(IBinder token) {
try {
return getActivityClientController().getRequestedOrientation(token);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
boolean convertFromTranslucent(IBinder token) {
try {
return getActivityClientController().convertFromTranslucent(token);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
boolean convertToTranslucent(IBinder token, Bundle options) {
try {
return getActivityClientController().convertToTranslucent(token, options);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
void reportActivityFullyDrawn(IBinder token, boolean restoredFromBundle) {
try {
getActivityClientController().reportActivityFullyDrawn(token, restoredFromBundle);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
boolean isImmersive(IBinder token) {
try {
return getActivityClientController().isImmersive(token);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
void setImmersive(IBinder token, boolean immersive) {
try {
getActivityClientController().setImmersive(token, immersive);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
boolean enterPictureInPictureMode(IBinder token, PictureInPictureParams params) {
try {
return getActivityClientController().enterPictureInPictureMode(token, params);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
void setPictureInPictureParams(IBinder token, PictureInPictureParams params) {
try {
getActivityClientController().setPictureInPictureParams(token, params);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
void toggleFreeformWindowingMode(IBinder token) {
try {
getActivityClientController().toggleFreeformWindowingMode(token);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
void startLockTaskModeByToken(IBinder token) {
try {
getActivityClientController().startLockTaskModeByToken(token);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
void stopLockTaskModeByToken(IBinder token) {
try {
getActivityClientController().stopLockTaskModeByToken(token);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
void showLockTaskEscapeMessage(IBinder token) {
try {
getActivityClientController().showLockTaskEscapeMessage(token);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
void setTaskDescription(IBinder token, ActivityManager.TaskDescription td) {
try {
getActivityClientController().setTaskDescription(token, td);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
boolean showAssistFromActivity(IBinder token, Bundle args) {
try {
return getActivityClientController().showAssistFromActivity(token, args);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
boolean isRootVoiceInteraction(IBinder token) {
try {
return getActivityClientController().isRootVoiceInteraction(token);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
void startLocalVoiceInteraction(IBinder callingActivity, Bundle options) {
try {
getActivityClientController().startLocalVoiceInteraction(callingActivity, options);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
void stopLocalVoiceInteraction(IBinder callingActivity) {
try {
getActivityClientController().stopLocalVoiceInteraction(callingActivity);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
void setShowWhenLocked(IBinder token, boolean showWhenLocked) {
try {
getActivityClientController().setShowWhenLocked(token, showWhenLocked);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
void setInheritShowWhenLocked(IBinder token, boolean inheritShowWhenLocked) {
try {
getActivityClientController().setInheritShowWhenLocked(token, inheritShowWhenLocked);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
void setTurnScreenOn(IBinder token, boolean turnScreenOn) {
try {
getActivityClientController().setTurnScreenOn(token, turnScreenOn);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
int setVrMode(IBinder token, boolean enabled, ComponentName packageName) {
try {
return getActivityClientController().setVrMode(token, enabled, packageName);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
void overridePendingTransition(IBinder token, String packageName,
int enterAnim, int exitAnim) {
try {
getActivityClientController().overridePendingTransition(token, packageName,
enterAnim, exitAnim);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
void setDisablePreviewScreenshots(IBinder token, boolean disable) {
try {
getActivityClientController().setDisablePreviewScreenshots(token, disable);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
/** Removes the snapshot of home task. | ActivityClient::invalidateHomeTaskSnapshot | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityClient.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityClient.java | MIT |
void reportSplashScreenAttached(IBinder token) {
try {
getActivityClientController().splashScreenAttached(token);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
} |
Reports the splash screen view has attached to client.
| ActivityClient::reportSplashScreenAttached | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityClient.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityClient.java | MIT |
public static IActivityClientController setActivityClientController(
IActivityClientController activityClientController) {
// No lock because it is no harm to encounter race condition. The thread safe Singleton#get
// will take over that case.
return INTERFACE_SINGLETON.mKnownInstance = activityClientController;
} |
If system server has passed the controller interface, store it so the subsequent access can
speed up.
| ActivityClient::setActivityClientController | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityClient.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityClient.java | MIT |
public documentgetelementsbytagnamevalue(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
| documentgetelementsbytagnamevalue::documentgetelementsbytagnamevalue | java | Reginer/aosp-android-jar | android-34/src/org/w3c/domts/level1/core/documentgetelementsbytagnamevalue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/w3c/domts/level1/core/documentgetelementsbytagnamevalue.java | MIT |
public void runTest() throws Throwable {
Document doc;
NodeList nameList;
Node nameNode;
Node firstChild;
String childValue;
doc = (Document) load("staff", false);
nameList = doc.getElementsByTagName("name");
nameNode = nameList.item(3);
firstChild = nameNode.getFirstChild();
childValue = firstChild.getNodeValue();
assertEquals("documentGetElementsByTagNameValueAssert", "Jeny Oconnor", childValue);
} |
Runs the test case.
@throws Throwable Any uncaught exception causes test to fail
| documentgetelementsbytagnamevalue::runTest | java | Reginer/aosp-android-jar | android-34/src/org/w3c/domts/level1/core/documentgetelementsbytagnamevalue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/w3c/domts/level1/core/documentgetelementsbytagnamevalue.java | MIT |
public String getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentgetelementsbytagnamevalue";
} |
Gets URI that identifies the test.
@return uri identifier of test
| documentgetelementsbytagnamevalue::getTargetURI | java | Reginer/aosp-android-jar | android-34/src/org/w3c/domts/level1/core/documentgetelementsbytagnamevalue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/w3c/domts/level1/core/documentgetelementsbytagnamevalue.java | MIT |
public static void main(final String[] args) {
DOMTestCase.doMain(documentgetelementsbytagnamevalue.class, args);
} |
Runs this test from the command line.
@param args command line arguments
| documentgetelementsbytagnamevalue::main | java | Reginer/aosp-android-jar | android-34/src/org/w3c/domts/level1/core/documentgetelementsbytagnamevalue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/w3c/domts/level1/core/documentgetelementsbytagnamevalue.java | MIT |
public KeyGenParameterSpec(
String keyStoreAlias,
@KeyProperties.Namespace int namespace,
int keySize,
AlgorithmParameterSpec spec,
X500Principal certificateSubject,
BigInteger certificateSerialNumber,
Date certificateNotBefore,
Date certificateNotAfter,
Date keyValidityStart,
Date keyValidityForOriginationEnd,
Date keyValidityForConsumptionEnd,
@KeyProperties.PurposeEnum int purposes,
@KeyProperties.DigestEnum String[] digests,
@KeyProperties.EncryptionPaddingEnum String[] encryptionPaddings,
@KeyProperties.SignaturePaddingEnum String[] signaturePaddings,
@KeyProperties.BlockModeEnum String[] blockModes,
boolean randomizedEncryptionRequired,
boolean userAuthenticationRequired,
int userAuthenticationValidityDurationSeconds,
@KeyProperties.AuthEnum int userAuthenticationType,
boolean userPresenceRequired,
byte[] attestationChallenge,
boolean devicePropertiesAttestationIncluded,
@NonNull int[] attestationIds,
boolean uniqueIdIncluded,
boolean userAuthenticationValidWhileOnBody,
boolean invalidatedByBiometricEnrollment,
boolean isStrongBoxBacked,
boolean userConfirmationRequired,
boolean unlockedDeviceRequired,
boolean criticalToDeviceEncryption,
int maxUsageCount,
String attestKeyAlias) {
if (TextUtils.isEmpty(keyStoreAlias)) {
throw new IllegalArgumentException("keyStoreAlias must not be empty");
}
if (certificateSubject == null) {
if (attestationChallenge == null) {
certificateSubject = DEFAULT_SELF_SIGNED_CERT_SUBJECT;
} else {
certificateSubject = DEFAULT_ATTESTATION_CERT_SUBJECT;
}
}
if (certificateNotBefore == null) {
certificateNotBefore = DEFAULT_CERT_NOT_BEFORE;
}
if (certificateNotAfter == null) {
certificateNotAfter = DEFAULT_CERT_NOT_AFTER;
}
if (certificateSerialNumber == null) {
certificateSerialNumber = DEFAULT_CERT_SERIAL_NUMBER;
}
if (certificateNotAfter.before(certificateNotBefore)) {
throw new IllegalArgumentException("certificateNotAfter < certificateNotBefore");
}
mKeystoreAlias = keyStoreAlias;
mNamespace = namespace;
mKeySize = keySize;
mSpec = spec;
mCertificateSubject = certificateSubject;
mCertificateSerialNumber = certificateSerialNumber;
mCertificateNotBefore = Utils.cloneIfNotNull(certificateNotBefore);
mCertificateNotAfter = Utils.cloneIfNotNull(certificateNotAfter);
mKeyValidityStart = Utils.cloneIfNotNull(keyValidityStart);
mKeyValidityForOriginationEnd = Utils.cloneIfNotNull(keyValidityForOriginationEnd);
mKeyValidityForConsumptionEnd = Utils.cloneIfNotNull(keyValidityForConsumptionEnd);
mPurposes = purposes;
mDigests = ArrayUtils.cloneIfNotEmpty(digests);
mEncryptionPaddings =
ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(encryptionPaddings));
mSignaturePaddings = ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(signaturePaddings));
mBlockModes = ArrayUtils.cloneIfNotEmpty(ArrayUtils.nullToEmpty(blockModes));
mRandomizedEncryptionRequired = randomizedEncryptionRequired;
mUserAuthenticationRequired = userAuthenticationRequired;
mUserPresenceRequired = userPresenceRequired;
mUserAuthenticationValidityDurationSeconds = userAuthenticationValidityDurationSeconds;
mUserAuthenticationType = userAuthenticationType;
mAttestationChallenge = Utils.cloneIfNotNull(attestationChallenge);
mDevicePropertiesAttestationIncluded = devicePropertiesAttestationIncluded;
mAttestationIds = attestationIds;
mUniqueIdIncluded = uniqueIdIncluded;
mUserAuthenticationValidWhileOnBody = userAuthenticationValidWhileOnBody;
mInvalidatedByBiometricEnrollment = invalidatedByBiometricEnrollment;
mIsStrongBoxBacked = isStrongBoxBacked;
mUserConfirmationRequired = userConfirmationRequired;
mUnlockedDeviceRequired = unlockedDeviceRequired;
mCriticalToDeviceEncryption = criticalToDeviceEncryption;
mMaxUsageCount = maxUsageCount;
mAttestKeyAlias = attestKeyAlias;
} |
@hide should be built with Builder
| KeyGenParameterSpec::KeyGenParameterSpec | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public int getKeySize() {
return mKeySize;
} |
Returns the requested key size. If {@code -1}, the size should be looked up from
{@link #getAlgorithmParameterSpec()}, if provided, otherwise an algorithm-specific default
size should be used.
| KeyGenParameterSpec::getKeySize | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public @KeyProperties.PurposeEnum int getPurposes() {
return mPurposes;
} |
Returns the set of purposes (e.g., encrypt, decrypt, sign) for which the key can be used.
Attempts to use the key for any other purpose will be rejected.
<p>See {@link KeyProperties}.{@code PURPOSE} flags.
| KeyGenParameterSpec::getPurposes | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public boolean isRandomizedEncryptionRequired() {
return mRandomizedEncryptionRequired;
} |
Returns {@code true} if encryption using this key must be sufficiently randomized to produce
different ciphertexts for the same plaintext every time. The formal cryptographic property
being required is <em>indistinguishability under chosen-plaintext attack ({@code
IND-CPA})</em>. This property is important because it mitigates several classes of
weaknesses due to which ciphertext may leak information about plaintext. For example, if a
given plaintext always produces the same ciphertext, an attacker may see the repeated
ciphertexts and be able to deduce something about the plaintext.
| KeyGenParameterSpec::isRandomizedEncryptionRequired | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public boolean isUserAuthenticationRequired() {
return mUserAuthenticationRequired;
} |
Returns {@code true} if the key is authorized to be used only if the user has been
authenticated.
<p>This authorization applies only to secret key and private key operations. Public key
operations are not restricted.
@see #getUserAuthenticationValidityDurationSeconds()
@see Builder#setUserAuthenticationRequired(boolean)
| KeyGenParameterSpec::isUserAuthenticationRequired | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public boolean isUserConfirmationRequired() {
return mUserConfirmationRequired;
} |
Returns {@code true} if the key is authorized to be used only for messages confirmed by the
user.
Confirmation is separate from user authentication (see
{@link Builder#setUserAuthenticationRequired(boolean)}). Keys can be created that require
confirmation but not user authentication, or user authentication but not confirmation, or
both. Confirmation verifies that some user with physical possession of the device has
approved a displayed message. User authentication verifies that the correct user is present
and has authenticated.
<p>This authorization applies only to secret key and private key operations. Public key
operations are not restricted.
@see Builder#setUserConfirmationRequired(boolean)
| KeyGenParameterSpec::isUserConfirmationRequired | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public int getUserAuthenticationValidityDurationSeconds() {
return mUserAuthenticationValidityDurationSeconds;
} |
Gets the duration of time (seconds) for which this key is authorized to be used after the
user is successfully authenticated. This has effect only if user authentication is required
(see {@link #isUserAuthenticationRequired()}).
<p>This authorization applies only to secret key and private key operations. Public key
operations are not restricted.
@return duration in seconds or {@code -1} if authentication is required for every use of the
key.
@see #isUserAuthenticationRequired()
@see Builder#setUserAuthenticationValidityDurationSeconds(int)
| KeyGenParameterSpec::getUserAuthenticationValidityDurationSeconds | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public @KeyProperties.AuthEnum int getUserAuthenticationType() {
return mUserAuthenticationType;
} |
Gets the modes of authentication that can authorize use of this key. This has effect only if
user authentication is required (see {@link #isUserAuthenticationRequired()}).
<p>This authorization applies only to secret key and private key operations. Public key
operations are not restricted.
@return integer representing the bitwse OR of all acceptable authentication types for the
key.
@see #isUserAuthenticationRequired()
@see Builder#setUserAuthenticationParameters(int, int)
| KeyGenParameterSpec::getUserAuthenticationType | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public boolean isUserPresenceRequired() {
return mUserPresenceRequired;
} |
Returns {@code true} if the key is authorized to be used only if a test of user presence has
been performed between the {@code Signature.initSign()} and {@code Signature.sign()} calls.
It requires that the KeyStore implementation have a direct way to validate the user presence
for example a KeyStore hardware backed strongbox can use a button press that is observable
in hardware. A test for user presence is tangential to authentication. The test can be part
of an authentication step as long as this step can be validated by the hardware protecting
the key and cannot be spoofed. For example, a physical button press can be used as a test of
user presence if the other pins connected to the button are not able to simulate a button
press. There must be no way for the primary processor to fake a button press, or that
button must not be used as a test of user presence.
| KeyGenParameterSpec::isUserPresenceRequired | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public byte[] getAttestationChallenge() {
return Utils.cloneIfNotNull(mAttestationChallenge);
} |
Returns the attestation challenge value that will be placed in attestation certificate for
this key pair.
<p>If this method returns non-{@code null}, the public key certificate for this key pair will
contain an extension that describes the details of the key's configuration and
authorizations, including the content of the attestation challenge value. If the key is in
secure hardware, and if the secure hardware supports attestation, the certificate will be
signed by a chain of certificates rooted at a trustworthy CA key. Otherwise the chain will
be rooted at an untrusted certificate.
<p>If this method returns {@code null}, and the spec is used to generate an asymmetric (RSA
or EC) key pair, the public key will have a self-signed certificate if it has purpose {@link
KeyProperties#PURPOSE_SIGN}. If does not have purpose {@link KeyProperties#PURPOSE_SIGN}, it
will have a fake certificate.
<p>Symmetric keys, such as AES and HMAC keys, do not have public key certificates. If a
KeyGenParameterSpec with getAttestationChallenge returning non-null is used to generate a
symmetric (AES or HMAC) key, {@link javax.crypto.KeyGenerator#generateKey()} will throw
{@link java.security.InvalidAlgorithmParameterException}.
@see Builder#setAttestationChallenge(byte[])
| KeyGenParameterSpec::getAttestationChallenge | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public boolean isDevicePropertiesAttestationIncluded() {
return mDevicePropertiesAttestationIncluded;
} |
Returns {@code true} if attestation for the base device properties ({@link Build#BRAND},
{@link Build#DEVICE}, {@link Build#MANUFACTURER}, {@link Build#MODEL}, {@link Build#PRODUCT})
was requested to be added in the attestation certificate for the generated key.
{@link javax.crypto.KeyGenerator#generateKey()} will throw
{@link java.security.ProviderException} if device properties attestation fails or is not
supported.
@see Builder#setDevicePropertiesAttestationIncluded(boolean)
| KeyGenParameterSpec::isDevicePropertiesAttestationIncluded | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public boolean isUserAuthenticationValidWhileOnBody() {
return mUserAuthenticationValidWhileOnBody;
} |
Returns {@code true} if the key will remain authorized only until the device is removed from
the user's body, up to the validity duration. This option has no effect on keys that don't
have an authentication validity duration, and has no effect if the device lacks an on-body
sensor.
<p>Authorization applies only to secret key and private key operations. Public key operations
are not restricted.
@see #isUserAuthenticationRequired()
@see #getUserAuthenticationValidityDurationSeconds()
@see Builder#setUserAuthenticationValidWhileOnBody(boolean)
| KeyGenParameterSpec::isUserAuthenticationValidWhileOnBody | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public boolean isInvalidatedByBiometricEnrollment() {
return mInvalidatedByBiometricEnrollment;
} |
Returns {@code true} if the key is irreversibly invalidated when a new biometric is
enrolled or all enrolled biometrics are removed. This has effect only for keys that
require biometric user authentication for every use.
@see #isUserAuthenticationRequired()
@see #getUserAuthenticationValidityDurationSeconds()
@see Builder#setInvalidatedByBiometricEnrollment(boolean)
| KeyGenParameterSpec::isInvalidatedByBiometricEnrollment | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public boolean isStrongBoxBacked() {
return mIsStrongBoxBacked;
} |
Returns {@code true} if the key is protected by a Strongbox security chip.
| KeyGenParameterSpec::isStrongBoxBacked | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public boolean isUnlockedDeviceRequired() {
return mUnlockedDeviceRequired;
} |
Returns {@code true} if the screen must be unlocked for this key to be used for decryption or
signing. Encryption and signature verification will still be available when the screen is
locked.
@see Builder#setUnlockedDeviceRequired(boolean)
| KeyGenParameterSpec::isUnlockedDeviceRequired | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public long getBoundToSpecificSecureUserId() {
return GateKeeper.INVALID_SECURE_USER_ID;
} |
@hide
| KeyGenParameterSpec::getBoundToSpecificSecureUserId | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public boolean isCriticalToDeviceEncryption() {
return mCriticalToDeviceEncryption;
} |
Returns whether this key is critical to the device encryption flow.
@see android.security.KeyStore#FLAG_CRITICAL_TO_DEVICE_ENCRYPTION
@hide
| KeyGenParameterSpec::isCriticalToDeviceEncryption | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public int getMaxUsageCount() {
return mMaxUsageCount;
} |
Returns the maximum number of times the limited use key is allowed to be used or
{@link KeyProperties#UNRESTRICTED_USAGE_COUNT} if there’s no restriction on the number of
times the key can be used.
@see Builder#setMaxUsageCount(int)
| KeyGenParameterSpec::getMaxUsageCount | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public Builder(@NonNull String keystoreAlias, @KeyProperties.PurposeEnum int purposes) {
if (keystoreAlias == null) {
throw new NullPointerException("keystoreAlias == null");
} else if (keystoreAlias.isEmpty()) {
throw new IllegalArgumentException("keystoreAlias must not be empty");
}
mKeystoreAlias = keystoreAlias;
mPurposes = purposes;
} |
Creates a new instance of the {@code Builder}.
@param keystoreAlias alias of the entry in which the generated key will appear in
Android KeyStore. Must not be empty.
@param purposes set of purposes (e.g., encrypt, decrypt, sign) for which the key can be
used. Attempts to use the key for any other purpose will be rejected.
<p>If the set of purposes for which the key can be used does not contain
{@link KeyProperties#PURPOSE_SIGN}, the self-signed certificate generated by
{@link KeyPairGenerator} of {@code AndroidKeyStore} provider will contain an
invalid signature. This is OK if the certificate is only used for obtaining the
public key from Android KeyStore.
<p>See {@link KeyProperties}.{@code PURPOSE} flags.
| Builder::Builder | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public Builder(@NonNull KeyGenParameterSpec sourceSpec) {
this(sourceSpec.getKeystoreAlias(), sourceSpec.getPurposes());
mNamespace = sourceSpec.getNamespace();
mKeySize = sourceSpec.getKeySize();
mSpec = sourceSpec.getAlgorithmParameterSpec();
mCertificateSubject = sourceSpec.getCertificateSubject();
mCertificateSerialNumber = sourceSpec.getCertificateSerialNumber();
mCertificateNotBefore = sourceSpec.getCertificateNotBefore();
mCertificateNotAfter = sourceSpec.getCertificateNotAfter();
mKeyValidityStart = sourceSpec.getKeyValidityStart();
mKeyValidityForOriginationEnd = sourceSpec.getKeyValidityForOriginationEnd();
mKeyValidityForConsumptionEnd = sourceSpec.getKeyValidityForConsumptionEnd();
mPurposes = sourceSpec.getPurposes();
if (sourceSpec.isDigestsSpecified()) {
mDigests = sourceSpec.getDigests();
}
mEncryptionPaddings = sourceSpec.getEncryptionPaddings();
mSignaturePaddings = sourceSpec.getSignaturePaddings();
mBlockModes = sourceSpec.getBlockModes();
mRandomizedEncryptionRequired = sourceSpec.isRandomizedEncryptionRequired();
mUserAuthenticationRequired = sourceSpec.isUserAuthenticationRequired();
mUserAuthenticationValidityDurationSeconds =
sourceSpec.getUserAuthenticationValidityDurationSeconds();
mUserAuthenticationType = sourceSpec.getUserAuthenticationType();
mUserPresenceRequired = sourceSpec.isUserPresenceRequired();
mAttestationChallenge = sourceSpec.getAttestationChallenge();
mDevicePropertiesAttestationIncluded =
sourceSpec.isDevicePropertiesAttestationIncluded();
mAttestationIds = sourceSpec.getAttestationIds();
mUniqueIdIncluded = sourceSpec.isUniqueIdIncluded();
mUserAuthenticationValidWhileOnBody = sourceSpec.isUserAuthenticationValidWhileOnBody();
mInvalidatedByBiometricEnrollment = sourceSpec.isInvalidatedByBiometricEnrollment();
mIsStrongBoxBacked = sourceSpec.isStrongBoxBacked();
mUserConfirmationRequired = sourceSpec.isUserConfirmationRequired();
mUnlockedDeviceRequired = sourceSpec.isUnlockedDeviceRequired();
mCriticalToDeviceEncryption = sourceSpec.isCriticalToDeviceEncryption();
mMaxUsageCount = sourceSpec.getMaxUsageCount();
mAttestKeyAlias = sourceSpec.getAttestKeyAlias();
} |
A Builder constructor taking in an already-built KeyGenParameterSpec, useful for
changing values of the KeyGenParameterSpec quickly.
@hide Should be used internally only.
| Builder::Builder | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public Builder setAlgorithmParameterSpec(@NonNull AlgorithmParameterSpec spec) {
if (spec == null) {
throw new NullPointerException("spec == null");
}
mSpec = spec;
return this;
} |
Sets the algorithm-specific key generation parameters. For example, for RSA keys this may
be an instance of {@link java.security.spec.RSAKeyGenParameterSpec} whereas for EC keys
this may be an instance of {@link java.security.spec.ECGenParameterSpec}.
<p>These key generation parameters must match other explicitly set parameters (if any),
such as key size.
| Builder::setAlgorithmParameterSpec | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
public Builder setCriticalToDeviceEncryption(boolean critical) {
mCriticalToDeviceEncryption = critical;
return this;
} |
Set whether this key is critical to the device encryption flow
This is a special flag only available to system servers to indicate the current key
is part of the device encryption flow. Setting this flag causes the key to not
be cryptographically bound to the LSKF even if the key is otherwise authentication
bound.
@hide
| Builder::setCriticalToDeviceEncryption | java | Reginer/aosp-android-jar | android-31/src/android/security/keystore/KeyGenParameterSpec.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/keystore/KeyGenParameterSpec.java | MIT |
private static ClassPathURLStreamHandler[] createBootClassPathUrlHandlers() {
String[] bootClassPathEntries = getBootClassPathEntries();
ArrayList<URLStreamHandler> urlStreamHandlers =
new ArrayList<URLStreamHandler>(bootClassPathEntries.length);
for (String bootClassPathEntry : bootClassPathEntries) {
try {
String entryUri = new File(bootClassPathEntry).toURI().toString();
// We assume all entries are zip or jar files.
URLStreamHandler urlStreamHandler =
new ClassPathURLStreamHandler(bootClassPathEntry);
urlStreamHandlers.add(urlStreamHandler);
} catch (IOException e) {
// Skip it
System.logE("Unable to open boot classpath entry: " + bootClassPathEntry, e);
}
}
return urlStreamHandlers.toArray(new ClassPathURLStreamHandler[urlStreamHandlers.size()]);
} |
Creates an array of ClassPathURLStreamHandler objects for handling resource loading from
the boot classpath.
| VMClassLoader::createBootClassPathUrlHandlers | java | Reginer/aosp-android-jar | android-32/src/java/lang/VMClassLoader.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/lang/VMClassLoader.java | MIT |
static URL getResource(String name) {
for (ClassPathURLStreamHandler urlHandler : bootClassPathUrlHandlers) {
URL url = urlHandler.getEntryUrlOrNull(name);
if (url != null) {
return url;
}
}
return null;
} |
Get a resource from a file in the bootstrap class path.
We assume that the bootclasspath can't change once the VM has started.
This assumption seems to be supported by the spec.
| VMClassLoader::getResource | java | Reginer/aosp-android-jar | android-32/src/java/lang/VMClassLoader.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/lang/VMClassLoader.java | MIT |
static List<URL> getResources(String name) {
ArrayList<URL> list = new ArrayList<URL>();
for (ClassPathURLStreamHandler urlHandler : bootClassPathUrlHandlers) {
URL url = urlHandler.getEntryUrlOrNull(name);
if (url != null) {
list.add(url);
}
}
return list;
} |
Get a resource from a file in the bootstrap class path.
We assume that the bootclasspath can't change once the VM has started.
This assumption seems to be supported by the spec.
static URL getResource(String name) {
for (ClassPathURLStreamHandler urlHandler : bootClassPathUrlHandlers) {
URL url = urlHandler.getEntryUrlOrNull(name);
if (url != null) {
return url;
}
}
return null;
}
/*
Get an enumeration with all matching resources.
| VMClassLoader::getResources | java | Reginer/aosp-android-jar | android-32/src/java/lang/VMClassLoader.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/lang/VMClassLoader.java | MIT |
public String getOneHandedStartDescription() {
return mStartOneHandedDescription;
} |
Gets One-Handed start description.
@return text of start description.
| OneHandedAccessibilityUtil::getOneHandedStartDescription | java | Reginer/aosp-android-jar | android-31/src/com/android/wm/shell/onehanded/OneHandedAccessibilityUtil.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/wm/shell/onehanded/OneHandedAccessibilityUtil.java | MIT |
public String getOneHandedStopDescription() {
return mStopOneHandedDescription;
} |
Gets One-Handed stop description.
@return text of stop description.
| OneHandedAccessibilityUtil::getOneHandedStopDescription | java | Reginer/aosp-android-jar | android-31/src/com/android/wm/shell/onehanded/OneHandedAccessibilityUtil.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/wm/shell/onehanded/OneHandedAccessibilityUtil.java | MIT |
public void announcementForScreenReader(String description) {
if (!mAccessibilityManager.isTouchExplorationEnabled()) {
return;
}
mDescription = description;
final AccessibilityEvent event = AccessibilityEvent.obtain();
event.setPackageName(mPackageName);
event.setEventType(AccessibilityEvent.TYPE_ANNOUNCEMENT);
event.getText().add(mDescription);
mAccessibilityManager.sendAccessibilityEvent(event);
} |
Announcement of A11y Events
@param description for accessibility announcement text
| OneHandedAccessibilityUtil::announcementForScreenReader | java | Reginer/aosp-android-jar | android-31/src/com/android/wm/shell/onehanded/OneHandedAccessibilityUtil.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/wm/shell/onehanded/OneHandedAccessibilityUtil.java | MIT |
public UnsupportedEapTypeException(int eapIdentifier, String message) {
super(message);
this.eapIdentifier = eapIdentifier;
} |
Construct an instance of UnsupportedEapTypeException with the specified detail message.
@param eapIdentifier the EAP Identifier for the message that contained the unsupported
EapType
@param message the detail message.
| UnsupportedEapTypeException::UnsupportedEapTypeException | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/net/eap/exceptions/UnsupportedEapTypeException.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/net/eap/exceptions/UnsupportedEapTypeException.java | MIT |
public UnsupportedEapTypeException(int eapIdentifier, String message, Throwable cause) {
super(message, cause);
this.eapIdentifier = eapIdentifier;
} |
Construct an instance of UnsupportedEapTypeException with the specified message and cause.
@param eapIdentifier the EAP Identifier for the message that contained the unsupported
EapType
@param message the detail message.
@param cause the cause.
| UnsupportedEapTypeException::UnsupportedEapTypeException | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/net/eap/exceptions/UnsupportedEapTypeException.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/net/eap/exceptions/UnsupportedEapTypeException.java | MIT |
public nodeentitysetnodevalue(final DOMTestDocumentBuilderFactory factory) throws org.w3c.domts.DOMTestIncompatibleException {
super(factory);
//
// check if loaded documents are supported for content type
//
String contentType = getContentType();
preload(contentType, "staff", true);
} |
Constructor.
@param factory document factory, may not be null
@throws org.w3c.domts.DOMTestIncompatibleException Thrown if test is not compatible with parser configuration
| nodeentitysetnodevalue::nodeentitysetnodevalue | java | Reginer/aosp-android-jar | android-34/src/org/w3c/domts/level1/core/nodeentitysetnodevalue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/w3c/domts/level1/core/nodeentitysetnodevalue.java | MIT |
public void runTest() throws Throwable {
Document doc;
DocumentType docType;
NamedNodeMap entities;
Node entityNode;
String entityValue;
doc = (Document) load("staff", true);
docType = doc.getDoctype();
assertNotNull("docTypeNotNull", docType);
entities = docType.getEntities();
assertNotNull("entitiesNotNull", entities);
entityNode = entities.getNamedItem("ent1");
assertNotNull("ent1NotNull", entityNode);
entityNode.setNodeValue("This should have no effect");
entityValue = entityNode.getNodeValue();
assertNull("nodeValueNull", entityValue);
} |
Runs the test case.
@throws Throwable Any uncaught exception causes test to fail
| nodeentitysetnodevalue::runTest | java | Reginer/aosp-android-jar | android-34/src/org/w3c/domts/level1/core/nodeentitysetnodevalue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/w3c/domts/level1/core/nodeentitysetnodevalue.java | MIT |
public String getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodeentitysetnodevalue";
} |
Gets URI that identifies the test.
@return uri identifier of test
| nodeentitysetnodevalue::getTargetURI | java | Reginer/aosp-android-jar | android-34/src/org/w3c/domts/level1/core/nodeentitysetnodevalue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/w3c/domts/level1/core/nodeentitysetnodevalue.java | MIT |
public static void main(final String[] args) {
DOMTestCase.doMain(nodeentitysetnodevalue.class, args);
} |
Runs this test from the command line.
@param args command line arguments
| nodeentitysetnodevalue::main | java | Reginer/aosp-android-jar | android-34/src/org/w3c/domts/level1/core/nodeentitysetnodevalue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/w3c/domts/level1/core/nodeentitysetnodevalue.java | MIT |
public characterdataindexsizeerrreplacedatacountnegative(final DOMTestDocumentBuilderFactory factory) throws org.w3c.domts.DOMTestIncompatibleException {
org.w3c.domts.DocumentBuilderSetting[] settings =
new org.w3c.domts.DocumentBuilderSetting[] {
org.w3c.domts.DocumentBuilderSetting.signed
};
DOMTestDocumentBuilderFactory testFactory = factory.newInstance(settings);
setFactory(testFactory);
//
// check if loaded documents are supported for content type
//
String contentType = getContentType();
preload(contentType, "staff", true);
} |
Constructor.
@param factory document factory, may not be null
@throws org.w3c.domts.DOMTestIncompatibleException Thrown if test is not compatible with parser configuration
| characterdataindexsizeerrreplacedatacountnegative::characterdataindexsizeerrreplacedatacountnegative | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level1/core/characterdataindexsizeerrreplacedatacountnegative.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level1/core/characterdataindexsizeerrreplacedatacountnegative.java | MIT |
public void runTest() throws Throwable {
Document doc;
NodeList elementList;
Node nameNode;
CharacterData child;
doc = (Document) load("staff", true);
elementList = doc.getElementsByTagName("address");
nameNode = elementList.item(0);
child = (CharacterData) nameNode.getFirstChild();
{
boolean success = false;
try {
child.replaceData(10, -3, "ABC");
} catch (DOMException ex) {
success = (ex.code == DOMException.INDEX_SIZE_ERR);
}
assertTrue("throws_INDEX_SIZE_ERR", success);
}
} |
Runs the test case.
@throws Throwable Any uncaught exception causes test to fail
| characterdataindexsizeerrreplacedatacountnegative::runTest | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level1/core/characterdataindexsizeerrreplacedatacountnegative.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level1/core/characterdataindexsizeerrreplacedatacountnegative.java | MIT |
public String getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdataindexsizeerrreplacedatacountnegative";
} |
Gets URI that identifies the test.
@return uri identifier of test
| characterdataindexsizeerrreplacedatacountnegative::getTargetURI | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level1/core/characterdataindexsizeerrreplacedatacountnegative.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level1/core/characterdataindexsizeerrreplacedatacountnegative.java | MIT |
public static void main(final String[] args) {
DOMTestCase.doMain(characterdataindexsizeerrreplacedatacountnegative.class, args);
} |
Runs this test from the command line.
@param args command line arguments
| characterdataindexsizeerrreplacedatacountnegative::main | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level1/core/characterdataindexsizeerrreplacedatacountnegative.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level1/core/characterdataindexsizeerrreplacedatacountnegative.java | MIT |
public float getDiff(float x) {
float t = 0.5f;
float range = 0.5f;
while (range > D_ERROR) {
float tx = getX(t);
range *= 0.5;
if (tx < x) {
t += range;
} else {
t -= range;
}
}
float x1 = getX(t - range);
float x2 = getX(t + range);
float y1 = getY(t - range);
float y2 = getY(t + range);
return (y2 - y1) / (x2 - x1);
} |
binary search for the region and linear interpolate the answer
| CubicEasing::getDiff | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/operations/utilities/easing/CubicEasing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/operations/utilities/easing/CubicEasing.java | MIT |
public float get(float x) {
if (x <= 0.0f) {
return 0f;
}
if (x >= 1.0f) {
return 1.0f;
}
float t = 0.5f;
float range = 0.5f;
while (range > ERROR) {
float tx = getX(t);
range *= 0.5f;
if (tx < x) {
t += range;
} else {
t -= range;
}
}
float x1 = getX(t - range);
float x2 = getX(t + range);
float y1 = getY(t - range);
float y2 = getY(t + range);
return (y2 - y1) * (x - x1) / (x2 - x1) + y1;
} |
binary search for the region and linear interpolate the answer
| CubicEasing::get | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/operations/utilities/easing/CubicEasing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/operations/utilities/easing/CubicEasing.java | MIT |
public static List<String> tokenize(@Nullable String sql, int options) {
final ArrayList<String> res = new ArrayList<>();
tokenize(sql, options, res::add);
return res;
} |
Tokenize the given SQL, returning the list of each encountered token.
@throws IllegalArgumentException if invalid SQL is encountered.
| SQLiteTokenizer::tokenize | java | Reginer/aosp-android-jar | android-34/src/android/database/sqlite/SQLiteTokenizer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/database/sqlite/SQLiteTokenizer.java | MIT |
public static void tokenize(@Nullable String sql, int options, Consumer<String> checker) {
if (sql == null) {
return;
}
int pos = 0;
final int len = sql.length();
while (pos < len) {
final char ch = peek(sql, pos);
// Regular token.
if (isAlpha(ch)) {
final int start = pos;
pos++;
while (isAlNum(peek(sql, pos))) {
pos++;
}
final int end = pos;
final String token = sql.substring(start, end);
checker.accept(token);
continue;
}
// Handle quoted tokens
if (isAnyOf(ch, "'\"`")) {
final int quoteStart = pos;
pos++;
for (;;) {
pos = sql.indexOf(ch, pos);
if (pos < 0) {
throw genException("Unterminated quote", sql);
}
if (peek(sql, pos + 1) != ch) {
break;
}
// Quoted quote char -- e.g. "abc""def" is a single string.
pos += 2;
}
final int quoteEnd = pos;
pos++;
if (ch != '\'') {
// Extract the token
final String tokenUnquoted = sql.substring(quoteStart + 1, quoteEnd);
final String token;
// Unquote if needed. i.e. "aa""bb" -> aa"bb
if (tokenUnquoted.indexOf(ch) >= 0) {
token = tokenUnquoted.replaceAll(
String.valueOf(ch) + ch, String.valueOf(ch));
} else {
token = tokenUnquoted;
}
checker.accept(token);
} else {
if ((options &= OPTION_TOKEN_ONLY) != 0) {
throw genException("Non-token detected", sql);
}
}
continue;
}
// Handle tokens enclosed in [...]
if (ch == '[') {
final int quoteStart = pos;
pos++;
pos = sql.indexOf(']', pos);
if (pos < 0) {
throw genException("Unterminated quote", sql);
}
final int quoteEnd = pos;
pos++;
final String token = sql.substring(quoteStart + 1, quoteEnd);
checker.accept(token);
continue;
}
if ((options &= OPTION_TOKEN_ONLY) != 0) {
throw genException("Non-token detected", sql);
}
// Detect comments.
if (ch == '-' && peek(sql, pos + 1) == '-') {
pos += 2;
pos = sql.indexOf('\n', pos);
if (pos < 0) {
// We disallow strings ending in an inline comment.
throw genException("Unterminated comment", sql);
}
pos++;
continue;
}
if (ch == '/' && peek(sql, pos + 1) == '*') {
pos += 2;
pos = sql.indexOf("*/", pos);
if (pos < 0) {
throw genException("Unterminated comment", sql);
}
pos += 2;
continue;
}
// Semicolon is never allowed.
if (ch == ';') {
throw genException("Semicolon is not allowed", sql);
}
// For this purpose, we can simply ignore other characters.
// (Note it doesn't handle the X'' literal properly and reports this X as a token,
// but that should be fine...)
pos++;
}
} |
Tokenize the given SQL, sending each encountered token to the given
{@link Consumer}.
@throws IllegalArgumentException if invalid SQL is encountered.
| SQLiteTokenizer::tokenize | java | Reginer/aosp-android-jar | android-34/src/android/database/sqlite/SQLiteTokenizer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/database/sqlite/SQLiteTokenizer.java | MIT |
public static boolean isKeyword(@NonNull String token) {
switch (token.toUpperCase(Locale.US)) {
case "ABORT": case "ACTION": case "ADD": case "AFTER":
case "ALL": case "ALTER": case "ANALYZE": case "AND":
case "AS": case "ASC": case "ATTACH": case "AUTOINCREMENT":
case "BEFORE": case "BEGIN": case "BETWEEN": case "BINARY":
case "BY": case "CASCADE": case "CASE": case "CAST":
case "CHECK": case "COLLATE": case "COLUMN": case "COMMIT":
case "CONFLICT": case "CONSTRAINT": case "CREATE": case "CROSS":
case "CURRENT": case "CURRENT_DATE": case "CURRENT_TIME": case "CURRENT_TIMESTAMP":
case "DATABASE": case "DEFAULT": case "DEFERRABLE": case "DEFERRED":
case "DELETE": case "DESC": case "DETACH": case "DISTINCT":
case "DO": case "DROP": case "EACH": case "ELSE":
case "END": case "ESCAPE": case "EXCEPT": case "EXCLUDE":
case "EXCLUSIVE": case "EXISTS": case "EXPLAIN": case "FAIL":
case "FILTER": case "FOLLOWING": case "FOR": case "FOREIGN":
case "FROM": case "FULL": case "GLOB": case "GROUP":
case "GROUPS": case "HAVING": case "IF": case "IGNORE":
case "IMMEDIATE": case "IN": case "INDEX": case "INDEXED":
case "INITIALLY": case "INNER": case "INSERT": case "INSTEAD":
case "INTERSECT": case "INTO": case "IS": case "ISNULL":
case "JOIN": case "KEY": case "LEFT": case "LIKE":
case "LIMIT": case "MATCH": case "NATURAL": case "NO":
case "NOCASE": case "NOT": case "NOTHING": case "NOTNULL":
case "NULL": case "OF": case "OFFSET": case "ON":
case "OR": case "ORDER": case "OTHERS": case "OUTER":
case "OVER": case "PARTITION": case "PLAN": case "PRAGMA":
case "PRECEDING": case "PRIMARY": case "QUERY": case "RAISE":
case "RANGE": case "RECURSIVE": case "REFERENCES": case "REGEXP":
case "REINDEX": case "RELEASE": case "RENAME": case "REPLACE":
case "RESTRICT": case "RIGHT": case "ROLLBACK": case "ROW":
case "ROWS": case "RTRIM": case "SAVEPOINT": case "SELECT":
case "SET": case "TABLE": case "TEMP": case "TEMPORARY":
case "THEN": case "TIES": case "TO": case "TRANSACTION":
case "TRIGGER": case "UNBOUNDED": case "UNION": case "UNIQUE":
case "UPDATE": case "USING": case "VACUUM": case "VALUES":
case "VIEW": case "VIRTUAL": case "WHEN": case "WHERE":
case "WINDOW": case "WITH": case "WITHOUT":
return true;
default:
return false;
}
} |
Test if given token is a
<a href="https://www.sqlite.org/lang_keywords.html">SQLite reserved
keyword</a>.
| SQLiteTokenizer::isKeyword | java | Reginer/aosp-android-jar | android-34/src/android/database/sqlite/SQLiteTokenizer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/database/sqlite/SQLiteTokenizer.java | MIT |
public static boolean isFunction(@NonNull String token) {
switch (token.toLowerCase(Locale.US)) {
case "abs": case "avg": case "char": case "coalesce":
case "count": case "glob": case "group_concat": case "hex":
case "ifnull": case "instr": case "length": case "like":
case "likelihood": case "likely": case "lower": case "ltrim":
case "max": case "min": case "nullif": case "random":
case "randomblob": case "replace": case "round": case "rtrim":
case "substr": case "sum": case "total": case "trim":
case "typeof": case "unicode": case "unlikely": case "upper":
case "zeroblob":
return true;
default:
return false;
}
} |
Test if given token is a
<a href="https://www.sqlite.org/lang_corefunc.html">SQLite reserved
function</a>.
| SQLiteTokenizer::isFunction | java | Reginer/aosp-android-jar | android-34/src/android/database/sqlite/SQLiteTokenizer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/database/sqlite/SQLiteTokenizer.java | MIT |
public static boolean isType(@NonNull String token) {
switch (token.toUpperCase(Locale.US)) {
case "INT": case "INTEGER": case "TINYINT": case "SMALLINT":
case "MEDIUMINT": case "BIGINT": case "INT2": case "INT8":
case "CHARACTER": case "VARCHAR": case "NCHAR": case "NVARCHAR":
case "TEXT": case "CLOB": case "BLOB": case "REAL":
case "DOUBLE": case "FLOAT": case "NUMERIC": case "DECIMAL":
case "BOOLEAN": case "DATE": case "DATETIME":
return true;
default:
return false;
}
} |
Test if given token is a
<a href="https://www.sqlite.org/datatype3.html">SQLite reserved type</a>.
| SQLiteTokenizer::isType | java | Reginer/aosp-android-jar | android-34/src/android/database/sqlite/SQLiteTokenizer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/database/sqlite/SQLiteTokenizer.java | MIT |
public AnnotationFormatError(String message) {
super(message);
} |
Constructs a new {@code AnnotationFormatError} with the specified
detail message.
@param message the detail message.
| AnnotationFormatError::AnnotationFormatError | java | Reginer/aosp-android-jar | android-33/src/java/lang/annotation/AnnotationFormatError.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/lang/annotation/AnnotationFormatError.java | MIT |
public AnnotationFormatError(String message, Throwable cause) {
super(message, cause);
} |
Constructs a new {@code AnnotationFormatError} with the specified
detail message and cause. Note that the detail message associated
with {@code cause} is <i>not</i> automatically incorporated in
this error's detail message.
@param message the detail message
@param cause the cause (A {@code null} value is permitted, and
indicates that the cause is nonexistent or unknown.)
| AnnotationFormatError::AnnotationFormatError | java | Reginer/aosp-android-jar | android-33/src/java/lang/annotation/AnnotationFormatError.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/lang/annotation/AnnotationFormatError.java | MIT |
public AnnotationFormatError(Throwable cause) {
super(cause);
} |
Constructs a new {@code AnnotationFormatError} with the specified
cause and a detail message of
{@code (cause == null ? null : cause.toString())} (which
typically contains the class and detail message of {@code cause}).
@param cause the cause (A {@code null} value is permitted, and
indicates that the cause is nonexistent or unknown.)
| AnnotationFormatError::AnnotationFormatError | java | Reginer/aosp-android-jar | android-33/src/java/lang/annotation/AnnotationFormatError.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/lang/annotation/AnnotationFormatError.java | MIT |
public GenerateRkpKeyException() {
} |
Constructs a new {@code GenerateRkpKeyException}.
| GenerateRkpKeyException::GenerateRkpKeyException | java | Reginer/aosp-android-jar | android-33/src/android/security/GenerateRkpKeyException.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/security/GenerateRkpKeyException.java | MIT |
public static UserBackupManagerService createUserBackupManagerServiceAndRunTasks(
int userId,
Context context,
File baseStateDir,
File dataDir,
TransportManager transportManager) {
return createUserBackupManagerServiceAndRunTasks(
userId, context, startBackupThread(null), baseStateDir, dataDir, transportManager);
} |
Creates an instance of {@link UserBackupManagerService} with a new backup thread and runs
tasks that were posted to it during instantiation.
<p>If the class-under-test is going to execute methods as the system, it's a good idea to
also call {@link #setUpBinderCallerAndApplicationAsSystem(Application)} before this method.
@see #createUserBackupManagerServiceAndRunTasks(int, Context, HandlerThread, File, File,
TransportManager)
| BackupManagerServiceTestUtils::createUserBackupManagerServiceAndRunTasks | java | Reginer/aosp-android-jar | android-34/src/com/android/server/backup/testing/BackupManagerServiceTestUtils.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/backup/testing/BackupManagerServiceTestUtils.java | MIT |
public static UserBackupManagerService createUserBackupManagerServiceAndRunTasks(
int userId,
Context context,
HandlerThread backupThread,
File baseStateDir,
File dataDir,
TransportManager transportManager) {
UserBackupManagerService backupManagerService =
UserBackupManagerService.createAndInitializeService(
userId,
context,
new BackupManagerService(context),
backupThread,
baseStateDir,
dataDir,
transportManager);
runToEndOfTasks(backupThread.getLooper());
return backupManagerService;
} |
Creates an instance of {@link UserBackupManagerService} with the supplied backup thread
{@code backupThread} and runs tasks that were posted to it during instantiation.
<p>If the class-under-test is going to execute methods as the system, it's a good idea to
also call {@link #setUpBinderCallerAndApplicationAsSystem(Application)} before this method.
| BackupManagerServiceTestUtils::createUserBackupManagerServiceAndRunTasks | java | Reginer/aosp-android-jar | android-34/src/com/android/server/backup/testing/BackupManagerServiceTestUtils.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/backup/testing/BackupManagerServiceTestUtils.java | MIT |
default void dataCollected(boolean success, byte[] data) { } |
Called when there is data to be recorded.
@param success Indicates whether the action is considered a success.
@param data The raw data to be recorded for analysis.
| public::dataCollected | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/plugins/FalsingPlugin.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/plugins/FalsingPlugin.java | MIT |
default FalsingManager getFalsingManager(Context context) {
return null;
} |
Return a {@link FalsingManager} to be used in place of the system's default.
@param context
| public::getFalsingManager | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/plugins/FalsingPlugin.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/plugins/FalsingPlugin.java | MIT |
public nodeentitynodename(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
| nodeentitynodename::nodeentitynodename | java | Reginer/aosp-android-jar | android-32/src/org/w3c/domts/level1/core/nodeentitynodename.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/org/w3c/domts/level1/core/nodeentitynodename.java | MIT |
public void runTest() throws Throwable {
Document doc;
DocumentType docType;
NamedNodeMap entities;
Node entityNode;
String entityName;
doc = (Document) load("staff", false);
docType = doc.getDoctype();
assertNotNull("docTypeNotNull", docType);
entities = docType.getEntities();
assertNotNull("entitiesNotNull", entities);
entityNode = entities.getNamedItem("ent1");
assertNotNull("entityNodeNotNull", entityNode);
entityName = entityNode.getNodeName();
assertEquals("entityNodeName", "ent1", entityName);
} |
Runs the test case.
@throws Throwable Any uncaught exception causes test to fail
| nodeentitynodename::runTest | java | Reginer/aosp-android-jar | android-32/src/org/w3c/domts/level1/core/nodeentitynodename.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/org/w3c/domts/level1/core/nodeentitynodename.java | MIT |
public String getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodeentitynodename";
} |
Gets URI that identifies the test.
@return uri identifier of test
| nodeentitynodename::getTargetURI | java | Reginer/aosp-android-jar | android-32/src/org/w3c/domts/level1/core/nodeentitynodename.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/org/w3c/domts/level1/core/nodeentitynodename.java | MIT |
public static void main(final String[] args) {
DOMTestCase.doMain(nodeentitynodename.class, args);
} |
Runs this test from the command line.
@param args command line arguments
| nodeentitynodename::main | java | Reginer/aosp-android-jar | android-32/src/org/w3c/domts/level1/core/nodeentitynodename.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/org/w3c/domts/level1/core/nodeentitynodename.java | MIT |
void scheduleTransaction(ClientTransaction transaction) {
transaction.preExecute(this);
sendMessage(ActivityThread.H.EXECUTE_TRANSACTION, transaction);
} |
Defines operations that a {@link android.app.servertransaction.ClientTransaction} or its items
can perform on client.
@hide
public abstract class ClientTransactionHandler {
// Schedule phase related logic and handlers.
/** Prepare and schedule transaction for execution. | ClientTransactionHandler::scheduleTransaction | java | Reginer/aosp-android-jar | android-33/src/android/app/ClientTransactionHandler.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/app/ClientTransactionHandler.java | MIT |
public Builder setClientPrefix(String clientPrefix) {
if (clientPrefix == null) {
throw new IllegalArgumentException("Client prefix cannot be null");
}
mClientPrefix = clientPrefix;
return this;
} |
Sets the client prefix for the visual voicemail SMS filter. The client prefix will appear
at the start of a visual voicemail SMS message, followed by a colon(:).
| Builder::setClientPrefix | java | Reginer/aosp-android-jar | android-33/src/android/telephony/VisualVoicemailSmsFilterSettings.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/telephony/VisualVoicemailSmsFilterSettings.java | MIT |
public Builder setOriginatingNumbers(List<String> originatingNumbers) {
if (originatingNumbers == null) {
throw new IllegalArgumentException("Originating numbers cannot be null");
}
mOriginatingNumbers = originatingNumbers;
return this;
} |
Sets the originating number allow list for the visual voicemail SMS filter. If the list
is not null only the SMS messages from a number in the list can be considered as a visual
voicemail SMS. Otherwise, messages from any address will be considered.
| Builder::setOriginatingNumbers | java | Reginer/aosp-android-jar | android-33/src/android/telephony/VisualVoicemailSmsFilterSettings.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/telephony/VisualVoicemailSmsFilterSettings.java | MIT |
public Builder setDestinationPort(int destinationPort) {
mDestinationPort = destinationPort;
return this;
} |
Sets the destination port for the visual voicemail SMS filter.
@param destinationPort The destination port, or {@link #DESTINATION_PORT_ANY}, or {@link
#DESTINATION_PORT_DATA_SMS}
| Builder::setDestinationPort | java | Reginer/aosp-android-jar | android-33/src/android/telephony/VisualVoicemailSmsFilterSettings.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/telephony/VisualVoicemailSmsFilterSettings.java | MIT |
public Builder setPackageName(String packageName) {
mPackageName = packageName;
return this;
} |
The package that registered this filter.
@hide
| Builder::setPackageName | java | Reginer/aosp-android-jar | android-33/src/android/telephony/VisualVoicemailSmsFilterSettings.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/telephony/VisualVoicemailSmsFilterSettings.java | MIT |
private VisualVoicemailSmsFilterSettings(Builder builder) {
clientPrefix = builder.mClientPrefix;
originatingNumbers = builder.mOriginatingNumbers;
destinationPort = builder.mDestinationPort;
packageName = builder.mPackageName;
} |
Use {@link Builder} to construct
| Builder::VisualVoicemailSmsFilterSettings | java | Reginer/aosp-android-jar | android-33/src/android/telephony/VisualVoicemailSmsFilterSettings.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/telephony/VisualVoicemailSmsFilterSettings.java | MIT |
public BackendBusyException(@DurationMillisLong long backOffHintMillis) {
super("The keystore backend has no operation slots available. Retry later.");
if (backOffHintMillis < 0) {
throw new IllegalArgumentException("Back-off hint cannot be negative.");
}
mBackOffHintMillis = backOffHintMillis;
} |
Constructs a new {@code BackendBusyException} without detail message and cause.
| BackendBusyException::BackendBusyException | java | Reginer/aosp-android-jar | android-34/src/android/security/keystore/BackendBusyException.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/security/keystore/BackendBusyException.java | MIT |
public BackendBusyException(@DurationMillisLong long backOffHintMillis,
@NonNull String message) {
super(message);
if (backOffHintMillis < 0) {
throw new IllegalArgumentException("Back-off hint cannot be negative.");
}
mBackOffHintMillis = backOffHintMillis;
} |
Constructs a new {@code BackendBusyException} with the provided detail message and
no cause.
| BackendBusyException::BackendBusyException | java | Reginer/aosp-android-jar | android-34/src/android/security/keystore/BackendBusyException.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/security/keystore/BackendBusyException.java | MIT |
public BackendBusyException(@DurationMillisLong long backOffHintMillis,
@NonNull String message, @NonNull Throwable cause) {
super(message, cause);
if (backOffHintMillis < 0) {
throw new IllegalArgumentException("Back-off hint cannot be negative.");
}
mBackOffHintMillis = backOffHintMillis;
} |
Constructs a new {@code BackendBusyException} with the provided detail message and
cause.
| BackendBusyException::BackendBusyException | java | Reginer/aosp-android-jar | android-34/src/android/security/keystore/BackendBusyException.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/security/keystore/BackendBusyException.java | MIT |
public @DurationMillisLong long getBackOffHintMillis() {
return mBackOffHintMillis;
} |
When retrying to start a Keystore operation after receiving this exception, this can be
used to determine how long to wait before retrying. It is not guaranteed that the operation
will succeeds after this time. Multiple retries may be necessary if the system is congested.
@return Number of milliseconds to back off before retrying.
| BackendBusyException::getBackOffHintMillis | java | Reginer/aosp-android-jar | android-34/src/android/security/keystore/BackendBusyException.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/security/keystore/BackendBusyException.java | MIT |
public static ActivityOptions makeCustomAnimation(Context context,
int enterResId, int exitResId) {
return makeCustomAnimation(context, enterResId, exitResId, null, null, null);
} |
Create an ActivityOptions specifying a custom animation to run when
the activity is displayed.
@param context Who is defining this. This is the application that the
animation resources will be loaded from.
@param enterResId A resource ID of the animation resource to use for
the incoming activity. Use 0 for no animation.
@param exitResId A resource ID of the animation resource to use for
the outgoing activity. Use 0 for no animation.
@return Returns a new ActivityOptions object that you can use to
supply these options as the options Bundle when starting an activity.
| ActivityOptions::makeCustomAnimation | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
public static ActivityOptions makeCustomInPlaceAnimation(Context context, int animId) {
if (animId == 0) {
throw new RuntimeException("You must specify a valid animation.");
}
ActivityOptions opts = new ActivityOptions();
opts.mPackageName = context.getPackageName();
opts.mAnimationType = ANIM_CUSTOM_IN_PLACE;
opts.mCustomInPlaceResId = animId;
return opts;
} |
Creates an ActivityOptions specifying a custom animation to run in place on an existing
activity.
@param context Who is defining this. This is the application that the
animation resources will be loaded from.
@param animId A resource ID of the animation resource to use for
the incoming activity.
@return Returns a new ActivityOptions object that you can use to
supply these options as the options Bundle when running an in-place animation.
@hide
| ActivityOptions::makeCustomInPlaceAnimation | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
public static ActivityOptions makeScaleUpAnimation(View source,
int startX, int startY, int width, int height) {
ActivityOptions opts = new ActivityOptions();
opts.mPackageName = source.getContext().getPackageName();
opts.mAnimationType = ANIM_SCALE_UP;
int[] pts = new int[2];
source.getLocationOnScreen(pts);
opts.mStartX = pts[0] + startX;
opts.mStartY = pts[1] + startY;
opts.mWidth = width;
opts.mHeight = height;
return opts;
} |
Create an ActivityOptions specifying an animation where the new
activity is scaled from a small originating area of the screen to
its final full representation.
<p>If the Intent this is being used with has not set its
{@link android.content.Intent#setSourceBounds Intent.setSourceBounds},
those bounds will be filled in for you based on the initial
bounds passed in here.
@param source The View that the new activity is animating from. This
defines the coordinate space for <var>startX</var> and <var>startY</var>.
@param startX The x starting location of the new activity, relative to <var>source</var>.
@param startY The y starting location of the activity, relative to <var>source</var>.
@param width The initial width of the new activity.
@param height The initial height of the new activity.
@return Returns a new ActivityOptions object that you can use to
supply these options as the options Bundle when starting an activity.
| ActivityOptions::makeScaleUpAnimation | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
public static ActivityOptions makeClipRevealAnimation(View source,
int startX, int startY, int width, int height) {
ActivityOptions opts = new ActivityOptions();
opts.mAnimationType = ANIM_CLIP_REVEAL;
int[] pts = new int[2];
source.getLocationOnScreen(pts);
opts.mStartX = pts[0] + startX;
opts.mStartY = pts[1] + startY;
opts.mWidth = width;
opts.mHeight = height;
return opts;
} |
Create an ActivityOptions specifying an animation where the new
activity is revealed from a small originating area of the screen to
its final full representation.
@param source The View that the new activity is animating from. This
defines the coordinate space for <var>startX</var> and <var>startY</var>.
@param startX The x starting location of the new activity, relative to <var>source</var>.
@param startY The y starting location of the activity, relative to <var>source</var>.
@param width The initial width of the new activity.
@param height The initial height of the new activity.
@return Returns a new ActivityOptions object that you can use to
supply these options as the options Bundle when starting an activity.
| ActivityOptions::makeClipRevealAnimation | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
public static ActivityOptions makeOpenCrossProfileAppsAnimation() {
ActivityOptions options = new ActivityOptions();
options.mAnimationType = ANIM_OPEN_CROSS_PROFILE_APPS;
return options;
} |
Creates an {@link ActivityOptions} object specifying an animation where the new activity
is started in another user profile by calling {@link
android.content.pm.crossprofile.CrossProfileApps#startMainActivity(ComponentName, UserHandle)
}.
@hide
| ActivityOptions::makeOpenCrossProfileAppsAnimation | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
public static ActivityOptions makeThumbnailScaleUpAnimation(View source,
Bitmap thumbnail, int startX, int startY) {
return makeThumbnailScaleUpAnimation(source, thumbnail, startX, startY, null);
} |
Create an ActivityOptions specifying an animation where a thumbnail
is scaled from a given position to the new activity window that is
being started.
<p>If the Intent this is being used with has not set its
{@link android.content.Intent#setSourceBounds Intent.setSourceBounds},
those bounds will be filled in for you based on the initial
thumbnail location and size provided here.
@param source The View that this thumbnail is animating from. This
defines the coordinate space for <var>startX</var> and <var>startY</var>.
@param thumbnail The bitmap that will be shown as the initial thumbnail
of the animation.
@param startX The x starting location of the bitmap, relative to <var>source</var>.
@param startY The y starting location of the bitmap, relative to <var>source</var>.
@return Returns a new ActivityOptions object that you can use to
supply these options as the options Bundle when starting an activity.
| ActivityOptions::makeThumbnailScaleUpAnimation | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
private static ActivityOptions makeThumbnailScaleUpAnimation(View source,
Bitmap thumbnail, int startX, int startY, OnAnimationStartedListener listener) {
return makeThumbnailAnimation(source, thumbnail, startX, startY, listener, true);
} |
Create an ActivityOptions specifying an animation where a thumbnail
is scaled from a given position to the new activity window that is
being started.
@param source The View that this thumbnail is animating from. This
defines the coordinate space for <var>startX</var> and <var>startY</var>.
@param thumbnail The bitmap that will be shown as the initial thumbnail
of the animation.
@param startX The x starting location of the bitmap, relative to <var>source</var>.
@param startY The y starting location of the bitmap, relative to <var>source</var>.
@param listener Optional OnAnimationStartedListener to find out when the
requested animation has started running. If for some reason the animation
is not executed, the callback will happen immediately.
@return Returns a new ActivityOptions object that you can use to
supply these options as the options Bundle when starting an activity.
| ActivityOptions::makeThumbnailScaleUpAnimation | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
public static ActivityOptions makeThumbnailAspectScaleDownAnimation(View source,
Bitmap thumbnail, int startX, int startY, int targetWidth, int targetHeight,
Handler handler, OnAnimationStartedListener listener) {
return makeAspectScaledThumbnailAnimation(source, thumbnail, startX, startY,
targetWidth, targetHeight, handler, listener, false);
} |
Create an ActivityOptions specifying an animation where the new activity
window and a thumbnail is aspect-scaled to a new location.
@param source The View that this thumbnail is animating to. This
defines the coordinate space for <var>startX</var> and <var>startY</var>.
@param thumbnail The bitmap that will be shown as the final thumbnail
of the animation.
@param startX The x end location of the bitmap, relative to <var>source</var>.
@param startY The y end location of the bitmap, relative to <var>source</var>.
@param handler If <var>listener</var> is non-null this must be a valid
Handler on which to dispatch the callback; otherwise it should be null.
@param listener Optional OnAnimationStartedListener to find out when the
requested animation has started running. If for some reason the animation
is not executed, the callback will happen immediately.
@return Returns a new ActivityOptions object that you can use to
supply these options as the options Bundle when starting an activity.
@hide
| ActivityOptions::makeThumbnailAspectScaleDownAnimation | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
public static ActivityOptions makeThumbnailAspectScaleDownAnimation(View source,
AppTransitionAnimationSpec[] specs, Handler handler,
OnAnimationStartedListener onAnimationStartedListener,
OnAnimationFinishedListener onAnimationFinishedListener) {
ActivityOptions opts = new ActivityOptions();
opts.mPackageName = source.getContext().getPackageName();
opts.mAnimationType = ANIM_THUMBNAIL_ASPECT_SCALE_DOWN;
opts.mAnimSpecs = specs;
opts.setOnAnimationStartedListener(handler, onAnimationStartedListener);
opts.setOnAnimationFinishedListener(handler, onAnimationFinishedListener);
return opts;
} |
Create an ActivityOptions specifying an animation where the new activity
window and a thumbnail is aspect-scaled to a new location.
@param source The View that this thumbnail is animating to. This
defines the coordinate space for <var>startX</var> and <var>startY</var>.
@param thumbnail The bitmap that will be shown as the final thumbnail
of the animation.
@param startX The x end location of the bitmap, relative to <var>source</var>.
@param startY The y end location of the bitmap, relative to <var>source</var>.
@param handler If <var>listener</var> is non-null this must be a valid
Handler on which to dispatch the callback; otherwise it should be null.
@param listener Optional OnAnimationStartedListener to find out when the
requested animation has started running. If for some reason the animation
is not executed, the callback will happen immediately.
@return Returns a new ActivityOptions object that you can use to
supply these options as the options Bundle when starting an activity.
@hide
public static ActivityOptions makeThumbnailAspectScaleDownAnimation(View source,
Bitmap thumbnail, int startX, int startY, int targetWidth, int targetHeight,
Handler handler, OnAnimationStartedListener listener) {
return makeAspectScaledThumbnailAnimation(source, thumbnail, startX, startY,
targetWidth, targetHeight, handler, listener, false);
}
private static ActivityOptions makeAspectScaledThumbnailAnimation(View source, Bitmap thumbnail,
int startX, int startY, int targetWidth, int targetHeight,
Handler handler, OnAnimationStartedListener listener, boolean scaleUp) {
ActivityOptions opts = new ActivityOptions();
opts.mPackageName = source.getContext().getPackageName();
opts.mAnimationType = scaleUp ? ANIM_THUMBNAIL_ASPECT_SCALE_UP :
ANIM_THUMBNAIL_ASPECT_SCALE_DOWN;
opts.mThumbnail = thumbnail;
int[] pts = new int[2];
source.getLocationOnScreen(pts);
opts.mStartX = pts[0] + startX;
opts.mStartY = pts[1] + startY;
opts.mWidth = targetWidth;
opts.mHeight = targetHeight;
opts.setOnAnimationStartedListener(handler, listener);
return opts;
}
/** @hide | ActivityOptions::makeThumbnailAspectScaleDownAnimation | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
public static ActivityOptions makeSceneTransitionAnimation(Activity activity,
View sharedElement, String sharedElementName) {
return makeSceneTransitionAnimation(activity, Pair.create(sharedElement, sharedElementName));
} |
Create an ActivityOptions to transition between Activities using cross-Activity scene
animations. This method carries the position of one shared element to the started Activity.
The position of <code>sharedElement</code> will be used as the epicenter for the
exit Transition. The position of the shared element in the launched Activity will be the
epicenter of its entering Transition.
<p>This requires {@link android.view.Window#FEATURE_ACTIVITY_TRANSITIONS} to be
enabled on the calling Activity to cause an exit transition. The same must be in
the called Activity to get an entering transition.</p>
@param activity The Activity whose window contains the shared elements.
@param sharedElement The View to transition to the started Activity.
@param sharedElementName The shared element name as used in the target Activity. This
must not be null.
@return Returns a new ActivityOptions object that you can use to
supply these options as the options Bundle when starting an activity.
@see android.transition.Transition#setEpicenterCallback(
android.transition.Transition.EpicenterCallback)
| ActivityOptions::makeSceneTransitionAnimation | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
public static void stopSharedElementAnimation(Window window) {
final View decorView = window.getDecorView();
if (decorView == null) {
return;
}
final ExitTransitionCoordinator exit = (ExitTransitionCoordinator)
decorView.getTag(com.android.internal.R.id.cross_task_transition);
if (exit != null) {
exit.cancelPendingTransitions();
decorView.setTagInternal(com.android.internal.R.id.cross_task_transition, null);
TransitionManager.endTransitions((ViewGroup) decorView);
exit.resetViews();
exit.clearState();
decorView.setVisibility(View.VISIBLE);
}
} |
This method should be called when the
{@link #startSharedElementAnimation(Window, ExitTransitionCallbacks, Pair[])}
animation must be stopped and the Views reset. This can happen if there was an error
from startActivity or a springboard activity and the animation should stop and reset.
@hide
| ActivityOptions::stopSharedElementAnimation | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
static ActivityOptions makeSceneTransitionAnimation(Activity activity,
ExitTransitionCoordinator exitCoordinator, ArrayList<String> sharedElementNames,
int resultCode, Intent resultData) {
ActivityOptions opts = new ActivityOptions();
opts.mAnimationType = ANIM_SCENE_TRANSITION;
opts.mSharedElementNames = sharedElementNames;
opts.mTransitionReceiver = exitCoordinator;
opts.mIsReturning = true;
opts.mResultCode = resultCode;
opts.mResultData = resultData;
if (activity == null) {
opts.mExitCoordinatorIndex = -1;
} else {
opts.mExitCoordinatorIndex =
activity.mActivityTransitionState.addExitTransitionCoordinator(exitCoordinator);
}
return opts;
} |
Needed for virtual devices because they can be slow enough that the 1 second timeout
triggers when it doesn't on normal devices.
@hide
@TestApi
public static void setExitTransitionTimeout(long timeoutMillis) {
ExitTransitionCoordinator.sMaxWaitMillis = timeoutMillis;
}
/** @hide | ActivityOptions::makeSceneTransitionAnimation | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
public static ActivityOptions makeTaskLaunchBehind() {
final ActivityOptions opts = new ActivityOptions();
opts.mAnimationType = ANIM_LAUNCH_TASK_BEHIND;
return opts;
} |
If set along with Intent.FLAG_ACTIVITY_NEW_DOCUMENT then the task being launched will not be
presented to the user but will instead be only available through the recents task list.
In addition, the new task wil be affiliated with the launching activity's task.
Affiliated tasks are grouped together in the recents task list.
<p>This behavior is not supported for activities with {@link
android.R.styleable#AndroidManifestActivity_launchMode launchMode} values of
<code>singleInstance</code> or <code>singleTask</code>.
| ActivityOptions::makeTaskLaunchBehind | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
public static ActivityOptions makeBasic() {
final ActivityOptions opts = new ActivityOptions();
return opts;
} |
Create a basic ActivityOptions that has no special animation associated with it.
Other options can still be set.
| ActivityOptions::makeBasic | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
public boolean getLaunchTaskBehind() {
return mAnimationType == ANIM_LAUNCH_TASK_BEHIND;
} |
Create an {@link ActivityOptions} instance that lets the application control the entire
transition using a {@link IRemoteTransition}.
@hide
@RequiresPermission(CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS)
public static ActivityOptions makeRemoteTransition(IRemoteTransition remoteTransition) {
final ActivityOptions opts = new ActivityOptions();
opts.mRemoteTransition = remoteTransition;
return opts;
}
/** @hide | ActivityOptions::getLaunchTaskBehind | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
public ActivityOptions(Bundle opts) {
// If the remote side sent us bad parcelables, they won't get the
// results they want, which is their loss.
opts.setDefusable(true);
mPackageName = opts.getString(KEY_PACKAGE_NAME);
try {
mUsageTimeReport = opts.getParcelable(KEY_USAGE_TIME_REPORT);
} catch (RuntimeException e) {
Slog.w(TAG, e);
}
mLaunchBounds = opts.getParcelable(KEY_LAUNCH_BOUNDS);
mAnimationType = opts.getInt(KEY_ANIM_TYPE, ANIM_UNDEFINED);
switch (mAnimationType) {
case ANIM_CUSTOM:
mCustomEnterResId = opts.getInt(KEY_ANIM_ENTER_RES_ID, 0);
mCustomExitResId = opts.getInt(KEY_ANIM_EXIT_RES_ID, 0);
mAnimationStartedListener = IRemoteCallback.Stub.asInterface(
opts.getBinder(KEY_ANIM_START_LISTENER));
break;
case ANIM_CUSTOM_IN_PLACE:
mCustomInPlaceResId = opts.getInt(KEY_ANIM_IN_PLACE_RES_ID, 0);
break;
case ANIM_SCALE_UP:
case ANIM_CLIP_REVEAL:
mStartX = opts.getInt(KEY_ANIM_START_X, 0);
mStartY = opts.getInt(KEY_ANIM_START_Y, 0);
mWidth = opts.getInt(KEY_ANIM_WIDTH, 0);
mHeight = opts.getInt(KEY_ANIM_HEIGHT, 0);
break;
case ANIM_THUMBNAIL_SCALE_UP:
case ANIM_THUMBNAIL_SCALE_DOWN:
case ANIM_THUMBNAIL_ASPECT_SCALE_UP:
case ANIM_THUMBNAIL_ASPECT_SCALE_DOWN:
// Unpackage the HardwareBuffer from the parceled thumbnail
final HardwareBuffer buffer = opts.getParcelable(KEY_ANIM_THUMBNAIL);
if (buffer != null) {
mThumbnail = Bitmap.wrapHardwareBuffer(buffer, null);
}
mStartX = opts.getInt(KEY_ANIM_START_X, 0);
mStartY = opts.getInt(KEY_ANIM_START_Y, 0);
mWidth = opts.getInt(KEY_ANIM_WIDTH, 0);
mHeight = opts.getInt(KEY_ANIM_HEIGHT, 0);
mAnimationStartedListener = IRemoteCallback.Stub.asInterface(
opts.getBinder(KEY_ANIM_START_LISTENER));
break;
case ANIM_SCENE_TRANSITION:
mTransitionReceiver = opts.getParcelable(KEY_TRANSITION_COMPLETE_LISTENER);
mIsReturning = opts.getBoolean(KEY_TRANSITION_IS_RETURNING, false);
mSharedElementNames = opts.getStringArrayList(KEY_TRANSITION_SHARED_ELEMENTS);
mResultData = opts.getParcelable(KEY_RESULT_DATA);
mResultCode = opts.getInt(KEY_RESULT_CODE);
mExitCoordinatorIndex = opts.getInt(KEY_EXIT_COORDINATOR_INDEX);
break;
}
mLockTaskMode = opts.getBoolean(KEY_LOCK_TASK_MODE, false);
mLaunchDisplayId = opts.getInt(KEY_LAUNCH_DISPLAY_ID, INVALID_DISPLAY);
mCallerDisplayId = opts.getInt(KEY_CALLER_DISPLAY_ID, INVALID_DISPLAY);
mLaunchTaskDisplayArea = opts.getParcelable(KEY_LAUNCH_TASK_DISPLAY_AREA_TOKEN);
mLaunchRootTask = opts.getParcelable(KEY_LAUNCH_ROOT_TASK_TOKEN);
mLaunchWindowingMode = opts.getInt(KEY_LAUNCH_WINDOWING_MODE, WINDOWING_MODE_UNDEFINED);
mLaunchActivityType = opts.getInt(KEY_LAUNCH_ACTIVITY_TYPE, ACTIVITY_TYPE_UNDEFINED);
mLaunchTaskId = opts.getInt(KEY_LAUNCH_TASK_ID, -1);
mPendingIntentLaunchFlags = opts.getInt(KEY_PENDING_INTENT_LAUNCH_FLAGS, 0);
mTaskAlwaysOnTop = opts.getBoolean(KEY_TASK_ALWAYS_ON_TOP, false);
mTaskOverlay = opts.getBoolean(KEY_TASK_OVERLAY, false);
mTaskOverlayCanResume = opts.getBoolean(KEY_TASK_OVERLAY_CAN_RESUME, false);
mAvoidMoveToFront = opts.getBoolean(KEY_AVOID_MOVE_TO_FRONT, false);
mFreezeRecentTasksReordering = opts.getBoolean(KEY_FREEZE_RECENT_TASKS_REORDERING, false);
mDisallowEnterPictureInPictureWhileLaunching = opts.getBoolean(
KEY_DISALLOW_ENTER_PICTURE_IN_PICTURE_WHILE_LAUNCHING, false);
mApplyActivityFlagsForBubbles = opts.getBoolean(
KEY_APPLY_ACTIVITY_FLAGS_FOR_BUBBLES, false);
if (opts.containsKey(KEY_ANIM_SPECS)) {
Parcelable[] specs = opts.getParcelableArray(KEY_ANIM_SPECS);
mAnimSpecs = new AppTransitionAnimationSpec[specs.length];
for (int i = specs.length - 1; i >= 0; i--) {
mAnimSpecs[i] = (AppTransitionAnimationSpec) specs[i];
}
}
if (opts.containsKey(KEY_ANIMATION_FINISHED_LISTENER)) {
mAnimationFinishedListener = IRemoteCallback.Stub.asInterface(
opts.getBinder(KEY_ANIMATION_FINISHED_LISTENER));
}
mSourceInfo = opts.getParcelable(KEY_SOURCE_INFO);
mRotationAnimationHint = opts.getInt(KEY_ROTATION_ANIMATION_HINT, -1);
mAppVerificationBundle = opts.getBundle(KEY_INSTANT_APP_VERIFICATION_BUNDLE);
if (opts.containsKey(KEY_SPECS_FUTURE)) {
mSpecsFuture = IAppTransitionAnimationSpecsFuture.Stub.asInterface(opts.getBinder(
KEY_SPECS_FUTURE));
}
mRemoteAnimationAdapter = opts.getParcelable(KEY_REMOTE_ANIMATION_ADAPTER);
mLaunchCookie = opts.getBinder(KEY_LAUNCH_COOKIE);
mRemoteTransition = IRemoteTransition.Stub.asInterface(opts.getBinder(
KEY_REMOTE_TRANSITION));
mOverrideTaskTransition = opts.getBoolean(KEY_OVERRIDE_TASK_TRANSITION);
mSplashScreenThemeResName = opts.getString(KEY_SPLASH_SCREEN_THEME);
mRemoveWithTaskOrganizer = opts.getBoolean(KEY_REMOVE_WITH_TASK_ORGANIZER);
mLaunchedFromBubble = opts.getBoolean(KEY_LAUNCHED_FROM_BUBBLE);
mTransientLaunch = opts.getBoolean(KEY_TRANSIENT_LAUNCH);
mSplashScreenStyle = opts.getInt(KEY_SPLASH_SCREEN_STYLE);
} |
Create an {@link ActivityOptions} instance that lets the application control the entire
transition using a {@link IRemoteTransition}.
@hide
@RequiresPermission(CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS)
public static ActivityOptions makeRemoteTransition(IRemoteTransition remoteTransition) {
final ActivityOptions opts = new ActivityOptions();
opts.mRemoteTransition = remoteTransition;
return opts;
}
/** @hide
public boolean getLaunchTaskBehind() {
return mAnimationType == ANIM_LAUNCH_TASK_BEHIND;
}
private ActivityOptions() {
}
/** @hide | ActivityOptions::ActivityOptions | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
public ActivityOptions setLaunchBounds(@Nullable Rect screenSpacePixelRect) {
mLaunchBounds = screenSpacePixelRect != null ? new Rect(screenSpacePixelRect) : null;
return this;
} |
Sets the bounds (window size and position) that the activity should be launched in.
Rect position should be provided in pixels and in screen coordinates.
Set to {@code null} to explicitly launch fullscreen.
<p>
<strong>NOTE:</strong> This value is ignored on devices that don't have
{@link android.content.pm.PackageManager#FEATURE_FREEFORM_WINDOW_MANAGEMENT} or
{@link android.content.pm.PackageManager#FEATURE_PICTURE_IN_PICTURE} enabled.
@param screenSpacePixelRect launch bounds or {@code null} for fullscreen
@return {@code this} {@link ActivityOptions} instance
| ActivityOptions::setLaunchBounds | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
public String getPackageName() {
return mPackageName;
} |
Sets the bounds (window size and position) that the activity should be launched in.
Rect position should be provided in pixels and in screen coordinates.
Set to {@code null} to explicitly launch fullscreen.
<p>
<strong>NOTE:</strong> This value is ignored on devices that don't have
{@link android.content.pm.PackageManager#FEATURE_FREEFORM_WINDOW_MANAGEMENT} or
{@link android.content.pm.PackageManager#FEATURE_PICTURE_IN_PICTURE} enabled.
@param screenSpacePixelRect launch bounds or {@code null} for fullscreen
@return {@code this} {@link ActivityOptions} instance
public ActivityOptions setLaunchBounds(@Nullable Rect screenSpacePixelRect) {
mLaunchBounds = screenSpacePixelRect != null ? new Rect(screenSpacePixelRect) : null;
return this;
}
/** @hide | ActivityOptions::getPackageName | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
public int getAnimationType() {
return mAnimationType;
} |
Returns the bounds that should be used to launch the activity.
@see #setLaunchBounds(Rect)
@return Bounds used to launch the activity.
@Nullable
public Rect getLaunchBounds() {
return mLaunchBounds;
}
/** @hide | ActivityOptions::getAnimationType | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
public int getCustomEnterResId() {
return mCustomEnterResId;
} |
Returns the bounds that should be used to launch the activity.
@see #setLaunchBounds(Rect)
@return Bounds used to launch the activity.
@Nullable
public Rect getLaunchBounds() {
return mLaunchBounds;
}
/** @hide
public int getAnimationType() {
return mAnimationType;
}
/** @hide | ActivityOptions::getCustomEnterResId | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
public int getCustomExitResId() {
return mCustomExitResId;
} |
Returns the bounds that should be used to launch the activity.
@see #setLaunchBounds(Rect)
@return Bounds used to launch the activity.
@Nullable
public Rect getLaunchBounds() {
return mLaunchBounds;
}
/** @hide
public int getAnimationType() {
return mAnimationType;
}
/** @hide
public int getCustomEnterResId() {
return mCustomEnterResId;
}
/** @hide | ActivityOptions::getCustomExitResId | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
public int getCustomInPlaceResId() {
return mCustomInPlaceResId;
} |
Returns the bounds that should be used to launch the activity.
@see #setLaunchBounds(Rect)
@return Bounds used to launch the activity.
@Nullable
public Rect getLaunchBounds() {
return mLaunchBounds;
}
/** @hide
public int getAnimationType() {
return mAnimationType;
}
/** @hide
public int getCustomEnterResId() {
return mCustomEnterResId;
}
/** @hide
public int getCustomExitResId() {
return mCustomExitResId;
}
/** @hide | ActivityOptions::getCustomInPlaceResId | java | Reginer/aosp-android-jar | android-31/src/android/app/ActivityOptions.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/app/ActivityOptions.java | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.