Commit Graph

15318 Commits

Author SHA1 Message Date
Jeff Sharkey
e069ac2c91 Merge "Interface to dynamically generate DropBox data." 2021-01-13 01:28:33 +00:00
Jeff Sharkey
8eebdbe4b5 Interface to dynamically generate DropBox data.
The existing DropBoxManager APIs require that data be entirely
pre-cooked before it can be added.  This adds significant overhead
to Log.wtf() style messages which collect logcat data, since we
need to copy that log data through a pipe to an in-memory buffer.

To avoid that overhead, this change introduces an EntrySource
interface which can either be pre-cooked data or dynamically
generated data written directly to an open FD on disk.  Future
changes will adjust the Log.wtf() logic to use this new interface
to have logcat write directly into an FD.

In addition, this interface paves the way for leveraging a newer
F2FS feature which transparently compresses and decompresses data in
the kernel, instead of forcing us to use DEFLATE in userspace.

This change drops periodic quota checking while recording new
entries, and instead adjusts to pre-flight the quota checks before
writing starts.  It also drops the expensive fsync(), since these
logs are collected on a best-effort basis.

Bug: 176843501
Test: atest CtsDropBoxManagerTestCases
Test: atest FrameworksServicesTests:com.android.server.DropBoxTest
Change-Id: Ic78e99a32cfaf4edac066a73a6864c9c9e9fdeef
2021-01-12 13:51:28 -07:00
Jonathan Miranda
41c074582d Merge "Fix startPostponedEnterTransition being called too early." 2021-01-12 19:01:13 +00:00
Benjamin Franz
a633741730 Merge "Add new overridable annotation to platform compat" am: 458515e464 am: 899cd8920b am: 9f7867cee2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1540124

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If74ec1464e1a52a14ab1aeb81ca676622a52a72d
2021-01-12 16:48:26 +00:00
Benjamin Franz
9f7867cee2 Merge "Add new overridable annotation to platform compat" am: 458515e464 am: 899cd8920b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1540124

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie8c48feb66285ec4153d61eb83ff8967dae28adf
2021-01-12 16:41:53 +00:00
Benjamin Franz
458515e464 Merge "Add new overridable annotation to platform compat" 2021-01-12 15:38:01 +00:00
Dmitri Plotnikov
3ac6cdc2f8 Convert several PowerCalculators to use BatteryUsageStats
Bug: 175644968
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests

Change-Id: If2c554ef3d186b108a7c0440be2ae2db548cf408
2021-01-11 20:01:43 -08:00
Dmitri Plotnikov
80c2d28583 Merge "Add PowerEstimators to the per-file OWNERS" am: 36a792091e am: becbe17ac0 am: ebb8dfe3e5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1546297

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idc240ff72dd9a15ec1ce1ff5a268030743ce8e5a
2021-01-12 03:39:42 +00:00
TreeHugger Robot
0159a7d66a Merge "Prevent UnsupportedOperationException in Completable" 2021-01-12 02:54:43 +00:00
Dmitri Plotnikov
ebb8dfe3e5 Merge "Add PowerEstimators to the per-file OWNERS" am: 36a792091e am: becbe17ac0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1546297

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia67477b9f6c8f2216545e02d7c5822d0aff547ed
2021-01-11 21:38:02 +00:00
Dmitri Plotnikov
f8248eb2eb Add PowerEstimators to the per-file OWNERS
Test: N/A
Change-Id: I7777551640227d7bfefbaa68f03e82167be39237
2021-01-11 10:50:28 -08:00
Wilson Wu
5084305d91 Prevent UnsupportedOperationException in Completable
The CountDownLatch#await() will be unblocked if there is an
InterruptedException happened.

Then it will cause the UnsupportedOperationException when
calling Completable.ValueBase#enforceGetValueLocked(),

Add a retry mechanism if InterruptedException happened.

