code
stringlengths 11
173k
| docstring
stringlengths 2
593k
| func_name
stringlengths 2
189
| language
stringclasses 1
value | repo
stringclasses 844
values | path
stringlengths 11
294
| url
stringlengths 60
339
| license
stringclasses 4
values |
---|---|---|---|---|---|---|---|
public void runTest() throws Throwable {
Document doc;
NodeList elementList;
Node emNode;
Node nsNode;
String nsName;
doc = (Document) load("hc_staff", false);
elementList = doc.getElementsByTagName("em");
emNode = elementList.item(1);
nsNode = emNode.getNextSibling();
nsName = nsNode.getNodeName();
assertEquals("whitespace", "#text", nsName);
} |
Runs the test case.
@throws Throwable Any uncaught exception causes test to fail
| hc_nodegetnextsibling::runTest | java | Reginer/aosp-android-jar | android-34/src/org/w3c/domts/level1/core/hc_nodegetnextsibling.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/w3c/domts/level1/core/hc_nodegetnextsibling.java | MIT |
public String getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetnextsibling";
} |
Gets URI that identifies the test.
@return uri identifier of test
| hc_nodegetnextsibling::getTargetURI | java | Reginer/aosp-android-jar | android-34/src/org/w3c/domts/level1/core/hc_nodegetnextsibling.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/w3c/domts/level1/core/hc_nodegetnextsibling.java | MIT |
public static void main(final String[] args) {
DOMTestCase.doMain(hc_nodegetnextsibling.class, args);
} |
Runs this test from the command line.
@param args command line arguments
| hc_nodegetnextsibling::main | java | Reginer/aosp-android-jar | android-34/src/org/w3c/domts/level1/core/hc_nodegetnextsibling.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/org/w3c/domts/level1/core/hc_nodegetnextsibling.java | MIT |
public hc_attreffectivevalue(final DOMTestDocumentBuilderFactory factory) throws org.w3c.domts.DOMTestIncompatibleException {
super(factory);
//
// check if loaded documents are supported for content type
//
String contentType = getContentType();
preload(contentType, "hc_staff", false);
} |
Constructor.
@param factory document factory, may not be null
@throws org.w3c.domts.DOMTestIncompatibleException Thrown if test is not compatible with parser configuration
| hc_attreffectivevalue::hc_attreffectivevalue | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level1/core/hc_attreffectivevalue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level1/core/hc_attreffectivevalue.java | MIT |
public void runTest() throws Throwable {
Document doc;
NodeList addressList;
Node testNode;
NamedNodeMap attributes;
Attr domesticAttr;
String value;
doc = (Document) load("hc_staff", false);
addressList = doc.getElementsByTagName("acronym");
testNode = addressList.item(0);
attributes = testNode.getAttributes();
domesticAttr = (Attr) attributes.getNamedItem("title");
value = domesticAttr.getNodeValue();
assertEquals("attrEffectiveValueAssert", "Yes", value);
} |
Runs the test case.
@throws Throwable Any uncaught exception causes test to fail
| hc_attreffectivevalue::runTest | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level1/core/hc_attreffectivevalue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level1/core/hc_attreffectivevalue.java | MIT |
public String getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attreffectivevalue";
} |
Gets URI that identifies the test.
@return uri identifier of test
| hc_attreffectivevalue::getTargetURI | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level1/core/hc_attreffectivevalue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level1/core/hc_attreffectivevalue.java | MIT |
public static void main(final String[] args) {
DOMTestCase.doMain(hc_attreffectivevalue.class, args);
} |
Runs this test from the command line.
@param args command line arguments
| hc_attreffectivevalue::main | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level1/core/hc_attreffectivevalue.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level1/core/hc_attreffectivevalue.java | MIT |
public SQLiteDatabase getWritableDatabaseSafe() throws EncryptionDbException {
try {
return super.getWritableDatabase();
} catch (SQLiteException e) {
throw new EncryptionDbException(e);
}
} |
Calls {@link #getWritableDatabase()}, but catches the unchecked {@link SQLiteException} and
rethrows {@link EncryptionDbException}.
| BackupEncryptionDbHelper::getWritableDatabaseSafe | java | Reginer/aosp-android-jar | android-32/src/com/android/server/backup/encryption/storage/BackupEncryptionDbHelper.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/server/backup/encryption/storage/BackupEncryptionDbHelper.java | MIT |
public SQLiteDatabase getReadableDatabaseSafe() throws EncryptionDbException {
try {
return super.getReadableDatabase();
} catch (SQLiteException e) {
throw new EncryptionDbException(e);
}
} |
Calls {@link #getReadableDatabase()}, but catches the unchecked {@link SQLiteException} and
rethrows {@link EncryptionDbException}.
| BackupEncryptionDbHelper::getReadableDatabaseSafe | java | Reginer/aosp-android-jar | android-32/src/com/android/server/backup/encryption/storage/BackupEncryptionDbHelper.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/server/backup/encryption/storage/BackupEncryptionDbHelper.java | MIT |
private static Long getSystemSeed() {
Long seed = null;
try {
// note that Long.valueOf(null) also throws a
// NumberFormatException so if the property is undefined this
// will still work correctly
seed = Long.valueOf(System.getProperty("seed"));
} catch (NumberFormatException e) {
// do nothing: seed is still null
}
return seed;
} |
Attempt to obtain the seed from the value of the "seed" property.
@return The seed or {@code null} if the "seed" property was not set or
could not be parsed.
| RandomFactory::getSystemSeed | java | Reginer/aosp-android-jar | android-32/src/jdk/testlibrary/RandomFactory.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/jdk/testlibrary/RandomFactory.java | MIT |
private static long getRandomSeed() {
return new Random().nextLong();
} |
Obtain a seed from an independent PRNG.
@return A random seed.
| RandomFactory::getRandomSeed | java | Reginer/aosp-android-jar | android-32/src/jdk/testlibrary/RandomFactory.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/jdk/testlibrary/RandomFactory.java | MIT |
public static long getSeed() {
Long seed = getSystemSeed();
if (seed == null) {
seed = getRandomSeed();
}
System.out.println("Seed from RandomFactory = "+seed+"L");
return seed;
} |
Obtain and print to STDOUT a seed appropriate for initializing a PRNG.
If the system property "seed" is set and has value which may be correctly
parsed it is used, otherwise a seed is generated using an independent
PRNG.
@return The seed.
| RandomFactory::getSeed | java | Reginer/aosp-android-jar | android-32/src/jdk/testlibrary/RandomFactory.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/jdk/testlibrary/RandomFactory.java | MIT |
public static Random getRandom() {
return new Random(getSeed());
} |
Obtain and print to STDOUT a seed and use it to initialize a new
{@code Random} instance which is returned. If the system
property "seed" is set and has value which may be correctly parsed it
is used, otherwise a seed is generated using an independent PRNG.
@return The {@code Random} instance.
| RandomFactory::getRandom | java | Reginer/aosp-android-jar | android-32/src/jdk/testlibrary/RandomFactory.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/jdk/testlibrary/RandomFactory.java | MIT |
public static SplittableRandom getSplittableRandom() {
return new SplittableRandom(getSeed());
} |
Obtain and print to STDOUT a seed and use it to initialize a new
{@code SplittableRandom} instance which is returned. If the system
property "seed" is set and has value which may be correctly parsed it
is used, otherwise a seed is generated using an independent PRNG.
@return The {@code SplittableRandom} instance.
| RandomFactory::getSplittableRandom | java | Reginer/aosp-android-jar | android-32/src/jdk/testlibrary/RandomFactory.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/jdk/testlibrary/RandomFactory.java | MIT |
public VirtualCamera(
@NonNull IVirtualDevice virtualDevice,
@NonNull String cameraId,
@NonNull VirtualCameraConfig config) {
mVirtualDevice = Objects.requireNonNull(virtualDevice);
mCameraId = Objects.requireNonNull(cameraId);
mConfig = Objects.requireNonNull(config);
} |
VirtualCamera device constructor.
@param virtualDevice The Binder object representing this camera in the server.
@param config Configuration for the new virtual camera
@hide
| VirtualCamera::VirtualCamera | java | Reginer/aosp-android-jar | android-35/src/android/companion/virtual/camera/VirtualCamera.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/companion/virtual/camera/VirtualCamera.java | MIT |
public ContentLanguageList () {
super(ContentLanguage.class,
ContentLanguageHeader.NAME);
} | Default constructor
| ContentLanguageList::ContentLanguageList | java | Reginer/aosp-android-jar | android-34/src/gov/nist/javax/sip/header/ContentLanguageList.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/gov/nist/javax/sip/header/ContentLanguageList.java | MIT |
public IllegalBlockSizeException() {
super();
} |
Constructs an IllegalBlockSizeException with no detail message.
A detail message is a String that describes this particular
exception.
| IllegalBlockSizeException::IllegalBlockSizeException | java | Reginer/aosp-android-jar | android-31/src/javax/crypto/IllegalBlockSizeException.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/javax/crypto/IllegalBlockSizeException.java | MIT |
public IllegalBlockSizeException(String msg) {
super(msg);
} |
Constructs an IllegalBlockSizeException with the specified
detail message.
@param msg the detail message.
| IllegalBlockSizeException::IllegalBlockSizeException | java | Reginer/aosp-android-jar | android-31/src/javax/crypto/IllegalBlockSizeException.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/javax/crypto/IllegalBlockSizeException.java | MIT |
public static TestSuite suite() throws Exception {
Class testClass = ClassLoader.getSystemClassLoader().loadClass(
"org.w3c.domts.level3.core.alltests");
Constructor testConstructor = testClass
.getConstructor(new Class[]{DOMTestDocumentBuilderFactory.class});
DOMTestDocumentBuilderFactory factory = new BatikTestDocumentBuilderFactory(
new DocumentBuilderSetting[0]);
Object test = testConstructor.newInstance(new Object[]{factory});
return new JUnitTestSuiteAdapter((DOMTestSuite) test);
} |
Factory method for suite.
@return suite
@throws Exception if Batik is not available or could not be instantiated
| TestBatik::suite | java | Reginer/aosp-android-jar | android-32/src/org/w3c/domts/level3/core/TestBatik.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/org/w3c/domts/level3/core/TestBatik.java | MIT |
default void getTouchInitiationRegion(Region region) {
} |
Returns the region the touch handler is interested in. By default, no region is specified,
indicating the entire screen should be considered.
@param region A {@link Region} that is passed in to the target entry touch region.
| getTouchInitiationRegion | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/dreams/touch/DreamTouchHandler.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/dreams/touch/DreamTouchHandler.java | MIT |
public Segment pop() {
Segment result = next != this ? next : null;
prev.next = next;
next.prev = prev;
next = null;
prev = null;
return result;
} |
Removes this segment of a circularly-linked list and returns its successor.
Returns null if the list is now empty.
| Segment::pop | java | Reginer/aosp-android-jar | android-35/src/com/android/okhttp/okio/Segment.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/okhttp/okio/Segment.java | MIT |
public Segment push(Segment segment) {
segment.prev = this;
segment.next = next;
next.prev = segment;
next = segment;
return segment;
} |
Appends {@code segment} after this segment in the circularly-linked list.
Returns the pushed segment.
| Segment::push | java | Reginer/aosp-android-jar | android-35/src/com/android/okhttp/okio/Segment.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/okhttp/okio/Segment.java | MIT |
public Segment split(int byteCount) {
if (byteCount <= 0 || byteCount > limit - pos) throw new IllegalArgumentException();
Segment prefix = new Segment(this);
prefix.limit = prefix.pos + byteCount;
pos += byteCount;
prev.push(prefix);
return prefix;
} |
Splits this head of a circularly-linked list into two segments. The first
segment contains the data in {@code [pos..pos+byteCount)}. The second
segment contains the data in {@code [pos+byteCount..limit)}. This can be
useful when moving partial segments from one buffer to another.
<p>Returns the new head of the circularly-linked list.
| Segment::split | java | Reginer/aosp-android-jar | android-35/src/com/android/okhttp/okio/Segment.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/okhttp/okio/Segment.java | MIT |
public void compact() {
if (prev == this) throw new IllegalStateException();
if (!prev.owner) return; // Cannot compact: prev isn't writable.
int byteCount = limit - pos;
int availableByteCount = SIZE - prev.limit + (prev.shared ? 0 : prev.pos);
if (byteCount > availableByteCount) return; // Cannot compact: not enough writable space.
writeTo(prev, byteCount);
pop();
SegmentPool.recycle(this);
} |
Call this when the tail and its predecessor may both be less than half
full. This will copy data so that segments can be recycled.
| Segment::compact | java | Reginer/aosp-android-jar | android-35/src/com/android/okhttp/okio/Segment.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/okhttp/okio/Segment.java | MIT |
public void writeTo(Segment sink, int byteCount) {
if (!sink.owner) throw new IllegalArgumentException();
if (sink.limit + byteCount > SIZE) {
// We can't fit byteCount bytes at the sink's current position. Shift sink first.
if (sink.shared) throw new IllegalArgumentException();
if (sink.limit + byteCount - sink.pos > SIZE) throw new IllegalArgumentException();
System.arraycopy(sink.data, sink.pos, sink.data, 0, sink.limit - sink.pos);
sink.limit -= sink.pos;
sink.pos = 0;
}
System.arraycopy(data, pos, sink.data, sink.limit, byteCount);
sink.limit += byteCount;
pos += byteCount;
} |
Call this when the tail and its predecessor may both be less than half
full. This will copy data so that segments can be recycled.
public void compact() {
if (prev == this) throw new IllegalStateException();
if (!prev.owner) return; // Cannot compact: prev isn't writable.
int byteCount = limit - pos;
int availableByteCount = SIZE - prev.limit + (prev.shared ? 0 : prev.pos);
if (byteCount > availableByteCount) return; // Cannot compact: not enough writable space.
writeTo(prev, byteCount);
pop();
SegmentPool.recycle(this);
}
/** Moves {@code byteCount} bytes from this segment to {@code sink}. | Segment::writeTo | java | Reginer/aosp-android-jar | android-35/src/com/android/okhttp/okio/Segment.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/okhttp/okio/Segment.java | MIT |
public int id() {
return mHandle.id();
} |
Get the system unique patch ID.
| AudioPatch::id | java | Reginer/aosp-android-jar | android-35/src/android/media/AudioPatch.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/media/AudioPatch.java | MIT |
default void onDeviceProvisionedChanged() { } |
Call when the device changes from not provisioned to provisioned
| onDeviceProvisionedChanged | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/statusbar/policy/DeviceProvisionedController.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/policy/DeviceProvisionedController.java | MIT |
default void onUserSwitched() {
onUserSetupChanged();
} |
Call on user switched
| onUserSwitched | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/statusbar/policy/DeviceProvisionedController.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/policy/DeviceProvisionedController.java | MIT |
default void onUserSetupChanged() { } |
Call when some user changes from not provisioned to provisioned
| onUserSetupChanged | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/statusbar/policy/DeviceProvisionedController.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/policy/DeviceProvisionedController.java | MIT |
public RemoteComposeBuffer(RemoteComposeState remoteComposeState) {
this.mRemoteComposeState = remoteComposeState;
} |
Provides an abstract buffer to encode/decode RemoteCompose operations
@param remoteComposeState the state used while encoding on the buffer
| RemoteComposeBuffer::RemoteComposeBuffer | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void reset(int expectedSize) {
mBuffer.reset(expectedSize);
mRemoteComposeState.reset();
} |
Reset the internal buffers
@param expectedSize provided hint for the main buffer size
| RemoteComposeBuffer::reset | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void header(int width, int height, String contentDescription, long capabilities) {
Header.COMPANION.apply(mBuffer, width, height, capabilities);
int contentDescriptionId = 0;
if (contentDescription != null) {
contentDescriptionId = addText(contentDescription);
RootContentDescription.COMPANION.apply(mBuffer, contentDescriptionId);
}
} |
Insert a header
@param width the width of the document in pixels
@param height the height of the document in pixels
@param contentDescription content description of the document
@param capabilities bitmask indicating needed capabilities (unused for now)
| RemoteComposeBuffer::header | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void header(int width, int height, String contentDescription) {
header(width, height, contentDescription, 0);
} |
Insert a header
@param width the width of the document in pixels
@param height the height of the document in pixels
@param contentDescription content description of the document
| RemoteComposeBuffer::header | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void drawBitmap(Object image,
int imageWidth, int imageHeight,
int srcLeft, int srcTop, int srcRight, int srcBottom,
int dstLeft, int dstTop, int dstRight, int dstBottom,
String contentDescription) {
int imageId = mRemoteComposeState.dataGetId(image);
if (imageId == -1) {
imageId = mRemoteComposeState.cache(image);
byte[] data = mPlatform.imageToByteArray(image);
BitmapData.COMPANION.apply(mBuffer, imageId, imageWidth, imageHeight, data);
}
int contentDescriptionId = 0;
if (contentDescription != null) {
contentDescriptionId = addText(contentDescription);
}
DrawBitmapInt.COMPANION.apply(
mBuffer, imageId, srcLeft, srcTop, srcRight, srcBottom,
dstLeft, dstTop, dstRight, dstBottom, contentDescriptionId
);
} |
Insert a bitmap
@param image an opaque image that we'll add to the buffer
@param imageWidth the width of the image
@param imageHeight the height of the image
@param srcLeft left coordinate of the source area
@param srcTop top coordinate of the source area
@param srcRight right coordinate of the source area
@param srcBottom bottom coordinate of the source area
@param dstLeft left coordinate of the destination area
@param dstTop top coordinate of the destination area
@param dstRight right coordinate of the destination area
@param dstBottom bottom coordinate of the destination area
| RemoteComposeBuffer::drawBitmap | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
int addText(String text) {
int id = mRemoteComposeState.dataGetId(text);
if (id == -1) {
id = mRemoteComposeState.cache(text);
TextData.COMPANION.apply(mBuffer, id, text);
}
return id;
} |
Adds a text string data to the stream and returns its id
Will be used to insert string with bitmaps etc.
@param text the string to inject in the buffer
| RemoteComposeBuffer::addText | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addClickArea(
int id,
String contentDescription,
float left,
float top,
float right,
float bottom,
String metadata
) {
int contentDescriptionId = 0;
if (contentDescription != null) {
contentDescriptionId = addText(contentDescription);
}
int metadataId = 0;
if (metadata != null) {
metadataId = addText(metadata);
}
ClickArea.COMPANION.apply(mBuffer, id, contentDescriptionId,
left, top, right, bottom, metadataId);
} |
Add a click area to the document
@param id the id of the click area, reported in the click listener callback
@param contentDescription the content description of that click area (accessibility)
@param left left coordinate of the area bounds
@param top top coordinate of the area bounds
@param right right coordinate of the area bounds
@param bottom bottom coordinate of the area bounds
@param metadata associated metadata, user-provided
| RemoteComposeBuffer::addClickArea | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void setRootContentBehavior(int scroll, int alignment, int sizing, int mode) {
RootContentBehavior.COMPANION.apply(mBuffer, scroll, alignment, sizing, mode);
} |
Sets the way the player handles the content
@param scroll set the horizontal behavior (NONE|SCROLL_HORIZONTAL|SCROLL_VERTICAL)
@param alignment set the alignment of the content (TOP|CENTER|BOTTOM|START|END)
@param sizing set the type of sizing for the content (NONE|SIZING_LAYOUT|SIZING_SCALE)
@param mode set the mode of sizing, either LAYOUT modes or SCALE modes
the LAYOUT modes are:
- LAYOUT_MATCH_PARENT
- LAYOUT_WRAP_CONTENT
or adding an horizontal mode and a vertical mode:
- LAYOUT_HORIZONTAL_MATCH_PARENT
- LAYOUT_HORIZONTAL_WRAP_CONTENT
- LAYOUT_HORIZONTAL_FIXED
- LAYOUT_VERTICAL_MATCH_PARENT
- LAYOUT_VERTICAL_WRAP_CONTENT
- LAYOUT_VERTICAL_FIXED
The LAYOUT_*_FIXED modes will use the intrinsic document size
| RemoteComposeBuffer::setRootContentBehavior | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addDrawArc(float left,
float top,
float right,
float bottom,
float startAngle,
float sweepAngle) {
DrawArc.COMPANION.apply(mBuffer, left, top, right, bottom, startAngle, sweepAngle);
} |
add Drawing the specified arc, which will be scaled to fit inside the specified oval.
<br>
If the start angle is negative or >= 360, the start angle is treated as start angle modulo
360.
<br>
If the sweep angle is >= 360, then the oval is drawn completely. Note that this differs
slightly from SkPath::arcTo, which treats the sweep angle modulo 360. If the sweep angle is
negative, the sweep angle is treated as sweep angle modulo 360
<br>
The arc is drawn clockwise. An angle of 0 degrees correspond to the geometric angle of 0
degrees (3 o'clock on a watch.)
<br>
@param left left coordinate of oval used to define the shape and size of the arc
@param top top coordinate of oval used to define the shape and size of the arc
@param right right coordinate of oval used to define the shape and size of the arc
@param bottom bottom coordinate of oval used to define the shape and size of the arc
@param startAngle Starting angle (in degrees) where the arc begins
@param sweepAngle Sweep angle (in degrees) measured clockwise
| RemoteComposeBuffer::addDrawArc | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addDrawBitmap(Object image,
float left,
float top,
float right,
float bottom,
String contentDescription) {
int imageId = mRemoteComposeState.dataGetId(image);
if (imageId == -1) {
imageId = mRemoteComposeState.cache(image);
byte[] data = mPlatform.imageToByteArray(image);
int imageWidth = mPlatform.getImageWidth(image);
int imageHeight = mPlatform.getImageHeight(image);
BitmapData.COMPANION.apply(mBuffer, imageId, imageWidth, imageHeight, data);
}
int contentDescriptionId = 0;
if (contentDescription != null) {
contentDescriptionId = addText(contentDescription);
}
DrawBitmap.COMPANION.apply(
mBuffer, imageId, left, top, right, bottom, contentDescriptionId
);
} |
@param image The bitmap to be drawn
@param left left coordinate of rectangle that the bitmap will be to fit into
@param top top coordinate of rectangle that the bitmap will be to fit into
@param right right coordinate of rectangle that the bitmap will be to fit into
@param bottom bottom coordinate of rectangle that the bitmap will be to fit into
@param contentDescription content description of the image
| RemoteComposeBuffer::addDrawBitmap | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addDrawCircle(float centerX, float centerY, float radius) {
DrawCircle.COMPANION.apply(mBuffer, centerX, centerY, radius);
} |
Draw the specified circle using the specified paint. If radius is <= 0, then nothing will be
drawn.
@param centerX The x-coordinate of the center of the circle to be drawn
@param centerY The y-coordinate of the center of the circle to be drawn
@param radius The radius of the circle to be drawn
| RemoteComposeBuffer::addDrawCircle | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addDrawLine(float x1, float y1, float x2, float y2) {
DrawLine.COMPANION.apply(mBuffer, x1, y1, x2, y2);
} |
Draw a line segment with the specified start and stop x,y coordinates, using the specified
paint.
@param x1 The x-coordinate of the start point of the line
@param y1 The y-coordinate of the start point of the line
@param x2 The x-coordinate of the end point of the line
@param y2 The y-coordinate of the end point of the line
| RemoteComposeBuffer::addDrawLine | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addDrawOval(float left, float top, float right, float bottom) {
DrawOval.COMPANION.apply(mBuffer, left, top, right, bottom);
} |
Draw the specified oval using the specified paint.
@param left left coordinate of oval
@param top top coordinate of oval
@param right right coordinate of oval
@param bottom bottom coordinate of oval
| RemoteComposeBuffer::addDrawOval | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addDrawPath(Object path) {
int id = mRemoteComposeState.dataGetId(path);
if (id == -1) { // never been seen before
id = addPathData(path);
}
addDrawPath(id);
} |
Draw the specified path
<p>
Note: path objects are not immutable
modifying them and calling this will not change the drawing
@param path The path to be drawn
| RemoteComposeBuffer::addDrawPath | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addDrawPath(int pathId) {
DrawPath.COMPANION.apply(mBuffer, pathId);
} |
Draw the specified path
@param pathId
| RemoteComposeBuffer::addDrawPath | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addDrawRect(float left, float top, float right, float bottom) {
DrawRect.COMPANION.apply(mBuffer, left, top, right, bottom);
} |
Draw the specified Rect
@param left left coordinate of rectangle to be drawn
@param top top coordinate of rectangle to be drawn
@param right right coordinate of rectangle to be drawn
@param bottom bottom coordinate of rectangle to be drawn
| RemoteComposeBuffer::addDrawRect | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addDrawRoundRect(float left, float top, float right, float bottom,
float radiusX, float radiusY) {
DrawRoundRect.COMPANION.apply(mBuffer, left, top, right, bottom, radiusX, radiusY);
} |
Draw the specified round-rect
@param left left coordinate of rectangle to be drawn
@param top left coordinate of rectangle to be drawn
@param right left coordinate of rectangle to be drawn
@param bottom left coordinate of rectangle to be drawn
@param radiusX The x-radius of the oval used to round the corners
@param radiusY The y-radius of the oval used to round the corners
| RemoteComposeBuffer::addDrawRoundRect | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addDrawTextOnPath(String text, Object path, float hOffset, float vOffset) {
int pathId = mRemoteComposeState.dataGetId(path);
if (pathId == -1) { // never been seen before
pathId = addPathData(path);
}
int textId = addText(text);
DrawTextOnPath.COMPANION.apply(mBuffer, textId, pathId, hOffset, vOffset);
} |
Draw the text, with origin at (x,y) along the specified path.
@param text The text to be drawn
@param path The path the text should follow for its baseline
@param hOffset The distance along the path to add to the text's starting position
@param vOffset The distance above(-) or below(+) the path to position the text
| RemoteComposeBuffer::addDrawTextOnPath | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addDrawTextRun(String text,
int start,
int end,
int contextStart,
int contextEnd,
float x,
float y,
boolean rtl) {
int textId = addText(text);
DrawTextRun.COMPANION.apply(
mBuffer, textId, start, end,
contextStart, contextEnd, x, y, rtl);
} |
Draw the text, with origin at (x,y). The origin is interpreted
based on the Align setting in the paint.
@param text The text to be drawn
@param start The index of the first character in text to draw
@param end (end - 1) is the index of the last character in text to draw
@param contextStart
@param contextEnd
@param x The x-coordinate of the origin of the text being drawn
@param y The y-coordinate of the baseline of the text being drawn
@param rtl Draw RTTL
| RemoteComposeBuffer::addDrawTextRun | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addDrawTweenPath(Object path1,
Object path2,
float tween,
float start,
float stop) {
int path1Id = mRemoteComposeState.dataGetId(path1);
if (path1Id == -1) { // never been seen before
path1Id = addPathData(path1);
}
int path2Id = mRemoteComposeState.dataGetId(path2);
if (path2Id == -1) { // never been seen before
path2Id = addPathData(path2);
}
addDrawTweenPath(path1Id, path2Id, tween, start, stop);
} |
draw an interpolation between two paths that have the same pattern
<p>
Warning paths objects are not immutable and this is not taken into consideration
@param path1 The path1 to be drawn between
@param path2 The path2 to be drawn between
@param tween The ratio of path1 and path2 to 0 = all path 1, 1 = all path2
@param start The start of the subrange of paths to draw 0 = start form start 0.5 is half way
@param stop The end of the subrange of paths to draw 1 = end at the end 0.5 is end half way
| RemoteComposeBuffer::addDrawTweenPath | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addDrawTweenPath(int path1Id,
int path2Id,
float tween,
float start,
float stop) {
DrawTweenPath.COMPANION.apply(
mBuffer, path1Id, path2Id,
tween, start, stop);
} |
draw an interpolation between two paths that have the same pattern
@param path1Id The path1 to be drawn between
@param path2Id The path2 to be drawn between
@param tween The ratio of path1 and path2 to 0 = all path 1, 1 = all path2
@param start The start of the subrange of paths to draw 0 = start form start .5 is 1/2 way
@param stop The end of the subrange of paths to draw 1 = end at the end .5 is end 1/2 way
| RemoteComposeBuffer::addDrawTweenPath | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public int addPathData(Object path) {
float[] pathData = mPlatform.pathToFloatArray(path);
int id = mRemoteComposeState.cache(path);
PathData.COMPANION.apply(mBuffer, id, pathData);
return id;
} |
Add a path object
@param path
@return the id of the path on the wire
| RemoteComposeBuffer::addPathData | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addMatrixSkew(float skewX, float skewY) {
MatrixSkew.COMPANION.apply(mBuffer, skewX, skewY);
} |
add a Pre-concat the current matrix with the specified skew.
@param skewX The amount to skew in X
@param skewY The amount to skew in Y
| RemoteComposeBuffer::addMatrixSkew | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addMatrixRestore() {
MatrixRestore.COMPANION.apply(mBuffer);
} |
This call balances a previous call to save(), and is used to remove all
modifications to the matrix/clip state since the last save call.
Do not call restore() more times than save() was called.
| RemoteComposeBuffer::addMatrixRestore | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addMatrixSave() {
MatrixSave.COMPANION.apply(mBuffer);
} |
Add a saves the current matrix and clip onto a private stack.
<p>
Subsequent calls to translate,scale,rotate,skew,concat or clipRect,
clipPath will all operate as usual, but when the balancing call to
restore() is made, those calls will be forgotten, and the settings that
existed before the save() will be reinstated.
| RemoteComposeBuffer::addMatrixSave | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addMatrixRotate(float angle, float centerX, float centerY) {
MatrixRotate.COMPANION.apply(mBuffer, angle, centerX, centerY);
} |
add a pre-concat the current matrix with the specified rotation.
@param angle The amount to rotate, in degrees
@param centerX The x-coord for the pivot point (unchanged by the rotation)
@param centerY The y-coord for the pivot point (unchanged by the rotation)
| RemoteComposeBuffer::addMatrixRotate | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addMatrixTranslate(float dx, float dy) {
MatrixTranslate.COMPANION.apply(mBuffer, dx, dy);
} |
add a Pre-concat to the current matrix with the specified translation
@param dx The distance to translate in X
@param dy The distance to translate in Y
| RemoteComposeBuffer::addMatrixTranslate | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addMatrixScale(float scaleX, float scaleY) {
MatrixScale.COMPANION.apply(mBuffer, scaleX, scaleY, Float.NaN, Float.NaN);
} |
Add a pre-concat of the current matrix with the specified scale.
@param scaleX The amount to scale in X
@param scaleY The amount to scale in Y
| RemoteComposeBuffer::addMatrixScale | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
public void addMatrixScale(float scaleX, float scaleY, float centerX, float centerY) {
MatrixScale.COMPANION.apply(mBuffer, scaleX, scaleY, centerX, centerY);
} |
Add a pre-concat of the current matrix with the specified scale.
@param scaleX The amount to scale in X
@param scaleY The amount to scale in Y
@param centerX The x-coord for the pivot point (unchanged by the scale)
@param centerY The y-coord for the pivot point (unchanged by the scale)
| RemoteComposeBuffer::addMatrixScale | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/widget/remotecompose/core/RemoteComposeBuffer.java | MIT |
private IsoChronology() {
} |
Restricted constructor.
| IsoChronology::IsoChronology | java | Reginer/aosp-android-jar | android-34/src/java/time/chrono/IsoChronology.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/java/time/chrono/IsoChronology.java | MIT |
private int numberOfDaysOfMonth(int year, int month) {
int dom;
switch (month) {
case 2:
dom = (IsoChronology.INSTANCE.isLeapYear(year) ? 29 : 28);
break;
case 4:
case 6:
case 9:
case 11:
dom = 30;
break;
default:
dom = 31;
break;
}
return dom;
} |
Gets the number of days for the given month in the given year.
@param year the year to represent, from MIN_YEAR to MAX_YEAR
@param month the month-of-year to represent, from 1 to 12
@return the number of days for the given month in the given year
| IsoChronology::numberOfDaysOfMonth | java | Reginer/aosp-android-jar | android-34/src/java/time/chrono/IsoChronology.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/java/time/chrono/IsoChronology.java | MIT |
public int getNumDisplays() {
return mNumDisplays;
} |
Returns the number built in displays on the device as defined in the power_profile.xml.
| CpuClusterKey::getNumDisplays | java | Reginer/aosp-android-jar | android-33/src/com/android/internal/os/PowerProfile.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/internal/os/PowerProfile.java | MIT |
public int getNumElements(String key) {
if (sPowerItemMap.containsKey(key)) {
return 1;
} else if (sPowerArrayMap.containsKey(key)) {
return sPowerArrayMap.get(key).length;
}
return 0;
} |
Returns the number of memory bandwidth buckets defined in power_profile.xml, or a
default value if the subsystem has no recorded value.
@return the number of memory bandwidth buckets.
| CpuClusterKey::getNumElements | java | Reginer/aosp-android-jar | android-33/src/com/android/internal/os/PowerProfile.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/internal/os/PowerProfile.java | MIT |
public double getAveragePowerOrDefault(String type, double defaultValue) {
if (sPowerItemMap.containsKey(type)) {
return sPowerItemMap.get(type);
} else if (sPowerArrayMap.containsKey(type)) {
return sPowerArrayMap.get(type)[0];
} else {
return defaultValue;
}
} |
Returns the average current in mA consumed by the subsystem, or the given
default value if the subsystem has no recorded value.
@param type the subsystem type
@param defaultValue the value to return if the subsystem has no recorded value.
@return the average current in milliAmps.
| CpuClusterKey::getAveragePowerOrDefault | java | Reginer/aosp-android-jar | android-33/src/com/android/internal/os/PowerProfile.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/internal/os/PowerProfile.java | MIT |
public double getAverageBatteryDrainOrDefaultMa(long key, double defaultValue) {
final long subsystemType = key & SUBSYSTEM_MASK;
final int subsystemFields = (int) (key & SUBSYSTEM_FIELDS_MASK);
final double value;
if (subsystemType == SUBSYSTEM_MODEM) {
value = sModemPowerProfile.getAverageBatteryDrainMa(subsystemFields);
} else {
value = Double.NaN;
}
if (Double.isNaN(value)) return defaultValue;
return value;
} |
Returns the average current in mA consumed by a subsystem's specified operation, or the given
default value if the subsystem has no recorded value.
@param key that describes a subsystem's battery draining operation
The key is built from multiple constant, see {@link Subsystem} and
{@link ModemPowerProfile}.
@param defaultValue the value to return if the subsystem has no recorded value.
@return the average current in milliAmps.
| CpuClusterKey::getAverageBatteryDrainOrDefaultMa | java | Reginer/aosp-android-jar | android-33/src/com/android/internal/os/PowerProfile.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/internal/os/PowerProfile.java | MIT |
public double getAverageBatteryDrainMa(long key) {
return getAverageBatteryDrainOrDefaultMa(key, 0);
} |
Returns the average current in mA consumed by a subsystem's specified operation.
@param key that describes a subsystem's battery draining operation
The key is built from multiple constant, see {@link Subsystem} and
{@link ModemPowerProfile}.
@return the average current in milliAmps.
| CpuClusterKey::getAverageBatteryDrainMa | java | Reginer/aosp-android-jar | android-33/src/com/android/internal/os/PowerProfile.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/internal/os/PowerProfile.java | MIT |
public double getAveragePowerForOrdinal(@PowerGroup String group, int ordinal,
double defaultValue) {
final String type = getOrdinalPowerType(group, ordinal);
return getAveragePowerOrDefault(type, defaultValue);
} |
Returns the average current in mA consumed by an ordinaled subsystem, or the given
default value if the subsystem has no recorded value.
@param group the subsystem {@link PowerGroup}.
@param ordinal which entity in the {@link PowerGroup}.
@param defaultValue the value to return if the subsystem has no recorded value.
@return the average current in milliAmps.
| CpuClusterKey::getAveragePowerForOrdinal | java | Reginer/aosp-android-jar | android-33/src/com/android/internal/os/PowerProfile.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/internal/os/PowerProfile.java | MIT |
public double getAveragePowerForOrdinal(@PowerGroup String group, int ordinal) {
return getAveragePowerForOrdinal(group, ordinal, 0);
} |
Returns the average current in mA consumed by an ordinaled subsystem.
@param group the subsystem {@link PowerGroup}.
@param ordinal which entity in the {@link PowerGroup}.
@return the average current in milliAmps.
| CpuClusterKey::getAveragePowerForOrdinal | java | Reginer/aosp-android-jar | android-33/src/com/android/internal/os/PowerProfile.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/internal/os/PowerProfile.java | MIT |
public void dumpDebug(ProtoOutputStream proto) {
// cpu.suspend
writePowerConstantToProto(proto, POWER_CPU_SUSPEND, PowerProfileProto.CPU_SUSPEND);
// cpu.idle
writePowerConstantToProto(proto, POWER_CPU_IDLE, PowerProfileProto.CPU_IDLE);
// cpu.active
writePowerConstantToProto(proto, POWER_CPU_ACTIVE, PowerProfileProto.CPU_ACTIVE);
// cpu.clusters.cores
// cpu.cluster_power.cluster
// cpu.core_speeds.cluster
// cpu.core_power.cluster
for (int cluster = 0; cluster < mCpuClusters.length; cluster++) {
final long token = proto.start(PowerProfileProto.CPU_CLUSTER);
proto.write(PowerProfileProto.CpuCluster.ID, cluster);
proto.write(PowerProfileProto.CpuCluster.CLUSTER_POWER,
sPowerItemMap.get(mCpuClusters[cluster].clusterPowerKey));
proto.write(PowerProfileProto.CpuCluster.CORES, mCpuClusters[cluster].numCpus);
for (Double speed : sPowerArrayMap.get(mCpuClusters[cluster].freqKey)) {
proto.write(PowerProfileProto.CpuCluster.SPEED, speed);
}
for (Double corePower : sPowerArrayMap.get(mCpuClusters[cluster].corePowerKey)) {
proto.write(PowerProfileProto.CpuCluster.CORE_POWER, corePower);
}
proto.end(token);
}
// wifi.scan
writePowerConstantToProto(proto, POWER_WIFI_SCAN, PowerProfileProto.WIFI_SCAN);
// wifi.on
writePowerConstantToProto(proto, POWER_WIFI_ON, PowerProfileProto.WIFI_ON);
// wifi.active
writePowerConstantToProto(proto, POWER_WIFI_ACTIVE, PowerProfileProto.WIFI_ACTIVE);
// wifi.controller.idle
writePowerConstantToProto(proto, POWER_WIFI_CONTROLLER_IDLE,
PowerProfileProto.WIFI_CONTROLLER_IDLE);
// wifi.controller.rx
writePowerConstantToProto(proto, POWER_WIFI_CONTROLLER_RX,
PowerProfileProto.WIFI_CONTROLLER_RX);
// wifi.controller.tx
writePowerConstantToProto(proto, POWER_WIFI_CONTROLLER_TX,
PowerProfileProto.WIFI_CONTROLLER_TX);
// wifi.controller.tx_levels
writePowerConstantArrayToProto(proto, POWER_WIFI_CONTROLLER_TX_LEVELS,
PowerProfileProto.WIFI_CONTROLLER_TX_LEVELS);
// wifi.controller.voltage
writePowerConstantToProto(proto, POWER_WIFI_CONTROLLER_OPERATING_VOLTAGE,
PowerProfileProto.WIFI_CONTROLLER_OPERATING_VOLTAGE);
// bluetooth.controller.idle
writePowerConstantToProto(proto, POWER_BLUETOOTH_CONTROLLER_IDLE,
PowerProfileProto.BLUETOOTH_CONTROLLER_IDLE);
// bluetooth.controller.rx
writePowerConstantToProto(proto, POWER_BLUETOOTH_CONTROLLER_RX,
PowerProfileProto.BLUETOOTH_CONTROLLER_RX);
// bluetooth.controller.tx
writePowerConstantToProto(proto, POWER_BLUETOOTH_CONTROLLER_TX,
PowerProfileProto.BLUETOOTH_CONTROLLER_TX);
// bluetooth.controller.voltage
writePowerConstantToProto(proto, POWER_BLUETOOTH_CONTROLLER_OPERATING_VOLTAGE,
PowerProfileProto.BLUETOOTH_CONTROLLER_OPERATING_VOLTAGE);
// modem.controller.sleep
writePowerConstantToProto(proto, POWER_MODEM_CONTROLLER_SLEEP,
PowerProfileProto.MODEM_CONTROLLER_SLEEP);
// modem.controller.idle
writePowerConstantToProto(proto, POWER_MODEM_CONTROLLER_IDLE,
PowerProfileProto.MODEM_CONTROLLER_IDLE);
// modem.controller.rx
writePowerConstantToProto(proto, POWER_MODEM_CONTROLLER_RX,
PowerProfileProto.MODEM_CONTROLLER_RX);
// modem.controller.tx
writePowerConstantArrayToProto(proto, POWER_MODEM_CONTROLLER_TX,
PowerProfileProto.MODEM_CONTROLLER_TX);
// modem.controller.voltage
writePowerConstantToProto(proto, POWER_MODEM_CONTROLLER_OPERATING_VOLTAGE,
PowerProfileProto.MODEM_CONTROLLER_OPERATING_VOLTAGE);
// gps.on
writePowerConstantToProto(proto, POWER_GPS_ON, PowerProfileProto.GPS_ON);
// gps.signalqualitybased
writePowerConstantArrayToProto(proto, POWER_GPS_SIGNAL_QUALITY_BASED,
PowerProfileProto.GPS_SIGNAL_QUALITY_BASED);
// gps.voltage
writePowerConstantToProto(proto, POWER_GPS_OPERATING_VOLTAGE,
PowerProfileProto.GPS_OPERATING_VOLTAGE);
// bluetooth.on
writePowerConstantToProto(proto, POWER_BLUETOOTH_ON, PowerProfileProto.BLUETOOTH_ON);
// bluetooth.active
writePowerConstantToProto(proto, POWER_BLUETOOTH_ACTIVE,
PowerProfileProto.BLUETOOTH_ACTIVE);
// bluetooth.at
writePowerConstantToProto(proto, POWER_BLUETOOTH_AT_CMD,
PowerProfileProto.BLUETOOTH_AT_CMD);
// ambient.on
writePowerConstantToProto(proto, POWER_AMBIENT_DISPLAY, PowerProfileProto.AMBIENT_DISPLAY);
// screen.on
writePowerConstantToProto(proto, POWER_SCREEN_ON, PowerProfileProto.SCREEN_ON);
// radio.on
writePowerConstantToProto(proto, POWER_RADIO_ON, PowerProfileProto.RADIO_ON);
// radio.scanning
writePowerConstantToProto(proto, POWER_RADIO_SCANNING, PowerProfileProto.RADIO_SCANNING);
// radio.active
writePowerConstantToProto(proto, POWER_RADIO_ACTIVE, PowerProfileProto.RADIO_ACTIVE);
// screen.full
writePowerConstantToProto(proto, POWER_SCREEN_FULL, PowerProfileProto.SCREEN_FULL);
// audio
writePowerConstantToProto(proto, POWER_AUDIO, PowerProfileProto.AUDIO);
// video
writePowerConstantToProto(proto, POWER_VIDEO, PowerProfileProto.VIDEO);
// camera.flashlight
writePowerConstantToProto(proto, POWER_FLASHLIGHT, PowerProfileProto.FLASHLIGHT);
// memory.bandwidths
writePowerConstantToProto(proto, POWER_MEMORY, PowerProfileProto.MEMORY);
// camera.avg
writePowerConstantToProto(proto, POWER_CAMERA, PowerProfileProto.CAMERA);
// wifi.batchedscan
writePowerConstantToProto(proto, POWER_WIFI_BATCHED_SCAN,
PowerProfileProto.WIFI_BATCHED_SCAN);
// battery.capacity
writePowerConstantToProto(proto, POWER_BATTERY_CAPACITY,
PowerProfileProto.BATTERY_CAPACITY);
} |
Dump power constants into PowerProfileProto
| CpuClusterKey::dumpDebug | java | Reginer/aosp-android-jar | android-33/src/com/android/internal/os/PowerProfile.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/internal/os/PowerProfile.java | MIT |
public void dump(PrintWriter pw) {
final IndentingPrintWriter ipw = new IndentingPrintWriter(pw);
sPowerItemMap.forEach((key, value) -> {
ipw.print(key, value);
ipw.println();
});
sPowerArrayMap.forEach((key, value) -> {
ipw.print(key, Arrays.toString(value));
ipw.println();
});
ipw.println("Modem values:");
ipw.increaseIndent();
sModemPowerProfile.dump(ipw);
ipw.decreaseIndent();
} |
Dump the PowerProfile values.
| CpuClusterKey::dump | java | Reginer/aosp-android-jar | android-33/src/com/android/internal/os/PowerProfile.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/internal/os/PowerProfile.java | MIT |
public void updateIndication(@IndicationType int type, KeyguardIndication newIndication,
boolean updateImmediately) {
if (type == INDICATION_TYPE_NOW_PLAYING
|| type == INDICATION_TYPE_REVERSE_CHARGING) {
// temporarily don't show here, instead use AmbientContainer b/181049781
return;
}
final boolean hasPreviousIndication = mIndicationMessages.get(type) != null;
final boolean hasNewIndication = newIndication != null;
if (!hasNewIndication) {
mIndicationMessages.remove(type);
mIndicationQueue.removeIf(x -> x == type);
} else {
if (!hasPreviousIndication) {
mIndicationQueue.add(type);
}
mIndicationMessages.put(type, newIndication);
}
if (mIsDozing) {
return;
}
final boolean showNow = updateImmediately
|| mCurrIndicationType == INDICATION_TYPE_NONE
|| mCurrIndicationType == type;
if (hasNewIndication) {
if (showNow) {
showIndication(type);
} else if (!isNextIndicationScheduled()) {
scheduleShowNextIndication();
}
return;
}
if (mCurrIndicationType == type
&& !hasNewIndication
&& updateImmediately) {
if (mShowNextIndicationRunnable != null) {
mShowNextIndicationRunnable.runImmediately();
} else {
showIndication(INDICATION_TYPE_NONE);
}
}
} |
Update the indication type with the given String.
@param type of indication
@param newIndication message to associate with this indication type
@param showImmediately if true: shows this indication message immediately. Else, the text
associated with this type is updated and will show when its turn in
the IndicationQueue comes around.
| KeyguardIndicationRotateTextViewController::updateIndication | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java | MIT |
public void hideIndication(@IndicationType int type) {
if (!mIndicationMessages.containsKey(type)
|| TextUtils.isEmpty(mIndicationMessages.get(type).getMessage())) {
return;
}
updateIndication(type, null, true);
} |
Stop showing the following indication type.
If the current indication is of this type, immediately stops showing the message.
| KeyguardIndicationRotateTextViewController::hideIndication | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java | MIT |
public void showTransient(CharSequence newIndication) {
final long inAnimationDuration = 600L; // see KeyguardIndicationTextView.getYInDuration
updateIndication(INDICATION_TYPE_TRANSIENT,
new KeyguardIndication.Builder()
.setMessage(newIndication)
.setMinVisibilityMillis(2000L + inAnimationDuration)
.setTextColor(mInitialTextColorState)
.build(),
/* showImmediately */true);
} |
Show a transient message.
Transient messages:
- show immediately
- will continue to be in the rotation of messages shown until hideTransient is called.
| KeyguardIndicationRotateTextViewController::showTransient | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java | MIT |
public void hideTransient() {
hideIndication(INDICATION_TYPE_TRANSIENT);
} |
Hide a transient message immediately.
| KeyguardIndicationRotateTextViewController::hideTransient | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java | MIT |
public boolean hasIndications() {
return mIndicationMessages.keySet().size() > 0;
} |
@return true if there are available indications to show
| KeyguardIndicationRotateTextViewController::hasIndications | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java | MIT |
private void showIndication(@IndicationType int type) {
cancelScheduledIndication();
mCurrIndicationType = type;
mIndicationQueue.removeIf(x -> x == type);
if (mCurrIndicationType != INDICATION_TYPE_NONE) {
mIndicationQueue.add(type); // re-add to show later
}
mView.switchIndication(mIndicationMessages.get(type));
// only schedule next indication if there's more than just this indication in the queue
if (mCurrIndicationType != INDICATION_TYPE_NONE && mIndicationQueue.size() > 1) {
scheduleShowNextIndication();
}
} |
Immediately show the passed indication type and schedule the next indication to show.
Will re-add this indication to be re-shown after all other indications have been
rotated through.
| KeyguardIndicationRotateTextViewController::showIndication | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/keyguard/KeyguardIndicationRotateTextViewController.java | MIT |
public void setEdgeEffectColor(@ColorInt int color) {
setTopEdgeEffectColor(color);
setBottomEdgeEffectColor(color);
} |
Sets the edge effect color for both top and bottom edge effects.
@param color The color for the edge effects.
@see #setTopEdgeEffectColor(int)
@see #setBottomEdgeEffectColor(int)
@see #getTopEdgeEffectColor()
@see #getBottomEdgeEffectColor()
| ScrollView::setEdgeEffectColor | java | Reginer/aosp-android-jar | android-35/src/android/widget/ScrollView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/widget/ScrollView.java | MIT |
public void setBottomEdgeEffectColor(@ColorInt int color) {
mEdgeGlowBottom.setColor(color);
} |
Sets the bottom edge effect color.
@param color The color for the bottom edge effect.
@see #setTopEdgeEffectColor(int)
@see #setEdgeEffectColor(int)
@see #getTopEdgeEffectColor()
@see #getBottomEdgeEffectColor()
| ScrollView::setBottomEdgeEffectColor | java | Reginer/aosp-android-jar | android-35/src/android/widget/ScrollView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/widget/ScrollView.java | MIT |
public void setTopEdgeEffectColor(@ColorInt int color) {
mEdgeGlowTop.setColor(color);
} |
Sets the top edge effect color.
@param color The color for the top edge effect.
@see #setBottomEdgeEffectColor(int)
@see #setEdgeEffectColor(int)
@see #getTopEdgeEffectColor()
@see #getBottomEdgeEffectColor()
| ScrollView::setTopEdgeEffectColor | java | Reginer/aosp-android-jar | android-35/src/android/widget/ScrollView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/widget/ScrollView.java | MIT |
public int getMaxScrollAmount() {
return (int) (MAX_SCROLL_FACTOR * (mBottom - mTop));
} |
@return The maximum amount this scroll view will scroll in response to
an arrow event.
| ScrollView::getMaxScrollAmount | java | Reginer/aosp-android-jar | android-35/src/android/widget/ScrollView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/widget/ScrollView.java | MIT |
public void setFillViewport(boolean fillViewport) {
if (fillViewport != mFillViewport) {
mFillViewport = fillViewport;
requestLayout();
}
} |
Indicates this ScrollView whether it should stretch its content height to fill
the viewport or not.
@param fillViewport True to stretch the content's height to the viewport's
boundaries, false otherwise.
@attr ref android.R.styleable#ScrollView_fillViewport
| ScrollView::setFillViewport | java | Reginer/aosp-android-jar | android-35/src/android/widget/ScrollView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/widget/ScrollView.java | MIT |
public boolean isSmoothScrollingEnabled() {
return mSmoothScrollingEnabled;
} |
@return Whether arrow scrolling will animate its transition.
| ScrollView::isSmoothScrollingEnabled | java | Reginer/aosp-android-jar | android-35/src/android/widget/ScrollView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/widget/ScrollView.java | MIT |
public void setSmoothScrollingEnabled(boolean smoothScrollingEnabled) {
mSmoothScrollingEnabled = smoothScrollingEnabled;
} |
Set whether arrow scrolling will animate its transition.
@param smoothScrollingEnabled whether arrow scrolling will animate its transition
| ScrollView::setSmoothScrollingEnabled | java | Reginer/aosp-android-jar | android-35/src/android/widget/ScrollView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/widget/ScrollView.java | MIT |
public boolean executeKeyEvent(KeyEvent event) {
mTempRect.setEmpty();
if (!canScroll()) {
if (isFocused() && event.getKeyCode() != KeyEvent.KEYCODE_BACK
&& event.getKeyCode() != KeyEvent.KEYCODE_ESCAPE) {
View currentFocused = findFocus();
if (currentFocused == this) currentFocused = null;
View nextFocused = FocusFinder.getInstance().findNextFocus(this,
currentFocused, View.FOCUS_DOWN);
return nextFocused != null
&& nextFocused != this
&& nextFocused.requestFocus(View.FOCUS_DOWN);
}
return false;
}
boolean handled = false;
if (event.getAction() == KeyEvent.ACTION_DOWN) {
switch (event.getKeyCode()) {
case KeyEvent.KEYCODE_DPAD_UP:
if (!event.isAltPressed()) {
handled = arrowScroll(View.FOCUS_UP);
} else {
handled = fullScroll(View.FOCUS_UP);
}
break;
case KeyEvent.KEYCODE_DPAD_DOWN:
if (!event.isAltPressed()) {
handled = arrowScroll(View.FOCUS_DOWN);
} else {
handled = fullScroll(View.FOCUS_DOWN);
}
break;
case KeyEvent.KEYCODE_MOVE_HOME:
handled = fullScroll(View.FOCUS_UP);
break;
case KeyEvent.KEYCODE_MOVE_END:
handled = fullScroll(View.FOCUS_DOWN);
break;
case KeyEvent.KEYCODE_PAGE_UP:
handled = pageScroll(View.FOCUS_UP);
break;
case KeyEvent.KEYCODE_PAGE_DOWN:
handled = pageScroll(View.FOCUS_DOWN);
break;
case KeyEvent.KEYCODE_SPACE:
handled = pageScroll(event.isShiftPressed() ? View.FOCUS_UP : View.FOCUS_DOWN);
break;
}
}
return handled;
} |
You can call this function yourself to have the scroll view perform
scrolling from a key event, just as if the event had been dispatched to
it by the view hierarchy.
@param event The key event to execute.
@return Return true if the event was handled, else false.
| ScrollView::executeKeyEvent | java | Reginer/aosp-android-jar | android-35/src/android/widget/ScrollView.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/widget/ScrollView.java | MIT |
public hc_nodegetownerdocumentnull(final DOMTestDocumentBuilderFactory factory) throws org.w3c.domts.DOMTestIncompatibleException {
super(factory);
//
// check if loaded documents are supported for content type
//
String contentType = getContentType();
preload(contentType, "hc_staff", false);
} |
Constructor.
@param factory document factory, may not be null
@throws org.w3c.domts.DOMTestIncompatibleException Thrown if test is not compatible with parser configuration
| hc_nodegetownerdocumentnull::hc_nodegetownerdocumentnull | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level1/core/hc_nodegetownerdocumentnull.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level1/core/hc_nodegetownerdocumentnull.java | MIT |
public void runTest() throws Throwable {
Document doc;
Document ownerDocument;
doc = (Document) load("hc_staff", false);
ownerDocument = doc.getOwnerDocument();
assertNull("nodeGetOwnerDocumentNullAssert1", ownerDocument);
} |
Runs the test case.
@throws Throwable Any uncaught exception causes test to fail
| hc_nodegetownerdocumentnull::runTest | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level1/core/hc_nodegetownerdocumentnull.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level1/core/hc_nodegetownerdocumentnull.java | MIT |
public String getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodegetownerdocumentnull";
} |
Gets URI that identifies the test.
@return uri identifier of test
| hc_nodegetownerdocumentnull::getTargetURI | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level1/core/hc_nodegetownerdocumentnull.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level1/core/hc_nodegetownerdocumentnull.java | MIT |
public static void main(final String[] args) {
DOMTestCase.doMain(hc_nodegetownerdocumentnull.class, args);
} |
Runs this test from the command line.
@param args command line arguments
| hc_nodegetownerdocumentnull::main | java | Reginer/aosp-android-jar | android-31/src/org/w3c/domts/level1/core/hc_nodegetownerdocumentnull.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level1/core/hc_nodegetownerdocumentnull.java | MIT |
public VopsSupportInfo() {} |
@hide
| VopsSupportInfo::VopsSupportInfo | java | Reginer/aosp-android-jar | android-33/src/android/telephony/VopsSupportInfo.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/telephony/VopsSupportInfo.java | MIT |
protected void writeToParcel(@NonNull Parcel dest, int flags, int type) {
dest.writeInt(type);
} |
Used by child classes for parceling.
@hide
| VopsSupportInfo::writeToParcel | java | Reginer/aosp-android-jar | android-33/src/android/telephony/VopsSupportInfo.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/telephony/VopsSupportInfo.java | MIT |
void dispatch(int what, int pmReason) {
final Message message = mHandler.obtainMessage(what);
message.arg1 = pmReason;
message.sendToTarget();
} |
@param what Message to send.
@param pmReason Reason this message was triggered - this should be a value from either
{@link PowerManager.WakeReason} or {@link PowerManager.GoToSleepReason}.
| KeyguardLifecyclesDispatcher::dispatch | java | Reginer/aosp-android-jar | android-32/src/com/android/systemui/keyguard/KeyguardLifecyclesDispatcher.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/com/android/systemui/keyguard/KeyguardLifecyclesDispatcher.java | MIT |
public void init(@DialogType int type, UsbDialogHelper usbDialogHelper) {
mDialogType = type;
mDialogHelper = usbDialogHelper;
} |
Initialize USB audio warning dialog message type and helper class.
@param type Dialog type for Activity.
@param usbDialogHelper Helper class for getting USB permission and confirm dialogs
| UsbAudioWarningDialogMessage::init | java | Reginer/aosp-android-jar | android-34/src/com/android/systemui/usb/UsbAudioWarningDialogMessage.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/systemui/usb/UsbAudioWarningDialogMessage.java | MIT |
public int getMessageId() {
if (!mDialogHelper.isUsbDevice()) {
return getUsbAccessoryPromptId();
}
if (hasRecordPermission() && isUsbAudioDevice()) {
// case# 1, 2, 3
return R.string.usb_audio_device_prompt;
} else if (!hasRecordPermission() && isUsbAudioDevice() && hasAudioPlayback()
&& !hasAudioCapture()) {
// case# 5
return R.string.usb_audio_device_prompt;
}
if (!hasRecordPermission() && isUsbAudioDevice() && hasAudioCapture()) {
// case# 6,7
return R.string.usb_audio_device_prompt_warn;
}
Log.w(TAG, "Only shows title with empty content description!");
return Resources.ID_NULL;
} |
According to USB audio warning dialog matrix table to return warning message id.
@return string resId for USB audio warning dialog message, otherwise {ID_NULL}.
See usb_audio.md for USB audio Permission and Confirmation warning dialog resource
string id matrix table.
| UsbAudioWarningDialogMessage::getMessageId | java | Reginer/aosp-android-jar | android-34/src/com/android/systemui/usb/UsbAudioWarningDialogMessage.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/systemui/usb/UsbAudioWarningDialogMessage.java | MIT |
public int getPromptTitleId() {
return (mDialogType == TYPE_PERMISSION)
? R.string.usb_audio_device_permission_prompt_title
: R.string.usb_audio_device_confirm_prompt_title;
} |
Gets prompt dialog title.
@return string id for USB prompt dialog title.
| UsbAudioWarningDialogMessage::getPromptTitleId | java | Reginer/aosp-android-jar | android-34/src/com/android/systemui/usb/UsbAudioWarningDialogMessage.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/systemui/usb/UsbAudioWarningDialogMessage.java | MIT |
public int getUsbAccessoryPromptId() {
return (mDialogType == TYPE_PERMISSION)
? R.string.usb_accessory_permission_prompt : R.string.usb_accessory_confirm_prompt;
} |
Gets USB Accessory prompt message id.
@return string id for USB Accessory prompt message.
| UsbAudioWarningDialogMessage::getUsbAccessoryPromptId | java | Reginer/aosp-android-jar | android-34/src/com/android/systemui/usb/UsbAudioWarningDialogMessage.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/systemui/usb/UsbAudioWarningDialogMessage.java | MIT |
public void destroy() {
// Unregisters everything, which is enough to allow gc.
for (TriggerSensor triggerSensor : mSensors) {
triggerSensor.setListening(false);
}
mProximitySensor.pause();
} |
Unregister any sensors.
| DozeSensorsUiEvent::destroy | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/doze/DozeSensors.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/doze/DozeSensors.java | MIT |
public void requestTemporaryDisable() {
mDebounceFrom = SystemClock.uptimeMillis();
} |
Temporarily disable some sensors to avoid turning on the device while the user is
turning it off.
| DozeSensorsUiEvent::requestTemporaryDisable | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/doze/DozeSensors.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/doze/DozeSensors.java | MIT |
public static Sensor findSensorWithType(SensorManager sensorManager, String type) {
if (TextUtils.isEmpty(type)) {
return null;
}
List<Sensor> sensorList = sensorManager.getSensorList(Sensor.TYPE_ALL);
for (Sensor s : sensorList) {
if (type.equals(s.getStringType())) {
return s;
}
}
return null;
} |
Utility method to find a {@link Sensor} for the supplied string type.
| DozeSensorsUiEvent::findSensorWithType | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/doze/DozeSensors.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/doze/DozeSensors.java | MIT |
public void setListening(boolean listen, boolean includeTouchScreenSensors) {
if (mListening == listen && mListeningTouchScreenSensors == includeTouchScreenSensors) {
return;
}
mListening = listen;
mListeningTouchScreenSensors = includeTouchScreenSensors;
updateListening();
} |
If sensors should be registered and sending signals.
| DozeSensorsUiEvent::setListening | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/doze/DozeSensors.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/doze/DozeSensors.java | MIT |
public void setListening(boolean listen, boolean includeTouchScreenSensors,
boolean lowPowerStateOrOff) {
final boolean shouldRegisterProxSensors =
!mSelectivelyRegisterProxSensors || lowPowerStateOrOff;
if (mListening == listen && mListeningTouchScreenSensors == includeTouchScreenSensors
&& mListeningProxSensors == shouldRegisterProxSensors) {
return;
}
mListening = listen;
mListeningTouchScreenSensors = includeTouchScreenSensors;
mListeningProxSensors = shouldRegisterProxSensors;
updateListening();
} |
If sensors should be registered and sending signals.
| DozeSensorsUiEvent::setListening | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/doze/DozeSensors.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/doze/DozeSensors.java | MIT |
private void updateListening() {
boolean anyListening = false;
for (TriggerSensor s : mSensors) {
boolean listen = mListening
&& (!s.mRequiresTouchscreen || mListeningTouchScreenSensors)
&& (!s.mRequiresProx || mListeningProxSensors);
s.setListening(listen);
if (listen) {
anyListening = true;
}
}
if (!anyListening) {
mSecureSettings.unregisterContentObserver(mSettingsObserver);
} else if (!mSettingRegistered) {
for (TriggerSensor s : mSensors) {
s.registerSettingsObserver(mSettingsObserver);
}
}
mSettingRegistered = anyListening;
} |
Registers/unregisters sensors based on internal state.
| DozeSensorsUiEvent::updateListening | java | Reginer/aosp-android-jar | android-31/src/com/android/systemui/doze/DozeSensors.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/systemui/doze/DozeSensors.java | MIT |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.