Commit Graph

15749 Commits

Author SHA1 Message Date
Jing Ji
2b2e73d1d6 Merge "Clone the CallStat objects/lists before dispatching it to the listener" into sc-dev 2021-03-10 02:16:46 +00:00
Jeff Sharkey
e394c59a75 Merge "Wait for installd to start to perform dexopt operation" am: 3f0f0b686a am: ee20cc3ca1 am: d2cd30f2cc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1615847

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I01a6b4f516ee1e74707babc10e5846d5cbfb61fe
2021-03-10 00:53:43 +00:00
Jeff Sharkey
d2cd30f2cc Merge "Wait for installd to start to perform dexopt operation" am: 3f0f0b686a am: ee20cc3ca1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1615847

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4b80a78b7e017e7c8bce69d856b321de6dc9357d
2021-03-10 00:05:37 +00:00
Jeff Sharkey
3f0f0b686a Merge "Wait for installd to start to perform dexopt operation" 2021-03-09 23:01:37 +00:00
Dmitri Plotnikov
f0a755448b Merge "Prevent crash when power profile has incorrect freq counts" into sc-dev 2021-03-09 18:44:29 +00:00
Treehugger Robot
d4e1a70921 Merge "Add final qualifier in LocationPermissionChecker" am: b002b20492 am: 50843debeb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1618842

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I60de5561418ac24a1210dec2d4ecaf16d1779518
2021-03-09 08:26:17 +00:00
Treehugger Robot
b002b20492 Merge "Add final qualifier in LocationPermissionChecker" 2021-03-09 07:58:14 +00:00
Dmitri Plotnikov
2d0ff3d3bd Prevent crash when power profile has incorrect freq counts
Bug: 179750543
Test: build and launch Settings
Change-Id: I9ede5caf0001deff0067eabd9520af9d315ac95f
2021-03-08 20:17:48 -08:00
Michael Wachenschwanz
b95b1a2eff Merge changes from topic "cpuEnergyAttribution" into sc-dev
* changes:
  Accumulate charge instead of energy in BatteryStatsImpl
  Accumulate and attribute measured Cpu energy in BatteryStats
2021-03-08 23:46:08 +00:00
Mady Mellor
e15c6dd81a Merge changes from topic "mm_setSuppress" into sc-dev
* changes:
  SysUI changes for setSuppressBubble
  Track locusId visibility in ShellTaskOrganizer
  Add locus id to ActivityRecord / TaskInfo
  Bubble API: suppress bubble
2021-03-08 21:27:36 +00:00
Jing Ji
9caf734d3a Clone the CallStat objects/lists before dispatching it to the listener
As these objects/lists could be mutated after being dispatched.

Bug: 181193693
Test: atest BatteryStatsBinderCallStatsTest BinderCallsStatsTest
Change-Id: I9de44e734acc7313d03ee616aa5e2f0a01da7cf3
2021-03-08 12:35:20 -08:00
Michael Wachenschwanz
68b8157e4e Accumulate charge instead of energy in BatteryStatsImpl
Track battery voltage along side the measured energy to calculate
battery charge consumption per EnergyConsumer. This better represents
a consumer's impact on battery. Also change numerous variable/method
names from energy units to charge units.

Bug: 180079165
Fixes: 173765509
Test: atest FrameworksCoreTests:com.android.internal.power.MeasuredEnergyStatsTest
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsNoteTest
Test: atest ScreenPowerCalculatorTest
Test: atest FrameworksServicesTests:com.android.server.am.MeasuredEnergySnapshotTest

