Commit Graph

15233 Commits

Author SHA1 Message Date
Jeff Sharkey
ea470d5ca8 Merge changes from topic "dec16"
* changes:
  Enable binary XML by default.
  Prepare for binary XML pivot.
  Migrate SettingsProvider to support typed XML.
2020-12-20 18:22:30 +00:00
TreeHugger Robot
026102b5c8 Merge "Add SystemBatteryConsumer for the Bluetooth drain type" 2020-12-19 07:36:44 +00:00
Dmitri Plotnikov
8677b4eb5b Add SystemBatteryConsumer for the Bluetooth drain type
Bug: 175644968
Test: mp :BatteryStatsViewer && adb shell am start -n com.android.frameworks.core.batterystatsviewer/.BatteryStatsViewerActivity

Change-Id: I2adde65a63faf18f0120f281ab1fcd5373f25091
2020-12-18 18:10:00 -08:00
Darryl Johnson
c9e9058347 Revert "Use eBPF-based time-in-state monitoring for groups of threads"
This reverts commit a7b599b824.

Reason for revert: Possible cause of b/175685062

Change-Id: If9a4592fa1c8e4c97ae187e45b509c3753d2f47e
2020-12-17 14:48:39 -08:00
TreeHugger Robot
25d4114431 Merge "SyncPointerCapture (7/n): Clean up unused code from old Pointer Capture" 2020-12-17 18:06:02 +00:00
Jeff Sharkey
e09d74c644 Prepare for binary XML pivot.
As part of preparing to enable the new binary XML wire format across
the device, we ran a large suite of unit tests which uncovered a
handful of bugs where client code was assuming that the serializer
would create TEXT tokens for newlines between tags.

Also relaxes all binary XML classes to accept either "UTF-8" or
"utf-8" as the encoding name.  Slight bug fixes to clear names, text,
and attributes for each event to match XmlPullParser documentation.

Fixes for existing unit tests that were assuming human-readable XML,
or assuming that the serialization would perform UTF-8 validation.

Bug: 171832118
Test: atest FrameworksServicesTests
Change-Id: I841fe41e4967b36ab17551294ae0f42fb87a8e71
2020-12-17 08:16:06 -07:00
Adam Bookatz
b406489702 Merge "OWNERS file for internal/power" 2020-12-17 05:37:26 +00:00
TreeHugger Robot
957b14994d Merge "Add "modeled" power components" 2020-12-17 04:03:13 +00:00
Victor Chang
63c5fe5d33 Merge "Make a copy of libcore.util.ArraysUtils in framework" 2020-12-17 02:25:00 +00:00
TreeHugger Robot
0aaf18c6a9 Merge "Screenshot to share sheet shared element transition." 2020-12-17 02:04:23 +00:00
Adam Bookatz
f3b0d892c3 Merge "BatteryStatsImpl uid blaming for measured energy data" 2020-12-17 00:37:17 +00:00
Adam Bookatz
a5dec0da4d OWNERS file for internal/power
Not in AOSP since the directory doesn't exist there yet.

Test: N/A
Change-Id: I7a04ae0af3ed4a55aa7e25c6fbf5e827a6368ec4
2020-12-16 15:52:24 -08:00
Victor Chang
198ced861a Make a copy of libcore.util.ArraysUtils in framework
It helps remove it from the @CorePlatformApi

Bug: 154796679
Test: ArrayUtilsTest
Change-Id: I0c8f194a74a16b2cc46f9eea4571d5fb674fbc28
2020-12-16 23:50:30 +00:00
Jon Miranda
92dfd67351 Screenshot to share sheet shared element transition.
Switching the share action to a Supplier interface allows us to
maintain the current code style, while ensuring that the
APIs required to start the transition are called when the
share chip is pressed.

Bug: 174811491
Test: manual

Change-Id: I201b82eaea650fcef23909212385fd6d56831429
2020-12-16 23:40:29 +00:00
Dmitri Plotnikov
cd6147bea9 Add "modeled" power components
Modeled power components are computed without regard
for power measured with ODPM/rails.

The purpose of this is mostly to support testing
of power models themselves.

Bug: 175644968
Test: mp :BatteryStatsViewer && adb shell am start -n com.android.frameworks.core.batterystatsviewer/.BatteryStatsViewerActivity

Change-Id: Icca6fe6954776baed48b593017abd8c9bab4dfb7
2020-12-16 13:07:04 -08:00
Mark Renouf
b37c18a5f9 Merge "Fix restore of RecyclerView scroll position" 2020-12-16 20:58:45 +00:00
Adam Bookatz
f53dedb883 BatteryStatsImpl uid blaming for measured energy data
Adds support for blaming measured energy (rail) data on individual uids
starting with display.

