Commit Graph

15644 Commits

Author SHA1 Message Date
Galia Peycheva
afccd69e59 Merge "Add window background blur public api" into sc-dev am: de2e513209
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13431944

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ide24b0414efe7af90784d93bd67fbd20233a0501
2021-02-15 13:02:48 +00:00
Galia Peycheva
de2e513209 Merge "Add window background blur public api" into sc-dev 2021-02-15 12:40:02 +00:00
TreeHugger Robot
01ad76b62a Merge "Throw IllegalArgumentException when calling LockPatternUtils#getCredentialTypeForUser with invalid ID." 2021-02-15 12:25:36 +00:00
Dmitri Plotnikov
a269018fe4 Merge "Convert WakelockPowerCalculator to work with BatteryUsageStats" into sc-dev am: ca9dfbe54e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13487141

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2db59d8998f48e15bf5efe8a94cc38098994f3a4
2021-02-14 05:23:38 +00:00
Dmitri Plotnikov
7970d9caab Merge "Simplify SystemServicePowerCalculator" into sc-dev am: d77bb6a44b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13545560

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I03777345e66e8d3434d9d529a5a4692db5bc7bfd
2021-02-14 05:23:20 +00:00
Dmitri Plotnikov
ca9dfbe54e Merge "Convert WakelockPowerCalculator to work with BatteryUsageStats" into sc-dev 2021-02-14 05:08:35 +00:00
Dmitri Plotnikov
d77bb6a44b Merge "Simplify SystemServicePowerCalculator" into sc-dev 2021-02-14 05:08:05 +00:00
Manish Singh
26ea29a2a2 Merge "Pass the media capabilities uid when opening media" into sc-dev am: 36723eae2e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13454823

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I430bd2d4678549e27f21777b33b7771bbdae4337
2021-02-13 04:16:14 +00:00
Dmitri Plotnikov
248ade5460 Convert WakelockPowerCalculator to work with BatteryUsageStats
Test: atest FrameworksCoreTests:com.android.internal.os.WakelockPowerCalculatorTest

Bug: 158137862
Change-Id: I485bdb1f7dc6622fdf30ddae6d6872f2455f36ad
2021-02-12 13:30:43 -08:00
Manish Singh
2ca39c020f Pass the media capabilities uid when opening media
FileSystemProvider should pass the uid of the calling app by setting
the EXTRA_MEDIA_CAPABILITIES_UID when opening a media, so that
TranscodeHelper can make decision to transcode or not transcode based on
the calling uid, and not based upon the Provider's uid.

BUG=176157500
Test: manual testing.

Change-Id: Ie08b94cf79c86e9f87639e4fbdd82b2732771187
2021-02-12 20:49:02 +00:00
TreeHugger Robot
b4f275e027 Merge "MeasuredEnergy comment cleanup" into sc-dev am: e33b00efb5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13555621

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I40d103ca97a3e2a3d3094a4e0840f5fdfec47907
2021-02-12 19:18:52 +00:00
TreeHugger Robot
e33b00efb5 Merge "MeasuredEnergy comment cleanup" into sc-dev 2021-02-12 19:12:57 +00:00
TreeHugger Robot
bfcb998d25 Merge "Add a new feature to store IncFs version." into sc-dev am: 6516885e88
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13556030

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1845fa51a1fc8d61ae70f65306090b46b70a585d
2021-02-12 16:50:15 +00:00
TreeHugger Robot
6516885e88 Merge "Add a new feature to store IncFs version." into sc-dev 2021-02-12 16:37:01 +00:00
Galia Peycheva
792b9eb8dc Add window background blur public api
This CL exposes Window#setBackgroundBlurRadius as public Api. It
creates a region behind the window (with the dimensions of the window
background drawable), which is blurred with the given radius.

It also adds windowBackgroundBlurRadius dimension as an xml attribute
on Window.