Change-Id: I5e727cebf1252cc7b1645a53282de2281c68ae85
2021-03-08 11:53:59 -08:00
Siarhei Vishniakou
6387cdfb91 Merge "Pass actual present time to ViewRootImpl" into sc-dev 2021-03-08 19:44:12 +00:00
Dmitri Plotnikov
32a183264b Merge "Add batteryTimeRemaining and chargeTimeRemaining to BatteryUsageStats" into sc-dev 2021-03-06 01:56:32 +00:00
Jeff Sharkey
bb107f0d53 Merge "Add per-file OWNERS for ChargeCalculators" am: e191d88136 am: 7526d5687c am: 77229abe61
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1621724

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3cfbb9ce3f4257cc676d24bcd0cb71b07279e56b
2021-03-05 22:36:55 +00:00
Jeff Sharkey
77229abe61 Merge "Add per-file OWNERS for ChargeCalculators" am: e191d88136 am: 7526d5687c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1621724

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib8b1efe14f542d922614121c4f9b1ffd4f2a61a6
2021-03-05 22:11:10 +00:00
Dmitri Plotnikov
cf2929ffe9 Add batteryTimeRemaining and chargeTimeRemaining to BatteryUsageStats
Bug: 158137862
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryChargeCalculatorTest
Change-Id: I247a593de242a2864eef16b7c9ea956209f60cbe
2021-03-05 13:57:47 -08:00
Siarhei Vishniakou
f0cf18d3ed Pass actual present time to ViewRootImpl
To measure end-to-end touch latency, we need to report the actual
present time to ViewRootImpl. ViewRootImpl, in turn, will report this
information to InputDispatcher. Finally, InputDispatcher will combine
all known information for a specific input event, and will report this
data to westworld.

In another patch, we will add a new call, 'reportLatencyInfo', to
InputPublisher. This call will allow the app to send this latency data
to InputDispatcher.

Bug: 169866723
Test: printed the input event present times inside ViewRootImpl
Change-Id: Ibd3a2cfeb1a340eb15cd2165071df1f8589634af
2021-03-05 21:42:32 +00:00
Dmitri Plotnikov
266ce1a1f0 Add per-file OWNERS for ChargeCalculators
Test: N/A
Change-Id: I0fd382a25afafcfb9476d35897ec8295f0293053
2021-03-05 10:04:07 -08:00
TreeHugger Robot
485249abd1 Merge "Clean up dead code in NetInitiatedActivity" into rvc-qpr-dev am: 91568eb50e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13288128

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7ebe7a1a4da45b4e238de50aa21691afffa30203
2021-03-05 17:18:59 +00:00
TreeHugger Robot
91568eb50e Merge "Clean up dead code in NetInitiatedActivity" into rvc-qpr-dev 2021-03-05 17:10:19 +00:00
James O'Leary
c4748fdab2 Merge "Fix crash when number of pixels < max colors" into sc-dev 2021-03-05 16:25:06 +00:00
Alexander Potapenko
493a8a1ad0 Merge changes from topic "kernel_bootreceiver" into sc-dev
* changes:
  BootReceiver: collect kernel memory corruptions from dmesg
  BootReceiver: move to services/core/java/com/android/server
2021-03-05 14:09:39 +00:00
SongFerng Wang
03297aacc6 Merge "Improve AllowedNetworkTypesForReason and refactor PreferredNetworkType" am: b332627a15 am: 6035378f91
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1614985

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia227678f0f38adc05bf6ea39eee0eea8ebfea582
2021-03-05 05:17:43 +00:00
Christian Wailes
02d6322bd2 Merge changes I04ac8fba,Ia0a8548f am: db6628bb7d am: a534c95087 am: 87287a5859
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1615382

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ief019f6e8ee38664c5319e1756ca2c72065cd1af
2021-03-05 05:15:59 +00:00
Christian Wailes
87287a5859 Merge changes I04ac8fba,Ia0a8548f am: db6628bb7d am: a534c95087
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1615382

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I06eb075d11b110ccbbd8dcaecb948e502d69f6bb
2021-03-05 05:10:07 +00:00
Wilson Wu
70c6ea463b Merge "Make IInputMethodPrivilegedOperations to oneway" into sc-dev 2021-03-05 03:54:16 +00:00
SongFerng Wang
b332627a15 Merge "Improve AllowedNetworkTypesForReason and refactor PreferredNetworkType" 2021-03-05 01:59:53 +00:00
TreeHugger Robot
72e83e74a0 Merge "Separate buffer stuffing and jank" into sc-dev 2021-03-05 01:54:13 +00:00
Jorim Jaggi
c373f35107 Separate buffer stuffing and jank
Bug: 161781469
Test: Perfetto trace with CUJ
Change-Id: I8583342a50a1d54b7aede89aa81c98178269b357
2021-03-04 21:48:30 +00:00
Christian Wailes
db6628bb7d Merge changes I04ac8fba,Ia0a8548f
* changes:
  Autoformatter changes.
  Inclusivity cleanup of the Zygote.