Bug: 176441559
Test: atest CtsInputMethodTestCases
Change-Id: I6b93e76f78b4b8c94fc4423c33a707207961816d
2021-01-11 13:56:02 +08:00
Treehugger Robot
b3b1c5f143 Merge "Revert "Clear BPF data in KernelCpuUidTimeReader.removeUid()"" am: dacb8190e1 am: 12c3e9264b am: 50e657d126
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1543472

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6db248e3f79587b82225d8ad87ca44dbc99a008e
2021-01-08 20:52:39 +00:00
Treehugger Robot
50e657d126 Merge "Revert "Clear BPF data in KernelCpuUidTimeReader.removeUid()"" am: dacb8190e1 am: 12c3e9264b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1543472

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9ef6f466e4fd872f3a643a4d21b55350a7be3042
2021-01-08 20:17:03 +00:00
Treehugger Robot
dacb8190e1 Merge "Revert "Clear BPF data in KernelCpuUidTimeReader.removeUid()"" 2021-01-08 18:57:11 +00:00
TreeHugger Robot
6611cca1ae Merge "Making it easier to investigate jank and latency traces" 2021-01-08 13:22:12 +00:00
TreeHugger Robot
8fc190c6fc Merge "IME API: InputConnecton#setImeTemporarilyConsumesInput(boolean)" 2021-01-08 07:20:49 +00:00
TreeHugger Robot
6609f2b095 Merge "Make IInputMethodManager to oneway (8/N)" 2021-01-08 04:19:59 +00:00
Lan Wei
30fe6aa964 IME API: InputConnecton#setImeTemporarilyConsumesInput(boolean)
Add API to set IME will temporarily consumes the input, for
this case, the cursor will be invisible in the app.

Bug: 175362887
Test: atest FrameworksCoreTests:TextViewTest
Test: atest CtsWidgetTestCases:TextViewTest

Change-Id: Ic04cacfd73f1f4cb254bb16caf6b04c00c91a318
2021-01-08 09:23:55 +08:00
vadimt
2be098c2b5 Making it easier to investigate jank and latency traces
Shortening Cuj<> to a more meaningful J<> for jank.

Using L<> for latency will make it easier to search for
Latency traces in trace tools. Using getNameOfAction() for
latencies in all places will simplify finding latencies in code.

Test: manual
Bug: 177018359
Change-Id: Ie3114e7d7f97e7950af19a014d06f5c632a607c3
2021-01-07 16:01:02 -08:00
Connor O'Brien
0648bad1b6 Revert "Clear BPF data in KernelCpuUidTimeReader.removeUid()"
This reverts commit 2eb8ad6245.

Reason for revert: Bug: 177011744

Change-Id: Ib9f1c0bda7d6df1b75dbe409f96dab39c1659781
2021-01-07 23:48:35 +00:00
Andrei-Valentin Onea
04f02686b8 Merge changes from topic "preinstall-overrides" am: 29ed176b46 am: d1ebbf5086 am: dd1d1cbacc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1520701

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifbdca1201aa118e59b45f7dd89441a210fc2fa9c
2021-01-07 17:52:57 +00:00
Andrei-Valentin Onea
dd1d1cbacc Merge changes from topic "preinstall-overrides" am: 29ed176b46 am: d1ebbf5086
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1520701

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I94c9aca60ff8d5eec190434a2a22338cb04d5922
2021-01-07 17:35:17 +00:00
Benjamin Franz
1cd6acee87 Add new overridable annotation to platform compat
With this CL the annotation is only digested, but has no behaviour
change yet. Eventually this annotation allows the annotated change id to
be overriden on non-debug builds

Bug: 174043039
Test: atest FrameworksServicesTests:PlatformCompatTest
Change-Id: Ibc1fce37085213b5a02155010189949e193f0882
2021-01-07 14:54:48 +00:00
Andrei-Valentin Onea
29ed176b46 Merge changes from topic "preinstall-overrides"
* changes:
  Add force_non_debuggable_final_build_for_compat
  Allow overriding compat config prior to install time.
