Commit Graph

9239 Commits

Author SHA1 Message Date
Dmitri Plotnikov
34297e2a3c Merge "Adjust total consumed power to avoid double-counting" into sc-dev am: 8b5679d534
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14023274

Change-Id: Ib81431d8437c6ed2aa1696a3d31c094b6351e931
2021-04-01 17:25:27 +00:00
Dmitri Plotnikov
8b5679d534 Merge "Adjust total consumed power to avoid double-counting" into sc-dev 2021-04-01 17:00:30 +00:00
Biswarup Pal
4a761808ba Merge "Refactor FileUtils#convertToModernFd" into sc-dev am: 3d73c3ad22
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13725034

Change-Id: Icccdbbd7d692159780ca6714f110008391d11cb2
2021-04-01 10:50:35 +00:00
Biswarup Pal
d80f760516 Refactor FileUtils#convertToModernFd
Replace implementation of FileUtils#convertToModernFd with
MediaStore#getOriginalMediaFormatFileDescriptor. Fix fd leak
by returning ParcelFileDescriptor instead of FileDescriptor.

Test: atest CtsProviderTestCases
Bug: 170488060
Change-Id: I7d6ecf4549e8ed5134d20977c2089240be804827
2021-03-31 21:25:21 +00:00
Treehugger Robot
b6d43480af Merge "Address API feedback on SKU/ODM_SKU" am: 599f545969 am: 210b7a542b am: 5c9c0e7622 am: e221106bf4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1658040

Change-Id: I765dcd0943699f767b9871c92baf330a3a4e9800
2021-03-31 15:44:48 +00:00
Treehugger Robot
e221106bf4 Merge "Address API feedback on SKU/ODM_SKU" am: 599f545969 am: 210b7a542b am: 5c9c0e7622
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1658040

Change-Id: If53f5ea849f8d00bd1984f4740ddbd4350931561
2021-03-31 15:29:29 +00:00
Treehugger Robot
5c9c0e7622 Merge "Address API feedback on SKU/ODM_SKU" am: 599f545969 am: 210b7a542b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1658040

Change-Id: I21ecac025395c23702ee59e93a72b50326798d8d
2021-03-31 14:46:12 +00:00
Michael Wright
01d7d0c8b2 Merge "Actually report resonant frequency and Q factor for vibrators." into sc-dev am: 68ac14c4a6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14033763

Change-Id: I9f01f655fbc55ca8fe4abc709d29f31e71e9dfbc
2021-03-31 13:21:45 +00:00
Michael Wright
ab7e61e87b Actually report resonant frequency and Q factor for vibrators.
This got plumbed all the way through except for the final step of
reporting this from the Vibrator object. Doh.

Bug: 182612056
Test: manual
Change-Id: I4282ff7914266589f0f61246fe42e8ef58e70460
2021-03-31 01:48:37 +01:00
Robin Lee
ddbe3e08ac Address API feedback on SKU/ODM_SKU
Change-Id: Iec5fe90dd172c9d45442731485da27c71039ac2f
Test: atest android.os.cts.BuildTest
Bug: 180419023
2021-03-30 17:07:02 +00:00
George Chang
26717af683 Merge changes from topic "update_NFCC_Always_on" am: 7b7b809587 am: 6a6d92ff09 am: f5dcd90370 am: 03259bf7a4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1655107

Change-Id: If0f2753def656a3f74181a00a7f0401f5c414359
2021-03-30 04:14:09 +00:00
George Chang
03259bf7a4 Merge changes from topic "update_NFCC_Always_on" am: 7b7b809587 am: 6a6d92ff09 am: f5dcd90370
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1655107

Change-Id: I57b2db68bb05750718298d776ba2d365bea44a8b
2021-03-30 03:59:15 +00:00
George Chang
f5dcd90370 Merge changes from topic "update_NFCC_Always_on" am: 7b7b809587 am: 6a6d92ff09
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1655107