2021-03-04 21:09:52 +00:00
Sebastian Achim
7adcb4f170 Wait for installd to start to perform dexopt operation
If there are any system_server jars that need dexopt then
we need to make sure that installd is started.

Issue: 160911601
Test: Manual - see issue
Change-Id: Iefcaf708b695504353f664b91017c9cd3a094f8e
2021-03-04 13:11:02 +01:00
Remi NGUYEN VAN
372fb6d68e Add final qualifier in LocationPermissionChecker
This is a partial cherry-pick of a generic change that added final
qualifiers.

Bug: 181837977
Test: m
Merged-In: I832c9d70c3dfcd8d669cf71939d97837becc973a

Change-Id: Ib6fecc50b17c2f035ff79beaec4a643cf1d2b458
2021-03-04 18:42:52 +09:00
SongFerngWang
e206456a16 Improve AllowedNetworkTypesForReason and refactor PreferredNetworkType
- Add more reasons of allowed network type
  - ALLOWED_NETWORK_TYPES_REASON_USER
  - ALLOWED_NETWORK_TYPES_REASON_CARRIER
- Add @systemApi for below
  - ALLOWED_NETWORK_TYPES_REASON_USER
  - ALLOWED_NETWORK_TYPES_REASON_POWER
  - ALLOWED_NETWORK_TYPES_REASON_CARRIER
  - setAllowedNetworkTypesForReason API
  - getAllowedNetworkTypesForReason API
  - getAllowedNetworkTypesBitmask API
- Add Public for below
  - CARRIER_NR_AVAILABILITY_NONE
  - CARRIER_NR_AVAILABILITY_NSA
  - CARRIER_NR_AVAILABILITY_SA
  - KEY_CARRIER_NR_AVAILABILITY_INT
- @Deprecated API
  - setPreferredNetworkTypeBitmask
  - getPreferredNetworkTypeBitmask
  - setAllowedNetworkType
  - getAllowedNetworkType
- Add a new way to notify allowedNetworkType at PhoneStateListener
- Replace KEY_NR_ENABLED_BOOL with KEY_CARRIER_NR_AVAILABILITY_INT

Bug: 161434786
Test: atest TelephonyManagerTest#testSetAllowedNetworkTypesForReason
(PASS)
atest TelephonyManagerTest#\
testSetAllowedNetworkTypesForReason_moreReason
(PASS)
atest PhoneStateListenerTest#\
testOnAllowedNetworkTypesChangedByRegisterPhoneStateListener
(PASS)

Change-Id: I3d0c119a0c2a30c56b0c127ba6525f8992b4e9dd
Merged-In: I3d0c119a0c2a30c56b0c127ba6525f8992b4e9dd
2021-03-04 14:58:54 +08:00
Alex Mang
d77366e4f2 Merge "Propagate ContentCaptureManager allowlist update to activities" into sc-dev 2021-03-04 02:26:25 +00:00
Jeff DeCew
82336d7562 Merge "Change groups to use number in the expander." into sc-dev 2021-03-04 01:12:21 +00:00
Michael Wachenschwanz
95bd56660e Accumulate and attribute measured Cpu energy in BatteryStats
BatteryExternalStatsWorker will now include measured Cpu Cluster energy
data (if available) when triggering a Cpu update in BatteryStatsImpl.
Using the per cluster per uid duration read from the kernel, the
measured energy can be attributed per cluster and then totaled to get
the Cpu energy consumption of a uid since the last update.

Fixes: 180079165
Test: manual ("adb shell dumpsys batterystats --measured-energy" on an
unplugged PowerStatsHal2.0 enabled device)

