* changes:
Apply fixes for EfficientStrings.
Apply fixes for EfficientStrings.
Apply fixes for EfficientStringsChecker.
Apply fixes for EfficientCollections.
Trivial refactor for consistent naming.
Expand formatSimple() to support widths.
Refinement of EfficientStringsChecker.
Refactoring to avoid paying the cost of extra StringBuilder that are
quickly disposed.
Bug: 170978902
Test: none
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: Icd914a63cdadf8123c1e5a5073f85245f0791f0b
The recently-built Error Prone checker has found many instances where
we're always paying the cost of StringBuilder concatenation, even in
the typical cases where preconditions are successfully met.
Benchmarks have shown that even when replacing these with varargs
formatter strings, the default case is 20x faster.
Bug: 170978902
Test: none
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: If8c00bc73467bfb91ec16c162969c9d26ca53646
Drop-in replacements suggested for inefficient collections. Also
annotate a handful of places where we're unable to update.
Bug: 155703208
Test: none
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: I48b600508df8160ac9b40fea7afca974b2c972f6
The validation check that might throw an exception is almost a decade
old at this point, and isn't likely to be hit. In addition, the
recently added "AndroidFrameworkBinderIdentity" Error Prone checker
ensures that clients working with these identities are well-behaved.
Removing this exception code is what enables @CriticalNative.
Bug: 171078335
Test: none
Change-Id: Ib4cc9becf325979a97a9b0e58ac2277f3b226aaa
ParcelableHolder is the way to extend already defined parcelables. So,
it's supposed to be used by OEM's modules.
For Parcelable to be used by the OEM's module, it should be exposed as
SystemApi
Bug: 146611855
Test: atest aidl_unittests aidl_integration_test CtsNdkBinderTest
Change-Id: I3d3e3d6b22ffd128dcfc8281d998ee3f55a398c5
This changes allow Incremental Service to directly report health status
to package manager service.
A health listener is created during package installation session to
monitor incremental storage health. After commit, a new listener is
created and will overwrite the old one.
The new listener will listen to incremental storage health and report
the status to package manager service, which will then send the status
to IncrementalStates, where the startability state and unstartable
reason might change, based on the health status code.
During reboot, for each incremental package, if it is not fully loaded,
the package manager service will register a health status listener to
continue monitor the health status of this package.
Test: unit test
Test: manual
BUG: 170435166
Change-Id: I220f230c523cfaf2c96019f9478554665e6af486
These constants must be in the Manager so that they can be accessed by
CarUserManagerService. They are @hide since they are not meant to be
exposed publicly.
Bug: 155913815
Test: atest UserManagerTest
Change-Id: I62922c1487e2eb0d66f38ac7b0b8d58f31d3ec90
ANGLE global settings variables have an unnecessary prefix, remove it.
Bug: b/170982184
Test: atest CtsAngleIntegrationHostTestCases
Change-Id: Id98e69820c90ede16cec8e798c0c77200b951966
Those annotations could be inferred by some tools (like Kotlin), but the
https://checkerframework.org/ doesn't check inherited annotations
complaining about all equals() invocations that get nullable argument.
The change was generated by running
find . -name \*.java | xargs sed -i 's/public boolean equals(Object /public boolean equals(@Nullable Object /'
in the frameworks/base directory and by automatically adding and
formatting required imports if needed. No manual edits.
Bug: 170883422
Test: Annotation change only. Should have not impact.
Exempt-From-Owner-Approval: Mechanical change not specific to any component.
Change-Id: I5eedb571c9d78862115dfdc5dae1cf2a35343580
To support removing a user as soon as possible, we introduce an
API that will remove a non-current user immediately or mark the
current user as ephemeral so that it is removed on user switch
or reboot.
This API will be used by CarService, which runs in a different
process, so the API must be exposed on UserManager (instead of
just UserManagerInternal).
Bug: 155913815
Test: adb shell pm remove-user --set-ephemeral-if-in-use <uid>
Change-Id: I5975a70c439bd7892939bcee65be2f2dd85026ed
Update ModemActivityInfo to present a nicer API surface and expose it as
a SystemApi. Also change clients in BatteryStats to match the new
surface.
This is part 1. Part 2 will modify the methods in TelephonyManager to
use a more up-to-standards threading model.
Bug: 170427831
Test: atest ModemActivityInfoTest
Change-Id: I762ed949342861c75d94eafce88335e7bd8c9139
Add new parcelable aidl and class using @hide while WIP.
Add methods vibrate and cancelVibrate to VibratorManagerService,
throwing UnsupportedOperationException while WIP.
Bug: 166586119
Test: atest FrameworksServicesTest:VibratorManagerServiceTest
atest FrameworksCoreTest:CombinedVibrationEffectTest
Change-Id: I78510631c3c5cae9836789f5a0de29c81994a852
* changes:
Upgrade AndroidFrameworkBinderIdentity to fatal.
Tighten up Binder.clearCallingIdentity() usage.
Tighten up Binder.clearCallingIdentity() usage.
Tighten up Binder.clearCallingIdentity() usage.
This is a third CL in a chain that adjusts existing malformed code
to follow AndroidFrameworkBinderIdentity best-practices.
Specifically, if a thread clears an identity they need to restore it
to avoid obscure security vulnerabilities. In addition, the relevant
"try" block must start immediately after the identity is cleared to
ensure that its restored if/when any exceptions are thrown.
Bug: 155703208
Test: make
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: I74cb958b68d55a647547aae21baff6ddc364859b
The recently added AndroidFrameworkBinderIdentity Error Prone checker
examines code to ensure that any cleared identities are restored to
avoid obscure security vulnerabilities.
This change is a purely mechanical refactoring that adds the "final"
keyword to the cleared identity to ensure that it's not accidentally
modified before eventually being cleared. Here's the exact command
used to generate this CL:
$ find . -name "*.java" -exec sed -Ei \
's/ (long \w+ = .+?clearCallingIdentity)/ final \1/' \
{} \;
Bug: 155703208
Test: make
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: I832c9d70c3dfcd8d669cf71939d97837becc973a
Since FUSE in R, there are only 4 mount modes that are used
from IVold.aidl:
REMOUNT_MODE_NONE
REMOUNT_MODE_DEFAULT
REMOUNT_MODE_INSTALLER
REMOUNT_MODE_PASS_THROUGH
REMOUNT_MODE_ANDROID_WRITABLE
Bug: 148454884
Test: Manual
Change-Id: I62b66083f2099b429474872b6f9c7cffb9fb906d