code
stringlengths
11
173k
docstring
stringlengths
2
593k
func_name
stringlengths
2
189
language
stringclasses
1 value
repo
stringclasses
833 values
path
stringlengths
11
294
url
stringlengths
60
339
license
stringclasses
4 values
public static int transcodeToUTF16(byte[] utf8, char[] utf16) { int i = 0, j = 0; while (i < utf8.length) { byte codeUnit = utf8[i++]; if (codeUnit >= 0) { if (j >= utf16.length) { return -1; } utf16[j++] = (char)codeUnit; continue; } short first = firstUnitTable[codeUnit & 0x7F]; int codePoint = first >>> 8; byte state = (byte)first; while (state >= 0) { if (i >= utf8.length) { return -1; } codeUnit = utf8[i++]; codePoint = (codePoint << 6) | (codeUnit & 0x3F); state = transitionTable[state + ((codeUnit & 0xFF) >>> 4)]; } if (state == S_ERR) { return -1; } if (codePoint <= 0xFFFF) { if (j >= utf16.length) { return -1; } // Code points from U+D800 to U+DFFF are caught by the DFA utf16[j++] = (char)codePoint; } else { if (j >= utf16.length - 1) { return -1; } // Code points above U+10FFFF are caught by the DFA utf16[j++] = (char)(0xD7C0 + (codePoint >>> 10)); utf16[j++] = (char)(0xDC00 | (codePoint & 0x3FF)); } } return j; }
Transcode a UTF-8 encoding into a UTF-16 representation. In the general case the output {@code utf16} array should be at least as long as the input {@code utf8} one to handle arbitrary inputs. The number of output UTF-16 code units is returned, or -1 if any errors are encountered (in which case an arbitrary amount of data may have been written into the output array). Errors that will be detected are malformed UTF-8, including incomplete, truncated or "overlong" encodings, and unmappable code points. In particular, no unmatched surrogates will be produced. An error will also result if {@code utf16} is found to be too small to store the complete output. @param utf8 A non-null array containing a well-formed UTF-8 encoding. @param utf16 A non-null array, at least as long as the {@code utf8} array in order to ensure the output will fit. @return The number of UTF-16 code units written to {@code utf16} (beginning from index 0), or else -1 if the input was either malformed or encoded any unmappable characters, or if the {@code utf16} is too small.
UTF8::transcodeToUTF16
java
Reginer/aosp-android-jar
android-34/src/com/android/org/bouncycastle/util/encoders/UTF8.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/org/bouncycastle/util/encoders/UTF8.java
MIT
public LongAtomicFormula(@Key int key) { super(key); checkArgument( key == VERSION_CODE, "Key %s cannot be used with LongAtomicFormula", keyToString(key)); mValue = null; mOperator = null; }
Constructs an empty {@link LongAtomicFormula}. This should only be used as a base. <p>This formula will always return false. @throws IllegalArgumentException if {@code key} cannot be used with long value
LongAtomicFormula::LongAtomicFormula
java
Reginer/aosp-android-jar
android-31/src/android/content/integrity/AtomicFormula.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/content/integrity/AtomicFormula.java
MIT
public LongAtomicFormula(@Key int key, @Operator int operator, long value) { super(key); checkArgument( key == VERSION_CODE, "Key %s cannot be used with LongAtomicFormula", keyToString(key)); checkArgument( isValidOperator(operator), "Unknown operator: %d", operator); mOperator = operator; mValue = value; }
Constructs a new {@link LongAtomicFormula}. <p>This formula will hold if and only if the corresponding information of an install specified by {@code key} is of the correct relationship to {@code value} as specified by {@code operator}. @throws IllegalArgumentException if {@code key} cannot be used with long value
LongAtomicFormula::LongAtomicFormula
java
Reginer/aosp-android-jar
android-31/src/android/content/integrity/AtomicFormula.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/content/integrity/AtomicFormula.java
MIT
public StringAtomicFormula(@Key int key) { super(key); checkArgument( key == PACKAGE_NAME || key == APP_CERTIFICATE || key == INSTALLER_CERTIFICATE || key == INSTALLER_NAME || key == STAMP_CERTIFICATE_HASH, "Key %s cannot be used with StringAtomicFormula", keyToString(key)); mValue = null; mIsHashedValue = null; }
Constructs an empty {@link StringAtomicFormula}. This should only be used as a base. <p>An empty formula will always match to false. @throws IllegalArgumentException if {@code key} cannot be used with string value
StringAtomicFormula::StringAtomicFormula
java
Reginer/aosp-android-jar
android-31/src/android/content/integrity/AtomicFormula.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/content/integrity/AtomicFormula.java
MIT
public StringAtomicFormula(@Key int key, @NonNull String value, boolean isHashed) { super(key); checkArgument( key == PACKAGE_NAME || key == APP_CERTIFICATE || key == INSTALLER_CERTIFICATE || key == INSTALLER_NAME || key == STAMP_CERTIFICATE_HASH, "Key %s cannot be used with StringAtomicFormula", keyToString(key)); mValue = value; mIsHashedValue = isHashed; }
Constructs a new {@link StringAtomicFormula}. <p>This formula will hold if and only if the corresponding information of an install specified by {@code key} equals {@code value}. @throws IllegalArgumentException if {@code key} cannot be used with string value
StringAtomicFormula::StringAtomicFormula
java
Reginer/aosp-android-jar
android-31/src/android/content/integrity/AtomicFormula.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/content/integrity/AtomicFormula.java
MIT
public StringAtomicFormula(@Key int key, @NonNull String value) { super(key); checkArgument( key == PACKAGE_NAME || key == APP_CERTIFICATE || key == INSTALLER_CERTIFICATE || key == INSTALLER_NAME || key == STAMP_CERTIFICATE_HASH, "Key %s cannot be used with StringAtomicFormula", keyToString(key)); mValue = hashValue(key, value); mIsHashedValue = (key == APP_CERTIFICATE || key == INSTALLER_CERTIFICATE || key == STAMP_CERTIFICATE_HASH) || !mValue.equals(value); }
Constructs a new {@link StringAtomicFormula} together with handling the necessary hashing for the given key. <p>The value will be automatically hashed with SHA256 and the hex digest will be computed when the key is PACKAGE_NAME or INSTALLER_NAME and the value is more than 32 characters. <p>The APP_CERTIFICATES, INSTALLER_CERTIFICATES, and STAMP_CERTIFICATE_HASH are always delivered in hashed form. So the isHashedValue is set to true by default. @throws IllegalArgumentException if {@code key} cannot be used with string value.
StringAtomicFormula::StringAtomicFormula
java
Reginer/aosp-android-jar
android-31/src/android/content/integrity/AtomicFormula.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/content/integrity/AtomicFormula.java
MIT
public BooleanAtomicFormula(@Key int key) { super(key); checkArgument( key == PRE_INSTALLED || key == STAMP_TRUSTED, String.format( "Key %s cannot be used with BooleanAtomicFormula", keyToString(key))); mValue = null; }
Constructs an empty {@link BooleanAtomicFormula}. This should only be used as a base. <p>An empty formula will always match to false. @throws IllegalArgumentException if {@code key} cannot be used with boolean value
BooleanAtomicFormula::BooleanAtomicFormula
java
Reginer/aosp-android-jar
android-31/src/android/content/integrity/AtomicFormula.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/content/integrity/AtomicFormula.java
MIT
public BooleanAtomicFormula(@Key int key, boolean value) { super(key); checkArgument( key == PRE_INSTALLED || key == STAMP_TRUSTED, String.format( "Key %s cannot be used with BooleanAtomicFormula", keyToString(key))); mValue = value; }
Constructs a new {@link BooleanAtomicFormula}. <p>This formula will hold if and only if the corresponding information of an install specified by {@code key} equals {@code value}. @throws IllegalArgumentException if {@code key} cannot be used with boolean value
BooleanAtomicFormula::BooleanAtomicFormula
java
Reginer/aosp-android-jar
android-31/src/android/content/integrity/AtomicFormula.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/content/integrity/AtomicFormula.java
MIT
default boolean isLogToAny() { return isLogToLogcat() || isLogToProto(); }
returns true is any logging is enabled for this group.
isLogToAny
java
Reginer/aosp-android-jar
android-32/src/com/android/internal/protolog/common/IProtoLogGroup.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/internal/protolog/common/IProtoLogGroup.java
MIT
private TemporalQueries() { }
Private constructor since this is a utility class.
TemporalQueries::TemporalQueries
java
Reginer/aosp-android-jar
android-31/src/java/time/temporal/TemporalQueries.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/java/time/temporal/TemporalQueries.java
MIT
public static TemporalQuery<ZoneId> zoneId() { return TemporalQueries.ZONE_ID; }
A strict query for the {@code ZoneId}. <p> This queries a {@code TemporalAccessor} for the zone. The zone is only returned if the date-time conceptually contains a {@code ZoneId}. It will not be returned if the date-time only conceptually has an {@code ZoneOffset}. Thus a {@link java.time.ZonedDateTime} will return the result of {@code getZone()}, but an {@link java.time.OffsetDateTime} will return null. <p> In most cases, applications should use {@link #zone()} as this query is too strict. <p> The result from JDK classes implementing {@code TemporalAccessor} is as follows:<br> {@code LocalDate} returns null<br> {@code LocalTime} returns null<br> {@code LocalDateTime} returns null<br> {@code ZonedDateTime} returns the associated zone<br> {@code OffsetTime} returns null<br> {@code OffsetDateTime} returns null<br> {@code ChronoLocalDate} returns null<br> {@code ChronoLocalDateTime} returns null<br> {@code ChronoZonedDateTime} returns the associated zone<br> {@code Era} returns null<br> {@code DayOfWeek} returns null<br> {@code Month} returns null<br> {@code Year} returns null<br> {@code YearMonth} returns null<br> {@code MonthDay} returns null<br> {@code ZoneOffset} returns null<br> {@code Instant} returns null<br> @return a query that can obtain the zone ID of a temporal, not null
TemporalQueries::zoneId
java
Reginer/aosp-android-jar
android-31/src/java/time/temporal/TemporalQueries.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/java/time/temporal/TemporalQueries.java
MIT
public static TemporalQuery<Chronology> chronology() { return TemporalQueries.CHRONO; }
A query for the {@code Chronology}. <p> This queries a {@code TemporalAccessor} for the chronology. If the target {@code TemporalAccessor} represents a date, or part of a date, then it should return the chronology that the date is expressed in. As a result of this definition, objects only representing time, such as {@code LocalTime}, will return null. <p> The result from JDK classes implementing {@code TemporalAccessor} is as follows:<br> {@code LocalDate} returns {@code IsoChronology.INSTANCE}<br> {@code LocalTime} returns null (does not represent a date)<br> {@code LocalDateTime} returns {@code IsoChronology.INSTANCE}<br> {@code ZonedDateTime} returns {@code IsoChronology.INSTANCE}<br> {@code OffsetTime} returns null (does not represent a date)<br> {@code OffsetDateTime} returns {@code IsoChronology.INSTANCE}<br> {@code ChronoLocalDate} returns the associated chronology<br> {@code ChronoLocalDateTime} returns the associated chronology<br> {@code ChronoZonedDateTime} returns the associated chronology<br> {@code Era} returns the associated chronology<br> {@code DayOfWeek} returns null (shared across chronologies)<br> {@code Month} returns {@code IsoChronology.INSTANCE}<br> {@code Year} returns {@code IsoChronology.INSTANCE}<br> {@code YearMonth} returns {@code IsoChronology.INSTANCE}<br> {@code MonthDay} returns null {@code IsoChronology.INSTANCE}<br> {@code ZoneOffset} returns null (does not represent a date)<br> {@code Instant} returns null (does not represent a date)<br> <p> The method {@link java.time.chrono.Chronology#from(TemporalAccessor)} can be used as a {@code TemporalQuery} via a method reference, {@code Chronology::from}. That method is equivalent to this query, except that it throws an exception if a chronology cannot be obtained. @return a query that can obtain the chronology of a temporal, not null
TemporalQueries::chronology
java
Reginer/aosp-android-jar
android-31/src/java/time/temporal/TemporalQueries.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/java/time/temporal/TemporalQueries.java
MIT
public static TemporalQuery<TemporalUnit> precision() { return TemporalQueries.PRECISION; }
A query for the smallest supported unit. <p> This queries a {@code TemporalAccessor} for the time precision. If the target {@code TemporalAccessor} represents a consistent or complete date-time, date or time then this must return the smallest precision actually supported. Note that fields such as {@code NANO_OF_DAY} and {@code NANO_OF_SECOND} are defined to always return ignoring the precision, thus this is the only way to find the actual smallest supported unit. For example, were {@code GregorianCalendar} to implement {@code TemporalAccessor} it would return a precision of {@code MILLIS}. <p> The result from JDK classes implementing {@code TemporalAccessor} is as follows:<br> {@code LocalDate} returns {@code DAYS}<br> {@code LocalTime} returns {@code NANOS}<br> {@code LocalDateTime} returns {@code NANOS}<br> {@code ZonedDateTime} returns {@code NANOS}<br> {@code OffsetTime} returns {@code NANOS}<br> {@code OffsetDateTime} returns {@code NANOS}<br> {@code ChronoLocalDate} returns {@code DAYS}<br> {@code ChronoLocalDateTime} returns {@code NANOS}<br> {@code ChronoZonedDateTime} returns {@code NANOS}<br> {@code Era} returns {@code ERAS}<br> {@code DayOfWeek} returns {@code DAYS}<br> {@code Month} returns {@code MONTHS}<br> {@code Year} returns {@code YEARS}<br> {@code YearMonth} returns {@code MONTHS}<br> {@code MonthDay} returns null (does not represent a complete date or time)<br> {@code ZoneOffset} returns null (does not represent a date or time)<br> {@code Instant} returns {@code NANOS}<br> @return a query that can obtain the precision of a temporal, not null
TemporalQueries::precision
java
Reginer/aosp-android-jar
android-31/src/java/time/temporal/TemporalQueries.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/java/time/temporal/TemporalQueries.java
MIT
public static TemporalQuery<ZoneId> zone() { return TemporalQueries.ZONE; }
A lenient query for the {@code ZoneId}, falling back to the {@code ZoneOffset}. <p> This queries a {@code TemporalAccessor} for the zone. It first tries to obtain the zone, using {@link #zoneId()}. If that is not found it tries to obtain the {@link #offset()}. Thus a {@link java.time.ZonedDateTime} will return the result of {@code getZone()}, while an {@link java.time.OffsetDateTime} will return the result of {@code getOffset()}. <p> In most cases, applications should use this query rather than {@code #zoneId()}. <p> The method {@link ZoneId#from(TemporalAccessor)} can be used as a {@code TemporalQuery} via a method reference, {@code ZoneId::from}. That method is equivalent to this query, except that it throws an exception if a zone cannot be obtained. @return a query that can obtain the zone ID or offset of a temporal, not null
TemporalQueries::zone
java
Reginer/aosp-android-jar
android-31/src/java/time/temporal/TemporalQueries.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/java/time/temporal/TemporalQueries.java
MIT
public static TemporalQuery<ZoneOffset> offset() { return TemporalQueries.OFFSET; }
A query for {@code ZoneOffset} returning null if not found. <p> This returns a {@code TemporalQuery} that can be used to query a temporal object for the offset. The query will return null if the temporal object cannot supply an offset. <p> The query implementation examines the {@link ChronoField#OFFSET_SECONDS OFFSET_SECONDS} field and uses it to create a {@code ZoneOffset}. <p> The method {@link java.time.ZoneOffset#from(TemporalAccessor)} can be used as a {@code TemporalQuery} via a method reference, {@code ZoneOffset::from}. This query and {@code ZoneOffset::from} will return the same result if the temporal object contains an offset. If the temporal object does not contain an offset, then the method reference will throw an exception, whereas this query will return null. @return a query that can obtain the offset of a temporal, not null
TemporalQueries::offset
java
Reginer/aosp-android-jar
android-31/src/java/time/temporal/TemporalQueries.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/java/time/temporal/TemporalQueries.java
MIT
public static TemporalQuery<LocalDate> localDate() { return TemporalQueries.LOCAL_DATE; }
A query for {@code LocalDate} returning null if not found. <p> This returns a {@code TemporalQuery} that can be used to query a temporal object for the local date. The query will return null if the temporal object cannot supply a local date. <p> The query implementation examines the {@link ChronoField#EPOCH_DAY EPOCH_DAY} field and uses it to create a {@code LocalDate}. <p> The method {@link ZoneOffset#from(TemporalAccessor)} can be used as a {@code TemporalQuery} via a method reference, {@code LocalDate::from}. This query and {@code LocalDate::from} will return the same result if the temporal object contains a date. If the temporal object does not contain a date, then the method reference will throw an exception, whereas this query will return null. @return a query that can obtain the date of a temporal, not null
TemporalQueries::localDate
java
Reginer/aosp-android-jar
android-31/src/java/time/temporal/TemporalQueries.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/java/time/temporal/TemporalQueries.java
MIT
public static TemporalQuery<LocalTime> localTime() { return TemporalQueries.LOCAL_TIME; }
A query for {@code LocalTime} returning null if not found. <p> This returns a {@code TemporalQuery} that can be used to query a temporal object for the local time. The query will return null if the temporal object cannot supply a local time. <p> The query implementation examines the {@link ChronoField#NANO_OF_DAY NANO_OF_DAY} field and uses it to create a {@code LocalTime}. <p> The method {@link ZoneOffset#from(TemporalAccessor)} can be used as a {@code TemporalQuery} via a method reference, {@code LocalTime::from}. This query and {@code LocalTime::from} will return the same result if the temporal object contains a time. If the temporal object does not contain a time, then the method reference will throw an exception, whereas this query will return null. @return a query that can obtain the time of a temporal, not null
TemporalQueries::localTime
java
Reginer/aosp-android-jar
android-31/src/java/time/temporal/TemporalQueries.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/java/time/temporal/TemporalQueries.java
MIT
public Result isTap(List<MotionEvent> motionEvents, double falsePenalty) { if (motionEvents.isEmpty()) { return falsed(0, "no motion events"); } float downX = motionEvents.get(0).getX(); float downY = motionEvents.get(0).getY(); for (MotionEvent event : motionEvents) { String reason; if (Math.abs(event.getX() - downX) >= mTouchSlop) { reason = "dX too big for a tap: " + Math.abs(event.getX() - downX) + "vs " + mTouchSlop; return falsed(falsePenalty, reason); } else if (Math.abs(event.getY() - downY) >= mTouchSlop) { reason = "dY too big for a tap: " + Math.abs(event.getY() - downY) + " vs " + mTouchSlop; return falsed(falsePenalty, reason); } } return Result.passed(0); }
Falsing classifier that accepts or rejects a gesture as a tap. public abstract class TapClassifier extends FalsingClassifier{ private final float mTouchSlop; TapClassifier(FalsingDataProvider dataProvider, float touchSlop) { super(dataProvider); mTouchSlop = touchSlop; } @Override Result calculateFalsingResult( @Classifier.InteractionType int interactionType, double historyBelief, double historyConfidence) { return isTap(getRecentMotionEvents(), 0.5); } /** Given a list of {@link android.view.MotionEvent}'s, returns true if the look like a tap.
TapClassifier::isTap
java
Reginer/aosp-android-jar
android-34/src/com/android/systemui/classifier/TapClassifier.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/systemui/classifier/TapClassifier.java
MIT
private MidiEvent createScheduledEvent(byte[] msg, int offset, int count, long timestamp) { MidiEvent event; if (count > POOL_EVENT_SIZE) { event = new MidiEvent(msg, offset, count, timestamp); } else { event = (MidiEvent) removeEventfromPool(); if (event == null) { event = new MidiEvent(POOL_EVENT_SIZE); } System.arraycopy(msg, offset, event.data, 0, count); event.count = count; event.setTimestamp(timestamp); } return event; }
Create an event that contains the message.
MidiEvent::createScheduledEvent
java
Reginer/aosp-android-jar
android-32/src/com/android/internal/midi/MidiEventScheduler.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/internal/midi/MidiEventScheduler.java
MIT
public MidiReceiver getReceiver() { return mReceiver; }
This MidiReceiver will write date to the scheduling buffer. @return the MidiReceiver
MidiEvent::getReceiver
java
Reginer/aosp-android-jar
android-32/src/com/android/internal/midi/MidiEventScheduler.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/internal/midi/MidiEventScheduler.java
MIT
public SoftInputWindow(Context context, String name, int theme, Callback callback, KeyEvent.Callback keyEventCallback, KeyEvent.DispatcherState dispatcherState, int windowType, int gravity, boolean takesFocus) { super(context, theme); mName = name; mCallback = callback; mKeyEventCallback = keyEventCallback; mDispatcherState = dispatcherState; mWindowType = windowType; mGravity = gravity; mTakesFocus = takesFocus; initDockWindow(); }
Create a SoftInputWindow that uses a custom style. @param context The Context in which the DockWindow should run. In particular, it uses the window manager and theme from this context to present its UI. @param theme A style resource describing the theme to use for the window. See <a href="{@docRoot}reference/available-resources.html#stylesandthemes">Style and Theme Resources</a> for more information about defining and using styles. This theme is applied on top of the current theme in <var>context</var>. If 0, the default dialog theme will be used.
SoftInputWindow::SoftInputWindow
java
Reginer/aosp-android-jar
android-32/src/android/inputmethodservice/SoftInputWindow.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/inputmethodservice/SoftInputWindow.java
MIT
public void setGravity(int gravity) { WindowManager.LayoutParams lp = getWindow().getAttributes(); lp.gravity = gravity; updateWidthHeight(lp); getWindow().setAttributes(lp); }
Set which boundary of the screen the DockWindow sticks to. @param gravity The boundary of the screen to stick. See {@link android.view.Gravity.LEFT}, {@link android.view.Gravity.TOP}, {@link android.view.Gravity.BOTTOM}, {@link android.view.Gravity.RIGHT}.
SoftInputWindow::setGravity
java
Reginer/aosp-android-jar
android-32/src/android/inputmethodservice/SoftInputWindow.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/inputmethodservice/SoftInputWindow.java
MIT
public SearchManagerService(Context context) { mContext = context; new MyPackageMonitor().register(context, null, UserHandle.ALL, true); new GlobalSearchProviderObserver(context.getContentResolver()); mHandler = BackgroundThread.getHandler(); }
Initializes the Search Manager service in the provided system context. Only one instance of this object should be created! @param context to use for accessing DB, window manager, etc.
Lifecycle::SearchManagerService
java
Reginer/aosp-android-jar
android-32/src/com/android/server/search/SearchManagerService.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/server/search/SearchManagerService.java
MIT
boolean writeDeviceOwner() { if (DEBUG) { Log.d(TAG, "Writing to device owner file"); } return new DeviceOwnerReadWriter().writeToFileLocked(); }
@return true upon success, false otherwise.
OwnersData::writeDeviceOwner
java
Reginer/aosp-android-jar
android-33/src/com/android/server/devicepolicy/OwnersData.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/server/devicepolicy/OwnersData.java
MIT
public StoreException(String msg, Throwable cause) { super(msg); _e = cause; }
Basic Constructor. @param msg message to be associated with this exception. @param cause the throwable that caused this exception to be raised.
StoreException::StoreException
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/org/bouncycastle/util/StoreException.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/util/StoreException.java
MIT
public static android.hardware.gnss.IGnssPowerIndication asInterface(android.os.IBinder obj) { if ((obj==null)) { return null; } android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR); if (((iin!=null)&&(iin instanceof android.hardware.gnss.IGnssPowerIndication))) { return ((android.hardware.gnss.IGnssPowerIndication)iin); } return new android.hardware.gnss.IGnssPowerIndication.Stub.Proxy(obj); }
Cast an IBinder object into an android.hardware.gnss.IGnssPowerIndication interface, generating a proxy if needed.
Stub::asInterface
java
Reginer/aosp-android-jar
android-35/src/android/hardware/gnss/IGnssPowerIndication.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/hardware/gnss/IGnssPowerIndication.java
MIT
public static java.lang.String getDefaultTransactionName(int transactionCode) { switch (transactionCode) { case TRANSACTION_setCallback: { return "setCallback"; } case TRANSACTION_requestGnssPowerStats: { return "requestGnssPowerStats"; } case TRANSACTION_getInterfaceVersion: { return "getInterfaceVersion"; } case TRANSACTION_getInterfaceHash: { return "getInterfaceHash"; } default: { return null; } } }
Cast an IBinder object into an android.hardware.gnss.IGnssPowerIndication interface, generating a proxy if needed. public static android.hardware.gnss.IGnssPowerIndication asInterface(android.os.IBinder obj) { if ((obj==null)) { return null; } android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR); if (((iin!=null)&&(iin instanceof android.hardware.gnss.IGnssPowerIndication))) { return ((android.hardware.gnss.IGnssPowerIndication)iin); } return new android.hardware.gnss.IGnssPowerIndication.Stub.Proxy(obj); } @Override public android.os.IBinder asBinder() { return this; } /** @hide
Stub::getDefaultTransactionName
java
Reginer/aosp-android-jar
android-35/src/android/hardware/gnss/IGnssPowerIndication.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/hardware/gnss/IGnssPowerIndication.java
MIT
public java.lang.String getTransactionName(int transactionCode) { return this.getDefaultTransactionName(transactionCode); }
Cast an IBinder object into an android.hardware.gnss.IGnssPowerIndication interface, generating a proxy if needed. public static android.hardware.gnss.IGnssPowerIndication asInterface(android.os.IBinder obj) { if ((obj==null)) { return null; } android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR); if (((iin!=null)&&(iin instanceof android.hardware.gnss.IGnssPowerIndication))) { return ((android.hardware.gnss.IGnssPowerIndication)iin); } return new android.hardware.gnss.IGnssPowerIndication.Stub.Proxy(obj); } @Override public android.os.IBinder asBinder() { return this; } /** @hide public static java.lang.String getDefaultTransactionName(int transactionCode) { switch (transactionCode) { case TRANSACTION_setCallback: { return "setCallback"; } case TRANSACTION_requestGnssPowerStats: { return "requestGnssPowerStats"; } case TRANSACTION_getInterfaceVersion: { return "getInterfaceVersion"; } case TRANSACTION_getInterfaceHash: { return "getInterfaceHash"; } default: { return null; } } } /** @hide
Stub::getTransactionName
java
Reginer/aosp-android-jar
android-35/src/android/hardware/gnss/IGnssPowerIndication.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/hardware/gnss/IGnssPowerIndication.java
MIT
public int getMaxTransactionId() { return 16777214; }
Cast an IBinder object into an android.hardware.gnss.IGnssPowerIndication interface, generating a proxy if needed. public static android.hardware.gnss.IGnssPowerIndication asInterface(android.os.IBinder obj) { if ((obj==null)) { return null; } android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR); if (((iin!=null)&&(iin instanceof android.hardware.gnss.IGnssPowerIndication))) { return ((android.hardware.gnss.IGnssPowerIndication)iin); } return new android.hardware.gnss.IGnssPowerIndication.Stub.Proxy(obj); } @Override public android.os.IBinder asBinder() { return this; } /** @hide public static java.lang.String getDefaultTransactionName(int transactionCode) { switch (transactionCode) { case TRANSACTION_setCallback: { return "setCallback"; } case TRANSACTION_requestGnssPowerStats: { return "requestGnssPowerStats"; } case TRANSACTION_getInterfaceVersion: { return "getInterfaceVersion"; } case TRANSACTION_getInterfaceHash: { return "getInterfaceHash"; } default: { return null; } } } /** @hide public java.lang.String getTransactionName(int transactionCode) { return this.getDefaultTransactionName(transactionCode); } @Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException { java.lang.String descriptor = DESCRIPTOR; if (code >= android.os.IBinder.FIRST_CALL_TRANSACTION && code <= android.os.IBinder.LAST_CALL_TRANSACTION) { data.enforceInterface(descriptor); } if (code == INTERFACE_TRANSACTION) { reply.writeString(descriptor); return true; } else if (code == TRANSACTION_getInterfaceVersion) { reply.writeNoException(); reply.writeInt(getInterfaceVersion()); return true; } else if (code == TRANSACTION_getInterfaceHash) { reply.writeNoException(); reply.writeString(getInterfaceHash()); return true; } switch (code) { case TRANSACTION_setCallback: { android.hardware.gnss.IGnssPowerIndicationCallback _arg0; _arg0 = android.hardware.gnss.IGnssPowerIndicationCallback.Stub.asInterface(data.readStrongBinder()); data.enforceNoDataAvail(); this.setCallback(_arg0); reply.writeNoException(); break; } case TRANSACTION_requestGnssPowerStats: { this.requestGnssPowerStats(); break; } default: { return super.onTransact(code, data, reply, flags); } } return true; } private static class Proxy implements android.hardware.gnss.IGnssPowerIndication { private android.os.IBinder mRemote; Proxy(android.os.IBinder remote) { mRemote = remote; } private int mCachedVersion = -1; private String mCachedHash = "-1"; @Override public android.os.IBinder asBinder() { return mRemote; } public java.lang.String getInterfaceDescriptor() { return DESCRIPTOR; } @Override public void setCallback(android.hardware.gnss.IGnssPowerIndicationCallback callback) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(asBinder()); android.os.Parcel _reply = android.os.Parcel.obtain(); try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeStrongInterface(callback); boolean _status = mRemote.transact(Stub.TRANSACTION_setCallback, _data, _reply, 0); if (!_status) { throw new android.os.RemoteException("Method setCallback is unimplemented."); } _reply.readException(); } finally { _reply.recycle(); _data.recycle(); } } @Override public void requestGnssPowerStats() throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(asBinder()); try { _data.writeInterfaceToken(DESCRIPTOR); boolean _status = mRemote.transact(Stub.TRANSACTION_requestGnssPowerStats, _data, null, android.os.IBinder.FLAG_ONEWAY); if (!_status) { throw new android.os.RemoteException("Method requestGnssPowerStats is unimplemented."); } } finally { _data.recycle(); } } @Override public int getInterfaceVersion() throws android.os.RemoteException { if (mCachedVersion == -1) { android.os.Parcel data = android.os.Parcel.obtain(asBinder()); android.os.Parcel reply = android.os.Parcel.obtain(); try { data.writeInterfaceToken(DESCRIPTOR); boolean _status = mRemote.transact(Stub.TRANSACTION_getInterfaceVersion, data, reply, 0); reply.readException(); mCachedVersion = reply.readInt(); } finally { reply.recycle(); data.recycle(); } } return mCachedVersion; } @Override public synchronized String getInterfaceHash() throws android.os.RemoteException { if ("-1".equals(mCachedHash)) { android.os.Parcel data = android.os.Parcel.obtain(asBinder()); android.os.Parcel reply = android.os.Parcel.obtain(); try { data.writeInterfaceToken(DESCRIPTOR); boolean _status = mRemote.transact(Stub.TRANSACTION_getInterfaceHash, data, reply, 0); reply.readException(); mCachedHash = reply.readString(); } finally { reply.recycle(); data.recycle(); } } return mCachedHash; } } static final int TRANSACTION_setCallback = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0); static final int TRANSACTION_requestGnssPowerStats = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1); static final int TRANSACTION_getInterfaceVersion = (android.os.IBinder.FIRST_CALL_TRANSACTION + 16777214); static final int TRANSACTION_getInterfaceHash = (android.os.IBinder.FIRST_CALL_TRANSACTION + 16777213); /** @hide
Proxy::getMaxTransactionId
java
Reginer/aosp-android-jar
android-35/src/android/hardware/gnss/IGnssPowerIndication.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/hardware/gnss/IGnssPowerIndication.java
MIT
public WakelockController(int displayId, DisplayManagerInternal.DisplayPowerCallbacks callbacks) { mDisplayId = displayId; mTag = "WakelockController[" + mDisplayId + "]"; mDisplayPowerCallbacks = callbacks; mSuspendBlockerIdUnfinishedBusiness = "[" + displayId + "]unfinished business"; mSuspendBlockerIdOnStateChanged = "[" + displayId + "]on state changed"; mSuspendBlockerIdProxPositive = "[" + displayId + "]prox positive"; mSuspendBlockerIdProxNegative = "[" + displayId + "]prox negative"; mSuspendBlockerIdProxDebounce = "[" + displayId + "]prox debounce"; }
The constructor of WakelockController. Manages the initialization of all the local entities needed for its appropriate functioning.
WakelockController::WakelockController
java
Reginer/aosp-android-jar
android-34/src/com/android/server/display/WakelockController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/WakelockController.java
MIT
public boolean acquireWakelock(@WAKE_LOCK_TYPE int wakelock) { return acquireWakelockInternal(wakelock); }
A utility to acquire a wakelock @param wakelock The type of Wakelock to be acquired @return True of the wakelock is successfully acquired. False if it is already acquired
WakelockController::acquireWakelock
java
Reginer/aosp-android-jar
android-34/src/com/android/server/display/WakelockController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/WakelockController.java
MIT
public boolean releaseWakelock(@WAKE_LOCK_TYPE int wakelock) { return releaseWakelockInternal(wakelock); }
A utility to release a wakelock @param wakelock The type of Wakelock to be released @return True of an acquired wakelock is successfully released. False if it is already acquired
WakelockController::releaseWakelock
java
Reginer/aosp-android-jar
android-34/src/com/android/server/display/WakelockController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/WakelockController.java
MIT
public void releaseAll() { for (int i = WAKE_LOCK_PROXIMITY_POSITIVE; i <= WAKE_LOCK_MAX; i++) { releaseWakelockInternal(i); } }
A utility to release all the wakelock acquired by the system
WakelockController::releaseAll
java
Reginer/aosp-android-jar
android-34/src/com/android/server/display/WakelockController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/WakelockController.java
MIT
private boolean acquireProxPositiveSuspendBlocker() { if (!mIsProximityPositiveAcquired) { mDisplayPowerCallbacks.acquireSuspendBlocker(mSuspendBlockerIdProxPositive); mIsProximityPositiveAcquired = true; return true; } return false; }
Acquires the proximity positive wakelock and notifies the PowerManagerService about the changes.
WakelockController::acquireProxPositiveSuspendBlocker
java
Reginer/aosp-android-jar
android-34/src/com/android/server/display/WakelockController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/WakelockController.java
MIT
private boolean acquireStateChangedSuspendBlocker() { // Grab a wake lock if we have change of the display state if (!mOnStateChangedPending) { if (DEBUG) { Slog.d(mTag, "State Changed..."); } mDisplayPowerCallbacks.acquireSuspendBlocker(mSuspendBlockerIdOnStateChanged); mOnStateChangedPending = true; return true; } return false; }
Acquires the state change wakelock and notifies the PowerManagerService about the changes.
WakelockController::acquireStateChangedSuspendBlocker
java
Reginer/aosp-android-jar
android-34/src/com/android/server/display/WakelockController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/WakelockController.java
MIT
private boolean releaseStateChangedSuspendBlocker() { if (mOnStateChangedPending) { mDisplayPowerCallbacks.releaseSuspendBlocker(mSuspendBlockerIdOnStateChanged); mOnStateChangedPending = false; return true; } return false; }
Releases the state change wakelock and notifies the PowerManagerService about the changes.
WakelockController::releaseStateChangedSuspendBlocker
java
Reginer/aosp-android-jar
android-34/src/com/android/server/display/WakelockController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/WakelockController.java
MIT
private boolean acquireUnfinishedBusinessSuspendBlocker() { // Grab a wake lock if we have unfinished business. if (!mUnfinishedBusiness) { if (DEBUG) { Slog.d(mTag, "Unfinished business..."); } mDisplayPowerCallbacks.acquireSuspendBlocker(mSuspendBlockerIdUnfinishedBusiness); mUnfinishedBusiness = true; return true; } return false; }
Acquires the unfinished business wakelock and notifies the PowerManagerService about the changes.
WakelockController::acquireUnfinishedBusinessSuspendBlocker
java
Reginer/aosp-android-jar
android-34/src/com/android/server/display/WakelockController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/WakelockController.java
MIT
private boolean releaseUnfinishedBusinessSuspendBlocker() { if (mUnfinishedBusiness) { if (DEBUG) { Slog.d(mTag, "Finished business..."); } mDisplayPowerCallbacks.releaseSuspendBlocker(mSuspendBlockerIdUnfinishedBusiness); mUnfinishedBusiness = false; return true; } return false; }
Releases the unfinished business wakelock and notifies the PowerManagerService about the changes.
WakelockController::releaseUnfinishedBusinessSuspendBlocker
java
Reginer/aosp-android-jar
android-34/src/com/android/server/display/WakelockController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/WakelockController.java
MIT
private boolean releaseProxPositiveSuspendBlocker() { if (mIsProximityPositiveAcquired) { mDisplayPowerCallbacks.releaseSuspendBlocker(mSuspendBlockerIdProxPositive); mIsProximityPositiveAcquired = false; return true; } return false; }
Releases the proximity positive wakelock and notifies the PowerManagerService about the changes.
WakelockController::releaseProxPositiveSuspendBlocker
java
Reginer/aosp-android-jar
android-34/src/com/android/server/display/WakelockController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/WakelockController.java
MIT
private boolean acquireProxNegativeSuspendBlocker() { if (!mIsProximityNegativeAcquired) { mDisplayPowerCallbacks.acquireSuspendBlocker(mSuspendBlockerIdProxNegative); mIsProximityNegativeAcquired = true; return true; } return false; }
Acquires the proximity negative wakelock and notifies the PowerManagerService about the changes.
WakelockController::acquireProxNegativeSuspendBlocker
java
Reginer/aosp-android-jar
android-34/src/com/android/server/display/WakelockController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/WakelockController.java
MIT
private boolean releaseProxNegativeSuspendBlocker() { if (mIsProximityNegativeAcquired) { mDisplayPowerCallbacks.releaseSuspendBlocker(mSuspendBlockerIdProxNegative); mIsProximityNegativeAcquired = false; return true; } return false; }
Releases the proximity negative wakelock and notifies the PowerManagerService about the changes.
WakelockController::releaseProxNegativeSuspendBlocker
java
Reginer/aosp-android-jar
android-34/src/com/android/server/display/WakelockController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/WakelockController.java
MIT
private boolean acquireProxDebounceSuspendBlocker() { if (!mHasProximityDebounced) { mDisplayPowerCallbacks.acquireSuspendBlocker(mSuspendBlockerIdProxDebounce); mHasProximityDebounced = true; return true; } return false; }
Acquires the proximity debounce wakelock and notifies the PowerManagerService about the changes.
WakelockController::acquireProxDebounceSuspendBlocker
java
Reginer/aosp-android-jar
android-34/src/com/android/server/display/WakelockController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/WakelockController.java
MIT
private boolean releaseProxDebounceSuspendBlocker() { if (mHasProximityDebounced) { mDisplayPowerCallbacks.releaseSuspendBlocker(mSuspendBlockerIdProxDebounce); mHasProximityDebounced = false; return true; } return false; }
Releases the proximity debounce wakelock and notifies the PowerManagerService about the changes.
WakelockController::releaseProxDebounceSuspendBlocker
java
Reginer/aosp-android-jar
android-34/src/com/android/server/display/WakelockController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/WakelockController.java
MIT
public Runnable getOnProximityPositiveRunnable() { return () -> { if (mIsProximityPositiveAcquired) { mIsProximityPositiveAcquired = false; mDisplayPowerCallbacks.onProximityPositive(); mDisplayPowerCallbacks.releaseSuspendBlocker(mSuspendBlockerIdProxPositive); } }; }
Gets the Runnable to be executed when the proximity becomes positive.
WakelockController::getOnProximityPositiveRunnable
java
Reginer/aosp-android-jar
android-34/src/com/android/server/display/WakelockController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/WakelockController.java
MIT
public Runnable getOnStateChangedRunnable() { return () -> { if (mOnStateChangedPending) { mOnStateChangedPending = false; mDisplayPowerCallbacks.onStateChanged(); mDisplayPowerCallbacks.releaseSuspendBlocker(mSuspendBlockerIdOnStateChanged); } }; }
Gets the Runnable to be executed when the display state changes
WakelockController::getOnStateChangedRunnable
java
Reginer/aosp-android-jar
android-34/src/com/android/server/display/WakelockController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/WakelockController.java
MIT
public Runnable getOnProximityNegativeRunnable() { return () -> { if (mIsProximityNegativeAcquired) { mIsProximityNegativeAcquired = false; mDisplayPowerCallbacks.onProximityNegative(); mDisplayPowerCallbacks.releaseSuspendBlocker(mSuspendBlockerIdProxNegative); } }; }
Gets the Runnable to be executed when the proximity becomes negative.
WakelockController::getOnProximityNegativeRunnable
java
Reginer/aosp-android-jar
android-34/src/com/android/server/display/WakelockController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/WakelockController.java
MIT
public void dumpLocal(PrintWriter pw) { pw.println("WakelockController State:"); pw.println(" mDisplayId=" + mDisplayId); pw.println(" mUnfinishedBusiness=" + hasUnfinishedBusiness()); pw.println(" mOnStateChangePending=" + isOnStateChangedPending()); pw.println(" mOnProximityPositiveMessages=" + isProximityPositiveAcquired()); pw.println(" mOnProximityNegativeMessages=" + isProximityNegativeAcquired()); }
Dumps the current state of this
WakelockController::dumpLocal
java
Reginer/aosp-android-jar
android-34/src/com/android/server/display/WakelockController.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/display/WakelockController.java
MIT
private static String filterNumericSugar(String address) { StringBuilder builder = new StringBuilder(); int len = address.length(); for (int i = 0; i < len; i++) { char c = address.charAt(i); int mapIndex = numericCharDialableMap.indexOfKey(c); if (mapIndex < 0) return null; if (! numericCharDialableMap.valueAt(mapIndex)) continue; builder.append(c); } return builder.toString(); }
Given a numeric address string, return the string without syntactic sugar, meaning parens, spaces, hyphens/minuses, or plus signs. If the input string contains non-numeric non-punctuation characters, return null.
CdmaSmsAddress::filterNumericSugar
java
Reginer/aosp-android-jar
android-32/src/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java
MIT
private static String filterWhitespace(String address) { StringBuilder builder = new StringBuilder(); int len = address.length(); for (int i = 0; i < len; i++) { char c = address.charAt(i); if ((c == ' ') || (c == '\r') || (c == '\n') || (c == '\t')) continue; builder.append(c); } return builder.toString(); }
Given a string, return the string without whitespace, including CR/LF.
CdmaSmsAddress::filterWhitespace
java
Reginer/aosp-android-jar
android-32/src/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/internal/telephony/cdma/sms/CdmaSmsAddress.java
MIT
private void maybeUpdateIconScaleDimens() { // We do not resize and scale system icons (on the right), only notification icons (on the // left). if (mNotification != null || mAlwaysScaleIcon) { updateIconScaleForNotifications(); } else { updateIconScaleForSystemIcons(); } }
Maximum allowed width or height for an icon drawable, if we can't get byte count private static final int MAX_IMAGE_SIZE = 5000; private static final String TAG = "StatusBarIconView"; private static final Property<StatusBarIconView, Float> ICON_APPEAR_AMOUNT = new FloatProperty<StatusBarIconView>("iconAppearAmount") { @Override public void setValue(StatusBarIconView object, float value) { object.setIconAppearAmount(value); } @Override public Float get(StatusBarIconView object) { return object.getIconAppearAmount(); } }; private static final Property<StatusBarIconView, Float> DOT_APPEAR_AMOUNT = new FloatProperty<StatusBarIconView>("dot_appear_amount") { @Override public void setValue(StatusBarIconView object, float value) { object.setDotAppearAmount(value); } @Override public Float get(StatusBarIconView object) { return object.getDotAppearAmount(); } }; private boolean mAlwaysScaleIcon; private int mStatusBarIconDrawingSizeIncreased = 1; private int mStatusBarIconDrawingSize = 1; private int mStatusBarIconSize = 1; private StatusBarIcon mIcon; @ViewDebug.ExportedProperty private String mSlot; private Drawable mNumberBackground; private Paint mNumberPain; private int mNumberX; private int mNumberY; private String mNumberText; private StatusBarNotification mNotification; private final boolean mBlocked; private int mDensity; private boolean mNightMode; private float mIconScale = 1.0f; private final Paint mDotPaint = new Paint(Paint.ANTI_ALIAS_FLAG); private float mDotRadius; private int mStaticDotRadius; private int mVisibleState = STATE_ICON; private float mIconAppearAmount = 1.0f; private ObjectAnimator mIconAppearAnimator; private ObjectAnimator mDotAnimator; private float mDotAppearAmount; private OnVisibilityChangedListener mOnVisibilityChangedListener; private int mDrawableColor; private int mIconColor; private int mDecorColor; private float mDozeAmount; private ValueAnimator mColorAnimator; private int mCurrentSetColor = NO_COLOR; private int mAnimationStartColor = NO_COLOR; private final ValueAnimator.AnimatorUpdateListener mColorUpdater = animation -> { int newColor = NotificationUtils.interpolateColors(mAnimationStartColor, mIconColor, animation.getAnimatedFraction()); setColorInternal(newColor); }; private final NotificationIconDozeHelper mDozer; private int mContrastedDrawableColor; private int mCachedContrastBackgroundColor = NO_COLOR; private float[] mMatrix; private ColorMatrixColorFilter mMatrixColorFilter; private boolean mIsInShelf; private Runnable mLayoutRunnable; private boolean mDismissed; private Runnable mOnDismissListener; private boolean mIncreasedSize; private boolean mShowsConversation; public StatusBarIconView(Context context, String slot, StatusBarNotification sbn) { this(context, slot, sbn, false); } public StatusBarIconView(Context context, String slot, StatusBarNotification sbn, boolean blocked) { super(context); mDozer = new NotificationIconDozeHelper(context); mBlocked = blocked; mSlot = slot; mNumberPain = new Paint(); mNumberPain.setTextAlign(Paint.Align.CENTER); mNumberPain.setColor(context.getColor(R.drawable.notification_number_text_color)); mNumberPain.setAntiAlias(true); setNotification(sbn); setScaleType(ScaleType.CENTER); mDensity = context.getResources().getDisplayMetrics().densityDpi; Configuration configuration = context.getResources().getConfiguration(); mNightMode = (configuration.uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES; initializeDecorColor(); reloadDimens(); maybeUpdateIconScaleDimens(); } public StatusBarIconView(Context context, AttributeSet attrs) { super(context, attrs); mDozer = new NotificationIconDozeHelper(context); mBlocked = false; mAlwaysScaleIcon = true; reloadDimens(); maybeUpdateIconScaleDimens(); mDensity = context.getResources().getDisplayMetrics().densityDpi; } /** Should always be preceded by {@link #reloadDimens()}
StatusBarIconView::maybeUpdateIconScaleDimens
java
Reginer/aosp-android-jar
android-31/src/com/android/systemui/statusbar/StatusBarIconView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/statusbar/StatusBarIconView.java
MIT
public boolean set(StatusBarIcon icon) { final boolean iconEquals = mIcon != null && equalIcons(mIcon.icon, icon.icon); final boolean levelEquals = iconEquals && mIcon.iconLevel == icon.iconLevel; final boolean visibilityEquals = mIcon != null && mIcon.visible == icon.visible; final boolean numberEquals = mIcon != null && mIcon.number == icon.number; mIcon = icon.clone(); setContentDescription(icon.contentDescription); if (!iconEquals) { if (!updateDrawable(false /* no clear */)) return false; // we have to clear the grayscale tag since it may have changed setTag(R.id.icon_is_grayscale, null); // Maybe set scale based on icon height maybeUpdateIconScaleDimens(); } if (!levelEquals) { setImageLevel(icon.iconLevel); } if (!numberEquals) { if (icon.number > 0 && getContext().getResources().getBoolean( R.bool.config_statusBarShowNumber)) { if (mNumberBackground == null) { mNumberBackground = getContext().getResources().getDrawable( R.drawable.ic_notification_overlay); } placeNumber(); } else { mNumberBackground = null; mNumberText = null; } invalidate(); } if (!visibilityEquals) { setVisibility(icon.visible && !mBlocked ? VISIBLE : GONE); } return true; }
Returns whether the set succeeded.
StatusBarIconView::set
java
Reginer/aosp-android-jar
android-31/src/com/android/systemui/statusbar/StatusBarIconView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/statusbar/StatusBarIconView.java
MIT
public static Drawable getIcon(Context sysuiContext, Context context, StatusBarIcon statusBarIcon) { int userId = statusBarIcon.user.getIdentifier(); if (userId == UserHandle.USER_ALL) { userId = UserHandle.USER_SYSTEM; } Drawable icon = statusBarIcon.icon.loadDrawableAsUser(context, userId); TypedValue typedValue = new TypedValue(); sysuiContext.getResources().getValue(R.dimen.status_bar_icon_scale_factor, typedValue, true); float scaleFactor = typedValue.getFloat(); // No need to scale the icon, so return it as is. if (scaleFactor == 1.f) { return icon; } return new ScalingDrawableWrapper(icon, scaleFactor); }
Returns the right icon to use for this item @param sysuiContext Context to use to get scale factor @param context Context to use to get resources of notification icon @return Drawable for this item, or null if the package or item could not be found
StatusBarIconView::getIcon
java
Reginer/aosp-android-jar
android-31/src/com/android/systemui/statusbar/StatusBarIconView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/statusbar/StatusBarIconView.java
MIT
public void setDecorColor(int iconTint) { mDecorColor = iconTint; updateDecorColor(); }
Set the color that is used to draw decoration like the overflow dot. This will not be applied to the drawable.
StatusBarIconView::setDecorColor
java
Reginer/aosp-android-jar
android-31/src/com/android/systemui/statusbar/StatusBarIconView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/statusbar/StatusBarIconView.java
MIT
public void setStaticDrawableColor(int color) { mDrawableColor = color; setColorInternal(color); updateContrastedStaticColor(); mIconColor = color; mDozer.setColor(color); }
Set the static color that should be used for the drawable of this icon if it's not transitioning this also immediately sets the color.
StatusBarIconView::setStaticDrawableColor
java
Reginer/aosp-android-jar
android-31/src/com/android/systemui/statusbar/StatusBarIconView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/statusbar/StatusBarIconView.java
MIT
private static void updateTintMatrix(float[] array, int color, float alphaBoost) { Arrays.fill(array, 0); array[4] = Color.red(color); array[9] = Color.green(color); array[14] = Color.blue(color); array[18] = Color.alpha(color) / 255f + alphaBoost; }
Updates {@param array} such that it represents a matrix that changes RGB to {@param color} and multiplies the alpha channel with the color's alpha+{@param alphaBoost}.
StatusBarIconView::updateTintMatrix
java
Reginer/aosp-android-jar
android-31/src/com/android/systemui/statusbar/StatusBarIconView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/statusbar/StatusBarIconView.java
MIT
int getContrastedStaticDrawableColor(int backgroundColor) { if (mCachedContrastBackgroundColor != backgroundColor) { mCachedContrastBackgroundColor = backgroundColor; updateContrastedStaticColor(); } return mContrastedDrawableColor; }
A drawable color that passes GAR on a specific background. This value is cached. @param backgroundColor Background to test against. @return GAR safe version of {@link StatusBarIconView#getStaticDrawableColor()}.
StatusBarIconView::getContrastedStaticDrawableColor
java
Reginer/aosp-android-jar
android-31/src/com/android/systemui/statusbar/StatusBarIconView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/statusbar/StatusBarIconView.java
MIT
public void setVisibleState(int visibleState, boolean animate, Runnable endRunnable, long duration) { boolean runnableAdded = false; if (visibleState != mVisibleState) { mVisibleState = visibleState; if (mIconAppearAnimator != null) { mIconAppearAnimator.cancel(); } if (mDotAnimator != null) { mDotAnimator.cancel(); } if (animate) { float targetAmount = 0.0f; Interpolator interpolator = Interpolators.FAST_OUT_LINEAR_IN; if (visibleState == STATE_ICON) { targetAmount = 1.0f; interpolator = Interpolators.LINEAR_OUT_SLOW_IN; } float currentAmount = getIconAppearAmount(); if (targetAmount != currentAmount) { mIconAppearAnimator = ObjectAnimator.ofFloat(this, ICON_APPEAR_AMOUNT, currentAmount, targetAmount); mIconAppearAnimator.setInterpolator(interpolator); mIconAppearAnimator.setDuration(duration == 0 ? ANIMATION_DURATION_FAST : duration); mIconAppearAnimator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { mIconAppearAnimator = null; runRunnable(endRunnable); } }); mIconAppearAnimator.start(); runnableAdded = true; } targetAmount = visibleState == STATE_ICON ? 2.0f : 0.0f; interpolator = Interpolators.FAST_OUT_LINEAR_IN; if (visibleState == STATE_DOT) { targetAmount = 1.0f; interpolator = Interpolators.LINEAR_OUT_SLOW_IN; } currentAmount = getDotAppearAmount(); if (targetAmount != currentAmount) { mDotAnimator = ObjectAnimator.ofFloat(this, DOT_APPEAR_AMOUNT, currentAmount, targetAmount); mDotAnimator.setInterpolator(interpolator);; mDotAnimator.setDuration(duration == 0 ? ANIMATION_DURATION_FAST : duration); final boolean runRunnable = !runnableAdded; mDotAnimator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { mDotAnimator = null; if (runRunnable) { runRunnable(endRunnable); } } }); mDotAnimator.start(); runnableAdded = true; } } else { setIconAppearAmount(visibleState == STATE_ICON ? 1.0f : 0.0f); setDotAppearAmount(visibleState == STATE_DOT ? 1.0f : visibleState == STATE_ICON ? 2.0f : 0.0f); } } if (!runnableAdded) { runRunnable(endRunnable); } }
Set the visibleState of this view. @param visibleState The new state. @param animate Should we animate? @param endRunnable The runnable to run at the end. @param duration The duration of an animation or 0 if the default should be taken.
StatusBarIconView::setVisibleState
java
Reginer/aosp-android-jar
android-31/src/com/android/systemui/statusbar/StatusBarIconView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/statusbar/StatusBarIconView.java
MIT
public void setShowsConversation(boolean showsConversation) { if (mShowsConversation != showsConversation) { mShowsConversation = showsConversation; updateIconColor(); } }
Sets whether this icon shows a person and should be tinted. If the state differs from the supplied setting, this will update the icon colors. @param showsConversation Whether the icon shows a person
StatusBarIconView::setShowsConversation
java
Reginer/aosp-android-jar
android-31/src/com/android/systemui/statusbar/StatusBarIconView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/statusbar/StatusBarIconView.java
MIT
public boolean showsConversation() { return mShowsConversation; }
@return if this icon shows a conversation
StatusBarIconView::showsConversation
java
Reginer/aosp-android-jar
android-31/src/com/android/systemui/statusbar/StatusBarIconView.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/statusbar/StatusBarIconView.java
MIT
public InferenceInputParcel(@NonNull InferenceInput value) { this( new ModelId.Builder() .setTableId(value.getParams().getKeyValueStore().getTableId()) .setKey(value.getParams().getModelKey()) .build(), value.getParams().getDelegateType(), value.getParams().getRecommendedNumThreads(), ByteArrayParceledListSlice.create(value.getInputData()), value.getBatchSize(), value.getParams().getModelType(), new InferenceOutputParcel(value.getExpectedOutputStructure())); }
The empty InferenceOutput representing the expected output structure. For TFLite, the inference code will verify whether this expected output structure matches model output signature. @NonNull private InferenceOutputParcel mExpectedOutputStructure; /** @hide
InferenceInputParcel::InferenceInputParcel
java
Reginer/aosp-android-jar
android-35/src/android/adservices/ondevicepersonalization/InferenceInputParcel.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/adservices/ondevicepersonalization/InferenceInputParcel.java
MIT
public Address(Locale locale) { mLocale = locale; }
Constructs a new Address object set to the given Locale and with all other fields initialized to null or false.
Address::Address
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public Locale getLocale() { return mLocale; }
Returns the Locale associated with this address.
Address::getLocale
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public int getMaxAddressLineIndex() { return mMaxAddressLineIndex; }
Returns the largest index currently in use to specify an address line. If no address lines are specified, -1 is returned.
Address::getMaxAddressLineIndex
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public String getAddressLine(int index) { if (index < 0) { throw new IllegalArgumentException("index = " + index + " < 0"); } return mAddressLines == null? null : mAddressLines.get(index); }
Returns a line of the address numbered by the given index (starting at 0), or null if no such line is present. @throws IllegalArgumentException if index < 0
Address::getAddressLine
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public void setAddressLine(int index, String line) { if (index < 0) { throw new IllegalArgumentException("index = " + index + " < 0"); } if (mAddressLines == null) { mAddressLines = new HashMap<Integer, String>(); } mAddressLines.put(index, line); if (line == null) { // We've eliminated a line, recompute the max index mMaxAddressLineIndex = -1; for (Integer i : mAddressLines.keySet()) { mMaxAddressLineIndex = Math.max(mMaxAddressLineIndex, i); } } else { mMaxAddressLineIndex = Math.max(mMaxAddressLineIndex, index); } }
Sets the line of the address numbered by index (starting at 0) to the given String, which may be null. @throws IllegalArgumentException if index < 0
Address::setAddressLine
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public String getFeatureName() { return mFeatureName; }
Returns the feature name of the address, for example, "Golden Gate Bridge", or null if it is unknown
Address::getFeatureName
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public void setFeatureName(String featureName) { mFeatureName = featureName; }
Sets the feature name of the address to the given String, which may be null
Address::setFeatureName
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public String getAdminArea() { return mAdminArea; }
Returns the administrative area name of the address, for example, "CA", or null if it is unknown
Address::getAdminArea
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public void setAdminArea(String adminArea) { this.mAdminArea = adminArea; }
Sets the administrative area name of the address to the given String, which may be null
Address::setAdminArea
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public String getSubAdminArea() { return mSubAdminArea; }
Returns the sub-administrative area name of the address, for example, "Santa Clara County", or null if it is unknown
Address::getSubAdminArea
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public void setSubAdminArea(String subAdminArea) { this.mSubAdminArea = subAdminArea; }
Sets the sub-administrative area name of the address to the given String, which may be null
Address::setSubAdminArea
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public String getLocality() { return mLocality; }
Returns the locality of the address, for example "Mountain View", or null if it is unknown.
Address::getLocality
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public void setLocality(String locality) { mLocality = locality; }
Sets the locality of the address to the given String, which may be null.
Address::setLocality
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public String getSubLocality() { return mSubLocality; }
Returns the sub-locality of the address, or null if it is unknown. For example, this may correspond to the neighborhood of the locality.
Address::getSubLocality
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public void setSubLocality(String sublocality) { mSubLocality = sublocality; }
Sets the sub-locality of the address to the given String, which may be null.
Address::setSubLocality
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public String getThoroughfare() { return mThoroughfare; }
Returns the thoroughfare name of the address, for example, "1600 Ampitheater Parkway", which may be null
Address::getThoroughfare
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public void setThoroughfare(String thoroughfare) { this.mThoroughfare = thoroughfare; }
Sets the thoroughfare name of the address, which may be null.
Address::setThoroughfare
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public String getSubThoroughfare() { return mSubThoroughfare; }
Returns the sub-thoroughfare name of the address, which may be null. This may correspond to the street number of the address.
Address::getSubThoroughfare
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public void setSubThoroughfare(String subthoroughfare) { this.mSubThoroughfare = subthoroughfare; }
Sets the sub-thoroughfare name of the address, which may be null.
Address::setSubThoroughfare
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public String getPremises() { return mPremises; }
Returns the premises of the address, or null if it is unknown.
Address::getPremises
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public void setPremises(String premises) { mPremises = premises; }
Sets the premises of the address to the given String, which may be null.
Address::setPremises
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public String getPostalCode() { return mPostalCode; }
Returns the postal code of the address, for example "94110", or null if it is unknown.
Address::getPostalCode
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public void setPostalCode(String postalCode) { mPostalCode = postalCode; }
Sets the postal code of the address to the given String, which may be null.
Address::setPostalCode
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public String getCountryCode() { return mCountryCode; }
Returns the country code of the address, for example "US", or null if it is unknown.
Address::getCountryCode
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public void setCountryCode(String countryCode) { mCountryCode = countryCode; }
Sets the country code of the address to the given String, which may be null.
Address::setCountryCode
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public String getCountryName() { return mCountryName; }
Returns the localized country name of the address, for example "Iceland", or null if it is unknown.
Address::getCountryName
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public void setCountryName(String countryName) { mCountryName = countryName; }
Sets the country name of the address to the given String, which may be null.
Address::setCountryName
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public boolean hasLatitude() { return mHasLatitude; }
Returns true if a latitude has been assigned to this Address, false otherwise.
Address::hasLatitude
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public double getLatitude() { if (mHasLatitude) { return mLatitude; } else { throw new IllegalStateException(); } }
Returns the latitude of the address if known. @throws IllegalStateException if this Address has not been assigned a latitude.
Address::getLatitude
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public void setLatitude(double latitude) { mLatitude = latitude; mHasLatitude = true; }
Sets the latitude associated with this address.
Address::setLatitude
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public void clearLatitude() { mHasLatitude = false; }
Removes any latitude associated with this address.
Address::clearLatitude
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public boolean hasLongitude() { return mHasLongitude; }
Returns true if a longitude has been assigned to this Address, false otherwise.
Address::hasLongitude
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public double getLongitude() { if (mHasLongitude) { return mLongitude; } else { throw new IllegalStateException(); } }
Returns the longitude of the address if known. @throws IllegalStateException if this Address has not been assigned a longitude.
Address::getLongitude
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public void setLongitude(double longitude) { mLongitude = longitude; mHasLongitude = true; }
Sets the longitude associated with this address.
Address::setLongitude
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public void clearLongitude() { mHasLongitude = false; }
Removes any longitude associated with this address.
Address::clearLongitude
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public String getPhone() { return mPhone; }
Returns the phone number of the address if known, or null if it is unknown. @throws IllegalStateException if this Address has not been assigned a phone number.
Address::getPhone
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public void setPhone(String phone) { mPhone = phone; }
Sets the phone number associated with this address.
Address::setPhone
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public String getUrl() { return mUrl; }
Returns the public URL for the address if known, or null if it is unknown.
Address::getUrl
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public void setUrl(String Url) { mUrl = Url; }
Sets the public URL associated with this address.
Address::setUrl
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT
public Bundle getExtras() { return mExtras; }
Returns additional provider-specific information about the address as a Bundle. The keys and values are determined by the provider. If no additional information is available, null is returned. <!-- <p> A number of common key/value pairs are listed below. Providers that use any of the keys on this list must provide the corresponding value as described below. <ul> </ul> -->
Address::getExtras
java
Reginer/aosp-android-jar
android-33/src/android/location/Address.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/location/Address.java
MIT