Bug: 167166562
Bug: 177524486
Test: m
Test: m doc-comment-check-docs
Test: atest BlurTests
Change-Id: I5c0ff3c7fc7a64e6b2e2339eccc23374ec3b5fd9
2021-02-12 16:17:12 +01:00
Marcin Oczeretko
30895e9cd0 Merge changes I327b971f,Ie35e1fe7 into sc-dev am: a4734632f7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13544926

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I926ef1890c2dab5914953994e7e931411f7f8abd
2021-02-12 11:38:45 +00:00
Marcin Oczeretko
a4734632f7 Merge changes I327b971f,Ie35e1fe7 into sc-dev
* changes:
  Update AOT trigger names to match the new convention
  Limit PerfettoTrigger to max 1 trigger per minute
2021-02-12 11:07:23 +00:00
Dmitri Plotnikov
d163574738 Simplify SystemServicePowerCalculator
Fix SystemServicePowerCalculatorTest

Test: atest FrameworksCoreTests:com.android.internal.os.SystemServicePowerCalculatorTest
Bug: 158137862

Change-Id: Ia3218b5c91eacfc0122a35d0898bddd8394f8c4e
2021-02-12 00:47:37 -08:00
Hai Zhang
83a33efe1e Merge "Revert "Revert "Fix privapp permission allowlisting.""" into sc-dev am: 820a6842ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13555326

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I570475cee42f3990fef3d216f13186419d1b764a
2021-02-12 04:49:33 +00:00
Hai Zhang
820a6842ed Merge "Revert "Revert "Fix privapp permission allowlisting.""" into sc-dev 2021-02-12 04:16:43 +00:00
Alex Buynytskyy
50bc17cdaa Add a new feature to store IncFs version.
And deprecating the old feature which didn't have versioning support.

V2 means that the new features are either required if the device
was shipped with S, or available if device updated kernel to S.

Bug: 180010901
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: If037f0eb23260f354b0929ff7afaf1af9627e5fa
2021-02-11 19:01:00 -08:00
Adam Bookatz
e98b43242b MeasuredEnergy comment cleanup
Cleans up some:
documentation
comments
dumpsys output

Test: manual
Bug: 174818228
Change-Id: I6b78432ba37a5ba1b00947e2ae9bbaec2349590f
2021-02-11 17:07:22 -08:00
Adam Bookatz
49fb789dc8 Merge "CustomMeasuredPowerCalculator" into sc-dev am: 056ea2d70f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13550569

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3b28f668c53356641d9adb925fa953f0ae5a9c76
2021-02-12 00:55:58 +00:00
Adam Bookatz
056ea2d70f Merge "CustomMeasuredPowerCalculator" into sc-dev 2021-02-12 00:38:31 +00:00
Connor O'Brien
76ab19500e Merge "Defer UID data removal until after reading is finished" into sc-dev am: 82cd582c4f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13539187

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8c1e117425436e56ff5d21b96cb1534438b96120
2021-02-11 21:49:45 +00:00
Connor O'Brien
82cd582c4f Merge "Defer UID data removal until after reading is finished" into sc-dev 2021-02-11 21:42:31 +00:00
Hai Zhang
8d8a003895 Revert "Revert "Fix privapp permission allowlisting.""
This reverts commit e54ab06710.

Reason for revert: Added the missing allowlist entries