Change-Id: I0127bf61decdd5a9a5744e3352d5a3ff3a5fa2fe
2021-03-03 16:20:39 -08:00
Chris Wailes
a6f8803c85 Inclusivity cleanup of the Zygote.
Changed "whitelist" to "allowlist" in many Zygote files.

BYPASS_INCLUSIVE_LANGUAGE_REASON="compatability with vendor files"

Test: cts
Change-Id: Ia0a8548f2e254fc36a9dce7e50af8284ed0caa47
2021-03-03 14:23:32 -08:00
TreeHugger Robot
1ef54a4a36 Merge "Broadcast cancel event of a CUJ session" into sc-dev 2021-03-03 21:14:03 +00:00
Jeff DeCew
138403add7 Change groups to use number in the expander.
* Old codepath is maintained; switch with config_showNotificationGroupCountInExpander.
* Use the default expander colors for low priority header.
* Uses the correct color for the old group overflow.
* Fixes the header view to correctly accomodates growing expander.

Bug: 181048615
Test: manual, visual inspection of groups and notification types that use headers
Change-Id: Ia314a6028645016df39d3e948fdc4eb194ed9ff2
2021-03-03 16:04:45 -05:00
Jeff DeCew
82b5194584 Merge changes Ifbf07b27,Ic9cd89e8 into sc-dev
* changes:
  Notification color overhaul.
  Implement the new visual style of the expand button
2021-03-03 21:02:08 +00:00
Stanislav Zholnin
4f5072825d Merge "Add API support for permission access timeline." into sc-dev 2021-03-03 16:35:28 +00:00
James O'Leary
bbfe962fff Fix crash when number of pixels < max colors
If extraction is run on a set of pixels whose count is less than the
number of max colors, then colors.length < max colors, and accesses
to colors[index] inside the for loop throw an ArrayOutOfBoundsException.

Test: add widget to home screen, reduce size of widget to small area.
observe crash. `mp core services` with fix, observe that crash no longer
occurs. `mp core services` again without fix, verify crash occurs after
boot.
Fixes: 181130209

Change-Id: I60bf1ab39f7a69f2fb0745049fd46d2f0b53a12c
2021-03-03 10:46:16 -05:00
Ming-Shin Lu
02116c6a4f Merge "Restore the last IME visiblity of the app window when allowed" into sc-dev 2021-03-03 14:30:15 +00:00
Stanislav Zholnin
07e6855f8b Add API support for permission access timeline.
Test: in development
Bug: 176965672
Change-Id: Ib06452946fda2fcbd32ac6172ea4a43dabde7b67
2021-03-03 11:03:07 +00:00
Wilson Wu
aa14580429 Make IInputMethodPrivilegedOperations to oneway
Comply all methods to ResultCallback to keep current
behavior and convert IInputMethodPrivilegedOperations
to one-way.

Bug: 173340613
Test: atest CtsInputMethodTestCases
Change-Id: I7dd8a457dbc7412c103a9ffe8d3895f30204f252
2021-03-03 18:11:24 +08:00
Alexander Potapenko
9676344a7d BootReceiver: move to services/core/java/com/android/server
Per Jeff Sharkey's suggestion, move this file to another subtree to
allow using com.android.server.IoThread. No functional change.

Test: manual runs with KFENCE enabled
Bug: 172316664

Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: I338283f17ba7c108d9bdd60b3e01d6bcbfc6b38a
2021-03-03 10:41:30 +01:00
Alex Buynytskyy
967b81014f Merge "Remove INCREMENTAL_VERSION and add version to INCREMENTAL feature." into sc-dev 2021-03-02 21:24:41 +00:00
Jeff DeCew
f437e2c61f Implement the new visual style of the expand button
Bug: 181048615
Test: visual and talkback testing of normal notifs, conversations, groups.
Change-Id: Ic9cd89e899a03010a523bee4f1ef72fbfbd8b43f
2021-03-02 16:10:00 -05:00
Abhijeet Kaur
b68c51d4c4 Merge "Removed unused mount mode constants" am: 14f35d5f2d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1605513

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I80d0c585e742f33ce90fac787f54b5c0903f070f
2021-03-02 20:59:46 +00:00