Commit Graph

15183 Commits

Author SHA1 Message Date
Treehugger Robot
baae6129ee Merge "Fixed Handler Leak on RecyclerView" am: 62b028daca am: 78ac7dd921 am: a475e3f791 am: acbc01ea84
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1495867

Change-Id: I12ef4a07b4430c7eaa50d9fe3183d925cb26aeee
2020-11-17 22:00:36 +00:00
Treehugger Robot
acbc01ea84 Merge "Fixed Handler Leak on RecyclerView" am: 62b028daca am: 78ac7dd921 am: a475e3f791
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1495867

Change-Id: I484c140a0d7294f0ef4b797f5c41cc1ee542fc87
2020-11-17 21:37:23 +00:00
Treehugger Robot
62b028daca Merge "Fixed Handler Leak on RecyclerView" 2020-11-17 20:17:44 +00:00
Ioana Stefan
06f759835a Merge changes from topics "ime-tracing-interface", "optimized-ime-tracing-clients", "optimized-ime-tracing-imms", "optimized-ime-tracing-ims"
* changes:
  Log only current client data in IME tracing
  Optimized workflow for IME tracing on InputMethodManagerService side
  Optimized workflow for IME tracing on InputMethodService side
  Optimized workflow for IME tracing on clients side
2020-11-17 15:18:30 +00:00
Miranda Kephart
92b7a54947 Merge "Close screenshot process on user switched" 2020-11-17 14:53:33 +00:00
Jeff DeCew
5185c6bf66 Merge changes from topic "template_redesign"
* changes:
  Update variable names to reduce confusion.
  Fix/hack MessagingStyle notifications
  Reduce notification minimized height
  Fix the placement of the work profile and feedback badges.
  Fix HUNs
  Remove the unneeded icon spacing in the InboxStyle.
  Hide app name from minimized notifications
  Notification Title is 16pt in Big state
  Ensure headerless notification with large icon is big enough.
  Round corners of BigPicture
  Increase the expand button touchable area.
  Remove the reply action entirely.
  Notification template redesign; part 1.
  Remove night-mode override of notification_divider_height
2020-11-17 13:21:53 +00:00
Janis Danisevskis
148e99707e resolve merge conflicts of 07bfeb3630 to master
Test: I solemnly swear I tested this conflict resolution.
Bug: None
Change-Id: Iab84b0fa8c708845aecd13dd45c242147829fd8b
2020-11-16 19:28:35 -08:00
Winson Chung
594c070243 Merge changes from topic "back_gesture_model_qpr" into rvc-qpr-dev am: 898602efc6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13005359

Change-Id: I8017c38ef9536b49ee2b7c1bed328c3e4ac1ec75
2020-11-17 03:26:33 +00:00
Maryam Karimzadehgan
1db145a655 Use ML model for the Back Gesture in EdgeBackGestureHandler. am: c7035fe4fe
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13005356

Change-Id: I22290f085b3eebabcc4ac028f0092d092d2c9864
2020-11-17 03:25:49 +00:00
Treehugger Robot
07bfeb3630 Merge changes I9731d978,I9e325782,I441a4d4d,I86a85e48,I9268fd66, ... am: aeb15e8592 am: 788f03de26 am: 365c77133b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1471565

Change-Id: If797faa86575774a6beeb1788e66ed6ae2d17994
2020-11-17 00:25:55 +00:00
Treehugger Robot
aeb15e8592 Merge changes I9731d978,I9e325782,I441a4d4d,I86a85e48,I9268fd66, ...
* changes:
  Keystore 2.0 SPI: Install legacy Keystore provider as AndroidKeyStoreLegacy
  Keystore 2.0 SPI: Zygote install Keystore2 provider conditionally
  Keystore 2.0 SPI: Evolve the generator SPI.
  Keystore 2.0 SPI: Evolve Factory SPI
  Keystore 2.0 SPI: AndroidKeyStoreProvider loads keys from Keystore 2.0
  Keystore 2.0 SPI: Evolve the Crypto SPI.
  Keystore 2.0 SPI: KeyParameter utilities.
  Keystore 2.0 SPI: Update the chunked streamer.
  Keystore 2.0 SPI: KeyStoreCryptoOperationUtils
  Keystore 2.0 SPI: KeyStoreKeys adopt Keystore 2.0
  Keystore 2.0: Shim around the basic functionality of Keystore 2.0
  Keystore 2.0 SPI: Duplicate Keystore SPI to android.security.keystore2 package
2020-11-16 22:51:03 +00:00
Maryam Karimzadehgan
0ed68db06c Add flag to get the name of the Model file from the flag in case we want
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
Merged-In: I6ecb556fea01f26323248b999d17c7b1d1b7eeb7
2020-11-16 18:56:28 +00:00
Miranda Kephart
7ef1a5dd15 Close screenshot process on user switched
Currently, we keep the process up even if the user switches,
meaning that in some cases (if the user is switched while the
screenshot UI is up) we will save images to the wrong profile.
This change makes ScreenshotHelper listen for user switches and
close the screenshot service, so that a new screenshot is
guaranteed to be constructed with the correct user's context.