Bug: 179996437
Change-Id: Id26f8405468fd62d87c7cb93eabbcee78021bbd8
2021-02-11 20:35:46 +00:00
Ben Lin
517df22b09 Merge "Revert "Pass ActivityOptions to HeavyWeightSwitcherAcivity."" into sc-dev am: 761072315a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13545882

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I942fccec088a1f14820d3bd34c7429be2f0354b3
2021-02-11 19:32:22 +00:00
Ben Lin
761072315a Merge "Revert "Pass ActivityOptions to HeavyWeightSwitcherAcivity."" into sc-dev 2021-02-11 19:29:58 +00:00
TreeHugger Robot
10b13492d1 Merge "BatteryStats.getCustomMeasuredEnergiesMicroJoules" into sc-dev am: c8f98396ee
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13546391

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6f2dbee378c61619f7034494095312959dcb26b9
2021-02-11 17:59:16 +00:00
Bo Hu
d4c6127385 Revert "Fix privapp permission allowlisting." am: e54ab06710
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13554514

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic68f9d1742e28b154ea7989a9d6b327d9e8aa6c5
2021-02-11 17:58:22 +00:00
TreeHugger Robot
c8f98396ee Merge "BatteryStats.getCustomMeasuredEnergiesMicroJoules" into sc-dev 2021-02-11 17:42:29 +00:00
Bo Hu
e54ab06710 Revert "Fix privapp permission allowlisting."
This reverts commit e391b19376.

Reason for revert: b/180009384

Test:
lunch sdk_gphone64_x86_64-userdebug
m -j
emulator



Change-Id: I5fb095019804ec732a11bccc9ad6ae43ccbb03b7
2021-02-11 17:20:06 +00:00
Marcin Oczeretko
794e034d2f Update AOT trigger names to match the new convention
Adding com.android.telemetry namespace prefix to Perfetto trigger names

Test: manual
Bug: 161781469
Change-Id: I327b971fc6415431ba3b6d9aa069cd26d0627761
2021-02-11 10:45:24 +00:00
Marcin Oczeretko
a87fab667c Limit PerfettoTrigger to max 1 trigger per minute
Test: manual
Bug: 161781469
Change-Id: Ie35e1fe7e6a12ab75a60c21f442adcd73372050f
2021-02-11 10:45:11 +00:00
Adam Bookatz
072a8ab081 Merge "BatteryStats receives custom measured energies" into sc-dev am: 420a8ca343
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13526643

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id6475ab872f1ba59c8e361c4668a7a1c56112070
2021-02-11 08:48:46 +00:00
Adam Bookatz
29b15648d1 CustomMeasuredPowerCalculator
Adds a BatterySipper.customMeasuredPowerMah field to account
for custom energy buckets (i.e. EnergyConsumers of type OTHER)
and adds it to the total accumulated battery drain for each uid.

Bug: 179107328
Bug: 174818228
Test: Manual
Change-Id: Iab9c7ff5f410cd7c4be1ce78dfb2c39d4f783418
2021-02-11 00:35:32 -08:00
Adam Bookatz
420a8ca343 Merge "BatteryStats receives custom measured energies" into sc-dev 2021-02-11 08:22:25 +00:00
Fiona Campbell
6c091873be Merge "Move BrightnessSynchronizer to a display-specific folder." into sc-dev am: 1a6f0cda46
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13497065

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie285660b409d9c0ecf61e55e90d0e120ac7f7958
2021-02-11 07:38:13 +00:00
Fiona Campbell
1a6f0cda46 Merge "Move BrightnessSynchronizer to a display-specific folder." into sc-dev 2021-02-11 07:27:06 +00:00
TreeHugger Robot
fc495f5eb2 Merge "Fix privapp permission allowlisting." into sc-dev am: 9ab53621d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13480932

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib17b1d16399c24b08fc766ea667e885c11fef92a
2021-02-11 03:49:35 +00:00
Hai Zhang
e391b19376 Fix privapp permission allowlisting.
The refactoring in S unintendedly introduced a change that allowed
signature|privileged to be granted to platform-signed privileged apps
without being in the allowlist XML, so we should revert to the old
behavior.

The refactoring was done in the hope that we can have one step that
handles privileged permission granting. However upon retrospection, we
have to do this in two separate steps because the privapp permission
allowlist should always be enforced first.

This change reverts to the old behavior by looking at both the current
code and the R source code, then extracts the privapp permission
enforcement as a separate step that happens first, to be used by both
signature and the new internal permission protection.