2021-01-07 14:04:12 +00:00
Wilson Wu
8e0d398ab9 Make IInputMethodManager to oneway (8/N)
Add IVoidResultCallback mechanism to emulate
current behavior.

Bug: 163453493
Test: Manual test with keyboard
Test: atest CtsInputMethodTestCases
Change-Id: I009d3a6e09c98166c08e8b9b318d821be36c42a7
2021-01-07 18:35:59 +08:00
Connor O'Brien
67c9be734f Merge "Clear BPF data in KernelCpuUidTimeReader.removeUid()" am: d5e143eee7 am: c5a860d297 am: 51271ba04a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1520149

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I36415a414a3188537fbb06f7cf7fd5d20f61b40e
2021-01-07 01:49:32 +00:00
Connor O'Brien
51271ba04a Merge "Clear BPF data in KernelCpuUidTimeReader.removeUid()" am: d5e143eee7 am: c5a860d297
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1520149

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4e7d114ffec9c4fe9c2f5378ce89c80a92590015
2021-01-07 01:09:20 +00:00
TreeHugger Robot
4d331c8e76 Merge "Make AndroidFuture and ServiceConnector ready for module usage." 2021-01-07 00:46:27 +00:00
Connor O'Brien
d5e143eee7 Merge "Clear BPF data in KernelCpuUidTimeReader.removeUid()" 2021-01-06 23:38:12 +00:00
Hai Zhang
a677335c58 Make AndroidFuture and ServiceConnector ready for module usage.
By moving to system APIs when applicable. Notable changes include:

1. Re-implement reading/writing Throwables from/to Parcel, without
Parcel private APIs.

2. Use the public API new Handler(Looper.getMainLooper()) instead of
Handler.getMain().

3. Use lambdas directly instead of PooledLambda, because the latter
would require bundling 20+ classes to bootclasspath for each module
using it, while AndroidFuture and ServiceConnector won't be creating a
great number of lambdas in a short time.

4. A bug that calls initCause() with the Throwable itself is fixed.

Bug: 158736025
Test: presubmit
Change-Id: I577da5a3bc4ed537123b7eceaa5addf8f7bb0d92
2021-01-06 14:07:11 -08:00
TreeHugger Robot
b326a72a2f Merge "Revert "Add shared transitions for screenshot->markup"" 2021-01-06 17:56:38 +00:00
Miranda Kephart
524336dbbd Revert "Add shared transitions for screenshot->markup"
This reverts commit 6b330ef7ee.

Reason for revert: cause of bug: 176874121

Change-Id: Icc87484f7cbe26bbe479fc47dca0aadae82e377b
2021-01-06 17:27:55 +00:00
TreeHugger Robot
9df7512c55 Merge "Demonstrate per Uid screen energy measurement in BatteryStatsViewer" 2021-01-06 09:07:05 +00:00
Michael Wachenschwanz
4546304f47 Demonstrate per Uid screen energy measurement in BatteryStatsViewer
Bug: 172361024
Test: mp :BatteryStatsViewer && adb shell am start -n com.android.frameworks.core.batterystatsviewer/.BatteryStatsViewerActivity
Change-Id: I1da2b5f23a216b45915921bd43ea5d5e14ddd23a
2021-01-05 16:46:19 -08:00
TreeHugger Robot
209f3ff1f0 Merge "Clean up dead code in NetInitiatedActivity" 2021-01-05 21:49:17 +00:00
TreeHugger Robot
7365a93174 Merge "Revert "Revert "Flip off use of old Chooser targets by default.""" 2021-01-05 21:36:59 +00:00
Miranda Kephart
9c8ca97586 Merge "Add shared transitions for screenshot->markup" 2021-01-05 19:58:52 +00:00
Jeff Sharkey
4b2191ad09 Merge "Update OWNERS for NetInitiatedActivity.java" am: 7283ceda9b am: 23519fbda4 am: 4079cfc439
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1536356

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I32a7a0acc9297b266cfa3cc2d3d898e77e924c47
2021-01-05 17:35:52 +00:00
Jeff Sharkey
4079cfc439 Merge "Update OWNERS for NetInitiatedActivity.java" am: 7283ceda9b am: 23519fbda4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1536356

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icf148f26961add3f0b43c6e853b3ab526a53008c
2021-01-05 17:16:55 +00:00
Jeff Sharkey
7283ceda9b Merge "Update OWNERS for NetInitiatedActivity.java" 2021-01-05 16:40:01 +00:00
Alison Cichowlas
5efbc0f929 Revert "Revert "Flip off use of old Chooser targets by default.""
This reverts commit 94c73953e4.

