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 static IsoDep get(Tag tag) {
if (!tag.hasTech(TagTechnology.ISO_DEP)) return null;
try {
return new IsoDep(tag);
} catch (RemoteException e) {
return null;
}
} |
Get an instance of {@link IsoDep} for the given tag.
<p>Does not cause any RF activity and does not block.
<p>Returns null if {@link IsoDep} was not enumerated in {@link Tag#getTechList}.
This indicates the tag does not support ISO-DEP.
@param tag an ISO-DEP compatible tag
@return ISO-DEP object
| IsoDep::get | java | Reginer/aosp-android-jar | android-32/src/android/nfc/tech/IsoDep.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/nfc/tech/IsoDep.java | MIT |
public IsoDep(Tag tag)
throws RemoteException {
super(tag, TagTechnology.ISO_DEP);
Bundle extras = tag.getTechExtras(TagTechnology.ISO_DEP);
if (extras != null) {
mHiLayerResponse = extras.getByteArray(EXTRA_HI_LAYER_RESP);
mHistBytes = extras.getByteArray(EXTRA_HIST_BYTES);
}
} |
Get an instance of {@link IsoDep} for the given tag.
<p>Does not cause any RF activity and does not block.
<p>Returns null if {@link IsoDep} was not enumerated in {@link Tag#getTechList}.
This indicates the tag does not support ISO-DEP.
@param tag an ISO-DEP compatible tag
@return ISO-DEP object
public static IsoDep get(Tag tag) {
if (!tag.hasTech(TagTechnology.ISO_DEP)) return null;
try {
return new IsoDep(tag);
} catch (RemoteException e) {
return null;
}
}
/** @hide | IsoDep::IsoDep | java | Reginer/aosp-android-jar | android-32/src/android/nfc/tech/IsoDep.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/nfc/tech/IsoDep.java | MIT |
public void setTimeout(int timeout) {
try {
int err = mTag.getTagService().setTimeout(TagTechnology.ISO_DEP, timeout);
if (err != ErrorCodes.SUCCESS) {
throw new IllegalArgumentException("The supplied timeout is not valid");
}
} catch (RemoteException e) {
Log.e(TAG, "NFC service dead", e);
}
} |
Set the timeout of {@link #transceive} in milliseconds.
<p>The timeout only applies to ISO-DEP {@link #transceive}, and is
reset to a default value when {@link #close} is called.
<p>Setting a longer timeout may be useful when performing
transactions that require a long processing time on the tag
such as key generation.
<p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
@param timeout timeout value in milliseconds
| IsoDep::setTimeout | java | Reginer/aosp-android-jar | android-32/src/android/nfc/tech/IsoDep.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/nfc/tech/IsoDep.java | MIT |
public int getTimeout() {
try {
return mTag.getTagService().getTimeout(TagTechnology.ISO_DEP);
} catch (RemoteException e) {
Log.e(TAG, "NFC service dead", e);
return 0;
}
} |
Get the current timeout for {@link #transceive} in milliseconds.
<p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
@return timeout value in milliseconds
| IsoDep::getTimeout | java | Reginer/aosp-android-jar | android-32/src/android/nfc/tech/IsoDep.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/nfc/tech/IsoDep.java | MIT |
public byte[] getHistoricalBytes() {
return mHistBytes;
} |
Return the ISO-DEP historical bytes for {@link NfcA} tags.
<p>Does not cause any RF activity and does not block.
<p>The historical bytes can be used to help identify a tag. They are present
only on {@link IsoDep} tags that are based on {@link NfcA} RF technology.
If this tag is not {@link NfcA} then null is returned.
<p>In ISO 14443-4 terminology, the historical bytes are a subset of the RATS
response.
@return ISO-DEP historical bytes, or null if this is not a {@link NfcA} tag
| IsoDep::getHistoricalBytes | java | Reginer/aosp-android-jar | android-32/src/android/nfc/tech/IsoDep.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/nfc/tech/IsoDep.java | MIT |
public byte[] getHiLayerResponse() {
return mHiLayerResponse;
} |
Return the higher layer response bytes for {@link NfcB} tags.
<p>Does not cause any RF activity and does not block.
<p>The higher layer response bytes can be used to help identify a tag.
They are present only on {@link IsoDep} tags that are based on {@link NfcB}
RF technology. If this tag is not {@link NfcB} then null is returned.
<p>In ISO 14443-4 terminology, the higher layer bytes are a subset of the
ATTRIB response.
@return ISO-DEP historical bytes, or null if this is not a {@link NfcB} tag
| IsoDep::getHiLayerResponse | java | Reginer/aosp-android-jar | android-32/src/android/nfc/tech/IsoDep.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/nfc/tech/IsoDep.java | MIT |
public byte[] transceive(byte[] data) throws IOException {
return transceive(data, true);
} |
Send raw ISO-DEP data to the tag and receive the response.
<p>Applications must only send the INF payload, and not the start of frame and
end of frame indicators. Applications do not need to fragment the payload, it
will be automatically fragmented and defragmented by {@link #transceive} if
it exceeds FSD/FSC limits.
<p>Use {@link #getMaxTransceiveLength} to retrieve the maximum number of bytes
that can be sent with {@link #transceive}.
<p>This is an I/O operation and will block until complete. It must
not be called from the main application thread. A blocked call will be canceled with
{@link IOException} if {@link #close} is called from another thread.
<p class="note">Requires the {@link android.Manifest.permission#NFC} permission.
@param data command bytes to send, must not be null
@return response bytes received, will not be null
@throws TagLostException if the tag leaves the field
@throws IOException if there is an I/O failure, or this operation is canceled
| IsoDep::transceive | java | Reginer/aosp-android-jar | android-32/src/android/nfc/tech/IsoDep.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/nfc/tech/IsoDep.java | MIT |
public int getMaxTransceiveLength() {
return getMaxTransceiveLengthInternal();
} |
Return the maximum number of bytes that can be sent with {@link #transceive}.
@return the maximum number of bytes that can be sent with {@link #transceive}.
| IsoDep::getMaxTransceiveLength | java | Reginer/aosp-android-jar | android-32/src/android/nfc/tech/IsoDep.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/nfc/tech/IsoDep.java | MIT |
public boolean isExtendedLengthApduSupported() {
try {
return mTag.getTagService().getExtendedLengthApdusSupported();
} catch (RemoteException e) {
Log.e(TAG, "NFC service dead", e);
return false;
}
} |
<p>Standard APDUs have a 1-byte length field, allowing a maximum of
255 payload bytes, which results in a maximum APDU length of 261 bytes.
<p>Extended length APDUs have a 3-byte length field, allowing 65535
payload bytes.
<p>Some NFC adapters, like the one used in the Nexus S and the Galaxy Nexus
do not support extended length APDUs. They are expected to be well-supported
in the future though. Use this method to check for extended length APDU
support.
@return whether the NFC adapter on this device supports extended length APDUs.
| IsoDep::isExtendedLengthApduSupported | java | Reginer/aosp-android-jar | android-32/src/android/nfc/tech/IsoDep.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/nfc/tech/IsoDep.java | MIT |
public void observe(Uri uri, int what) {
mUriEventMap.put(uri, what);
final ContentResolver resolver = mContext.getContentResolver();
resolver.registerContentObserver(uri, false, this);
} |
Start observing a content.
@param uri Content URI
@param what The event to fire if the content changes
| SettingsObserver::observe | java | Reginer/aosp-android-jar | android-31/src/com/android/internal/telephony/SettingsObserver.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/internal/telephony/SettingsObserver.java | MIT |
public void unobserve() {
final ContentResolver resolver = mContext.getContentResolver();
resolver.unregisterContentObserver(this);
} |
Stop observing a content.
| SettingsObserver::unobserve | java | Reginer/aosp-android-jar | android-31/src/com/android/internal/telephony/SettingsObserver.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/internal/telephony/SettingsObserver.java | MIT |
public AccessControlProfileId(int id) {
this.mId = id;
} |
Constructs a new object holding a numerical identifier.
<p>The identifier must be a non-negative number and less than 32.
@param id the identifier.
| AccessControlProfileId::AccessControlProfileId | java | Reginer/aosp-android-jar | android-35/src/android/security/identity/AccessControlProfileId.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/security/identity/AccessControlProfileId.java | MIT |
public int getId() {
return this.mId;
} |
Gets the numerical identifier wrapped by this object.
@return the identifier.
| AccessControlProfileId::getId | java | Reginer/aosp-android-jar | android-35/src/android/security/identity/AccessControlProfileId.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/security/identity/AccessControlProfileId.java | MIT |
public elementreplaceattributewithself(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
| elementreplaceattributewithself::elementreplaceattributewithself | java | Reginer/aosp-android-jar | android-33/src/org/w3c/domts/level1/core/elementreplaceattributewithself.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/org/w3c/domts/level1/core/elementreplaceattributewithself.java | MIT |
public void runTest() throws Throwable {
Document doc;
NodeList elementList;
Element testEmployee;
Attr streetAttr;
Attr replacedAttr;
doc = (Document) load("staff", true);
elementList = doc.getElementsByTagName("address");
testEmployee = (Element) elementList.item(2);
streetAttr = testEmployee.getAttributeNode("street");
replacedAttr = testEmployee.setAttributeNode(streetAttr);
assertSame("replacedAttr", streetAttr, replacedAttr);
} |
Runs the test case.
@throws Throwable Any uncaught exception causes test to fail
| elementreplaceattributewithself::runTest | java | Reginer/aosp-android-jar | android-33/src/org/w3c/domts/level1/core/elementreplaceattributewithself.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/org/w3c/domts/level1/core/elementreplaceattributewithself.java | MIT |
public String getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/elementreplaceattributewithself";
} |
Gets URI that identifies the test.
@return uri identifier of test
| elementreplaceattributewithself::getTargetURI | java | Reginer/aosp-android-jar | android-33/src/org/w3c/domts/level1/core/elementreplaceattributewithself.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/org/w3c/domts/level1/core/elementreplaceattributewithself.java | MIT |
public static void main(final String[] args) {
DOMTestCase.doMain(elementreplaceattributewithself.class, args);
} |
Runs this test from the command line.
@param args command line arguments
| elementreplaceattributewithself::main | java | Reginer/aosp-android-jar | android-33/src/org/w3c/domts/level1/core/elementreplaceattributewithself.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/org/w3c/domts/level1/core/elementreplaceattributewithself.java | MIT |
public String getId() {
return mId;
} |
Gets the id.
| UserData::getId | java | Reginer/aosp-android-jar | android-34/src/android/service/autofill/UserData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/service/autofill/UserData.java | MIT |
public void dump(String prefix, PrintWriter pw) {
pw.print(prefix); pw.print("id: "); pw.print(mId);
pw.print(prefix); pw.print("Default Algorithm: "); pw.print(mDefaultAlgorithm);
pw.print(prefix); pw.print("Default Args"); pw.print(mDefaultArgs);
if (mCategoryAlgorithms != null && mCategoryAlgorithms.size() > 0) {
pw.print(prefix); pw.print("Algorithms per category: ");
for (int i = 0; i < mCategoryAlgorithms.size(); i++) {
pw.print(prefix); pw.print(prefix); pw.print(mCategoryAlgorithms.keyAt(i));
pw.print(": "); pw.println(Helper.getRedacted(mCategoryAlgorithms.valueAt(i)));
pw.print("args="); pw.print(mCategoryArgs.get(mCategoryAlgorithms.keyAt(i)));
}
}
// Cannot disclose field ids or values because they could contain PII
pw.print(prefix); pw.print("Field ids size: "); pw.println(mCategoryIds.length);
for (int i = 0; i < mCategoryIds.length; i++) {
pw.print(prefix); pw.print(prefix); pw.print(i); pw.print(": ");
pw.println(Helper.getRedacted(mCategoryIds[i]));
}
pw.print(prefix); pw.print("Values size: "); pw.println(mValues.length);
for (int i = 0; i < mValues.length; i++) {
pw.print(prefix); pw.print(prefix); pw.print(i); pw.print(": ");
pw.println(Helper.getRedacted(mValues[i]));
}
} |
Gets the id.
public String getId() {
return mId;
}
/** @hide
@Override
public String[] getCategoryIds() {
return mCategoryIds;
}
/** @hide
@Override
public String[] getValues() {
return mValues;
}
/** @hide
@TestApi
@Override
public ArrayMap<String, String> getFieldClassificationAlgorithms() {
return mCategoryAlgorithms;
}
/** @hide
@Override
public ArrayMap<String, Bundle> getFieldClassificationArgs() {
return mCategoryArgs;
}
/** @hide | UserData::dump | java | Reginer/aosp-android-jar | android-34/src/android/service/autofill/UserData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/service/autofill/UserData.java | MIT |
public static void dumpConstraints(String prefix, PrintWriter pw) {
pw.print(prefix); pw.print("maxUserDataSize: "); pw.println(getMaxUserDataSize());
pw.print(prefix); pw.print("maxFieldClassificationIdsSize: ");
pw.println(getMaxFieldClassificationIdsSize());
pw.print(prefix); pw.print("maxCategoryCount: "); pw.println(getMaxCategoryCount());
pw.print(prefix); pw.print("minValueLength: "); pw.println(getMinValueLength());
pw.print(prefix); pw.print("maxValueLength: "); pw.println(getMaxValueLength());
} |
Gets the id.
public String getId() {
return mId;
}
/** @hide
@Override
public String[] getCategoryIds() {
return mCategoryIds;
}
/** @hide
@Override
public String[] getValues() {
return mValues;
}
/** @hide
@TestApi
@Override
public ArrayMap<String, String> getFieldClassificationAlgorithms() {
return mCategoryAlgorithms;
}
/** @hide
@Override
public ArrayMap<String, Bundle> getFieldClassificationArgs() {
return mCategoryArgs;
}
/** @hide
public void dump(String prefix, PrintWriter pw) {
pw.print(prefix); pw.print("id: "); pw.print(mId);
pw.print(prefix); pw.print("Default Algorithm: "); pw.print(mDefaultAlgorithm);
pw.print(prefix); pw.print("Default Args"); pw.print(mDefaultArgs);
if (mCategoryAlgorithms != null && mCategoryAlgorithms.size() > 0) {
pw.print(prefix); pw.print("Algorithms per category: ");
for (int i = 0; i < mCategoryAlgorithms.size(); i++) {
pw.print(prefix); pw.print(prefix); pw.print(mCategoryAlgorithms.keyAt(i));
pw.print(": "); pw.println(Helper.getRedacted(mCategoryAlgorithms.valueAt(i)));
pw.print("args="); pw.print(mCategoryArgs.get(mCategoryAlgorithms.keyAt(i)));
}
}
// Cannot disclose field ids or values because they could contain PII
pw.print(prefix); pw.print("Field ids size: "); pw.println(mCategoryIds.length);
for (int i = 0; i < mCategoryIds.length; i++) {
pw.print(prefix); pw.print(prefix); pw.print(i); pw.print(": ");
pw.println(Helper.getRedacted(mCategoryIds[i]));
}
pw.print(prefix); pw.print("Values size: "); pw.println(mValues.length);
for (int i = 0; i < mValues.length; i++) {
pw.print(prefix); pw.print(prefix); pw.print(i); pw.print(": ");
pw.println(Helper.getRedacted(mValues[i]));
}
}
/** @hide | UserData::dumpConstraints | java | Reginer/aosp-android-jar | android-34/src/android/service/autofill/UserData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/service/autofill/UserData.java | MIT |
public Builder(@NonNull String id, @NonNull String value, @NonNull String categoryId) {
mId = checkNotEmpty("id", id);
checkNotEmpty("categoryId", categoryId);
checkValidValue(value);
final int maxUserDataSize = getMaxUserDataSize();
mCategoryIds = new ArrayList<>(maxUserDataSize);
mValues = new ArrayList<>(maxUserDataSize);
mUniqueValueCategoryPairs = new ArraySet<>(maxUserDataSize);
mUniqueCategoryIds = new ArraySet<>(getMaxCategoryCount());
addMapping(value, categoryId);
} |
Creates a new builder for the user data used for <a href="#FieldClassification">field
classification</a>.
<p>The user data must contain at least one pair of {@code value} -> {@code categoryId},
and more pairs can be added through the {@link #add(String, String)} method. For example:
<pre class="prettyprint">
new UserData.Builder("v1", "Bart Simpson", "name")
.add("[email protected]", "email")
.add("[email protected]", "email")
.build();
</pre>
@param id id used to identify the whole {@link UserData} object. This id is also returned
by {@link AutofillManager#getUserDataId()}, which can be used to check if the
{@link UserData} is up-to-date without fetching the whole object (through
{@link AutofillManager#getUserData()}).
@param value value of the user data.
@param categoryId autofill field category.
@throws IllegalArgumentException if any of the following occurs:
<ul>
<li>{@code id} is empty</li>
<li>{@code categoryId} is empty</li>
<li>{@code value} is empty</li>
<li>the length of {@code value} is lower than {@link UserData#getMinValueLength()}</li>
<li>the length of {@code value} is higher than
{@link UserData#getMaxValueLength()}</li>
</ul>
| Builder::Builder | java | Reginer/aosp-android-jar | android-34/src/android/service/autofill/UserData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/service/autofill/UserData.java | MIT |
private VoicemailContract() {
} |
The contract between the voicemail provider and applications. Contains
definitions for the supported URIs and columns.
<P>The content providers exposes two tables through this interface:
<ul>
<li> Voicemails table: This stores the actual voicemail records. The
columns and URIs for accessing this table are defined by the
{@link Voicemails} class.
</li>
<li> Status table: This provides a way for the voicemail source application
to convey its current state to the system. The columns and URIS for
accessing this table are defined by the {@link Status} class.
</li>
</ul>
<P> The minimum permission needed to access this content provider is
{@link android.Manifest.permission#ADD_VOICEMAIL} or carrier privileges (see
{@link android.telephony.TelephonyManager#hasCarrierPrivileges}).
<P>Voicemails are inserted by what is called as a "voicemail source"
application, which is responsible for syncing voicemail data between a remote
server and the local voicemail content provider. "voicemail source"
application should always set the {@link #PARAM_KEY_SOURCE_PACKAGE} in the
URI to identify its package.
<P>In addition to the {@link ContentObserver} notifications the voicemail
provider also generates broadcast intents to notify change for applications
that are not active and therefore cannot listen to ContentObserver
notifications. Broadcast intents with following actions are generated:
<ul>
<li> {@link #ACTION_NEW_VOICEMAIL} is generated for each new voicemail
inserted.
</li>
<li> {@link Intent#ACTION_PROVIDER_CHANGED} is generated for any change
made into the database, including new voicemail.
</li>
</ul>
public class VoicemailContract {
/** Not instantiable. | VoicemailContract::VoicemailContract | java | Reginer/aosp-android-jar | android-31/src/android/provider/VoicemailContract.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/provider/VoicemailContract.java | MIT |
private Voicemails() {
} |
Name of the source package field, which must be same across all voicemail related tables.
This is an internal field.
@hide
public static final String SOURCE_PACKAGE_FIELD = "source_package";
/** Defines fields exposed through the /voicemail path of this content provider.
public static final class Voicemails implements BaseColumns, OpenableColumns {
/** Not instantiable. | Voicemails::Voicemails | java | Reginer/aosp-android-jar | android-31/src/android/provider/VoicemailContract.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/provider/VoicemailContract.java | MIT |
public static Uri buildSourceUri(String packageName) {
return Voicemails.CONTENT_URI.buildUpon()
.appendQueryParameter(PARAM_KEY_SOURCE_PACKAGE, packageName)
.build();
} |
A convenience method to build voicemail URI specific to a source package by appending
{@link VoicemailContract#PARAM_KEY_SOURCE_PACKAGE} param to the base URI.
| Voicemails::buildSourceUri | java | Reginer/aosp-android-jar | android-31/src/android/provider/VoicemailContract.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/provider/VoicemailContract.java | MIT |
public static Uri insert(Context context, Voicemail voicemail) {
ContentResolver contentResolver = context.getContentResolver();
ContentValues contentValues = getContentValues(voicemail);
return contentResolver.insert(buildSourceUri(context.getPackageName()), contentValues);
} |
Inserts a new voicemail into the voicemail content provider.
@param context The context of the app doing the inserting
@param voicemail Data to be inserted
@return {@link Uri} of the newly inserted {@link Voicemail}
@hide
| Voicemails::insert | java | Reginer/aosp-android-jar | android-31/src/android/provider/VoicemailContract.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/provider/VoicemailContract.java | MIT |
public static int insert(Context context, List<Voicemail> voicemails) {
ContentResolver contentResolver = context.getContentResolver();
int count = voicemails.size();
for (int i = 0; i < count; i++) {
ContentValues contentValues = getContentValues(voicemails.get(i));
contentResolver.insert(buildSourceUri(context.getPackageName()), contentValues);
}
return count;
} |
Inserts a list of voicemails into the voicemail content provider.
@param context The context of the app doing the inserting
@param voicemails Data to be inserted
@return the number of voicemails inserted
@hide
| Voicemails::insert | java | Reginer/aosp-android-jar | android-31/src/android/provider/VoicemailContract.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/provider/VoicemailContract.java | MIT |
public static int deleteAll(Context context) {
return context.getContentResolver().delete(
buildSourceUri(context.getPackageName()), "", new String[0]);
} |
Clears all voicemails accessible to this voicemail content provider for the calling
package. By default, a package only has permission to delete voicemails it inserted.
@return the number of voicemails deleted
@hide
| Voicemails::deleteAll | java | Reginer/aosp-android-jar | android-31/src/android/provider/VoicemailContract.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/provider/VoicemailContract.java | MIT |
private static ContentValues getContentValues(Voicemail voicemail) {
ContentValues contentValues = new ContentValues();
contentValues.put(Voicemails.DATE, String.valueOf(voicemail.getTimestampMillis()));
contentValues.put(Voicemails.NUMBER, voicemail.getNumber());
contentValues.put(Voicemails.DURATION, String.valueOf(voicemail.getDuration()));
contentValues.put(Voicemails.SOURCE_PACKAGE, voicemail.getSourcePackage());
contentValues.put(Voicemails.SOURCE_DATA, voicemail.getSourceData());
contentValues.put(Voicemails.IS_READ, voicemail.isRead() ? 1 : 0);
PhoneAccountHandle phoneAccount = voicemail.getPhoneAccount();
if (phoneAccount != null) {
contentValues.put(Voicemails.PHONE_ACCOUNT_COMPONENT_NAME,
phoneAccount.getComponentName().flattenToString());
contentValues.put(Voicemails.PHONE_ACCOUNT_ID, phoneAccount.getId());
}
if (voicemail.getTranscription() != null) {
contentValues.put(Voicemails.TRANSCRIPTION, voicemail.getTranscription());
}
return contentValues;
} |
Maps structured {@link Voicemail} to {@link ContentValues} in content provider.
| Voicemails::getContentValues | java | Reginer/aosp-android-jar | android-31/src/android/provider/VoicemailContract.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/provider/VoicemailContract.java | MIT |
private Status() {
} |
Maps structured {@link Voicemail} to {@link ContentValues} in content provider.
private static ContentValues getContentValues(Voicemail voicemail) {
ContentValues contentValues = new ContentValues();
contentValues.put(Voicemails.DATE, String.valueOf(voicemail.getTimestampMillis()));
contentValues.put(Voicemails.NUMBER, voicemail.getNumber());
contentValues.put(Voicemails.DURATION, String.valueOf(voicemail.getDuration()));
contentValues.put(Voicemails.SOURCE_PACKAGE, voicemail.getSourcePackage());
contentValues.put(Voicemails.SOURCE_DATA, voicemail.getSourceData());
contentValues.put(Voicemails.IS_READ, voicemail.isRead() ? 1 : 0);
PhoneAccountHandle phoneAccount = voicemail.getPhoneAccount();
if (phoneAccount != null) {
contentValues.put(Voicemails.PHONE_ACCOUNT_COMPONENT_NAME,
phoneAccount.getComponentName().flattenToString());
contentValues.put(Voicemails.PHONE_ACCOUNT_ID, phoneAccount.getId());
}
if (voicemail.getTranscription() != null) {
contentValues.put(Voicemails.TRANSCRIPTION, voicemail.getTranscription());
}
return contentValues;
}
}
/** Defines fields exposed through the /status path of this content provider.
public static final class Status implements BaseColumns {
/** URI to insert/retrieve status of voicemail source.
public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/status");
/** The MIME type for a collection of voicemail source statuses.
public static final String DIR_TYPE = "vnd.android.cursor.dir/voicemail.source.status";
/** The MIME type for a single voicemail source status entry.
public static final String ITEM_TYPE = "vnd.android.cursor.item/voicemail.source.status";
/** Not instantiable. | Status::Status | java | Reginer/aosp-android-jar | android-31/src/android/provider/VoicemailContract.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/provider/VoicemailContract.java | MIT |
public static Uri buildSourceUri(String packageName) {
return Status.CONTENT_URI.buildUpon()
.appendQueryParameter(PARAM_KEY_SOURCE_PACKAGE, packageName).build();
} |
A convenience method to build status URI specific to a source package by appending
{@link VoicemailContract#PARAM_KEY_SOURCE_PACKAGE} param to the base URI.
| Status::buildSourceUri | java | Reginer/aosp-android-jar | android-31/src/android/provider/VoicemailContract.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/provider/VoicemailContract.java | MIT |
public void pack(ByteBuffer byteBuffer) {
// The ByteOrder must have already been set by the caller. In most
// cases ByteOrder.nativeOrder() is correct, with the possible
// exception of usage within unittests.
byteBuffer.putInt(nlmsg_len);
byteBuffer.putShort(nlmsg_type);
byteBuffer.putShort(nlmsg_flags);
byteBuffer.putInt(nlmsg_seq);
byteBuffer.putInt(nlmsg_pid);
} |
Write netlink message header to ByteBuffer.
| StructNlMsgHdr::pack | java | Reginer/aosp-android-jar | android-34/src/com/android/net/module/util/netlink/StructNlMsgHdr.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/net/module/util/netlink/StructNlMsgHdr.java | MIT |
protected GeneralDigest()
{
xBufOff = 0;
} |
Standard constructor
| GeneralDigest::GeneralDigest | java | Reginer/aosp-android-jar | android-35/src/com/android/org/bouncycastle/crypto/digests/GeneralDigest.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/org/bouncycastle/crypto/digests/GeneralDigest.java | MIT |
protected GeneralDigest(GeneralDigest t)
{
copyIn(t);
} |
Copy constructor. We are using copy constructors in place
of the Object.clone() interface as this interface is not
supported by J2ME.
| GeneralDigest::GeneralDigest | java | Reginer/aosp-android-jar | android-35/src/com/android/org/bouncycastle/crypto/digests/GeneralDigest.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/org/bouncycastle/crypto/digests/GeneralDigest.java | MIT |
public boolean isIdleState() {
return mState == ScrollState.IDLE;
} |
There's no touch and there's no animation.
| Direction::isIdleState | java | Reginer/aosp-android-jar | android-34/src/com/android/systemui/qs/touch/SwipeDetector.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/systemui/qs/touch/SwipeDetector.java | MIT |
public float computeVelocity(float delta, long currentMillis) {
long previousMillis = mCurrentMillis;
mCurrentMillis = currentMillis;
float deltaTimeMillis = mCurrentMillis - previousMillis;
float velocity = (deltaTimeMillis > 0) ? (delta / deltaTimeMillis) : 0;
if (Math.abs(mVelocity) < 0.001f) {
mVelocity = velocity;
} else {
float alpha = computeDampeningFactor(deltaTimeMillis);
mVelocity = interpolate(mVelocity, velocity, alpha);
}
return mVelocity;
} |
Computes the damped velocity.
| SwipeDetector::computeVelocity | java | Reginer/aosp-android-jar | android-34/src/com/android/systemui/qs/touch/SwipeDetector.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/systemui/qs/touch/SwipeDetector.java | MIT |
private static float computeDampeningFactor(float deltaTime) {
return deltaTime / (SCROLL_VELOCITY_DAMPENING_RC + deltaTime);
} |
Returns a time-dependent dampening factor using delta time.
| SwipeDetector::computeDampeningFactor | java | Reginer/aosp-android-jar | android-34/src/com/android/systemui/qs/touch/SwipeDetector.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/systemui/qs/touch/SwipeDetector.java | MIT |
private static float interpolate(float from, float to, float alpha) {
return (1.0f - alpha) * from + alpha * to;
} |
Returns the linear interpolation between two values
| SwipeDetector::interpolate | java | Reginer/aosp-android-jar | android-34/src/com/android/systemui/qs/touch/SwipeDetector.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/systemui/qs/touch/SwipeDetector.java | MIT |
public SocketException(String msg) {
super(msg);
} |
Constructs a new {@code SocketException} with the
specified detail message.
@param msg the detail message.
| SocketException::SocketException | java | Reginer/aosp-android-jar | android-32/src/java/net/SocketException.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/net/SocketException.java | MIT |
public SocketException() {
} |
Constructs a new {@code SocketException} with no detail message.
| SocketException::SocketException | java | Reginer/aosp-android-jar | android-32/src/java/net/SocketException.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/net/SocketException.java | MIT |
public SocketException(Throwable cause) {
super(cause);
} |
Constructs a new {@code SocketException} with no detail message.
public SocketException() {
}
// BEGIN Android-added: SocketException ctor with cause for internal use.
/** @hide | SocketException::SocketException | java | Reginer/aosp-android-jar | android-32/src/java/net/SocketException.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/net/SocketException.java | MIT |
public SocketException(String msg, Throwable cause) {
super(msg, cause);
} |
Constructs a new {@code SocketException} with no detail message.
public SocketException() {
}
// BEGIN Android-added: SocketException ctor with cause for internal use.
/** @hide
public SocketException(Throwable cause) {
super(cause);
}
/** @hide | SocketException::SocketException | java | Reginer/aosp-android-jar | android-32/src/java/net/SocketException.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/net/SocketException.java | MIT |
public attrgetownerelement04(final DOMTestDocumentBuilderFactory factory) throws org.w3c.domts.DOMTestIncompatibleException {
org.w3c.domts.DocumentBuilderSetting[] settings =
new org.w3c.domts.DocumentBuilderSetting[] {
org.w3c.domts.DocumentBuilderSetting.namespaceAware
};
DOMTestDocumentBuilderFactory testFactory = factory.newInstance(settings);
setFactory(testFactory);
//
// check if loaded documents are supported for content type
//
String contentType = getContentType();
preload(contentType, "staffNS", false);
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
| attrgetownerelement04::attrgetownerelement04 | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level2/core/attrgetownerelement04.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level2/core/attrgetownerelement04.java | MIT |
public void runTest() throws Throwable {
Document doc;
Document docImp;
Node ownerElement;
Element element;
Attr attr;
Attr attrImp;
NodeList addresses;
doc = (Document) load("staffNS", false);
docImp = (Document) load("staff", false);
addresses = doc.getElementsByTagNameNS("http://www.nist.gov", "address");
element = (Element) addresses.item(1);
assertNotNull("empAddressNotNull", element);
attr = element.getAttributeNodeNS("http://www.nist.gov", "zone");
attrImp = (Attr) docImp.importNode(attr, true);
ownerElement = attrImp.getOwnerElement();
assertNull("attrgetownerelement04", ownerElement);
} |
Runs the test case.
@throws Throwable Any uncaught exception causes test to fail
| attrgetownerelement04::runTest | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level2/core/attrgetownerelement04.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level2/core/attrgetownerelement04.java | MIT |
public String getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/attrgetownerelement04";
} |
Gets URI that identifies the test.
@return uri identifier of test
| attrgetownerelement04::getTargetURI | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level2/core/attrgetownerelement04.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level2/core/attrgetownerelement04.java | MIT |
public static void main(final String[] args) {
DOMTestCase.doMain(attrgetownerelement04.class, args);
} |
Runs this test from the command line.
@param args command line arguments
| attrgetownerelement04::main | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level2/core/attrgetownerelement04.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level2/core/attrgetownerelement04.java | MIT |
public void setSecurityParams(@SecurityType int securityType) {
// Clear all the bitsets.
allowedKeyManagement.clear();
allowedProtocols.clear();
allowedAuthAlgorithms.clear();
allowedPairwiseCiphers.clear();
allowedGroupCiphers.clear();
allowedGroupManagementCiphers.clear();
allowedSuiteBCiphers.clear();
switch (securityType) {
case SECURITY_TYPE_OPEN:
allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
break;
case SECURITY_TYPE_WEP:
allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN);
allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.SHARED);
break;
case SECURITY_TYPE_PSK:
allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
break;
case SECURITY_TYPE_EAP:
allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP);
allowedKeyManagement.set(WifiConfiguration.KeyMgmt.IEEE8021X);
break;
case SECURITY_TYPE_SAE:
allowedProtocols.set(WifiConfiguration.Protocol.RSN);
allowedKeyManagement.set(WifiConfiguration.KeyMgmt.SAE);
allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP);
allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.GCMP_256);
allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
allowedGroupCiphers.set(WifiConfiguration.GroupCipher.GCMP_256);
requirePmf = true;
break;
case SECURITY_TYPE_EAP_SUITE_B:
allowedProtocols.set(WifiConfiguration.Protocol.RSN);
allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP);
allowedKeyManagement.set(WifiConfiguration.KeyMgmt.IEEE8021X);
allowedKeyManagement.set(WifiConfiguration.KeyMgmt.SUITE_B_192);
allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.GCMP_256);
allowedGroupCiphers.set(WifiConfiguration.GroupCipher.GCMP_256);
allowedGroupManagementCiphers.set(WifiConfiguration.GroupMgmtCipher.BIP_GMAC_256);
// Note: allowedSuiteBCiphers bitset will be set by the service once the
// certificates are attached to this profile
requirePmf = true;
break;
case SECURITY_TYPE_OWE:
allowedProtocols.set(WifiConfiguration.Protocol.RSN);
allowedKeyManagement.set(WifiConfiguration.KeyMgmt.OWE);
allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP);
allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.GCMP_256);
allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
allowedGroupCiphers.set(WifiConfiguration.GroupCipher.GCMP_256);
requirePmf = true;
break;
case SECURITY_TYPE_WAPI_PSK:
allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WAPI_PSK);
allowedProtocols.set(WifiConfiguration.Protocol.WAPI);
allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.SMS4);
allowedGroupCiphers.set(WifiConfiguration.GroupCipher.SMS4);
break;
case SECURITY_TYPE_WAPI_CERT:
allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WAPI_CERT);
allowedProtocols.set(WifiConfiguration.Protocol.WAPI);
allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.SMS4);
allowedGroupCiphers.set(WifiConfiguration.GroupCipher.SMS4);
break;
default:
throw new IllegalArgumentException("unknown security type " + securityType);
}
} |
Set the various security params to correspond to the provided security type.
This is accomplished by setting the various BitSets exposed in WifiConfiguration.
@param securityType One of the following security types:
{@link #SECURITY_TYPE_OPEN},
{@link #SECURITY_TYPE_WEP},
{@link #SECURITY_TYPE_PSK},
{@link #SECURITY_TYPE_EAP},
{@link #SECURITY_TYPE_SAE},
{@link #SECURITY_TYPE_EAP_SUITE_B},
{@link #SECURITY_TYPE_OWE},
{@link #SECURITY_TYPE_WAPI_PSK}, or
{@link #SECURITY_TYPE_WAPI_CERT}
| Status::setSecurityParams | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public boolean isOpenNetwork() {
final int cardinality = allowedKeyManagement.cardinality();
final boolean hasNoKeyMgmt = cardinality == 0
|| (cardinality == 1 && (allowedKeyManagement.get(KeyMgmt.NONE)
|| allowedKeyManagement.get(KeyMgmt.OWE)));
boolean hasNoWepKeys = true;
if (wepKeys != null) {
for (int i = 0; i < wepKeys.length; i++) {
if (wepKeys[i] != null) {
hasNoWepKeys = false;
break;
}
}
}
return hasNoKeyMgmt && hasNoWepKeys;
} |
@hide
Returns true if this WiFi config is for an open network.
| Status::isOpenNetwork | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public static boolean isValidMacAddressForRandomization(MacAddress mac) {
return mac != null && !MacAddressUtils.isMulticastAddress(mac) && mac.isLocallyAssigned()
&& !MacAddress.fromString(WifiInfo.DEFAULT_MAC_ADDRESS).equals(mac);
} |
@hide
Checks if the given MAC address can be used for Connected Mac Randomization
by verifying that it is non-null, unicast, locally assigned, and not default mac.
@param mac MacAddress to check
@return true if mac is good to use
| Status::isValidMacAddressForRandomization | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public @NonNull MacAddress getRandomizedMacAddress() {
return mRandomizedMacAddress;
} |
Returns MAC address set to be the local randomized MAC address.
Depending on user preference, the device may or may not use the returned MAC address for
connections to this network.
<p>
Information is restricted to Device Owner, Profile Owner, and Carrier apps
(which will only obtain addresses for configurations which they create). Other callers
will receive a default "02:00:00:00:00:00" MAC address.
| Status::getRandomizedMacAddress | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void setRandomizedMacAddress(@NonNull MacAddress mac) {
if (mac == null) {
Log.e(TAG, "setRandomizedMacAddress received null MacAddress.");
return;
}
mRandomizedMacAddress = mac;
} |
@hide
@param mac MacAddress to change into
| Status::setRandomizedMacAddress | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public static int getMaxNetworkSelectionDisableReason() {
return NETWORK_SELECTION_DISABLED_MAX - 1;
} |
Get an integer that is equal to the maximum integer value of all the
DISABLED_* reasons
e.g. {@link #DISABLED_NONE}, {@link #DISABLED_ASSOCIATION_REJECTION}, etc.
All DISABLED_* constants will be contiguous in the range
0, 1, 2, 3, ..., getMaxNetworkSelectionDisableReasons()
<br />
For example, this can be used to iterate through all the network selection
disable reasons like so:
<pre>{@code
for (int reason = 0; reason <= getMaxNetworkSelectionDisableReasons(); reason++) {
...
}
}</pre>
| NetworkSelectionStatus::getMaxNetworkSelectionDisableReason | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public DisableReasonInfo(String reasonStr, int disableThreshold,
int disableTimeoutMillis) {
mReasonStr = reasonStr;
mDisableThreshold = disableThreshold;
mDisableTimeoutMillis = disableTimeoutMillis;
} |
Constructor
@param reasonStr string representation of the error
@param disableThreshold number of failures before we disable the network
@param disableTimeoutMillis the timeout, in milliseconds, before we re-enable the
network after disabling it
| DisableReasonInfo::DisableReasonInfo | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void setSeenInLastQualifiedNetworkSelection(boolean seen) {
mSeenInLastQualifiedNetworkSelection = seen;
} |
set whether this network is visible in latest Qualified Network Selection
@param seen value set to candidate
@hide
| DisableReasonInfo::setSeenInLastQualifiedNetworkSelection | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public boolean getSeenInLastQualifiedNetworkSelection() {
return mSeenInLastQualifiedNetworkSelection;
} |
get whether this network is visible in latest Qualified Network Selection
@return returns true -- network is visible in latest Qualified Network Selection
false -- network is invisible in latest Qualified Network Selection
@hide
| DisableReasonInfo::getSeenInLastQualifiedNetworkSelection | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void setCandidate(ScanResult scanCandidate) {
mCandidate = scanCandidate;
} |
set the temporary candidate of current network selection procedure
@param scanCandidate {@link ScanResult} the candidate set to mCandidate
@hide
| DisableReasonInfo::setCandidate | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public ScanResult getCandidate() {
return mCandidate;
} |
get the temporary candidate of current network selection procedure
@return returns {@link ScanResult} temporary candidate of current network selection
procedure
@hide
| DisableReasonInfo::getCandidate | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void setCandidateScore(int score) {
mCandidateScore = score;
} |
set the score of the temporary candidate of current network selection procedure
@param score value set to mCandidateScore
@hide
| DisableReasonInfo::setCandidateScore | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public int getCandidateScore() {
return mCandidateScore;
} |
get the score of the temporary candidate of current network selection procedure
@return returns score of the temporary candidate of current network selection procedure
@hide
| DisableReasonInfo::getCandidateScore | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public String getConnectChoice() {
return mConnectChoice;
} |
get user preferred choice over this configuration
@return returns configKey of user preferred choice over this configuration
@hide
| DisableReasonInfo::getConnectChoice | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void setConnectChoice(String newConnectChoice) {
mConnectChoice = newConnectChoice;
} |
set user preferred choice over this configuration
@param newConnectChoice, the configKey of user preferred choice over this configuration
@hide
| DisableReasonInfo::setConnectChoice | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void setHasEverConnected(boolean value) {
mHasEverConnected = value;
} |
set user preferred choice over this configuration
@param newConnectChoice, the configKey of user preferred choice over this configuration
@hide
public void setConnectChoice(String newConnectChoice) {
mConnectChoice = newConnectChoice;
}
/** Get the current Quality network selection status as a String (for debugging).
@NonNull
public String getNetworkStatusString() {
return QUALITY_NETWORK_SELECTION_STATUS[mStatus];
}
/** @hide | DisableReasonInfo::setHasEverConnected | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public boolean hasEverConnected() {
return mHasEverConnected;
} |
set user preferred choice over this configuration
@param newConnectChoice, the configKey of user preferred choice over this configuration
@hide
public void setConnectChoice(String newConnectChoice) {
mConnectChoice = newConnectChoice;
}
/** Get the current Quality network selection status as a String (for debugging).
@NonNull
public String getNetworkStatusString() {
return QUALITY_NETWORK_SELECTION_STATUS[mStatus];
}
/** @hide
public void setHasEverConnected(boolean value) {
mHasEverConnected = value;
}
/** True if the device has ever connected to this network, false otherwise. | DisableReasonInfo::hasEverConnected | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public NetworkSelectionStatus() {
// previously stored configs will not have this parameter, so we default to false.
mHasEverConnected = false;
} |
set user preferred choice over this configuration
@param newConnectChoice, the configKey of user preferred choice over this configuration
@hide
public void setConnectChoice(String newConnectChoice) {
mConnectChoice = newConnectChoice;
}
/** Get the current Quality network selection status as a String (for debugging).
@NonNull
public String getNetworkStatusString() {
return QUALITY_NETWORK_SELECTION_STATUS[mStatus];
}
/** @hide
public void setHasEverConnected(boolean value) {
mHasEverConnected = value;
}
/** True if the device has ever connected to this network, false otherwise.
public boolean hasEverConnected() {
return mHasEverConnected;
}
/** @hide | DisableReasonInfo::NetworkSelectionStatus | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public String getNetworkSelectionDisableReasonString() {
return getNetworkSelectionDisableReasonString(mNetworkSelectionDisableReason);
} |
get current network disable reason
@return current network disable reason in String (for debug purpose)
@hide
| Builder::getNetworkSelectionDisableReasonString | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public boolean isNetworkEnabled() {
return mStatus == NETWORK_SELECTION_ENABLED;
} |
True if the current network is enabled to join network selection, false otherwise.
@hide
| Builder::isNetworkEnabled | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public boolean isNetworkTemporaryDisabled() {
return mStatus == NETWORK_SELECTION_TEMPORARY_DISABLED;
} |
@return whether current network is temporary disabled
@hide
| Builder::isNetworkTemporaryDisabled | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public boolean isNetworkPermanentlyDisabled() {
return mStatus == NETWORK_SELECTION_PERMANENTLY_DISABLED;
} |
True if the current network is permanently disabled, false otherwise.
@hide
| Builder::isNetworkPermanentlyDisabled | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void setNetworkSelectionStatus(int status) {
if (status >= 0 && status < NETWORK_SELECTION_STATUS_MAX) {
mStatus = status;
}
} |
set current network selection status
@param status network selection status to set
@hide
| Builder::setNetworkSelectionStatus | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void setNetworkSelectionDisableReason(@NetworkSelectionDisableReason int reason) {
if (reason >= 0 && reason < NETWORK_SELECTION_DISABLED_MAX) {
mNetworkSelectionDisableReason = reason;
} else {
throw new IllegalArgumentException("Illegal reason value: " + reason);
}
} |
set Network disable reason
@param reason Network disable reason
@hide
| Builder::setNetworkSelectionDisableReason | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void setDisableTime(long timeStamp) {
mTemporarilyDisabledTimestamp = timeStamp;
} |
@param timeStamp Set when current network is disabled in millisecond since January 1,
1970 00:00:00.0 UTC
@hide
| Builder::setDisableTime | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public long getDisableTime() {
return mTemporarilyDisabledTimestamp;
} |
Returns when the current network was disabled, in milliseconds since January 1,
1970 00:00:00.0 UTC.
| Builder::getDisableTime | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public int getDisableReasonCounter(@NetworkSelectionDisableReason int reason) {
if (reason >= DISABLED_NONE && reason < NETWORK_SELECTION_DISABLED_MAX) {
return mNetworkSeclectionDisableCounter[reason];
} else {
throw new IllegalArgumentException("Illegal reason value: " + reason);
}
} |
Get the disable counter of a specific reason.
@param reason specific failure reason. One of the {@link #DISABLED_NONE} or
DISABLED_* constants e.g. {@link #DISABLED_ASSOCIATION_REJECTION}.
@exception IllegalArgumentException for invalid reason
@return counter number for specific error reason.
| Builder::getDisableReasonCounter | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void setDisableReasonCounter(int reason, int value) {
if (reason >= DISABLED_NONE && reason < NETWORK_SELECTION_DISABLED_MAX) {
mNetworkSeclectionDisableCounter[reason] = value;
} else {
throw new IllegalArgumentException("Illegal reason value: " + reason);
}
} |
set the counter of a specific failure reason
@param reason reason for disable error
@param value the counter value for this specific reason
@exception throw IllegalArgumentException for illegal input
@hide
| Builder::setDisableReasonCounter | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void incrementDisableReasonCounter(int reason) {
if (reason >= DISABLED_NONE && reason < NETWORK_SELECTION_DISABLED_MAX) {
mNetworkSeclectionDisableCounter[reason]++;
} else {
throw new IllegalArgumentException("Illegal reason value: " + reason);
}
} |
increment the counter of a specific failure reason
@param reason a specific failure reason
@exception throw IllegalArgumentException for illegal input
@hide
| Builder::incrementDisableReasonCounter | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void clearDisableReasonCounter(int reason) {
if (reason >= DISABLED_NONE && reason < NETWORK_SELECTION_DISABLED_MAX) {
mNetworkSeclectionDisableCounter[reason] = DISABLED_NONE;
} else {
throw new IllegalArgumentException("Illegal reason value: " + reason);
}
} |
clear the counter of a specific failure reason
@param reason a specific failure reason
@exception throw IllegalArgumentException for illegal input
@hide
| Builder::clearDisableReasonCounter | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void clearDisableReasonCounter() {
Arrays.fill(mNetworkSeclectionDisableCounter, DISABLED_NONE);
} |
clear all the failure reason counters
@hide
| Builder::clearDisableReasonCounter | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public String getNetworkSelectionBSSID() {
return mNetworkSelectionBSSID;
} |
get current network Selection BSSID
@return current network Selection BSSID
@hide
| Builder::getNetworkSelectionBSSID | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void setNetworkSelectionBSSID(String bssid) {
mNetworkSelectionBSSID = bssid;
} |
set network Selection BSSID
@param bssid The target BSSID for assocaition
@hide
| Builder::setNetworkSelectionBSSID | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void copy(NetworkSelectionStatus source) {
mStatus = source.mStatus;
mNetworkSelectionDisableReason = source.mNetworkSelectionDisableReason;
for (int index = DISABLED_NONE; index < NETWORK_SELECTION_DISABLED_MAX;
index++) {
mNetworkSeclectionDisableCounter[index] =
source.mNetworkSeclectionDisableCounter[index];
}
mTemporarilyDisabledTimestamp = source.mTemporarilyDisabledTimestamp;
mNetworkSelectionBSSID = source.mNetworkSelectionBSSID;
setSeenInLastQualifiedNetworkSelection(source.getSeenInLastQualifiedNetworkSelection());
setCandidate(source.getCandidate());
setCandidateScore(source.getCandidateScore());
setConnectChoice(source.getConnectChoice());
setHasEverConnected(source.hasEverConnected());
} |
set network Selection BSSID
@param bssid The target BSSID for assocaition
@hide
public void setNetworkSelectionBSSID(String bssid) {
mNetworkSelectionBSSID = bssid;
}
/** @hide | Builder::copy | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void writeToParcel(Parcel dest) {
dest.writeInt(getNetworkSelectionStatus());
dest.writeInt(getNetworkSelectionDisableReason());
for (int index = DISABLED_NONE; index < NETWORK_SELECTION_DISABLED_MAX;
index++) {
dest.writeInt(getDisableReasonCounter(index));
}
dest.writeLong(getDisableTime());
dest.writeString(getNetworkSelectionBSSID());
if (getConnectChoice() != null) {
dest.writeInt(CONNECT_CHOICE_EXISTS);
dest.writeString(getConnectChoice());
} else {
dest.writeInt(CONNECT_CHOICE_NOT_EXISTS);
}
dest.writeInt(hasEverConnected() ? 1 : 0);
} |
set network Selection BSSID
@param bssid The target BSSID for assocaition
@hide
public void setNetworkSelectionBSSID(String bssid) {
mNetworkSelectionBSSID = bssid;
}
/** @hide
public void copy(NetworkSelectionStatus source) {
mStatus = source.mStatus;
mNetworkSelectionDisableReason = source.mNetworkSelectionDisableReason;
for (int index = DISABLED_NONE; index < NETWORK_SELECTION_DISABLED_MAX;
index++) {
mNetworkSeclectionDisableCounter[index] =
source.mNetworkSeclectionDisableCounter[index];
}
mTemporarilyDisabledTimestamp = source.mTemporarilyDisabledTimestamp;
mNetworkSelectionBSSID = source.mNetworkSelectionBSSID;
setSeenInLastQualifiedNetworkSelection(source.getSeenInLastQualifiedNetworkSelection());
setCandidate(source.getCandidate());
setCandidateScore(source.getCandidateScore());
setConnectChoice(source.getConnectChoice());
setHasEverConnected(source.hasEverConnected());
}
/** @hide | Builder::writeToParcel | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void readFromParcel(Parcel in) {
setNetworkSelectionStatus(in.readInt());
setNetworkSelectionDisableReason(in.readInt());
for (int index = DISABLED_NONE; index < NETWORK_SELECTION_DISABLED_MAX;
index++) {
setDisableReasonCounter(index, in.readInt());
}
setDisableTime(in.readLong());
setNetworkSelectionBSSID(in.readString());
if (in.readInt() == CONNECT_CHOICE_EXISTS) {
setConnectChoice(in.readString());
} else {
setConnectChoice(null);
}
setHasEverConnected(in.readInt() != 0);
} |
set network Selection BSSID
@param bssid The target BSSID for assocaition
@hide
public void setNetworkSelectionBSSID(String bssid) {
mNetworkSelectionBSSID = bssid;
}
/** @hide
public void copy(NetworkSelectionStatus source) {
mStatus = source.mStatus;
mNetworkSelectionDisableReason = source.mNetworkSelectionDisableReason;
for (int index = DISABLED_NONE; index < NETWORK_SELECTION_DISABLED_MAX;
index++) {
mNetworkSeclectionDisableCounter[index] =
source.mNetworkSeclectionDisableCounter[index];
}
mTemporarilyDisabledTimestamp = source.mTemporarilyDisabledTimestamp;
mNetworkSelectionBSSID = source.mNetworkSelectionBSSID;
setSeenInLastQualifiedNetworkSelection(source.getSeenInLastQualifiedNetworkSelection());
setCandidate(source.getCandidate());
setCandidateScore(source.getCandidateScore());
setConnectChoice(source.getConnectChoice());
setHasEverConnected(source.hasEverConnected());
}
/** @hide
public void writeToParcel(Parcel dest) {
dest.writeInt(getNetworkSelectionStatus());
dest.writeInt(getNetworkSelectionDisableReason());
for (int index = DISABLED_NONE; index < NETWORK_SELECTION_DISABLED_MAX;
index++) {
dest.writeInt(getDisableReasonCounter(index));
}
dest.writeLong(getDisableTime());
dest.writeString(getNetworkSelectionBSSID());
if (getConnectChoice() != null) {
dest.writeInt(CONNECT_CHOICE_EXISTS);
dest.writeString(getConnectChoice());
} else {
dest.writeInt(CONNECT_CHOICE_NOT_EXISTS);
}
dest.writeInt(hasEverConnected() ? 1 : 0);
}
/** @hide | Builder::readFromParcel | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void setAssociationStatus(@RecentFailureReason int status) {
mAssociationStatus = status;
} |
@param status the association status code for the recent failure
| RecentFailure::setAssociationStatus | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void clear() {
mAssociationStatus = RECENT_FAILURE_NONE;
} |
Sets the RecentFailure to NONE
| RecentFailure::clear | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public boolean isPasspoint() {
return !TextUtils.isEmpty(FQDN)
&& !TextUtils.isEmpty(providerFriendlyName)
&& enterpriseConfig != null
&& enterpriseConfig.getEapMethod() != WifiEnterpriseConfig.Eap.NONE
&& !TextUtils.isEmpty(mPasspointUniqueId);
} |
Identify if this configuration represents a Passpoint network
| RecentFailure::isPasspoint | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public boolean isLinked(WifiConfiguration config) {
if (config != null) {
if (config.linkedConfigurations != null && linkedConfigurations != null) {
if (config.linkedConfigurations.get(getKey()) != null
&& linkedConfigurations.get(config.getKey()) != null) {
return true;
}
}
}
return false;
} |
Helper function, identify if a configuration is linked
@hide
| RecentFailure::isLinked | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public String getKeyIdForCredentials(WifiConfiguration current) {
String keyMgmt = "";
try {
// Get current config details for fields that are not initialized
if (TextUtils.isEmpty(SSID)) SSID = current.SSID;
if (allowedKeyManagement.cardinality() == 0) {
allowedKeyManagement = current.allowedKeyManagement;
}
if (allowedKeyManagement.get(KeyMgmt.WPA_EAP)) {
keyMgmt += KeyMgmt.strings[KeyMgmt.WPA_EAP];
}
if (allowedKeyManagement.get(KeyMgmt.OSEN)) {
keyMgmt += KeyMgmt.strings[KeyMgmt.OSEN];
}
if (allowedKeyManagement.get(KeyMgmt.IEEE8021X)) {
keyMgmt += KeyMgmt.strings[KeyMgmt.IEEE8021X];
}
if (allowedKeyManagement.get(KeyMgmt.SUITE_B_192)) {
keyMgmt += KeyMgmt.strings[KeyMgmt.SUITE_B_192];
}
if (allowedKeyManagement.get(KeyMgmt.WAPI_CERT)) {
keyMgmt += KeyMgmt.strings[KeyMgmt.WAPI_CERT];
}
if (TextUtils.isEmpty(keyMgmt)) {
throw new IllegalStateException("Not an EAP network");
}
String keyId = trimStringForKeyId(SSID) + "_" + keyMgmt + "_"
+ trimStringForKeyId(enterpriseConfig.getKeyId(current != null
? current.enterpriseConfig : null));
if (!fromWifiNetworkSuggestion) {
return keyId;
}
return keyId + "_" + trimStringForKeyId(BSSID) + "_" + trimStringForKeyId(creatorName);
} catch (NullPointerException e) {
throw new IllegalStateException("Invalid config details");
}
} |
Get an identifier for associating credentials with this config
@param current configuration contains values for additional fields
that are not part of this configuration. Used
when a config with some fields is passed by an application.
@throws IllegalStateException if config is invalid for key id generation
@hide
| RecentFailure::getKeyIdForCredentials | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public String getSsidAndSecurityTypeString() {
String key;
if (allowedKeyManagement.get(KeyMgmt.WPA_PSK)) {
key = SSID + KeyMgmt.strings[KeyMgmt.WPA_PSK];
} else if (allowedKeyManagement.get(KeyMgmt.WPA_EAP)
|| allowedKeyManagement.get(KeyMgmt.IEEE8021X)) {
key = SSID + KeyMgmt.strings[KeyMgmt.WPA_EAP];
} else if (wepTxKeyIndex >= 0 && wepTxKeyIndex < wepKeys.length
&& wepKeys[wepTxKeyIndex] != null) {
key = SSID + "WEP";
} else if (allowedKeyManagement.get(KeyMgmt.OWE)) {
key = SSID + KeyMgmt.strings[KeyMgmt.OWE];
} else if (allowedKeyManagement.get(KeyMgmt.SAE)) {
key = SSID + KeyMgmt.strings[KeyMgmt.SAE];
} else if (allowedKeyManagement.get(KeyMgmt.SUITE_B_192)) {
key = SSID + KeyMgmt.strings[KeyMgmt.SUITE_B_192];
} else if (allowedKeyManagement.get(KeyMgmt.WAPI_PSK)) {
key = SSID + KeyMgmt.strings[KeyMgmt.WAPI_PSK];
} else if (allowedKeyManagement.get(KeyMgmt.WAPI_CERT)) {
key = SSID + KeyMgmt.strings[KeyMgmt.WAPI_CERT];
} else if (allowedKeyManagement.get(KeyMgmt.OSEN)) {
key = SSID + KeyMgmt.strings[KeyMgmt.OSEN];
} else {
key = SSID + KeyMgmt.strings[KeyMgmt.NONE];
}
return key;
} | @hide
return the SSID + security type in String format.
| RecentFailure::getSsidAndSecurityTypeString | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public ProxyInfo getHttpProxy() {
if (mIpConfiguration.getProxySettings() == IpConfiguration.ProxySettings.NONE) {
return null;
}
return new ProxyInfo(mIpConfiguration.getHttpProxy());
} |
Returns the HTTP proxy used by this object.
@return a {@link ProxyInfo httpProxy} representing the proxy specified by this
WifiConfiguration, or {@code null} if no proxy is specified.
| RecentFailure::getHttpProxy | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void setHttpProxy(ProxyInfo httpProxy) {
if (httpProxy == null) {
mIpConfiguration.setProxySettings(IpConfiguration.ProxySettings.NONE);
mIpConfiguration.setHttpProxy(null);
return;
}
ProxyInfo httpProxyCopy;
ProxySettings proxySettingCopy;
if (!Uri.EMPTY.equals(httpProxy.getPacFileUrl())) {
proxySettingCopy = IpConfiguration.ProxySettings.PAC;
// Construct a new PAC URL Proxy
httpProxyCopy = ProxyInfo.buildPacProxy(httpProxy.getPacFileUrl(), httpProxy.getPort());
} else {
proxySettingCopy = IpConfiguration.ProxySettings.STATIC;
// Construct a new HTTP Proxy
httpProxyCopy = ProxyInfo.buildDirectProxy(httpProxy.getHost(), httpProxy.getPort(),
Arrays.asList(httpProxy.getExclusionList()));
}
if (!httpProxyCopy.isValid()) {
throw new IllegalArgumentException("Invalid ProxyInfo: " + httpProxyCopy.toString());
}
mIpConfiguration.setProxySettings(proxySettingCopy);
mIpConfiguration.setHttpProxy(httpProxyCopy);
} |
Set the {@link ProxyInfo} for this WifiConfiguration. This method should only be used by a
device owner or profile owner. When other apps attempt to save a {@link WifiConfiguration}
with modified proxy settings, the methods {@link WifiManager#addNetwork} and
{@link WifiManager#updateNetwork} fail and return {@code -1}.
@param httpProxy {@link ProxyInfo} representing the httpProxy to be used by this
WifiConfiguration. Setting this to {@code null} will explicitly set no
proxy, removing any proxy that was previously set.
@exception IllegalArgumentException for invalid httpProxy
| RecentFailure::setHttpProxy | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public int describeContents() {
return 0;
} |
Set the {@link ProxySettings} and {@link ProxyInfo} for this network.
@hide
@UnsupportedAppUsage
public void setProxy(@NonNull ProxySettings settings, @NonNull ProxyInfo proxy) {
mIpConfiguration.setProxySettings(settings);
mIpConfiguration.setHttpProxy(proxy);
}
/** Implement the Parcelable interface {@hide} | RecentFailure::describeContents | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void setPasspointManagementObjectTree(String passpointManagementObjectTree) {
mPasspointManagementObjectTree = passpointManagementObjectTree;
} |
Set the {@link ProxySettings} and {@link ProxyInfo} for this network.
@hide
@UnsupportedAppUsage
public void setProxy(@NonNull ProxySettings settings, @NonNull ProxyInfo proxy) {
mIpConfiguration.setProxySettings(settings);
mIpConfiguration.setHttpProxy(proxy);
}
/** Implement the Parcelable interface {@hide}
public int describeContents() {
return 0;
}
/** @hide | RecentFailure::setPasspointManagementObjectTree | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public String getMoTree() {
return mPasspointManagementObjectTree;
} |
Set the {@link ProxySettings} and {@link ProxyInfo} for this network.
@hide
@UnsupportedAppUsage
public void setProxy(@NonNull ProxySettings settings, @NonNull ProxyInfo proxy) {
mIpConfiguration.setProxySettings(settings);
mIpConfiguration.setHttpProxy(proxy);
}
/** Implement the Parcelable interface {@hide}
public int describeContents() {
return 0;
}
/** @hide
public void setPasspointManagementObjectTree(String passpointManagementObjectTree) {
mPasspointManagementObjectTree = passpointManagementObjectTree;
}
/** @hide | RecentFailure::getMoTree | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public WifiConfiguration(@NonNull WifiConfiguration source) {
if (source != null) {
networkId = source.networkId;
status = source.status;
SSID = source.SSID;
BSSID = source.BSSID;
FQDN = source.FQDN;
roamingConsortiumIds = source.roamingConsortiumIds.clone();
providerFriendlyName = source.providerFriendlyName;
isHomeProviderNetwork = source.isHomeProviderNetwork;
preSharedKey = source.preSharedKey;
mNetworkSelectionStatus.copy(source.getNetworkSelectionStatus());
apBand = source.apBand;
apChannel = source.apChannel;
wepKeys = new String[4];
for (int i = 0; i < wepKeys.length; i++) {
wepKeys[i] = source.wepKeys[i];
}
wepTxKeyIndex = source.wepTxKeyIndex;
priority = source.priority;
hiddenSSID = source.hiddenSSID;
allowedKeyManagement = (BitSet) source.allowedKeyManagement.clone();
allowedProtocols = (BitSet) source.allowedProtocols.clone();
allowedAuthAlgorithms = (BitSet) source.allowedAuthAlgorithms.clone();
allowedPairwiseCiphers = (BitSet) source.allowedPairwiseCiphers.clone();
allowedGroupCiphers = (BitSet) source.allowedGroupCiphers.clone();
allowedGroupManagementCiphers = (BitSet) source.allowedGroupManagementCiphers.clone();
allowedSuiteBCiphers = (BitSet) source.allowedSuiteBCiphers.clone();
enterpriseConfig = new WifiEnterpriseConfig(source.enterpriseConfig);
defaultGwMacAddress = source.defaultGwMacAddress;
mIpConfiguration = new IpConfiguration(source.mIpConfiguration);
if ((source.linkedConfigurations != null)
&& (source.linkedConfigurations.size() > 0)) {
linkedConfigurations = new HashMap<String, Integer>();
linkedConfigurations.putAll(source.linkedConfigurations);
}
validatedInternetAccess = source.validatedInternetAccess;
isLegacyPasspointConfig = source.isLegacyPasspointConfig;
ephemeral = source.ephemeral;
osu = source.osu;
trusted = source.trusted;
fromWifiNetworkSuggestion = source.fromWifiNetworkSuggestion;
fromWifiNetworkSpecifier = source.fromWifiNetworkSpecifier;
meteredHint = source.meteredHint;
meteredOverride = source.meteredOverride;
useExternalScores = source.useExternalScores;
lastConnectUid = source.lastConnectUid;
lastUpdateUid = source.lastUpdateUid;
creatorUid = source.creatorUid;
creatorName = source.creatorName;
lastUpdateName = source.lastUpdateName;
peerWifiConfiguration = source.peerWifiConfiguration;
lastConnected = source.lastConnected;
lastDisconnected = source.lastDisconnected;
numScorerOverride = source.numScorerOverride;
numScorerOverrideAndSwitchedNetwork = source.numScorerOverrideAndSwitchedNetwork;
numAssociation = source.numAssociation;
allowAutojoin = source.allowAutojoin;
numNoInternetAccessReports = source.numNoInternetAccessReports;
noInternetAccessExpected = source.noInternetAccessExpected;
shared = source.shared;
recentFailure.setAssociationStatus(source.recentFailure.getAssociationStatus());
mRandomizedMacAddress = source.mRandomizedMacAddress;
macRandomizationSetting = source.macRandomizationSetting;
randomizedMacExpirationTimeMs = source.randomizedMacExpirationTimeMs;
requirePmf = source.requirePmf;
updateIdentifier = source.updateIdentifier;
carrierId = source.carrierId;
mPasspointUniqueId = source.mPasspointUniqueId;
}
} |
Set the {@link ProxySettings} and {@link ProxyInfo} for this network.
@hide
@UnsupportedAppUsage
public void setProxy(@NonNull ProxySettings settings, @NonNull ProxyInfo proxy) {
mIpConfiguration.setProxySettings(settings);
mIpConfiguration.setHttpProxy(proxy);
}
/** Implement the Parcelable interface {@hide}
public int describeContents() {
return 0;
}
/** @hide
public void setPasspointManagementObjectTree(String passpointManagementObjectTree) {
mPasspointManagementObjectTree = passpointManagementObjectTree;
}
/** @hide
public String getMoTree() {
return mPasspointManagementObjectTree;
}
/** Copy constructor | RecentFailure::WifiConfiguration | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public void setPasspointUniqueId(String uniqueId) {
mPasspointUniqueId = uniqueId;
} |
Set the Passpoint unique identifier
@param uniqueId Passpoint unique identifier to be set
@hide
| RecentFailure::setPasspointUniqueId | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public String getPasspointUniqueId() {
return mPasspointUniqueId;
} |
Set the Passpoint unique identifier
@hide
| RecentFailure::getPasspointUniqueId | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
public boolean needsPreSharedKey() {
return allowedKeyManagement.get(KeyMgmt.WPA_PSK)
|| allowedKeyManagement.get(KeyMgmt.SAE)
|| allowedKeyManagement.get(KeyMgmt.WAPI_PSK);
} |
Whether the key mgmt indicates if the WifiConfiguration needs a preSharedKey or not.
@return true if preSharedKey is needed, false otherwise.
@hide
| RecentFailure::needsPreSharedKey | java | Reginer/aosp-android-jar | android-31/src/android/net/wifi/WifiConfiguration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/net/wifi/WifiConfiguration.java | MIT |
default void onEntryBind(NotificationEntry entry, StatusBarNotification sbn) {
} |
Called when the entry is having a new status bar notification bound to it. This should
be used to initialize any derivative state on the entry that needs to update when the
notification is updated.
| onEntryBind | java | Reginer/aosp-android-jar | android-34/src/com/android/systemui/statusbar/notification/collection/notifcollection/NotifCollectionListener.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/systemui/statusbar/notification/collection/notifcollection/NotifCollectionListener.java | MIT |
default void onEntryInit(@NonNull NotificationEntry entry) {
} |
Called whenever a new {@link NotificationEntry} is initialized. This should be used for
initializing any decorated state tied to the notification.
Do not reference other registered {@link NotifCollectionListener} implementations here as
there is no guarantee of order and they may not have had a chance to initialize yet. Instead,
use {@link #onEntryAdded} which is called after all initialization.
| onEntryInit | java | Reginer/aosp-android-jar | android-34/src/com/android/systemui/statusbar/notification/collection/notifcollection/NotifCollectionListener.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/systemui/statusbar/notification/collection/notifcollection/NotifCollectionListener.java | MIT |
default void onEntryAdded(@NonNull NotificationEntry entry) {
} |
Called whenever a notification with a new key is posted.
| onEntryAdded | java | Reginer/aosp-android-jar | android-34/src/com/android/systemui/statusbar/notification/collection/notifcollection/NotifCollectionListener.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/systemui/statusbar/notification/collection/notifcollection/NotifCollectionListener.java | MIT |
default void onEntryUpdated(@NonNull NotificationEntry entry, boolean fromSystem) {
onEntryUpdated(entry);
} |
Called whenever a notification with the same key as an existing notification is posted. By
the time this listener is called, the entry's SBN and Ranking will already have been updated.
This delegates to {@link #onEntryUpdated(NotificationEntry)} by default.
@param fromSystem If true, this update came from the NotificationManagerService.
If false, the notification update is an internal change within systemui.
| onEntryUpdated | java | Reginer/aosp-android-jar | android-34/src/com/android/systemui/statusbar/notification/collection/notifcollection/NotifCollectionListener.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/systemui/statusbar/notification/collection/notifcollection/NotifCollectionListener.java | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.