Bug: 170474245
Fix: 170474245
Test: manual -- verified bad state occurs if user switches within
the timeout period, ensured that screenshots work immediately
after switching with this change.

Change-Id: I9d32d0928e6c2bda161d04555438d0dd7afef0ba
2020-11-16 12:48:45 -05:00
Inseob Kim
71d21ecd60 Merge "Remove obsolete property ro.kernel.android.tracing" am: 3661fc477c am: cb98552e03 am: 1ee0a2519e am: d15205e7cc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1498598

Change-Id: I2925414e9cb2ef68ddee4a6fc89c4d4b56e4def8
2020-11-16 12:40:42 +00:00
Inseob Kim
d15205e7cc Merge "Remove obsolete property ro.kernel.android.tracing" am: 3661fc477c am: cb98552e03 am: 1ee0a2519e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1498598

Change-Id: Icedff80bb584ab245b039d1bb3f5c56fb31d592c
2020-11-16 12:12:16 +00:00
Janis Danisevskis
6180e85e36 Keystore 2.0 SPI: Zygote install Keystore2 provider conditionally
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
2020-11-13 19:55:41 -08:00
TreeHugger Robot
81a1f37b1c Merge "Consistent handling of modified UTF-8." 2020-11-14 02:29:42 +00:00
Jeff Sharkey
50a99364c6 Consistent handling of modified UTF-8.
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
2020-11-13 14:11:41 -07:00
TreeHugger Robot
385212485f Merge "Using CUJ name instead of ordinal in traces" 2020-11-13 20:39:09 +00:00
Vadim Tryshev
43389874e6 Merge "Moving the name getter of latency action to LatencyTracker" 2020-11-13 18:21:24 +00:00
Jeff DeCew
dc81adf34e Reduce notification minimized height
Bug: 163626038
Test: manual
Change-Id: Ic5e94389f2f41eebcecc8df393ff2f26c1d7e426
2020-11-13 13:16:02 -05:00
Jeff DeCew
b5839a11e9 Increase the expand button touchable area.
The touchable area used to be a 48x48 square, but we
actually want the entire right-hand side of the
notification to be touchable in the collapsed state.

Bug: 163626038
Test: atest SystemUITests
Test: manual - check touch bounds and validate w/ TalkBack
Change-Id: I9c1b5a0e01d841ed5d448ee5e1030b7f1cbbb2f2
2020-11-13 13:16:00 -05:00
Jeff DeCew
1842262813 Notification template redesign; part 1.
Known issues:
* Sub-par dyson animation
* Sub-par animation of text in the title
* Notification height limits not yet adjusted
* Decorated custom view height limits not yet updated
* HUNs may need to get their own headerless template
* Messaging style notifications are not yet headerless
* Possible [de]colorization bug for grouped icons
* Some notifications still not always expandable

Bug: 163626038
Test: Manual, visual testing
Change-Id: I9e7e2fd689938a13e042c8f6319bd7d0d2252781
2020-11-13 13:16:00 -05:00
Inseob Kim
56ab231a8f Remove obsolete property ro.kernel.android.tracing
Bug: 173179120
Test: build
Change-Id: If46e65dac70ab4f1835048dbbcc8b571ce598224
2020-11-13 19:39:02 +09:00
Ioana Stefan
ab1008480b Optimized workflow for IME tracing on clients side
Optimized the tracing logic for the IME clients information. The
clients trigger a tracing dump through the new method triggerClientDump
exposed by the ImeTracing interface. This change was done
to be able to support custom dump for clients information and
custom dump from IMS.

This change only covers the clients information. The IMS and IMMS
information will be dumped in next changes.

Bug: 154348613
Test: start IME tracing by calling "adb shell ime tracing start"
      end IME tracing by calling "adb shell ime tracing stop"
      pull trace using "adb pull /data/misc/wmtrace/ime_trace_clients.pb ime_trace_clients.pb"
Change-Id: I499cb5f45a3e78912b09b9c6cedf1ce5443e797a
2020-11-13 10:18:47 +00:00
Dan Shi
4514ae9876 Merge "Revert "Move BasicShellCommandHandler to frameworks/lib/modules-..."" 2020-11-12 22:46:35 +00:00
Dan Shi
f689b18ddc Revert "Move BasicShellCommandHandler to frameworks/lib/modules-..."
Revert "Update import path of BasicShellCommandHandler"

Revert "Update path for BasicShellCommandHandler"

Revert "Update path for BasicShellCommandHandler"

Revert "Update rule for BasicShellCommandHandler"

Revert submission 12975279-move_BSCH

Reason for revert: b/173120275
Reverted Changes:
Ib750f4774:Move BasicShellCommandHandler
I43c0dc327:Update import path of BasicShellCommandHandler
I73d58c07c:Update path for BasicShellCommandHandler
I21f103949:Update path for BasicShellCommandHandler
I8a2873df6:Move BasicShellCommandHandler to frameworks/lib/mo...
I91df774a3:Update rule for BasicShellCommandHandler

Exempt-From-Owner-Approval: to fix b/173120275