1. Display measured energy data is apportioned to apps.
This is based on their relative foreground activity time and PROCESS_STATE_TOP
time, in accordance with the current BatteryStatsHelper smearing algorithm.

2. Infrastructure is in place for additional energy rails
to do likewise.

3. Fixes a bug in Bluetooth activity data not being reset properly

4. Fixes a bug in that resets didn't handle external data properly

Test: atest FrameworksServicesTests:com.android.server.am.MeasuredEnergySnapshotTest \
            FrameworksCoreTests:com.android.internal.power.MeasuredEnergyStatsTest \
            FrameworksCoreTests:com.android.internal.os.BatteryStatsNoteTest#testUpdateDisplayEnergyLocked

Bug: 174818228
Bug: 174818483
Bug: 174818545
Bug: 173652857
Change-Id: Ibade3689ad7c3c22e181c8086df25c203fe0ad6b
2020-12-16 12:32:59 -08:00
Prabir Pradhan
a26dd05602 SyncPointerCapture (7/n): Clean up unused code from old Pointer Capture
After the pipeline changes to Pointer Capture, this CL cleans up the
following:
- The old way of notifying windows of Pointer Capture
(IWindow::dispatchPointerCaptureChanged) is removed.
- Tracking Pointer Capture in WindowManagerService is removed.

Bug: 141749603
Test: manual, flash crosshatch, pointer capture works.
Change-Id: I5bbcef42fe8d0d93a64a4a411b1d493fcb800f92
2020-12-16 19:34:07 +00:00
TreeHugger Robot
8068b16f2f Merge "Move NUM_GPS_SIGNAL_QUALITY_LEVELS to GnssSignalQuality" 2020-12-16 18:58:25 +00:00
TreeHugger Robot
71a741594f Merge "Add InputConnection#performSpellCheck()." 2020-12-16 10:54:27 +00:00
Wilson Wu
0e75d9e4dd Merge "Make IInputMethodManager to oneway (5/N)" 2020-12-16 09:33:42 +00:00
Mark Renouf
d184971cce Fix restore of RecyclerView scroll position
Always subtract a delta to return to the origin.

Bug: 175740554
Fix: 175740554
Test: manual
Change-Id: I2bbce8f12eed34f2fe524784ea53cf42499ab690
2020-12-16 02:16:56 -05:00
Kohsuke Yatoh
e751e1036a Add InputConnection#performSpellCheck().
IME can use this method to redo spell checking after it has learned a
new user dictionary word.

Bug: 166304720
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: I956cd46f25bb77b7e1a6a3e1478c0d7efa1a056a
2020-12-15 22:48:47 +00:00
Soonil Nagarkar
ff097cef17 Move NUM_GPS_SIGNAL_QUALITY_LEVELS to GnssSignalQuality
This allows us to move GnssMetrics out of the client in a follow up CL.

Test: compiles
Change-Id: Idce044199f2ce223f893bfaecf43e5043a83bb94
2020-12-15 21:29:08 +00:00
TreeHugger Robot
0f04a2e670 Merge "Rename setTint to setColor" 2020-12-15 21:28:48 +00:00
Chris Tate
9bace5915a Merge "Make isAppBad() lock-free" 2020-12-15 20:31:55 +00:00
Alison Cichowlas
7cd8ae4855 Merge "Fix sharing shortcuts not showing for Work Profile." 2020-12-15 20:08:20 +00:00
Nicolas Geoffray
22e424f582 Merge "Make Class.getPackageName public." am: 3a76c4c9aa am: 7a0acb4d34 am: df634d7c4e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519502

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I74d1fea098a9beeb3db99e35317bd7c1ae23ee83
2020-12-15 19:00:39 +00:00
Nicolas Geoffray
df634d7c4e Merge "Make Class.getPackageName public." am: 3a76c4c9aa am: 7a0acb4d34
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519502

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia30633196eef2c2fdbebde3ad87c9e19c3c8b58e
2020-12-15 18:28:30 +00:00
Lucas Dupin
447eebd6d8 Rename setTint to setColor
We're not tinting, we're actually drawing an alpha blended color on top

