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 TypefaceSpan(@NonNull Parcel src) {
mFamily = src.readString();
mTypeface = LeakyTypefaceStorage.readTypefaceFromParcel(src);
} |
Constructs a {@link TypefaceSpan} from a parcel.
| TypefaceSpan::TypefaceSpan | java | Reginer/aosp-android-jar | android-33/src/android/text/style/TypefaceSpan.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/text/style/TypefaceSpan.java | MIT |
public int getChainId() {
return chainId;
} |
Return an identifier for this radio chain. This is an arbitrary ID which is consistent for
the same device.
@return The radio chain ID.
| RadioChainInfo::getChainId | java | Reginer/aosp-android-jar | android-33/src/android/net/wifi/nl80211/RadioChainInfo.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/net/wifi/nl80211/RadioChainInfo.java | MIT |
public int getLevelDbm() {
return level;
} |
Returns the detected signal level on this radio chain in dBm (aka RSSI).
@return A signal level in dBm.
| RadioChainInfo::getLevelDbm | java | Reginer/aosp-android-jar | android-33/src/android/net/wifi/nl80211/RadioChainInfo.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/net/wifi/nl80211/RadioChainInfo.java | MIT |
public RadioChainInfo(int chainId, int level) {
this.chainId = chainId;
this.level = level;
} |
Construct a RadioChainInfo.
| RadioChainInfo::RadioChainInfo | java | Reginer/aosp-android-jar | android-33/src/android/net/wifi/nl80211/RadioChainInfo.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/net/wifi/nl80211/RadioChainInfo.java | MIT |
protected void setBoostToPriority(int priority) {
// We don't care about the other threads here, as long as they see the update of this
// variable immediately.
mBoostToPriority = priority;
final PriorityState state = mThreadState.get();
if (state.regionCounter != 0) {
final int prevPriority = getThreadPriority(state.tid);
if (prevPriority != priority) {
setThreadPriority(state.tid, priority);
}
}
} |
Updates the priority we boost the threads to, and updates the current thread's priority if
necessary.
| ThreadPriorityBooster::setBoostToPriority | java | Reginer/aosp-android-jar | android-33/src/com/android/server/ThreadPriorityBooster.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/server/ThreadPriorityBooster.java | MIT |
public MediaRouter.RouteInfo getRoute() {
return mRoute;
} |
Gets the route that this dialog is controlling.
| MediaRouteControllerDialog::getRoute | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/app/MediaRouteControllerDialog.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/app/MediaRouteControllerDialog.java | MIT |
public View onCreateMediaControlView(Bundle savedInstanceState) {
return null;
} |
Provides the subclass an opportunity to create a view that will
be included within the body of the dialog to offer additional media controls
for the currently playing content.
@param savedInstanceState The dialog's saved instance state.
@return The media control view, or null if none.
| MediaRouteControllerDialog::onCreateMediaControlView | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/app/MediaRouteControllerDialog.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/app/MediaRouteControllerDialog.java | MIT |
public View getMediaControlView() {
return mControlView;
} |
Gets the media control view that was created by {@link #onCreateMediaControlView(Bundle)}.
@return The media control view, or null if none.
| MediaRouteControllerDialog::getMediaControlView | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/app/MediaRouteControllerDialog.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/app/MediaRouteControllerDialog.java | MIT |
public void setVolumeControlEnabled(boolean enable) {
if (mVolumeControlEnabled != enable) {
mVolumeControlEnabled = enable;
if (mCreated) {
updateVolume();
}
}
} |
Sets whether to enable the volume slider and volume control using the volume keys
when the route supports it.
<p>
The default value is true.
</p>
| MediaRouteControllerDialog::setVolumeControlEnabled | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/app/MediaRouteControllerDialog.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/app/MediaRouteControllerDialog.java | MIT |
public boolean isVolumeControlEnabled() {
return mVolumeControlEnabled;
} |
Returns whether to enable the volume slider and volume control using the volume keys
when the route supports it.
| MediaRouteControllerDialog::isVolumeControlEnabled | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/app/MediaRouteControllerDialog.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/app/MediaRouteControllerDialog.java | MIT |
public void initialize(
CentralSurfaces centralSurfaces,
StatusBarKeyguardViewManager statusBarKeyguardViewManager,
NotificationShadeWindowViewController notificationShadeWindowViewController,
NotificationPanelViewController notificationPanel,
View ambientIndicationContainer) {
mCentralSurfaces = centralSurfaces;
mStatusBarKeyguardViewManager = statusBarKeyguardViewManager;
mNotificationPanel = notificationPanel;
mNotificationShadeWindowViewController = notificationShadeWindowViewController;
mAmbientIndicationContainer = ambientIndicationContainer;
} |
Initialize instance with objects only available later during execution.
| DozeServiceHost::initialize | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/statusbar/phone/DozeServiceHost.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/phone/DozeServiceHost.java | MIT |
boolean hasPendingScreenOffCallback() {
return mPendingScreenOffCallback != null;
} |
When the dozing host is waiting for scrims to fade out to change the display state.
| DozeServiceHost::hasPendingScreenOffCallback | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/statusbar/phone/DozeServiceHost.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/phone/DozeServiceHost.java | MIT |
void executePendingScreenOffCallback() {
if (mPendingScreenOffCallback == null) {
return;
}
mPendingScreenOffCallback.run();
mPendingScreenOffCallback = null;
} |
Executes an nullifies the pending display state callback.
@see #hasPendingScreenOffCallback()
@see #prepareForGentleSleep(Runnable)
| DozeServiceHost::executePendingScreenOffCallback | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/statusbar/phone/DozeServiceHost.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/phone/DozeServiceHost.java | MIT |
void setAlwaysOnSuppressed(boolean suppressed) {
if (suppressed == mAlwaysOnSuppressed) {
return;
}
mAlwaysOnSuppressed = suppressed;
for (Callback callback : mCallbacks) {
callback.onAlwaysOnSuppressedChanged(suppressed);
}
} |
Suppresses always-on-display and waking up the display for notifications.
Does not disable wakeup gestures like pickup and tap.
| DozeServiceHost::setAlwaysOnSuppressed | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/statusbar/phone/DozeServiceHost.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/phone/DozeServiceHost.java | MIT |
public boolean isAlwaysOnSuppressed() {
return mAlwaysOnSuppressed;
} |
Whether always-on-display is being suppressed. This does not affect wakeup gestures like
pickup and tap.
| DozeServiceHost::isAlwaysOnSuppressed | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/statusbar/phone/DozeServiceHost.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/phone/DozeServiceHost.java | MIT |
public XalanDOMTestDocumentBuilderFactory(
DocumentBuilderFactory baseFactory,
DocumentBuilderSetting[] settings) throws DOMTestIncompatibleException {
super(baseFactory, settings);
} |
Creates a JAXP implementation of DOMTestDocumentBuilderFactory.
@param factory null for default JAXP provider. If not null,
factory will be mutated in constructor and should be released
by calling code upon return.
@param settings array of settings, may be null.
| XalanDOMTestDocumentBuilderFactory::XalanDOMTestDocumentBuilderFactory | java | Reginer/aosp-android-jar | android-32/src/org/w3c/domts/XalanDOMTestDocumentBuilderFactory.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/org/w3c/domts/XalanDOMTestDocumentBuilderFactory.java | MIT |
public Object createXPathEvaluator(Document doc) {
try {
Class xpathClass = Class.forName(
"org.apache.xpath.domapi.XPathEvaluatorImpl");
Constructor constructor = xpathClass.getConstructor(new Class[] {Document.class});
return constructor.newInstance(new Object[] {doc});
}
catch (Exception ex) {
}
return doc;
} |
Creates XPath evaluator
@param doc DOM document, may not be null
| XalanDOMTestDocumentBuilderFactory::createXPathEvaluator | java | Reginer/aosp-android-jar | android-32/src/org/w3c/domts/XalanDOMTestDocumentBuilderFactory.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/org/w3c/domts/XalanDOMTestDocumentBuilderFactory.java | MIT |
TreeSet(NavigableMap<E,Object> m) {
this.m = m;
} |
Constructs a set backed by the specified navigable map.
| TreeSet::TreeSet | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public TreeSet() {
this(new TreeMap<>());
} |
Constructs a new, empty tree set, sorted according to the
natural ordering of its elements. All elements inserted into
the set must implement the {@link Comparable} interface.
Furthermore, all such elements must be <i>mutually
comparable</i>: {@code e1.compareTo(e2)} must not throw a
{@code ClassCastException} for any elements {@code e1} and
{@code e2} in the set. If the user attempts to add an element
to the set that violates this constraint (for example, the user
attempts to add a string element to a set whose elements are
integers), the {@code add} call will throw a
{@code ClassCastException}.
| TreeSet::TreeSet | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public TreeSet(Comparator<? super E> comparator) {
this(new TreeMap<>(comparator));
} |
Constructs a new, empty tree set, sorted according to the specified
comparator. All elements inserted into the set must be <i>mutually
comparable</i> by the specified comparator: {@code comparator.compare(e1,
e2)} must not throw a {@code ClassCastException} for any elements
{@code e1} and {@code e2} in the set. If the user attempts to add
an element to the set that violates this constraint, the
{@code add} call will throw a {@code ClassCastException}.
@param comparator the comparator that will be used to order this set.
If {@code null}, the {@linkplain Comparable natural
ordering} of the elements will be used.
| TreeSet::TreeSet | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public TreeSet(Collection<? extends E> c) {
this();
addAll(c);
} |
Constructs a new tree set containing the elements in the specified
collection, sorted according to the <i>natural ordering</i> of its
elements. All elements inserted into the set must implement the
{@link Comparable} interface. Furthermore, all such elements must be
<i>mutually comparable</i>: {@code e1.compareTo(e2)} must not throw a
{@code ClassCastException} for any elements {@code e1} and
{@code e2} in the set.
@param c collection whose elements will comprise the new set
@throws ClassCastException if the elements in {@code c} are
not {@link Comparable}, or are not mutually comparable
@throws NullPointerException if the specified collection is null
| TreeSet::TreeSet | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public TreeSet(SortedSet<E> s) {
this(s.comparator());
addAll(s);
} |
Constructs a new tree set containing the same elements and
using the same ordering as the specified sorted set.
@param s sorted set whose elements will comprise the new set
@throws NullPointerException if the specified sorted set is null
| TreeSet::TreeSet | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public Iterator<E> iterator() {
return m.navigableKeySet().iterator();
} |
Returns an iterator over the elements in this set in ascending order.
@return an iterator over the elements in this set in ascending order
| TreeSet::iterator | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public Iterator<E> descendingIterator() {
return m.descendingKeySet().iterator();
} |
Returns an iterator over the elements in this set in descending order.
@return an iterator over the elements in this set in descending order
@since 1.6
| TreeSet::descendingIterator | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public NavigableSet<E> descendingSet() {
return new TreeSet<>(m.descendingMap());
} |
@since 1.6
| TreeSet::descendingSet | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public int size() {
return m.size();
} |
Returns the number of elements in this set (its cardinality).
@return the number of elements in this set (its cardinality)
| TreeSet::size | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public boolean isEmpty() {
return m.isEmpty();
} |
Returns {@code true} if this set contains no elements.
@return {@code true} if this set contains no elements
| TreeSet::isEmpty | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public boolean contains(Object o) {
return m.containsKey(o);
} |
Returns {@code true} if this set contains the specified element.
More formally, returns {@code true} if and only if this set
contains an element {@code e} such that
{@code Objects.equals(o, e)}.
@param o object to be checked for containment in this set
@return {@code true} if this set contains the specified element
@throws ClassCastException if the specified object cannot be compared
with the elements currently in the set
@throws NullPointerException if the specified element is null
and this set uses natural ordering, or its comparator
does not permit null elements
| TreeSet::contains | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public boolean add(E e) {
return m.put(e, PRESENT)==null;
} |
Adds the specified element to this set if it is not already present.
More formally, adds the specified element {@code e} to this set if
the set contains no element {@code e2} such that
{@code Objects.equals(e, e2)}.
If this set already contains the element, the call leaves the set
unchanged and returns {@code false}.
@param e element to be added to this set
@return {@code true} if this set did not already contain the specified
element
@throws ClassCastException if the specified object cannot be compared
with the elements currently in this set
@throws NullPointerException if the specified element is null
and this set uses natural ordering, or its comparator
does not permit null elements
| TreeSet::add | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public boolean remove(Object o) {
return m.remove(o)==PRESENT;
} |
Removes the specified element from this set if it is present.
More formally, removes an element {@code e} such that
{@code Objects.equals(o, e)},
if this set contains such an element. Returns {@code true} if
this set contained the element (or equivalently, if this set
changed as a result of the call). (This set will not contain the
element once the call returns.)
@param o object to be removed from this set, if present
@return {@code true} if this set contained the specified element
@throws ClassCastException if the specified object cannot be compared
with the elements currently in this set
@throws NullPointerException if the specified element is null
and this set uses natural ordering, or its comparator
does not permit null elements
| TreeSet::remove | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public void clear() {
m.clear();
} |
Removes all of the elements from this set.
The set will be empty after this call returns.
| TreeSet::clear | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public boolean addAll(Collection<? extends E> c) {
// Use linear-time version if applicable
if (m.size()==0 && c.size() > 0 &&
c instanceof SortedSet &&
m instanceof TreeMap) {
SortedSet<? extends E> set = (SortedSet<? extends E>) c;
TreeMap<E,Object> map = (TreeMap<E, Object>) m;
Comparator<?> cc = set.comparator();
Comparator<? super E> mc = map.comparator();
if (cc==mc || (cc != null && cc.equals(mc))) {
map.addAllForTreeSet(set, PRESENT);
return true;
}
}
return super.addAll(c);
} |
Adds all of the elements in the specified collection to this set.
@param c collection containing elements to be added to this set
@return {@code true} if this set changed as a result of the call
@throws ClassCastException if the elements provided cannot be compared
with the elements currently in the set
@throws NullPointerException if the specified collection is null or
if any element is null and this set uses natural ordering, or
its comparator does not permit null elements
| TreeSet::addAll | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public NavigableSet<E> subSet(E fromElement, boolean fromInclusive,
E toElement, boolean toInclusive) {
return new TreeSet<>(m.subMap(fromElement, fromInclusive,
toElement, toInclusive));
} |
@throws ClassCastException {@inheritDoc}
@throws NullPointerException if {@code fromElement} or {@code toElement}
is null and this set uses natural ordering, or its comparator
does not permit null elements
@throws IllegalArgumentException {@inheritDoc}
@since 1.6
| TreeSet::subSet | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public NavigableSet<E> headSet(E toElement, boolean inclusive) {
return new TreeSet<>(m.headMap(toElement, inclusive));
} |
@throws ClassCastException {@inheritDoc}
@throws NullPointerException if {@code toElement} is null and
this set uses natural ordering, or its comparator does
not permit null elements
@throws IllegalArgumentException {@inheritDoc}
@since 1.6
| TreeSet::headSet | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public NavigableSet<E> tailSet(E fromElement, boolean inclusive) {
return new TreeSet<>(m.tailMap(fromElement, inclusive));
} |
@throws ClassCastException {@inheritDoc}
@throws NullPointerException if {@code fromElement} is null and
this set uses natural ordering, or its comparator does
not permit null elements
@throws IllegalArgumentException {@inheritDoc}
@since 1.6
| TreeSet::tailSet | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public SortedSet<E> subSet(E fromElement, E toElement) {
return subSet(fromElement, true, toElement, false);
} |
@throws ClassCastException {@inheritDoc}
@throws NullPointerException if {@code fromElement} or
{@code toElement} is null and this set uses natural ordering,
or its comparator does not permit null elements
@throws IllegalArgumentException {@inheritDoc}
| TreeSet::subSet | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public SortedSet<E> headSet(E toElement) {
return headSet(toElement, false);
} |
@throws ClassCastException {@inheritDoc}
@throws NullPointerException if {@code toElement} is null
and this set uses natural ordering, or its comparator does
not permit null elements
@throws IllegalArgumentException {@inheritDoc}
| TreeSet::headSet | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public SortedSet<E> tailSet(E fromElement) {
return tailSet(fromElement, true);
} |
@throws ClassCastException {@inheritDoc}
@throws NullPointerException if {@code fromElement} is null
and this set uses natural ordering, or its comparator does
not permit null elements
@throws IllegalArgumentException {@inheritDoc}
| TreeSet::tailSet | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public E first() {
return m.firstKey();
} |
@throws NoSuchElementException {@inheritDoc}
| TreeSet::first | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public E lower(E e) {
return m.lowerKey(e);
} |
@throws ClassCastException {@inheritDoc}
@throws NullPointerException if the specified element is null
and this set uses natural ordering, or its comparator
does not permit null elements
@since 1.6
| TreeSet::lower | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
private void writeObject(java.io.ObjectOutputStream s)
throws java.io.IOException {
// Write out any hidden stuff
s.defaultWriteObject();
// Write out Comparator
s.writeObject(m.comparator());
// Write out size
s.writeInt(m.size());
// Write out all elements in the proper order.
for (E e : m.keySet())
s.writeObject(e);
} |
Save the state of the {@code TreeSet} instance to a stream (that is,
serialize it).
@serialData Emits the comparator used to order this set, or
{@code null} if it obeys its elements' natural ordering
(Object), followed by the size of the set (the number of
elements it contains) (int), followed by all of its
elements (each an Object) in order (as determined by the
set's Comparator, or by the elements' natural ordering if
the set has no Comparator).
| TreeSet::writeObject | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
private void readObject(java.io.ObjectInputStream s)
throws java.io.IOException, ClassNotFoundException {
// Read in any hidden stuff
s.defaultReadObject();
// Read in Comparator
@SuppressWarnings("unchecked")
Comparator<? super E> c = (Comparator<? super E>) s.readObject();
// Create backing TreeMap
TreeMap<E,Object> tm = new TreeMap<>(c);
m = tm;
// Read in size
int size = s.readInt();
tm.readTreeSet(size, s, PRESENT);
} |
Reconstitute the {@code TreeSet} instance from a stream (that is,
deserialize it).
| TreeSet::readObject | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public Spliterator<E> spliterator() {
return TreeMap.keySpliteratorFor(m);
} |
Creates a <em><a href="Spliterator.html#binding">late-binding</a></em>
and <em>fail-fast</em> {@link Spliterator} over the elements in this
set.
<p>The {@code Spliterator} reports {@link Spliterator#SIZED},
{@link Spliterator#DISTINCT}, {@link Spliterator#SORTED}, and
{@link Spliterator#ORDERED}. Overriding implementations should document
the reporting of additional characteristic values.
<p>The spliterator's comparator (see
{@link java.util.Spliterator#getComparator()}) is {@code null} if
the tree set's comparator (see {@link #comparator()}) is {@code null}.
Otherwise, the spliterator's comparator is the same as or imposes the
same total ordering as the tree set's comparator.
@return a {@code Spliterator} over the elements in this set
@since 1.8
| TreeSet::spliterator | java | Reginer/aosp-android-jar | android-33/src/java/util/TreeSet.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/util/TreeSet.java | MIT |
public void readSettings(@NonNull TypedXmlPullParser parser,
@NonNull DomainVerificationStateMap<DomainVerificationPkgState> liveState,
@NonNull Function<String, PackageSetting> pkgSettingFunction)
throws IOException, XmlPullParserException {
DomainVerificationPersistence.ReadResult result =
DomainVerificationPersistence.readFromXml(parser);
ArrayMap<String, DomainVerificationPkgState> active = result.active;
ArrayMap<String, DomainVerificationPkgState> restored = result.restored;
synchronized (mLock) {
int activeSize = active.size();
for (int activeIndex = 0; activeIndex < activeSize; activeIndex++) {
DomainVerificationPkgState pkgState = active.valueAt(activeIndex);
String pkgName = pkgState.getPackageName();
DomainVerificationPkgState existingState = liveState.get(pkgName);
if (existingState != null) {
// This branch should never be possible. Settings should be read from disk
// before any states are attached. But just in case, handle it.
if (!existingState.getId().equals(pkgState.getId())) {
mergePkgState(existingState, pkgState, pkgSettingFunction);
}
} else {
mPendingPkgStates.put(pkgName, pkgState);
}
}
int restoredSize = restored.size();
for (int restoredIndex = 0; restoredIndex < restoredSize; restoredIndex++) {
DomainVerificationPkgState pkgState = restored.valueAt(restoredIndex);
mRestoredPkgStates.put(pkgState.getPackageName(), pkgState);
}
}
} |
Parses a previously stored set of states and merges them with {@param liveState}, directly
mutating the values. This is intended for reading settings written by {@link
#writeSettings(TypedXmlSerializer, DomainVerificationStateMap, int, Function)} on the same
device setup.
| DomainVerificationSettings::readSettings | java | Reginer/aosp-android-jar | android-31/src/com/android/server/pm/verify/domain/DomainVerificationSettings.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/server/pm/verify/domain/DomainVerificationSettings.java | MIT |
public void restoreSettings(@NonNull TypedXmlPullParser parser,
@NonNull DomainVerificationStateMap<DomainVerificationPkgState> liveState,
@NonNull Function<String, PackageSetting> pkgSettingFunction)
throws IOException, XmlPullParserException {
// TODO(b/170746586): Restoration assumes user IDs match, which is probably not the case on
// a new device.
DomainVerificationPersistence.ReadResult result =
DomainVerificationPersistence.readFromXml(parser);
// When restoring settings, both active and previously restored are merged, since they
// should both go into the newly restored data. Active is added on top of restored just
// in case a duplicate is found. Active should be preferred.
ArrayMap<String, DomainVerificationPkgState> stateList = result.restored;
stateList.putAll(result.active);
synchronized (mLock) {
for (int stateIndex = 0; stateIndex < stateList.size(); stateIndex++) {
DomainVerificationPkgState newState = stateList.valueAt(stateIndex);
String pkgName = newState.getPackageName();
DomainVerificationPkgState existingState = liveState.get(pkgName);
if (existingState == null) {
existingState = mPendingPkgStates.get(pkgName);
}
if (existingState == null) {
existingState = mRestoredPkgStates.get(pkgName);
}
if (existingState != null) {
mergePkgState(existingState, newState, pkgSettingFunction);
} else {
// If there's no existing state, that means the new state has to be transformed
// in preparation for attaching to brand new package that may eventually be
// installed. This means coercing STATE_SUCCESS and STATE_RESTORED to
// STATE_RESTORED and dropping everything else, the same logic that
// mergePkgState runs, without the merge part.
ArrayMap<String, Integer> stateMap = newState.getStateMap();
int size = stateMap.size();
for (int index = size - 1; index >= 0; index--) {
Integer stateInteger = stateMap.valueAt(index);
if (stateInteger != null) {
int state = stateInteger;
if (state == DomainVerificationState.STATE_SUCCESS
|| state == DomainVerificationState.STATE_RESTORED) {
stateMap.setValueAt(index, DomainVerificationState.STATE_RESTORED);
} else {
stateMap.removeAt(index);
}
}
}
mRestoredPkgStates.put(pkgName, newState);
}
}
}
} |
Parses a previously stored set of states and merges them with {@param liveState}, directly
mutating the values. This is intended for restoration across device setups.
| DomainVerificationSettings::restoreSettings | java | Reginer/aosp-android-jar | android-31/src/com/android/server/pm/verify/domain/DomainVerificationSettings.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/server/pm/verify/domain/DomainVerificationSettings.java | MIT |
public void init() {
if (mInited) {
return;
}
onInit();
mInited = true;
if (isAttachedToWindow()) {
mOnAttachStateListener.onViewAttachedToWindow(mView);
}
addOnAttachStateChangeListener(mOnAttachStateListener);
} |
Call immediately after constructing Controller in order to handle view lifecycle events.
Generally speaking, you don't want to override this method. Instead, override
{@link #onInit()} as a way to have an run-once idempotent method that you can use for
setup of your ViewController.
| ViewController::init | java | Reginer/aosp-android-jar | android-32/src/com/android/systemui/util/ViewController.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/systemui/util/ViewController.java | MIT |
protected void onInit() {} |
Run once when {@link #init()} is called.
Override this to perform idempotent, one-time setup that your controller needs. It will
be called before {@link #onViewAttached()}.
| ViewController::onInit | java | Reginer/aosp-android-jar | android-32/src/com/android/systemui/util/ViewController.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/systemui/util/ViewController.java | MIT |
public void addOnAttachStateChangeListener(View.OnAttachStateChangeListener listener) {
if (mView != null) {
mView.addOnAttachStateChangeListener(listener);
}
} |
Run once when {@link #init()} is called.
Override this to perform idempotent, one-time setup that your controller needs. It will
be called before {@link #onViewAttached()}.
protected void onInit() {}
protected Context getContext() {
return mView.getContext();
}
protected Resources getResources() {
return mView.getResources();
}
public boolean isAttachedToWindow() {
return mView != null && mView.isAttachedToWindow();
}
/** Add an OnAttachStateListener to the view. Does nothing if the view is null. | ViewController::addOnAttachStateChangeListener | java | Reginer/aosp-android-jar | android-32/src/com/android/systemui/util/ViewController.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/systemui/util/ViewController.java | MIT |
static void setLayerTypeForFaded(@Nullable View view, boolean faded) {
if (view != null) {
int newLayerType = faded ? View.LAYER_TYPE_HARDWARE : View.LAYER_TYPE_NONE;
view.setLayerType(newLayerType, null);
}
} |
Calls {@link View#setLayerType} with {@link View#LAYER_TYPE_HARDWARE} if faded and
{@link View#LAYER_TYPE_NONE} otherwise.
| setLayerTypeForFaded | java | Reginer/aosp-android-jar | android-32/src/com/android/systemui/statusbar/notification/NotificationFadeAware.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/systemui/statusbar/notification/NotificationFadeAware.java | MIT |
BluetoothHeadsetClient(Context context, ServiceListener listener,
BluetoothAdapter adapter) {
mAdapter = adapter;
mAttributionSource = adapter.getAttributionSource();
mProfileConnector.connect(context, listener);
mCloseGuard = new CloseGuard();
mCloseGuard.open("close");
} |
Create a BluetoothHeadsetClient proxy object.
| BluetoothHeadsetClient::BluetoothHeadsetClient | java | Reginer/aosp-android-jar | android-34/src/android/bluetooth/BluetoothHeadsetClient.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/bluetooth/BluetoothHeadsetClient.java | MIT |
protected void finalize() {
if (mCloseGuard != null) {
mCloseGuard.warnIfOpen();
}
close();
} |
Close the connection to the backing service. Other public functions of BluetoothHeadsetClient
will return default error results once close() has been called. Multiple invocations of
close() are ok.
@hide
@Override
public void close() {
if (VDBG) log("close()");
mProfileConnector.disconnect();
if (mCloseGuard != null) {
mCloseGuard.close();
}
}
private IBluetoothHeadsetClient getService() {
return mProfileConnector.getService();
}
/** @hide | BluetoothHeadsetClient::finalize | java | Reginer/aosp-android-jar | android-34/src/android/bluetooth/BluetoothHeadsetClient.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/bluetooth/BluetoothHeadsetClient.java | MIT |
public NetworkServiceState(BluetoothDevice device, boolean isServiceAvailable,
String operatorName, int signalStrength, boolean isRoaming) {
mDevice = device;
mIsServiceAvailable = isServiceAvailable;
mOperatorName = operatorName;
mSignalStrength = signalStrength;
mIsRoaming = isRoaming;
} |
Create a NetworkServiceState Object
@param device The device associated with this network signal state
@param isServiceAvailable True if there is service available, False otherwise
@param operatorName The name of the operator associated with the remote device's current
network. Use Null if the value is unknown
@param signalStrength The general signal strength
@param isRoaming True if we are network roaming, False otherwise
@hide
| NetworkServiceState::NetworkServiceState | java | Reginer/aosp-android-jar | android-34/src/android/bluetooth/BluetoothHeadsetClient.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/bluetooth/BluetoothHeadsetClient.java | MIT |
public Query(@NonNull String input,
long timestampMillis,
@NonNull Bundle extras) {
mInput = input;
mTimestampMillis = timestampMillis;
mExtras = extras != null ? extras : new Bundle();
} |
Query object used to pass search box input from client to service.
@param input string typed from the client
@param timestampMillis timestamp that query string was typed.
@param extras bundle that contains other client UI constraints data
| Query::Query | java | Reginer/aosp-android-jar | android-32/src/android/app/search/Query.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/app/search/Query.java | MIT |
public Query(@NonNull String input, long timestampMillis) {
this(input, timestampMillis, new Bundle());
} |
Query object used to pass search box input from client to service.
@param input string typed from the client
@param timestampMillis timestamp that query string was typed
| Query::Query | java | Reginer/aosp-android-jar | android-32/src/android/app/search/Query.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/app/search/Query.java | MIT |
public long getTimestampMillis() {
return mTimestampMillis;
} |
Base of the timestamp should be SystemClock.elasedRealTime()
@return timestamp that query string was typed
| Query::getTimestampMillis | java | Reginer/aosp-android-jar | android-32/src/android/app/search/Query.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/app/search/Query.java | MIT |
public CMSSignedData(
Map hashes,
byte[] sigBlock)
throws CMSException
{
this(hashes, CMSUtils.readContentInfo(sigBlock));
} |
Content with detached signature, digests precomputed
@param hashes a map of precomputed digests for content indexed by name of hash.
@param sigBlock the signature object.
| CMSSignedData::CMSSignedData | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | MIT |
public CMSSignedData(
CMSProcessable signedContent,
InputStream sigData)
throws CMSException
{
this(signedContent, CMSUtils.readContentInfo(new ASN1InputStream(sigData)));
} |
base constructor - content with detached signature.
@param signedContent the content that was signed.
@param sigData the signature object.
| CMSSignedData::CMSSignedData | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | MIT |
public CMSSignedData(
InputStream sigData)
throws CMSException
{
this(CMSUtils.readContentInfo(sigData));
} |
base constructor - with encapsulated content
| CMSSignedData::CMSSignedData | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | MIT |
public int getVersion()
{
return signedData.getVersion().intValueExact();
} |
Return the version number for this object
| CMSSignedData::getVersion | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | MIT |
public SignerInformationStore getSignerInfos()
{
if (signerInfoStore == null)
{
ASN1Set s = signedData.getSignerInfos();
List signerInfos = new ArrayList();
for (int i = 0; i != s.size(); i++)
{
SignerInfo info = SignerInfo.getInstance(s.getObjectAt(i));
ASN1ObjectIdentifier contentType = signedData.getEncapContentInfo().getContentType();
if (hashes == null)
{
signerInfos.add(new SignerInformation(info, contentType, signedContent, null));
}
else
{
Object obj = hashes.keySet().iterator().next();
byte[] hash = (obj instanceof String) ? (byte[])hashes.get(info.getDigestAlgorithm().getAlgorithm().getId()) : (byte[])hashes.get(info.getDigestAlgorithm().getAlgorithm());
signerInfos.add(new SignerInformation(info, contentType, null, hash));
}
}
signerInfoStore = new SignerInformationStore(signerInfos);
}
return signerInfoStore;
} |
return the collection of signers that are associated with the
signatures for the message.
| CMSSignedData::getSignerInfos | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | MIT |
public boolean isDetachedSignature()
{
return signedData.getEncapContentInfo().getContent() == null && signedData.getSignerInfos().size() > 0;
} |
Return if this is object represents a detached signature.
@return true if this message represents a detached signature, false otherwise.
| CMSSignedData::isDetachedSignature | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | MIT |
public boolean isCertificateManagementMessage()
{
return signedData.getEncapContentInfo().getContent() == null && signedData.getSignerInfos().size() == 0;
} |
Return if this is object represents a certificate management message.
@return true if the message has no signers or content, false otherwise.
| CMSSignedData::isCertificateManagementMessage | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | MIT |
public Store<X509CertificateHolder> getCertificates()
{
return HELPER.getCertificates(signedData.getCertificates());
} |
Return any X.509 certificate objects in this SignedData structure as a Store of X509CertificateHolder objects.
@return a Store of X509CertificateHolder objects.
| CMSSignedData::getCertificates | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | MIT |
public Store<X509CRLHolder> getCRLs()
{
return HELPER.getCRLs(signedData.getCRLs());
} |
Return any X.509 CRL objects in this SignedData structure as a Store of X509CRLHolder objects.
@return a Store of X509CRLHolder objects.
| CMSSignedData::getCRLs | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | MIT |
public Store<X509AttributeCertificateHolder> getAttributeCertificates()
{
return HELPER.getAttributeCertificates(signedData.getCertificates());
} |
Return any X.509 attribute certificate objects in this SignedData structure as a Store of X509AttributeCertificateHolder objects.
@return a Store of X509AttributeCertificateHolder objects.
| CMSSignedData::getAttributeCertificates | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | MIT |
public Set<AlgorithmIdentifier> getDigestAlgorithmIDs()
{
Set<AlgorithmIdentifier> digests = new HashSet<AlgorithmIdentifier>(signedData.getDigestAlgorithms().size());
for (Enumeration en = signedData.getDigestAlgorithms().getObjects(); en.hasMoreElements();)
{
digests.add(AlgorithmIdentifier.getInstance(en.nextElement()));
}
return Collections.unmodifiableSet(digests);
} |
Return the digest algorithm identifiers for the SignedData object
@return the set of digest algorithm identifiers
| CMSSignedData::getDigestAlgorithmIDs | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | MIT |
public String getSignedContentTypeOID()
{
return signedData.getEncapContentInfo().getContentType().getId();
} |
Return the a string representation of the OID associated with the
encapsulated content info structure carried in the signed data.
@return the OID for the content type.
| CMSSignedData::getSignedContentTypeOID | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | MIT |
public ContentInfo toASN1Structure()
{
return contentInfo;
} |
return the ContentInfo
| CMSSignedData::toASN1Structure | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | MIT |
public byte[] getEncoded()
throws IOException
{
return contentInfo.getEncoded();
} |
return the ASN.1 encoded representation of this object.
| CMSSignedData::getEncoded | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | MIT |
public byte[] getEncoded(String encoding)
throws IOException
{
return contentInfo.getEncoded(encoding);
} |
return the ASN.1 encoded representation of this object using the specified encoding.
@param encoding the ASN.1 encoding format to use ("BER", "DL", or "DER").
| CMSSignedData::getEncoded | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | MIT |
public static CMSSignedData replaceSigners(
CMSSignedData signedData,
SignerInformationStore signerInformationStore)
{
//
// copy
//
CMSSignedData cms = new CMSSignedData(signedData);
//
// replace the store
//
cms.signerInfoStore = signerInformationStore;
//
// replace the signers in the SignedData object
//
ASN1EncodableVector digestAlgs = new ASN1EncodableVector();
ASN1EncodableVector vec = new ASN1EncodableVector();
Iterator it = signerInformationStore.getSigners().iterator();
while (it.hasNext())
{
SignerInformation signer = (SignerInformation)it.next();
digestAlgs.add(CMSSignedHelper.INSTANCE.fixAlgID(signer.getDigestAlgorithmID()));
vec.add(signer.toASN1Structure());
}
ASN1Set digests = new DERSet(digestAlgs);
ASN1Set signers = new DLSet(vec);
ASN1Sequence sD = (ASN1Sequence)signedData.signedData.toASN1Primitive();
vec = new ASN1EncodableVector();
//
// signers are the last item in the sequence.
//
vec.add(sD.getObjectAt(0)); // version
vec.add(digests);
for (int i = 2; i != sD.size() - 1; i++)
{
vec.add(sD.getObjectAt(i));
}
vec.add(signers);
cms.signedData = SignedData.getInstance(new BERSequence(vec));
//
// replace the contentInfo with the new one
//
cms.contentInfo = new ContentInfo(cms.contentInfo.getContentType(), cms.signedData);
return cms;
} |
Replace the SignerInformation store associated with this
CMSSignedData object with the new one passed in. You would
probably only want to do this if you wanted to change the unsigned
attributes associated with a signer, or perhaps delete one.
@param signedData the signed data object to be used as a base.
@param signerInformationStore the new signer information store to use.
@return a new signed data object.
| CMSSignedData::replaceSigners | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | MIT |
public static CMSSignedData replaceCertificatesAndCRLs(
CMSSignedData signedData,
Store certificates,
Store attrCerts,
Store revocations)
throws CMSException
{
//
// copy
//
CMSSignedData cms = new CMSSignedData(signedData);
//
// replace the certs and revocations in the SignedData object
//
ASN1Set certSet = null;
ASN1Set crlSet = null;
if (certificates != null || attrCerts != null)
{
List certs = new ArrayList();
if (certificates != null)
{
certs.addAll(CMSUtils.getCertificatesFromStore(certificates));
}
if (attrCerts != null)
{
certs.addAll(CMSUtils.getAttributeCertificatesFromStore(attrCerts));
}
ASN1Set set = CMSUtils.createBerSetFromList(certs);
if (set.size() != 0)
{
certSet = set;
}
}
if (revocations != null)
{
ASN1Set set = CMSUtils.createBerSetFromList(CMSUtils.getCRLsFromStore(revocations));
if (set.size() != 0)
{
crlSet = set;
}
}
//
// replace the CMS structure.
//
cms.signedData = new SignedData(signedData.signedData.getDigestAlgorithms(),
signedData.signedData.getEncapContentInfo(),
certSet,
crlSet,
signedData.signedData.getSignerInfos());
//
// replace the contentInfo with the new one
//
cms.contentInfo = new ContentInfo(cms.contentInfo.getContentType(), cms.signedData);
return cms;
} |
Replace the certificate and CRL information associated with this
CMSSignedData object with the new one passed in.
@param signedData the signed data object to be used as a base.
@param certificates the new certificates to be used.
@param attrCerts the new attribute certificates to be used.
@param revocations the new CRLs to be used - a collection of X509CRLHolder objects, OtherRevocationInfoFormat, or both.
@return a new signed data object.
@exception CMSException if there is an error processing the CertStore
| CMSSignedData::replaceCertificatesAndCRLs | java | Reginer/aosp-android-jar | android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/cms/CMSSignedData.java | MIT |
public NamespaceSupport2 ()
{
reset();
} |
Create a new Namespace support object.
| NamespaceSupport2::NamespaceSupport2 | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
public void reset ()
{
// Discarding the whole stack doesn't save us a lot versus
// creating a new NamespaceSupport. Do we care, or should we
// change this to just reset the root context?
currentContext = new Context2(null);
currentContext.declarePrefix("xml", XMLNS);
} |
Reset this Namespace support object for reuse.
<p>It is necessary to invoke this method before reusing the
Namespace support object for a new session.</p>
| NamespaceSupport2::reset | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
public void pushContext ()
{
// JJK: Context has a parent pointer.
// That means we don't need a stack to pop.
// We may want to retain for reuse, but that can be done via
// a child pointer.
Context2 parentContext=currentContext;
currentContext = parentContext.getChild();
if (currentContext == null){
currentContext = new Context2(parentContext);
}
else{
// JJK: This will wipe out any leftover data
// if we're reusing a previously allocated Context.
currentContext.setParent(parentContext);
}
} |
Start a new Namespace context.
<p>Normally, you should push a new context at the beginning
of each XML element: the new context will automatically inherit
the declarations of its parent context, but it will also keep
track of which declarations were made within this context.</p>
<p>The Namespace support object always starts with a base context
already in force: in this context, only the "xml" prefix is
declared.</p>
@see #popContext
| NamespaceSupport2::pushContext | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
public void popContext ()
{
Context2 parentContext=currentContext.getParent();
if(parentContext==null)
throw new EmptyStackException();
else
currentContext = parentContext;
} |
Revert to the previous Namespace context.
<p>Normally, you should pop the context at the end of each
XML element. After popping the context, all Namespace prefix
mappings that were previously in force are restored.</p>
<p>You must not attempt to declare additional Namespace
prefixes after popping a context, unless you push another
context first.</p>
@see #pushContext
| NamespaceSupport2::popContext | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
public boolean declarePrefix (String prefix, String uri)
{
if (prefix.equals("xml") || prefix.equals("xmlns")) {
return false;
} else {
currentContext.declarePrefix(prefix, uri);
return true;
}
} |
Declare a Namespace prefix.
<p>This method declares a prefix in the current Namespace
context; the prefix will remain in force until this context
is popped, unless it is shadowed in a descendant context.</p>
<p>To declare a default Namespace, use the empty string. The
prefix must not be "xml" or "xmlns".</p>
<p>Note that you must <em>not</em> declare a prefix after
you've pushed and popped another Namespace.</p>
<p>Note that there is an asymmetry in this library: while {@link
#getPrefix getPrefix} will not return the default "" prefix,
even if you have declared one; to check for a default prefix,
you have to look it up explicitly using {@link #getURI getURI}.
This asymmetry exists to make it easier to look up prefixes
for attribute names, where the default prefix is not allowed.</p>
@param prefix The prefix to declare, or null for the empty
string.
@param uri The Namespace URI to associate with the prefix.
@return true if the prefix was legal, false otherwise
@see #processName
@see #getURI
@see #getPrefix
| NamespaceSupport2::declarePrefix | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
public String [] processName (String qName, String[] parts,
boolean isAttribute)
{
String[] name=currentContext.processName(qName, isAttribute);
if(name==null)
return null;
// JJK: This recopying is required because processName may return
// a cached result. I Don't Like It. *****
System.arraycopy(name,0,parts,0,3);
return parts;
} |
Process a raw XML 1.0 name.
<p>This method processes a raw XML 1.0 name in the current
context by removing the prefix and looking it up among the
prefixes currently declared. The return value will be the
array supplied by the caller, filled in as follows:</p>
<dl>
<dt>parts[0]</dt>
<dd>The Namespace URI, or an empty string if none is
in use.</dd>
<dt>parts[1]</dt>
<dd>The local name (without prefix).</dd>
<dt>parts[2]</dt>
<dd>The original raw name.</dd>
</dl>
<p>All of the strings in the array will be internalized. If
the raw name has a prefix that has not been declared, then
the return value will be null.</p>
<p>Note that attribute names are processed differently than
element names: an unprefixed element name will received the
default Namespace (if any), while an unprefixed element name
will not.</p>
@param qName The raw XML 1.0 name to be processed.
@param parts A string array supplied by the caller, capable of
holding at least three members.
@param isAttribute A flag indicating whether this is an
attribute name (true) or an element name (false).
@return The supplied array holding three internalized strings
representing the Namespace URI (or empty string), the
local name, and the raw XML 1.0 name; or null if there
is an undeclared prefix.
@see #declarePrefix
* @see java.lang.String#intern | NamespaceSupport2::processName | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
public String getURI (String prefix)
{
return currentContext.getURI(prefix);
} |
Look up a prefix and get the currently-mapped Namespace URI.
<p>This method looks up the prefix in the current context.
Use the empty string ("") for the default Namespace.</p>
@param prefix The prefix to look up.
@return The associated Namespace URI, or null if the prefix
is undeclared in this context.
@see #getPrefix
@see #getPrefixes
| NamespaceSupport2::getURI | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
public Enumeration getPrefixes ()
{
return currentContext.getPrefixes();
} |
Return an enumeration of all prefixes currently declared.
<p><strong>Note:</strong> if there is a default prefix, it will not be
returned in this enumeration; check for the default prefix
using the {@link #getURI getURI} with an argument of "".</p>
@return An enumeration of all prefixes declared in the
current context except for the empty (default)
prefix.
@see #getDeclaredPrefixes
@see #getURI
| NamespaceSupport2::getPrefixes | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
public String getPrefix (String uri)
{
return currentContext.getPrefix(uri);
} |
Return one of the prefixes mapped to a Namespace URI.
<p>If more than one prefix is currently mapped to the same
URI, this method will make an arbitrary selection; if you
want all of the prefixes, use the {@link #getPrefixes}
method instead.</p>
<p><strong>Note:</strong> this will never return the empty
(default) prefix; to check for a default prefix, use the {@link
#getURI getURI} method with an argument of "".</p>
@param uri The Namespace URI.
@return One of the prefixes currently mapped to the URI supplied,
or null if none is mapped or if the URI is assigned to
the default Namespace.
@see #getPrefixes(java.lang.String)
* @see #getURI | NamespaceSupport2::getPrefix | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
public Enumeration getPrefixes (String uri)
{
// JJK: The old code involved creating a vector, filling it
// with all the matching prefixes, and then getting its
// elements enumerator. Wastes storage, wastes cycles if we
// don't actually need them all. Better to either implement
// a specific enumerator for these prefixes... or a filter
// around the all-prefixes enumerator, which comes out to
// roughly the same thing.
//
// **** Currently a filter. That may not be most efficient
// when I'm done restructuring storage!
return new PrefixForUriEnumerator(this,uri,getPrefixes());
} |
Return an enumeration of all prefixes currently declared for a URI.
<p>This method returns prefixes mapped to a specific Namespace
URI. The xml: prefix will be included. If you want only one
prefix that's mapped to the Namespace URI, and you don't care
which one you get, use the {@link #getPrefix getPrefix}
method instead.</p>
<p><strong>Note:</strong> the empty (default) prefix is
<em>never</em> included in this enumeration; to check for the
presence of a default Namespace, use the {@link #getURI getURI}
method with an argument of "".</p>
@param uri The Namespace URI.
@return An enumeration of all prefixes declared in the
current context.
@see #getPrefix
@see #getDeclaredPrefixes
* @see #getURI | NamespaceSupport2::getPrefixes | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
public Enumeration getDeclaredPrefixes ()
{
return currentContext.getDeclaredPrefixes();
} |
Return an enumeration of all prefixes declared in this context.
<p>The empty (default) prefix will be included in this
enumeration; note that this behaviour differs from that of
{@link #getPrefix} and {@link #getPrefixes}.</p>
@return An enumeration of all prefixes declared in this
context.
@see #getPrefixes
@see #getURI
| NamespaceSupport2::getDeclaredPrefixes | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
Context2 (Context2 parent)
{
if(parent==null)
{
prefixTable = new Hashtable();
uriTable = new Hashtable();
elementNameTable=null;
attributeNameTable=null;
}
else
setParent(parent);
} |
Create a new Namespace context.
| Context2::Context2 | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
Context2 getChild()
{
return child;
} |
@returns The child Namespace context object, or null if this
is the last currently on the chain.
| Context2::getChild | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
Context2 getParent()
{
return parent;
} |
@returns The parent Namespace context object, or null if this
is the root.
| Context2::getParent | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
void setParent (Context2 parent)
{
this.parent = parent;
parent.child = this; // JJK: Doubly-linked
declarations = null;
prefixTable = parent.prefixTable;
uriTable = parent.uriTable;
elementNameTable = parent.elementNameTable;
attributeNameTable = parent.attributeNameTable;
defaultNS = parent.defaultNS;
tablesDirty = false;
} |
(Re)set the parent of this Namespace context.
This is separate from the c'tor because it's re-applied
when a Context2 is reused by push-after-pop.
@param context The parent Namespace context object.
| Context2::setParent | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
void declarePrefix (String prefix, String uri)
{
// Lazy processing...
if (!tablesDirty) {
copyTables();
}
if (declarations == null) {
declarations = new Vector();
}
prefix = prefix.intern();
uri = uri.intern();
if ("".equals(prefix)) {
if ("".equals(uri)) {
defaultNS = null;
} else {
defaultNS = uri;
}
} else {
prefixTable.put(prefix, uri);
uriTable.put(uri, prefix); // may wipe out another prefix
}
declarations.addElement(prefix);
} |
Declare a Namespace prefix for this context.
@param prefix The prefix to declare.
@param uri The associated Namespace URI.
@see org.xml.sax.helpers.NamespaceSupport2#declarePrefix
| Context2::declarePrefix | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
String [] processName (String qName, boolean isAttribute)
{
String name[];
Hashtable table;
// Select the appropriate table.
if (isAttribute) {
if(elementNameTable==null)
elementNameTable=new Hashtable();
table = elementNameTable;
} else {
if(attributeNameTable==null)
attributeNameTable=new Hashtable();
table = attributeNameTable;
}
// Start by looking in the cache, and
// return immediately if the name
// is already known in this content
name = (String[])table.get(qName);
if (name != null) {
return name;
}
// We haven't seen this name in this
// context before.
name = new String[3];
int index = qName.indexOf(':');
// No prefix.
if (index == -1) {
if (isAttribute || defaultNS == null) {
name[0] = "";
} else {
name[0] = defaultNS;
}
name[1] = qName.intern();
name[2] = name[1];
}
// Prefix
else {
String prefix = qName.substring(0, index);
String local = qName.substring(index+1);
String uri;
if ("".equals(prefix)) {
uri = defaultNS;
} else {
uri = (String)prefixTable.get(prefix);
}
if (uri == null) {
return null;
}
name[0] = uri;
name[1] = local.intern();
name[2] = qName.intern();
}
// Save in the cache for future use.
table.put(name[2], name);
tablesDirty = true;
return name;
} |
Process a raw XML 1.0 name in this context.
@param qName The raw XML 1.0 name.
@param isAttribute true if this is an attribute name.
@return An array of three strings containing the
URI part (or empty string), the local part,
and the raw name, all internalized, or null
if there is an undeclared prefix.
@see org.xml.sax.helpers.NamespaceSupport2#processName
| Context2::processName | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
String getURI (String prefix)
{
if ("".equals(prefix)) {
return defaultNS;
} else if (prefixTable == null) {
return null;
} else {
return (String)prefixTable.get(prefix);
}
} |
Look up the URI associated with a prefix in this context.
@param prefix The prefix to look up.
@return The associated Namespace URI, or null if none is
declared.
@see org.xml.sax.helpers.NamespaceSupport2#getURI
| Context2::getURI | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
String getPrefix (String uri)
{
if (uriTable == null) {
return null;
} else {
return (String)uriTable.get(uri);
}
} |
Look up one of the prefixes associated with a URI in this context.
<p>Since many prefixes may be mapped to the same URI,
the return value may be unreliable.</p>
@param uri The URI to look up.
@return The associated prefix, or null if none is declared.
@see org.xml.sax.helpers.NamespaceSupport2#getPrefix
| Context2::getPrefix | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
Enumeration getDeclaredPrefixes ()
{
if (declarations == null) {
return EMPTY_ENUMERATION;
} else {
return declarations.elements();
}
} |
Return an enumeration of prefixes declared in this context.
@return An enumeration of prefixes (possibly empty).
@see org.xml.sax.helpers.NamespaceSupport2#getDeclaredPrefixes
| Context2::getDeclaredPrefixes | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
Enumeration getPrefixes ()
{
if (prefixTable == null) {
return EMPTY_ENUMERATION;
} else {
return prefixTable.keys();
}
} |
Return an enumeration of all prefixes currently in force.
<p>The default prefix, if in force, is <em>not</em>
returned, and will have to be checked for separately.</p>
@return An enumeration of prefixes (never empty).
@see org.xml.sax.helpers.NamespaceSupport2#getPrefixes
| Context2::getPrefixes | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
private void copyTables ()
{
// Start by copying our parent's bindings
prefixTable = (Hashtable)prefixTable.clone();
uriTable = (Hashtable)uriTable.clone();
// Replace the caches with empty ones, rather than
// trying to determine which bindings should be flushed.
// As far as I can tell, these caches are never actually
// used in Xalan... More efficient to remove the whole
// cache system? ****
if(elementNameTable!=null)
elementNameTable=new Hashtable();
if(attributeNameTable!=null)
attributeNameTable=new Hashtable();
tablesDirty = true;
} |
Copy on write for the internal tables in this context.
<p>This class is optimized for the normal case where most
elements do not contain Namespace declarations. In that case,
the Context2 will share data structures with its parent.
New tables are obtained only when new declarations are issued,
so they can be popped off the stack.</p>
<p> JJK: **** Alternative: each Context2 might declare
_only_ its local bindings, and delegate upward if not found.</p>
| Context2::copyTables | java | Reginer/aosp-android-jar | android-35/src/org/apache/xml/utils/NamespaceSupport2.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/org/apache/xml/utils/NamespaceSupport2.java | MIT |
protected boolean isDividerAllowedAbove(RecyclerView.ViewHolder viewHolder) {
return !(viewHolder instanceof DividedViewHolder)
|| ((DividedViewHolder) viewHolder).isDividerAllowedAbove();
} |
Whether a divider is allowed above the view holder. The allowed values will be combined
according to {@link #getDividerCondition()}. The default implementation delegates to {@link
com.android.setupwizardlib.DividerItemDecoration.DividedViewHolder}, or simply allows the
divider if the view holder doesn't implement {@code DividedViewHolder}. Subclasses can override
this to give more information to decide whether a divider should be drawn.
@return True if divider is allowed above this view holder.
| DividerItemDecoration::isDividerAllowedAbove | java | Reginer/aosp-android-jar | android-31/src/com/android/setupwizardlib/DividerItemDecoration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/setupwizardlib/DividerItemDecoration.java | MIT |
protected boolean isDividerAllowedBelow(RecyclerView.ViewHolder viewHolder) {
return !(viewHolder instanceof DividedViewHolder)
|| ((DividedViewHolder) viewHolder).isDividerAllowedBelow();
} |
Whether a divider is allowed below the view holder. The allowed values will be combined
according to {@link #getDividerCondition()}. The default implementation delegates to {@link
com.android.setupwizardlib.DividerItemDecoration.DividedViewHolder}, or simply allows the
divider if the view holder doesn't implement {@code DividedViewHolder}. Subclasses can override
this to give more information to decide whether a divider should be drawn.
@return True if divider is allowed below this view holder.
| DividerItemDecoration::isDividerAllowedBelow | java | Reginer/aosp-android-jar | android-31/src/com/android/setupwizardlib/DividerItemDecoration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/setupwizardlib/DividerItemDecoration.java | MIT |
public void setDivider(Drawable divider) {
if (divider != null) {
dividerIntrinsicHeight = divider.getIntrinsicHeight();
} else {
dividerIntrinsicHeight = 0;
}
this.divider = divider;
} |
Whether a divider is allowed below the view holder. The allowed values will be combined
according to {@link #getDividerCondition()}. The default implementation delegates to {@link
com.android.setupwizardlib.DividerItemDecoration.DividedViewHolder}, or simply allows the
divider if the view holder doesn't implement {@code DividedViewHolder}. Subclasses can override
this to give more information to decide whether a divider should be drawn.
@return True if divider is allowed below this view holder.
protected boolean isDividerAllowedBelow(RecyclerView.ViewHolder viewHolder) {
return !(viewHolder instanceof DividedViewHolder)
|| ((DividedViewHolder) viewHolder).isDividerAllowedBelow();
}
/** Sets the drawable to be used as the divider. | DividerItemDecoration::setDivider | java | Reginer/aosp-android-jar | android-31/src/com/android/setupwizardlib/DividerItemDecoration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/setupwizardlib/DividerItemDecoration.java | MIT |
public Drawable getDivider() {
return divider;
} |
Whether a divider is allowed below the view holder. The allowed values will be combined
according to {@link #getDividerCondition()}. The default implementation delegates to {@link
com.android.setupwizardlib.DividerItemDecoration.DividedViewHolder}, or simply allows the
divider if the view holder doesn't implement {@code DividedViewHolder}. Subclasses can override
this to give more information to decide whether a divider should be drawn.
@return True if divider is allowed below this view holder.
protected boolean isDividerAllowedBelow(RecyclerView.ViewHolder viewHolder) {
return !(viewHolder instanceof DividedViewHolder)
|| ((DividedViewHolder) viewHolder).isDividerAllowedBelow();
}
/** Sets the drawable to be used as the divider.
public void setDivider(Drawable divider) {
if (divider != null) {
dividerIntrinsicHeight = divider.getIntrinsicHeight();
} else {
dividerIntrinsicHeight = 0;
}
this.divider = divider;
}
/** Gets the drawable currently used as the divider. | DividerItemDecoration::getDivider | java | Reginer/aosp-android-jar | android-31/src/com/android/setupwizardlib/DividerItemDecoration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/setupwizardlib/DividerItemDecoration.java | MIT |
public void setDividerHeight(int dividerHeight) {
this.dividerHeight = dividerHeight;
} |
Whether a divider is allowed below the view holder. The allowed values will be combined
according to {@link #getDividerCondition()}. The default implementation delegates to {@link
com.android.setupwizardlib.DividerItemDecoration.DividedViewHolder}, or simply allows the
divider if the view holder doesn't implement {@code DividedViewHolder}. Subclasses can override
this to give more information to decide whether a divider should be drawn.
@return True if divider is allowed below this view holder.
protected boolean isDividerAllowedBelow(RecyclerView.ViewHolder viewHolder) {
return !(viewHolder instanceof DividedViewHolder)
|| ((DividedViewHolder) viewHolder).isDividerAllowedBelow();
}
/** Sets the drawable to be used as the divider.
public void setDivider(Drawable divider) {
if (divider != null) {
dividerIntrinsicHeight = divider.getIntrinsicHeight();
} else {
dividerIntrinsicHeight = 0;
}
this.divider = divider;
}
/** Gets the drawable currently used as the divider.
public Drawable getDivider() {
return divider;
}
/** Sets the divider height, in pixels. | DividerItemDecoration::setDividerHeight | java | Reginer/aosp-android-jar | android-31/src/com/android/setupwizardlib/DividerItemDecoration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/setupwizardlib/DividerItemDecoration.java | MIT |
public int getDividerHeight() {
return dividerHeight;
} |
Whether a divider is allowed below the view holder. The allowed values will be combined
according to {@link #getDividerCondition()}. The default implementation delegates to {@link
com.android.setupwizardlib.DividerItemDecoration.DividedViewHolder}, or simply allows the
divider if the view holder doesn't implement {@code DividedViewHolder}. Subclasses can override
this to give more information to decide whether a divider should be drawn.
@return True if divider is allowed below this view holder.
protected boolean isDividerAllowedBelow(RecyclerView.ViewHolder viewHolder) {
return !(viewHolder instanceof DividedViewHolder)
|| ((DividedViewHolder) viewHolder).isDividerAllowedBelow();
}
/** Sets the drawable to be used as the divider.
public void setDivider(Drawable divider) {
if (divider != null) {
dividerIntrinsicHeight = divider.getIntrinsicHeight();
} else {
dividerIntrinsicHeight = 0;
}
this.divider = divider;
}
/** Gets the drawable currently used as the divider.
public Drawable getDivider() {
return divider;
}
/** Sets the divider height, in pixels.
public void setDividerHeight(int dividerHeight) {
this.dividerHeight = dividerHeight;
}
/** Gets the divider height, in pixels. | DividerItemDecoration::getDividerHeight | java | Reginer/aosp-android-jar | android-31/src/com/android/setupwizardlib/DividerItemDecoration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/setupwizardlib/DividerItemDecoration.java | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.