Change-Id: Iaa44f9aa4c1621f331275dc76ecb7505100fe9c5
2020-11-12 22:44:12 +00:00
vadimt
660729d4da Moving the name getter of latency action to LatencyTracker
Test: compiling
Bug: 131859447
Change-Id: I150e50d1ec33260ba8de9c71a11938850b74ecc0
2020-11-12 13:41:52 -08:00
vadimt
84f452dbe2 Using CUJ name instead of ordinal in traces
Test: manual
Bug: 167170986
Change-Id: Id212a997d1922ef5f3eed5f16b4bde603de9ce0c
2020-11-12 13:24:52 -08:00
TreeHugger Robot
4a15a3ef65 Merge "Make IInputMethodManager to oneway (1/N)" 2020-11-12 17:50:42 +00:00
Chiachang Wang
c91ed0851e Merge "Move BasicShellCommandHandler to frameworks/lib/modules-utils" 2020-11-12 05:08:48 +00:00
Wu Ahan
88dd4d99f6 Merge "Support translation between interaction type and cuj type" 2020-11-12 02:36:09 +00:00
Ytai Ben-tsvi
93f4464b76 Merge "Clean up on client death in SoundTriggerService" 2020-11-11 21:31:39 +00:00
Maryam Karimzadehgan
c7035fe4fe Use ML model for the Back Gesture in EdgeBackGestureHandler.
Change-Id: I2fd5255e903932c03a35ae463b0eff3840dc81bd
Merged-In: I2fd5255e903932c03a35ae463b0eff3840dc81bd
Test: manual model test and getting the results
Bug: 150170384
2020-11-11 20:17:56 +00:00
Ytai Ben-Tsvi
3559e8693e Clean up on client death in SoundTriggerService
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
2020-11-11 10:12:59 -08:00
Adam Bookatz
b89db6c170 Merge "Remove some unused methods in BSI" 2020-11-11 17:46:17 +00:00
Jiwon Kim
9db33d9c1c Fixed Handler Leak on RecyclerView
A MotionEvent object is not recycled in case of error at onTouchEvent function.

@Override
public boolean onTouchEvent(MotionEvent e) {
...
final MotionEvent vtev = MotionEvent.obtain(e);
...
    case MotionEvent.ACTION_MOVE: {
        final int index = e.findPointerIndex(mScrollPointerId);
        if (index < 0) {
            Log.e(TAG, "Error processing scroll; pointer index for id "
                    + mScrollPointerId + " not found. Did any MotionEvents get skipped?");
            return false;
        }
...
}

Test: Manual

Signed-off-by: Jiwon Kim <jiwon88.kim@samsung.com>
Change-Id: I8390a5d8c78b306a6c81dce9d41ceffe93bfdeb7
2020-11-11 18:21:11 +09:00
Ahan Wu
72d5d080a2 Support translation between interaction type and cuj type
Support a helper method to translate the cuj name from interaction type.

Bug: 172660959
Test: atest
CollectorsHelperTest: com.android.helpers.UiInteractionFrameInfoHelperTest
Change-Id: I3bcc64684b79fad7fc59b71a269231eb6dd91674
2020-11-11 05:02:48 +00:00
Jeff Sharkey
af7d02531c Merge changes from topic "nov7"
* changes:
  Custom binary XML wire protocol.
  Progress towards efficient XML serialization.
  More efficient alternatives to ByteBuffer.
  CharsetUtils alternatives that avoid allocations.
2020-11-10 23:35:51 +00:00
Kweku Adams
ff6fcd7bcd Check app querying permissions.
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
2020-11-10 11:02:27 -08:00
Jeff Sharkey
4ccea87969 Custom binary XML wire protocol.
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
2020-11-10 11:58:03 -07:00
Jeff Sharkey
b5856365b4 Progress towards efficient XML serialization.
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
2020-11-10 11:56:11 -07:00
Jeff Sharkey
162f86ddce More efficient alternatives to ByteBuffer.
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
2020-11-10 11:56:06 -07:00
Fiona Campbell
d7bfe1f310 Clean up BrightnessSynchronizer
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
2020-11-10 11:21:33 +00:00
Wilson Wu
fd64b28073 Make IInputMethodManager to oneway (1/N)
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
2020-11-10 18:02:10 +08:00
Chiachang Wang
e8f12d1c01 Move BasicShellCommandHandler to frameworks/lib/modules-utils
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
2020-11-10 09:54:14 +08:00
Adam Bookatz
db71cc02a2 Remove some unused methods in BSI
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
2020-11-09 16:03:49 -08:00
Mathew Inwood
f8abe13db4 Merge "Add maxTargetSdk restriction to unused APIs." 2020-11-09 14:41:20 +00:00
Alison Cichowlas
4f4d34cce6 Merge "Revert "Flip off use of old Chooser targets by default."" 2020-11-09 14:09:05 +00:00
Michael Sun
dfe0fe8583 Merge "Update to use new android.system.suspend.control AIDL interface" am: e40aa2d118 am: b726bcfd65 am: a9b465c8d8 am: f9fd07e735
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1480304

Change-Id: I45693209b358a1b1f9691d3729743688b3229172
2020-11-06 19:40:26 +00:00