Test: Manual
Bug: 159712515
Change-Id: I12788b19ecf0d4a8e65056914bc0dafd16f417c9
2020-12-15 09:48:12 -08:00
Nicolas Geoffray
3a76c4c9aa Merge "Make Class.getPackageName public." 2020-12-15 16:55:44 +00:00
Alison Cichowlas
1138fcdb5c Merge "Add SystemUI to OWNERS for Sharesheet." am: eff7324d9c am: ace8f705bc am: 1a55495ae9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1525899

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I98180f81772e451e63ca6ecb903574c0279a7afd
2020-12-15 15:59:19 +00:00
Alison Cichowlas
1a55495ae9 Merge "Add SystemUI to OWNERS for Sharesheet." am: eff7324d9c am: ace8f705bc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1525899

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6fc43cc854488c505479de6461ed56e02916955b
2020-12-15 15:50:36 +00:00
Alison Cichowlas
17cb4137ad Fix sharing shortcuts not showing for Work Profile.
Bug: 175042485, 175240616
Test: per repro instructions in bug
Change-Id: Iecbc57369f46fcae72d6acdb997ea8daacc77979
2020-12-15 15:13:09 +00:00
Alison Cichowlas
eff7324d9c Merge "Add SystemUI to OWNERS for Sharesheet." 2020-12-15 15:08:10 +00:00
Marcin Oczeretko
542a022a41 Merge "Add sf_missed_frames field to UiInteractionFrameInfo atom" 2020-12-15 09:07:44 +00:00
Chloris Kuo
8047aec1e4 Merge "New DeviceConfig flags for NAS" 2020-12-15 02:43:04 +00:00
TreeHugger Robot
dfbda02fed Merge "Add SystemBatteryConsumer" 2020-12-14 22:07:09 +00:00
Alison Cichowlas
e432f6c014 Add SystemUI to OWNERS for Sharesheet.
Change-Id: I2ecbab59516ae0cb53d47fa819c26336f76d9483
2020-12-14 21:46:41 +00:00
Wale Ogunwale
f7ecdf6988 Merge "Add more OWNERS coverages(2/n)" am: a2c85ce0ba am: 700b3d812f am: dfbbd0e5d7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1527819

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0b99215f99e165cbfc0ee925878d291746d94163
2020-12-14 17:49:34 +00:00
Wale Ogunwale
dfbbd0e5d7 Merge "Add more OWNERS coverages(2/n)" am: a2c85ce0ba am: 700b3d812f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1527819

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1d1525ba52d4365241785b4789f7363aac0d32c4
2020-12-14 17:30:00 +00:00
TreeHugger Robot
f010d5dea2 Merge "Add Assistant Triggered EventTime" 2020-12-14 17:00:13 +00:00
Marcin Oczeretko
85af0bab69 Add sf_missed_frames field to UiInteractionFrameInfo atom
For now the field is always set to 0 since we do not
get this data from sf yet

Test: UTs for affected classes
Bug: 171049584
Change-Id: I128afe514393e78636c01469075d415068326ef8
2020-12-14 16:41:55 +00:00
Charles Chen
2c86c2cf8a Add more OWNERS coverages(2/n)
Test: manual
Bug: 174932174
Change-Id: Id6a4c60734f24a3d8fdec27b11baead550296441
2020-12-14 15:00:22 +08:00
TreeHugger Robot
331168f15a Merge "Use LatencyTracker to log the time of recents animation" 2020-12-14 05:31:09 +00:00
Treehugger Robot
431139218a Merge "Add missing IMF OWNERS" am: 4e3959e571 am: 30497d0911 am: 03ced7e52e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1525813

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5896f244b5d601ceec3da6d25cc2a1b633ff4f55
2020-12-12 02:54:04 +00:00
Treehugger Robot
03ced7e52e Merge "Add missing IMF OWNERS" am: 4e3959e571 am: 30497d0911
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1525813

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3534455778648e6be10ffedbd2d692656d88d318
2020-12-12 02:14:04 +00:00
Dmitri Plotnikov
32a19285aa Add SystemBatteryConsumer
Bug: 158137862
Test: mp :BatteryStatsViewer && adb shell am start -n com.android.frameworks.core.batterystatsviewer/.BatteryStatsViewerActivity

Change-Id: I436096fb4c268f4f03542c7334a8f448bf74a738
2020-12-12 01:53:14 +00:00
Christopher Tate
296b7e9bfa Make isAppBad() lock-free
We trade off increased cost of (rare) mutations of the set of "bad" apps
in order to make the core lookup "is this specific app bad?" lock-free.
Locking discipline turned out to be a dominant cost in a very hot code
path within the running system, even uncontended.

Bug: 175339368
Test: tbd
Change-Id: I8803a177d46b01b86897f1e8d0966eb2452849fd
2020-12-11 12:25:51 -08:00
Evan Severson
df179c3d04 Merge changes I32ab8848,If470bc9a
* changes:
  Notify if a sensor is used but privacy is enabled
  Add flags to onOpNoted/Started callbacks
2020-12-11 18:36:17 +00:00