For packages:
android.util.proto
android.util.jar
android.util.apk
android.util
This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.
Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@
Bug: 110868826
Test: m
Change-Id: Ia0f48c244b0fbe33d40d797702a82303648196ed
AUPT is triggering an fdsan diagnostic when creating a temporary
ParcelFileDescriptor to write to a Parcel. This code seems correct at
first glance, so under the assumption that some other code is closing
the file descriptor out from under us, keep our owned file descriptor
around as a ParcelFileDescriptor to catch the perpetrator in the act.
Bug: http://b/112405224
Test: atest MemoryIntArrayTest
(testAshmemSizeMatchesMemoryIntArraySize failed/crashed before, fails now)
Change-Id: Ie8ff7562c78ecde4cf1757d572ecb733213cc975
Putting /** @hide */ on the same line results in the automated annotation
addition putting the annotation the previous line, which then results in
the @hide javadoc annotation being ignored (since it's now no longer
strictly before the method declaration).
Bug: 110868826
Test: m
Change-Id: I1b5c290a17ead46effd2f2ff3f4b33884efbc116
Base64OutputStream.close() first write()s (possibly empty) data
and then close()s the underlying stream. Because of an inverted
condition, exceptions thrown by the underlying stream were handled
incorrectly:
- if both the underlying write() and close()/flush() throw
then it would throw the latter exception when it should
have thrown the former, suppressing the latter.
- if only the underlying close() throws then that exception
was swallowed when it should have been closed.
This bug existed ever since this file was first added to
Android in commit 9df2ffd420
in Feb 2010 (before the concept of suppressed exceptions
existed/was supported). The buggy code was proposed in a
review comment on that CL, which was then accepted/integrated
into the CL.
This CL fixes the inverted condition and adds test coverage.
It also adds code to add the suppressed exception (if any).
Bug: 111697617
Test: Confirmed that Base64Test fails (as described above) before
this CL but passes after this CL, when running these commands:
make FrameworksCoreTests && \
adb install -r ${ANDROID_PRODUCT_OUT}/data/app/FrameworksCoreTests/FrameworksCoreTests.apk && \
adb shell am instrument -w -e class android.util.Base64Test \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Specifically, before this CL, the following test failures occur:
1.) junit.framework.AssertionFailedError
at junit.framework.Assert.fail(Assert.java:48)
at junit.framework.Assert.fail(Assert.java:56)
at android.util.Base64Test.testOutputStream_ioExceptionDuringClose(Base64Test.java:546)
2.) junit.framework.ComparisonFailure: expected:<[writ]e()> but was:<[clos]e()>
at junit.framework.Assert.assertEquals(Assert.java:85)
at junit.framework.Assert.assertEquals(Assert.java:91)
at android.util.Base64Test.testOutputStream_ioExceptionDuringCloseAndWrite(Base64Test.java:574)
Change-Id: If7fd7c4615ca004638d7c5d8f1869e7eddb16f33
In upstream OpenJDK the InflaterInputStream.closed field is private.
During integration of OpenJDK into Android it was changed to be
protected so that it could be used by StrictJarFile, and in the process
was accidentally made part of the public API. This change removes the
StrictJarFile dependency on that field.
Bug: 111061052
Test: checkbuild, flash and run FrameworkCoreTests
Change-Id: I8aee1c444cf27e7078b848c65e0433c831ab06a0
Introduce a constant StrictJarManifest.ATTRIBUTE_NAME_NAME so that
callers (StrictJarManifest{,Reader}) don't need to rely on
Attributes.Name.NAME which was added via an Android patch.
Bug: 35910877
Test: Treehugger
Change-Id: I292fbefc6c5561609dcd8281d1e2a931a1ffa5b2
It makes sense to hide the details of the parser implementation
(and other similar objects) in libcore so it could be changed.
This change removes the "ExpatPerformanceTest" which appears not to have
been maintained and was comparing KxmlParser with itself. It is assumed
that android.util.Xml used to return the expat parser.
Test: build
Bug: 111055375
Merged-In: Ibad247323ba90cd949aecb2bd92f2f73306a4327
Change-Id: Ibad247323ba90cd949aecb2bd92f2f73306a4327
It makes sense to hide the details of the parser implementation
(and other similar objects) in libcore so it could be changed.
This change removes the "ExpatPerformanceTest" which appears not to have
been maintained and was comparing KxmlParser with itself. It is assumed
that android.util.Xml used to return the expat parser.
Test: build
Bug: 111055375
Change-Id: Ibad247323ba90cd949aecb2bd92f2f73306a4327
Track changes in libcore to remove a constructor + lint
import order changes. Instead of the constructor a utility
method is introduced.
Test: Build / boot
Bug: 111055375
Merged-In: Id683a9d9d6e27d4c8df623dae189da9e74a6d410
Change-Id: Id683a9d9d6e27d4c8df623dae189da9e74a6d410
Track changes in libcore to remove a constructor + lint
import order changes. Instead of the constructor a utility
method is introduced.
Test: Build / boot
Bug: 111055375
Change-Id: Id683a9d9d6e27d4c8df623dae189da9e74a6d410
Half has a dependency on an internal sun.misc.FloatingDecimal
that can be replaced by an equivalent call on java.lang.Float
(which calls through to FloatingDecimal).
Any performance hit is worth it for a smaller API surface.
Bug: 111055375
Test: Build
Change-Id: Iecdf3aa9414922a77edbdc439b0c2b88033b3af8
Using the Settings App-Developer Options-Feature Flag, allow the user to
enable or disable the Hearing Aid Profile.
Test: Manual testing using Settings App
Change-Id: I58a9d339941e235242c443c85b6f4194b5a296c9
The client code now "suggests" time updates
to the time detection service. The current implementation
of the time detection service will validate and set the
device system clock as needed. In future it will ignore
these suggestions if better information is available.
Responsibility for sending the
TelephonyIntents.ACTION_NETWORK_SET_TIME intent has
been moved to the time detection service until it can be
removed or replaced.
The telephony code is still responsible for basic rate
limiting but the majority of the decision logic has been
moved to the service.
There is an associated change in telephony code to switch to
using the server.
Bug: 78217059
Test: atest FrameworksServicesTests:com.android.server.timedetector
Test: atest FrameworksCoreTests:android.util.TimestampedValueTest
Change-Id: I4f7a10ac06b2d32da22689e1ddf309e0a2795f30
This is sufficient to wire up time detection from telephony
to the new service without breaking time detection.
This cherry-pick contains a small change: to use
SystemClock.elapsedRealtime() instead of the newer
SystemClock.elapsedRealtimeClock() with Clock.millis().
Bug: 78217059
Test: atest FrameworksServicesTests:com.android.server.timedetector
Test: atest FrameworksCoreTests:android.util.TimestampedValueTest
Merged-In: Id7175878dc22e5272c31f3e478af4b0e4183b62b
Change-Id: Id7175878dc22e5272c31f3e478af4b0e4183b62b
(cherry picked from commit 24836bfb15)
This is sufficient to wire up time detection from telephony
to the new service without breaking time detection.
Bug: 78217059
Test: atest FrameworksServicesTests:com.android.server.timedetector
Test: atest FrameworksCoreTests:android.util.TimestampedValueTest
Change-Id: Id7175878dc22e5272c31f3e478af4b0e4183b62b
This CL adds an @IntDef specifying the valid constants
that can be supplied as the Log level.
It also removes a documentation reference to a (former?) level
named "SUPPRESS" which doesn't exist.
Test: In lint
Change-Id: I159d687a5c16be76afcd7a3370a5f02025a1aff7