Change-Id: Ie96dfbcd9e37a1e76faa2efbea2fc146a42e82f9
2021-03-30 03:07:50 +00:00
Dmitri Plotnikov
ff6c7f864c Adjust total consumed power to avoid double-counting
The definition of SystemBatteryConsumer.getConsumedPower()
has been changed to include power attributed to apps.
That power is also included in UidBatteryConsumers, so we
ended up double-counting power attributed to apps.

Bug: 183235836
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests
Change-Id: Ib99b3ce910b62528241e271bdb3b925a9ac01830
2021-03-29 19:18:24 -07:00
Sean Stout
c5f8e6dd72 Merge "Update Wakelocks to be per-DisplayGroup" into sc-dev am: 97effb798d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13823066

Change-Id: I19cfe7ced235b70e9875b480aae200422defe881
2021-03-29 08:59:16 +00:00
Sean Stout
97effb798d Merge "Update Wakelocks to be per-DisplayGroup" into sc-dev 2021-03-29 08:18:28 +00:00
George Chang
ba34121efc Make NFC_UID TestApi
Bug: 182979907
Test: atest android.permission.cts.NfcPermissionTest
Test: atest android.net.wifi.cts.WifiManagerTest
Change-Id: Id007984bcd03b5892bd774673c8c0ab836032fc9
2021-03-28 22:28:06 +08:00
Dmitri Plotnikov
3497fb9b94 Merge "Add SystemBatteryConsumer.getPowerConsumedByApps()" into sc-dev am: eb2a57b807
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13944376

Change-Id: Ibed8bbf53944d2ef88f4cd2224cb4680d1e91494
2021-03-26 14:45:13 +00:00
Dmitri Plotnikov
eb2a57b807 Merge "Add SystemBatteryConsumer.getPowerConsumedByApps()" into sc-dev 2021-03-26 14:31:35 +00:00
Steven Moreland
8b4cc36362 Merge "Binder: allow stability downgrade" am: 7236cf6dca am: 0852de16cb am: e86ea5d7d4 am: 32f27edf97
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1651544

Change-Id: If57b7ff10a3ffe56e14752650c3d3bd347f2a823
2021-03-26 04:35:40 +00:00
Steven Moreland
32f27edf97 Merge "Binder: allow stability downgrade" am: 7236cf6dca am: 0852de16cb am: e86ea5d7d4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1651544

Change-Id: Icb13c0c97fb72d56c0212fe2ec4100653c454bd4
2021-03-26 03:58:18 +00:00
Steven Moreland
e86ea5d7d4 Merge "Binder: allow stability downgrade" am: 7236cf6dca am: 0852de16cb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1651544

Change-Id: I5f0e1dcb3a06dcb35bf2c68f077afbe32a4e8088
2021-03-26 03:14:29 +00:00
Lais Andrade
1c879e13af Merge "Implement PWLE support" into sc-dev am: 1eba10e2a2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13969748

Change-Id: I4be9ca83d3a38aee1e519a66363cbe60f6f7f60c
2021-03-26 02:50:28 +00:00
Lais Andrade
1eba10e2a2 Merge "Implement PWLE support" into sc-dev 2021-03-26 02:01:14 +00:00
Dmitri Plotnikov
c733ef6692 Add SystemBatteryConsumer.getPowerConsumedByApps()
Also, standardize the implementations of getConsumedPower()
to consistently return the total power consumed, not the
power unattributed to apps.

Bug: 183235836
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests
Change-Id: Iaedb29b9d7afd9843b0ab871e9b8656963db11ea
2021-03-25 18:45:08 -07:00
Sean Stout
8a5baa96c9 Update Wakelocks to be per-DisplayGroup
Bug: 168210495
Test: atest PowerManagerServiceTest
Change-Id: Ic23301a8dcdfc97f3a83c74d61ad4108a187e52d
2021-03-25 13:22:20 -07:00
Zimuzo Ezeozue
4466efbf39 Merge "Address onAnrDelayStarted API comments" into sc-dev am: 3244637a97
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13996765

