Commit Graph

15329 Commits

Author SHA1 Message Date
Alison Cichowlas
de71c34838 Add edit to share dialog action bar.
Bug: 150960874
Test: atest ChooserActivityTest & manual verification
Change-Id: Ie52aaab90f678d32d9b67f95d81f86b82d1b9c7c
2021-01-14 21:42:09 +00:00
TreeHugger Robot
85cab1fa8b Merge "Use API for binding service with custom user and executor." 2021-01-14 10:36:55 +00:00
Rafal Slawik
23ac0f8f3a Merge "Measure total time in state" 2021-01-14 08:03:35 +00:00
Hai Zhang
a95881f6ca Use API for binding service with custom user and executor.
There is actually already a public API overload for
Context.bindService() which allows binding the service with the user
of Context.getUser() and a custom Executor.

We can construct an Executor from our Handler, but this executor is
required to remain the same instance for different calls to
bindService() for the same ServiceConnection by the API, so we should
keep the Executor instance, as well as the Handler instance, instead
of calling getJobHandler() every time. In fact getJobHandler() is
already required to return the same instance, or bindServiceAsUser()
would have thrown the same exception for different Handlers.

Also removed a check in ContextImpl.bindService() to allow mainline
modules to use the bindService() API with Context multi-user.

Bug: 158736025
Test: presubmit
Change-Id: I95717a4a74267dff4fbe1898a82cdfa7f195cc06
2021-01-13 15:00:37 -08:00
Winson Chung
c31ec3d518 Merge "Migrate FrameTracker to use ST Jank information" 2021-01-13 19:36:00 +00:00
Chiachang Wang
03f70bab17 Merge "[IT4.21] Update the label type of idle timer" am: 4bdcbf4608 am: bf710b7402 am: e276fd4654
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1535721

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9445412f619fa8d4d0e7888a333bbdffdca013bf
2021-01-13 10:33:55 +00:00
Chiachang Wang
e276fd4654 Merge "[IT4.21] Update the label type of idle timer" am: 4bdcbf4608 am: bf710b7402
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1535721

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6d54f242cee6171c8666efed21d83349366b7070
2021-01-13 10:12:15 +00:00
Chiachang Wang
4bdcbf4608 Merge "[IT4.21] Update the label type of idle timer" 2021-01-13 09:10:43 +00:00
Chiachang Wang
3ce298dff1 [IT4.21] Update the label type of idle timer
The first parameter of adding idle timer is an unique identity
to communicate between ConnectivityService and netd. Netd will
notify the activity change using the identity, so it's fine to
replace the legacy type with transport type since we should
deprecate the usage of legacy type.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: Ia00606539b86872cca9a92285bd940c8a720a033
2021-01-13 14:10:15 +08:00
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
Rafal Slawik
f278e21a61 Measure total time in state
Total CPU time in state added in https://r.android.com/1538886.

Bug: 174245730
Test: cmd stats pull-source 10095
Change-Id: I6cd27ac172e36d2e889429808bd4bd583795d7c9
2021-01-12 13:45:33 +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
Jorim Jaggi
2ee0ab9556 Migrate FrameTracker to use ST Jank information
Test: FrameTrackerTest
Test: Systrace, perform CUJ
Bug: 174755489
Change-Id: I906abce66d456add7c562b1d9038352eb589f6f0
2021-01-07 23:01:18 +01: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