This patch makes Zygote install the Keystore 2.0 SPI as
"AndroidKeyStore" and the old Keystore SPI as "AndroidKeyStoreLegacy"
if the platform property ro.android.security.keystore2.enable is
set to true. This allows us to boot Android with vital components, such
as LockSettingsService, still using the legacy Keystore, while we run
CTS tests against the new implementation, migrate other system
components, and perform migration tests.
This CL will be superseded by a CL that makes Zygote install the
Keystore 2.0 SPI exclusively when the migration of all dependent
components is complete.
Bug: 171305684
Test: None
Change-Id: I9e32578285167c4d63f4f536a07fe98473a883e0
A recent set of patches had mismatched handling of UTF-8 vs modified
UTF-8; this change converges all paths towards using modified UTF-8
to match the DataInput/Output API contract.
New tests verify that underlying raw data is compatible between the
upstream and local implementations.
Bug: 171832118
Test: atest FrameworksCoreTests:android.util.CharsetUtilsTest
Test: atest FrameworksCoreTests:android.util.XmlTest
Test: atest FrameworksCoreTests:android.util.BinaryXmlTest
Test: atest FrameworksCoreTests:com.android.internal.util.FastDataTest
Change-Id: I49423edc867839fb6626cd8bd361abe7bc512633
This change adds tracking of SoundTriggerService client death
and frees up resources whenever that happens.
Test: Kill Now Playing process and observer recovery.
Bug: 171026874
Change-Id: Ie31d0a3ed392b1513b4e81ec3c344f4e79adcf52
Support a helper method to translate the cuj name from interaction type.
Bug: 172660959
Test: atest
CollectorsHelperTest: com.android.helpers.UiInteractionFrameInfoHelperTest
Change-Id: I3bcc64684b79fad7fc59b71a269231eb6dd91674
* changes:
Custom binary XML wire protocol.
Progress towards efficient XML serialization.
More efficient alternatives to ByteBuffer.
CharsetUtils alternatives that avoid allocations.
We no longer let apps query the existence of other apps (with some
exceptions). Make sure we honor that by always returning false for the
power-allowlist if the calling app doesn't have the required
permissions.
Bug: 166668654
Test: atest DeviceIdleTest
Test: atest CtsSecurityTestCases:DeviceIdleControllerTest
Test: atest FrameworksMockingServicesTests:DeviceIdleControllerTest
Change-Id: I895f1d666a213e141d9fbf08600c611f04f3a7fd
We've identified that XML writing and reading uses roughly 1.5% of
all system_server CPU, and can generate many temporary objects.
Building on the recent TypedXmlSerializer/PullParser interfaces, this
change introduces new BinaryXmlSerializer/PullParser implementations
that store data using a custom binary wire protocol. Benchmarking of
a typical packages.xml has shown this new binary approach can write
4.3x faster and read 8.5x faster, while using 2.4x less disk space:
timeWrite_Fast_mean: 27946635
timeWrite_Binary_mean: 6519341
timeRead_Fast_mean: 59562531
timeRead_Binary_mean: 7020185
A major factor in choosing to invest in this new wire protocol is
that it enables the long-tail of over 100 unique XML schemas used
across the OS internals to be transparently upgraded to gain these
benefits with only minimal changes, reducing the risks associated
with rewriting those schemas.
Finally, since the wire protocol is essentially a serialized event
stream, it's trivial to transparently convert this new protocol
into human-readable XML and vice-versa. The tests in this change
demonstrate this translation working correctly, and future changes
will introduce new shell tools to aid development work.
Bug: 171832118
Test: atest FrameworksCoreTests:android.util.XmlTest
Test: atest FrameworksCoreTests:android.util.BinaryXmlTest
Test: atest CorePerfTests:android.util.XmlPerfTest
Change-Id: Ib9390701f09562dca952b3786622675b9c68a462
We've identified that XML writing and reading uses roughly 1.5% of
all system_server CPU, and can generate many temporary objects.
To set the stage for some long-term improvements, this change
introduces new TypedXmlSerializer and TypedXmlPullParser interfaces
which offer efficient access to primitive attributes and text.
This change also updates XmlUtils to redirect primitive operations
through these new interfaces.
Bug: 171832118
Test: atest FrameworksCoreTests:android.util.XmlTest
Change-Id: I5ba3ad87cf79ca10705a96b98855164a27fee021
Some upcoming binary XML work needs to efficiently read and write
raw bytes, and we initially started using ByteBuffer. However, that
design had additional overhead since we were performing bounds checks
twice (once to fill/drain buffers, then again to parse data). In
addition, the upstream ByteBuffer makes per-byte method invocations
internally, instead of going directly the the buffer.
This change introduces FastDataInput/Output as local implementations
of DataInput/Output which are focused on performance. They also
handle fill/drain from an underlying Input/OutputStream, and the
included benchmarks show reading 3x faster and writing 2x faster:
timeRead_Upstream_mean: 5543730
timeRead_Local_mean: 1698602
timeWrite_Upstream_mean: 3731119
timeWrite_Local_mean: 1885983
We also use the new CharsetUtils methods to write UTF-8 values
directly without additional allocations whenever possible. This
requires using a non-movable buffer to avoid JNI overhead to gain
the 30% benchmarked performance wins.
Bug: 171832118
Test: atest CorePerfTests:com.android.internal.util.FastDataPerfTest
Test: atest FrameworksCoreTests:com.android.internal.util.FastDataTest
Change-Id: If28ee381adb528d03cc9851d78236d985b6ede16
Create a startSynchronizing() method rather than having this code in the
constructor. This makes it cleaner and its actions more explicit.
Bug: none
Test: manual
Change-Id: I6b84274639ad719ed877f1d04e6621717f860677
Isolate the Completable class from the CancellationGroup
class because not all Completable objects could be cancelled.
So we don’t need to always hold a final CancellationGroup in
Completable class. If the Completable object could be cancelled,
pass it as parameter when doing await.
Bug: 163453493
Test: Manual test with keyboard
Test: atest CtsInputMethodTestCases
Change-Id: If79810d5acc36b5a8c6a2c7cfcabeb4d0ebed197
BasicShellCommandHandler is used by mainline modules and the
framwork. There is a new repo that was created for putting
this kind of utility class. Move BasicShellCommandHandler for
the incoming ConnectivityService mainline and updating the
related usage.
Bug: 170598012
Test: m ; verify with adb shell cmd
Change-Id: I8a2873df6e7d8342b7a8b466bda155f74c807ee3
BatteryStatsImpl has some recently added methods where formerly we used
A()
now we use
A(int elapsedTime)
Often those old A() calls are now unused and can be removed.
Test: compiles
Test: FrameworksCoreTests
Test: FrameworksServicesTests
Change-Id: I4cac7879db47811ed92455470a660a675db6a4c7
Results:
We measure the latency between Editor.startActionModeInternal is called
and FloatingToolbar.show() is called.
When there is only smart action (url)
Before: ~150ms
After ~30ms
When there are 5 smart actions (phone number)
Before: ~400ms
After: ~100ms
Before and after videos:
https://recall.googleplex.com/projects/ea8c4705-96bd-46f0-9f37-786708050727
Fixed a few issues:
1. updateAssistMenuItems() gets the Icons from TextClassification
object, calls loadDrawable on them and creates the MenuItem
objects loadDrawable() is slow, especially if we have a lot of
smart action icons to load. Even worse, we are calling this
function 4 times in a row when selecting something! 1 time from
onCreateActionMode and 3 times from onPrepareActionMode.
The fix here is to avoid reloading the drawable if it is the same
text classification object.
2. From SelectionActionModeHelper, we call startActionModeInternal
before SelectionModifierCursorController.show()
Internally, SelectionModifierCursorController.show()
show the two selection handles by calling startHandle.show() and
endHandle.show(). Apparently, each handle.show() call invalidates the
action model right after it is just created! This explains two of the
unnecessary onPrepareActionModel calls.
The fix is to call SelectionModifierCursorController.show()
before startActionModeInternal() is called.
3. Editor.startActionModeInternal() does not invoke
FloatingToolbar.show() right away.
There are two issues here.
a) Editor.startActionModeInternal() ends up calling
FloatingActionModel.repositionToolbar() which hopefully calls
FloatingToolbar.show(). Sadly, it is not the case
because mViewRectOnScreen is not set at that time. mViewRectOnScreen
is set in next onPreDrawCall() call.
b) When mViewRectOnScreen is finally set and calls repositionToolbar()
again , it still won't call FloatingToolbar.show() immediately
because we think that the toolbar is moving by comparing the previous
content rect and the current content rect. They are different because
the previous one is empty(it wasn't shown before). Becoz we think it is
moving, we schedule the FloatingToolbar.show() call after 50ms.
To fix a, we now update mViewRectOnScreen() right away wihout waiting
for the next onPreDraw call().
To fix b, when the previous content rect is moving, we don't consider
the toolbar as moving anymore.
Bug: 169043706
Test: atest android.widget.TextViewActivityTest
Test: atest
cts/tests/tests/textclassifier/src/android/view/textclassifier/cts/TextViewIntegrationTest.java
Test: atest
cts/tests/tests/widget/src/android/widget/cts/TextViewTest.java
Test: Smart select a phone number and then smart select a link.
Make sure the smart actions menuitems are updated.
Test: Click on a smart linkify link. Then dismiss it by tapping outside.
Change-Id: I634b21ac7ed66a14883dc17e03ef006df5b3f223
The suspend_control_aidl_interface is updated, renamed, and splitted
into android.system.suspend.control and
android.system.suspend.control.internal. Update to use the correct
interfaces.
Test: atest FrameworksCoreTests:KernelWakelockReaderTest
Bug: 171598743
Change-Id: I32aa339b27f3d9680a61b7338b1bdb531a1a43f7
In order to achieve the look and feel of colored surfaces, the blur
drawable should be able to receive a color and draw it on top of the
blur region.
Test: manual
Fixes: 172372852
Change-Id: I4cab21e337ca18f617780531368ba70154027b72
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.
Bug: 170729553
Test: Treehugger
Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
Move bubbles package and related resources to shell package,
also copied some used codes and resources.
Bug: 161980186
Test: atest SystemUITests
Test: atest WMShellUnitTests
Change-Id: Ia108bd4149b3c3bf86631ba1a7a6bce0e76af78f
to try out different models. In addition, we should not log touches in
the middle of the screen for logging so moving the block at the very
beginning.
Test: unittest, manual test
Bug: 150170384
Change-Id: I6ecb556fea01f26323248b999d17c7b1d1b7eeb7