Also simplified the check about privileged permission, because vendor
privileged permission is always a privileged permission, as made sure
in PermissionInfo.fixProtectionLevel().

In the mean time, added the missing privapp permission allowlist entry
for Settings and RESTART_WIFI_SUBSYSTEM for device to boot.

Fixes: 179309876
Test: manual
Change-Id: I93cfe7a4621fc5ac65229d42c7a8ebd825ae8ae5
2021-02-10 16:40:00 -08:00
Adam Bookatz
da600e0c4a BatteryStats.getCustomMeasuredEnergiesMicroJoules
BatteryStats now has access to the custom measured energies,
in the form of an array of energies, indexed by the custom
energy bucket number (i.e. by the ordinal of each energy
consumer of type OTHER).

Also cleans up unused methods (now that we've solidified this
method as being the one required).

Bug: 179107328
Bug: 174818228

Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsNoteTest
Test: atest FrameworksCoreTests:com.android.internal.power.MeasuredEnergyStatsTest
Change-Id: I96d646bd844dfa64d48dbb1158358b7561bae971
2021-02-10 16:05:29 -08:00
Ben Lin
e7ee51e008 Revert "Pass ActivityOptions to HeavyWeightSwitcherAcivity."
This reverts commit 52e7ab8b6f.

Reason for revert: b/179796975, this broke a CTS test

Change-Id: I5e5544dd625b474f7589d2ec32b3eebef9a4487c
2021-02-10 21:16:07 +00:00
Dmitri Plotnikov
0aeb4884ed Merge "Make ScreenPowerCalculator use measured energy with BatteryUsageStats" into sc-dev am: e4d66ae2fe
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13502599

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I93272b399798ac27bc98753562c533c57bf8bfaa
2021-02-10 18:31:08 +00:00
Dmitri Plotnikov
e4d66ae2fe Merge "Make ScreenPowerCalculator use measured energy with BatteryUsageStats" into sc-dev 2021-02-10 18:22:03 +00:00
Adam Bookatz
822ed39c43 BatteryStats receives custom measured energies
EnergyConsumer data of type OTHER is now pulled and
processed by BatteryExternalStatsWorker.
This means that 'custom energy buckets' energy data is
now available.
It is pulled by BESW, stored/snapshotted in
MeasuredEnergySnapshot, and deltas are sent to
BatteryStatsImpl, which stores them (depending on its
internal state).

MeasuredEnergyArray is removed, in favour of using
EnergyConsumerResults[] directly.

Bug: 176988041
Bug: 174818228
Bug: 179107328
Test: atest BatteryStatsNoteTest
Test: atest FrameworksServicesTests:com.android.server.am.MeasuredEnergySnapshotTest
Test: atest FrameworksCoreTests:com.android.internal.power.MeasuredEnergyStatsTest
Change-Id: Ib6a88d1579f97bc653cdb67a671f4fdd05f1dfe5
2021-02-10 09:25:16 -08:00
Fiona Campbell
d87e6c0699 Move BrightnessSynchronizer to a display-specific folder.
Bug: 159210246
Test: manual
Change-Id: Idbd9a1affd8db66d13f5dd8f173d0e2d557e24d8
2021-02-10 17:05:55 +00:00
TreeHugger Robot
ed36c17e6a Merge "Read CPU usage for system server thread groups" into sc-dev am: 55cd2f4859
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13495669

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I059ee00a759ca280087b52233736fd85a63e88f3
2021-02-10 14:13:09 +00:00
Rafal Slawik
4661d6aa6d Read CPU usage for system server thread groups
Add a statsd puller to record CPU usage of system server threads: all
and binder.

Bug: 173227907
Test: cmd stats pull-source 10098
Test: atest CpuStatsTests
Change-Id: I0d5c6e1e8d772bae6efdcbe62767932cc2fefe02
2021-02-10 11:21:00 +00:00