Reason for revert: 90% of clicks use new targets - let's go for it.

Bug: 170144291

Change-Id: Ia899c15b691aeb27e75056ce5a7673a5be8a3490
2021-01-05 16:18:02 +00:00
Miranda Kephart
6b330ef7ee Add shared transitions for screenshot->markup
Bug: 170138961
Bug: 159419046
Test: manual

Change-Id: I3a9c7487cbc36a4a7183030d2e3aa432958f7e1a
2021-01-05 14:41:30 +00:00
Jeff Sharkey
179ed2b7d8 Fix FastDataOutput performance bug.
The underlying CharsetUtils methods accept the total length of the
underlying byte[] array; the bug in the existing logic was attempting
to pass the remaining length, which caused much more aggressive
one-off buffer allocation when not needed.

Bug: 171832118
Test: atest FrameworksCoreTests:com.android.internal.util.FastDataTest
Test: atest FrameworksCoreTests:android.util.CharsetUtilsTest
Test: atest FrameworksCoreTests:android.util.XmlTest
Test: atest FrameworksCoreTests:android.util.BinaryXmlTest
Change-Id: If257f75446d2f99313eecc3c11822d770f920687
2021-01-04 21:42:21 -07:00
TreeHugger Robot
0883daddf1 Merge "Add HIDE_REMOVE_CLIENT into InputMethodDebug" 2020-12-31 06:02:37 +00:00
Wilson Wu
1778037875 Add HIDE_REMOVE_CLIENT into InputMethodDebug
CL [1] introduced the HIDE_REMOVE_CLIENT reason in
SoftInputShowHideReason.

Add this reason into InputMethodDebug to avoid dump
unknown reason unexpectedly.

[1]: Ifb91111f7136952462678ff6d0a5e917abb5005e

Bug: 167780081
Test: atest InputMethodDebugTest
Change-Id: I23a8deea66600e3e31bdcb5fbf8fb87d91c57e4d
2020-12-31 13:58:56 +08:00
Michael Sun
236cc4b08b Merge "Revert "Add more logging for wakelock stats inquiries"" am: 4f1774283c am: d051fbac00 am: 9660a9256e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534146

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib81f8e12efdbb2c23d87d6a1ade4e451d8f4df6d
2020-12-30 19:05:02 +00:00
Michael Sun
9660a9256e Merge "Revert "Add more logging for wakelock stats inquiries"" am: 4f1774283c am: d051fbac00
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534146

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I737867f97653ab76aa2a50d0c2323b0337574262
2020-12-30 18:27:59 +00:00
Michael Sun
4f1774283c Merge "Revert "Add more logging for wakelock stats inquiries"" 2020-12-30 17:38:41 +00:00
Andrei Onea
224f8c01d7 Allow overriding compat config prior to install time.
If the user tries to apply an override for a package that is not yet
installed, the override is put into a 'deferred' bucket, to be validated
upon installation.
Overrides are rechecked every time an app is installed, updated or
deleted.
If a deferred override is valid at install or update time, it gets
promoted to a regular override.
If a deferred override cannot be applied upon app installation or
update, it remains deferred.
If an app is deleted, all its overrides become deferred.
When any of the reset commands are called for a given package, that
removes both regular and deferred overrides.

Bug: 158696818
Test: atest CompatConfigTest
Test: atest OverrideValidatorImplTest
Change-Id: I50eab62214d1325ec6185ddcfe9e8f425e11c98b
2020-12-30 14:37:12 +00:00