Change-Id: I8bb3b7fd38d722a0e63ee109133beb6d236f8a34
2021-03-25 20:10:03 +00:00
Zimuzo Ezeozue
3244637a97 Merge "Address onAnrDelayStarted API comments" into sc-dev 2021-03-25 19:35:47 +00:00
Zim
308a048787 Address onAnrDelayStarted API comments
Test: m
Bug: 183446229
Change-Id: I433096c9fdc003b777f8a280f13f675a2d7ea8bf
2021-03-25 16:15:36 +00:00
Lais Andrade
68a199f60d Implement PWLE support
Implement composePwle method and related frequency control getter
introduced to the IVibrator interface.

Bug: 167947076
Test: VibratorControllerTest and VibraionThreadTest
Change-Id: If15f47fae33bce0bcb916e84af0c6712068f3a00
2021-03-25 13:21:02 +00:00
Michael Wachenschwanz
5e5c72e7ea Merge "Accumulate Mobile Radio and Gnss measured energy in BatteryStats" into sc-dev am: 522bb3d9cc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13958991

Change-Id: Ia5cd74c3cfc074a9177fb343f4f33e3d11d188c9
2021-03-24 20:55:54 +00:00
Michael Wachenschwanz
522bb3d9cc Merge "Accumulate Mobile Radio and Gnss measured energy in BatteryStats" into sc-dev 2021-03-24 20:46:34 +00:00
Dmitri Plotnikov
7d092ceaed Merge "Remove references to BatterStatsHelper from BatteryUsageStatsProvider" into sc-dev am: 0d1235b411
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13958996

Change-Id: I51b037979094152c429fe16f8f46561ef2271dc9
2021-03-24 18:55:36 +00:00
Dmitri Plotnikov
0d1235b411 Merge "Remove references to BatterStatsHelper from BatteryUsageStatsProvider" into sc-dev 2021-03-24 18:35:48 +00:00
Abhijeet Kaur
7591e2d06a Make getExternalStorageMountMode as SystemApi
Secondary volumes are FUSE mounted, whereas Android/data and Android/obb
on primary volumes are not FUSE mounted. Access to these private app
directories on primary volumes is restricted using the mount modes, but
access for these on secondary volumes need to be regulated by
MediaProvider.

Make getExternalStorageMountMode as SystemApi so that MediaProvider
can leverage the same mount logic for Secondary volumes.
Expose relevant mount modes as SystemApi as well.

This change saves us the maintenance overhead for Secondary volumes for
Android S+. Otherwise we would have to check if an app is a signature
app through APIs which would basically be the duplication for the
logic in StorageManagerService.java.

Expose ExternalStorageProvider and downloads Authority for MediaProvider
to rely only on APIs. This is also required for CDD modifications that
these 2 providers are given exceptional access to private app dirs.

Bug: 175796984
Bug: 173505864
Bug: 173505864
Test: atest DownloadProviderTest
Test: atest CtsScopedStorageHostTest
Test: atest android.scopedstorage.cts.host.PublicVolumeHostTest#testCheckInstallerAppAccessToObbDirs
Test: atest android.scopedstorage.cts.host.PublicVolumeHostTest#testCantAccessOtherAppsExternalDirs
Change-Id: I51bc7bd3f355fadd9de56ac267469c2352eb0ffa
Merged-In: I51bc7bd3f355fadd9de56ac267469c2352eb0ffa
2021-03-24 09:28:27 +00:00
Dmitri Plotnikov
b8b58ebd2f Remove references to BatterStatsHelper from BatteryUsageStatsProvider
Also, add BatteryUsageStatsQuery.getMaxStatsAge() to allow throttling
of battery stats sync.

Bug: 174186345
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests
Change-Id: I097c6b9575422837a522cf313a320e83221cdfab
2021-03-23 19:29:11 -07:00
Michael Wachenschwanz
27959e75dc Accumulate Mobile Radio and Gnss measured energy in BatteryStats
Enabled querying and processing Mobile Radio and Gnss energy consumption
in BatteryStatsExternal.
Attribute and accumulate their power deltas in BatteryStatsImpl
Utilize measured power data in MobileRadioPowerCalculator and
GnssPowerCaluclulator.

Bug: 174818228
Test: atest GnssPowerCalculatorTest
Test: atest MobileRadioPowerCalculatorTest
Test: BatteryStatsExternalWorkerTest
Change-Id: If062033ff3c8cff20842be2cd92b04f6cb981366
2021-03-23 18:40:35 -07:00
Steven Moreland
bf6bbc60aa Binder: allow stability downgrade
For instance, use a VINTF interface inside the system image without
adding it to the VINTF manifest (e.g. for testing, in this case, the
interface can't be used between system and vendor).

Bug: 183154648
Test: N/A
Change-Id: I9ceb5d96e6a245b9509d9c60828aa3736056909d
2021-03-24 01:26:04 +00:00
TreeHugger Robot
8342e6d823 Merge "Introduce vibrator frequency mapping." into sc-dev am: 14278aecfd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13886485

Change-Id: I81391fec56d7baba714afbe2483da6c42a5b9733
2021-03-24 01:04:07 +00:00
Dmitri Plotnikov
7edd2b92e9 Merge "Change getStatsStartRealtime to getStatsStartTimestamp" into sc-dev am: f2dca81569
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13957373

Change-Id: Iba89366fedfd01a207d56c089f7bfd054d8a3151
2021-03-24 00:59:44 +00:00
Martijn Coenen
af354d74a9 Merge "Make StorageVolume#getOwner a system API." into sc-dev am: be76c4051b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13931544

Change-Id: I46e4e8d663045335a41df0b4eae48672cdba634e
2021-03-24 00:59:13 +00:00
TreeHugger Robot
478e03ed12 Merge "Add isAppIoBlocked TestApi" into sc-dev 2021-03-23 20:57:56 +00:00
TreeHugger Robot
14278aecfd Merge "Introduce vibrator frequency mapping." into sc-dev 2021-03-23 19:11:07 +00:00
Zim
ae30d154f6 Add isAppIoBlocked TestApi
This allows us test the notifyAppIoBlocked and notifyAppIoResumed APIs

Also fixed isAppIoBlocked bug where a uid with a blocked counter of
'0' would incorrectly result in returning true.

Test: m
Bug: 181222557
Change-Id: I3e8f040cd0e08cb0765fec0cfafab6428d6a3a00
Merged-In: I3e8f040cd0e08cb0765fec0cfafab6428d6a3a00
2021-03-23 18:14:58 +00:00
TreeHugger Robot
fa5fcd4806 Merge "Add isAppIoBlocked TestApi" 2021-03-23 18:12:43 +00:00
Dmitri Plotnikov
f2dca81569 Merge "Change getStatsStartRealtime to getStatsStartTimestamp" into sc-dev 2021-03-23 17:29:38 +00:00
Martijn Coenen
be76c4051b Merge "Make StorageVolume#getOwner a system API." into sc-dev 2021-03-23 17:22:39 +00:00
Lais Andrade
e574d3bbe8 Introduce vibrator frequency mapping.
Introduce frequency data to VibratorInfo and a transformation for
VibrationEffect that maps relative frequency and amplitude values to the
device absolute values.

The transformation also clips amplitude values to the device bandwidth
map provided.

Pending implementation of chaining composed waveforms and sending PWLE
primitives to the HAL.

Bug: 167947076
Test: DeviceVibrationEffectAdapterTest
Change-Id: Ie7505a1c0f50bb7d907b0752c02987f258316874
2021-03-23 15:28:10 +00:00
Zim
f094406d36 Add isAppIoBlocked TestApi
This allows us test the notifyAppIoBlocked and notifyAppIoResumed APIs

Also fixed isAppIoBlocked bug where a uid with a blocked counter of
'0' would incorrectly result in returning true.

Test: m
Bug: 181222557
Change-Id: I3e8f040cd0e08cb0765fec0cfafab6428d6a3a00
2021-03-23 14:49:56 +00:00
TreeHugger Robot
1ab180da79 Merge "Introduce WaveformBuilder to VibrationEffect" into sc-dev am: 9db9a56c7e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13828865

Change-Id: I70acc05ee9b610211bd1b13b55454756263eedb2
2021-03-23 14:42:03 +00:00