Commit Graph

9228 Commits

Author SHA1 Message Date
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
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
TreeHugger Robot
9db9a56c7e Merge "Introduce WaveformBuilder to VibrationEffect" into sc-dev 2021-03-23 14:32:56 +00:00
Martijn Coenen
b329228214 Make StorageVolume#getOwner a system API.
Since the MediaProvider mainline module will now manage volumes of
multiple users, it needs to know which user a volume belongs to. This
was implemented by an already existing API, so make that a @SystemApi.

Bug: 182396009
Test: N/A

Change-Id: I9ca24e500adfd51fbd52e863f549365dd9aaf39d
2021-03-23 14:16:12 +00:00
TreeHugger Robot
c2f195bbc5 Merge "Make getExternalStorageMountMode as SystemApi" 2021-03-23 13:25:56 +00:00
Saumya Pathak
37fc428f52 Merge "Add app clone profile and APIs." into sc-dev am: cbe66b17b9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13709992

Change-Id: If7bb00d9cef3ea19b79da23793747e4a41989dc9
2021-03-23 11:32:35 +00:00
Abhijeet Kaur
839aa85298 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
2021-03-23 11:18:17 +00:00
Saumya Pathak
cbe66b17b9 Merge "Add app clone profile and APIs." into sc-dev 2021-03-23 11:15:59 +00:00
Saumya Pathak
5a4fc52fc7 Add app clone profile and APIs.
This change adds a new hidden user type "android.os.usertype.profile.CLONE"
and two new system APIs "isCloneProfile" and "hasSharedMedia". To support App cloning, we need to support sharing media between the owner user and the clone user. Adding this as a property in UserTypeDetails.

Bug: 182396009
Test: atest android.multiuser.cts.UserManagerTest#testCloneUser, atest com.android.server.pm.UserManagerTest#testCloneUser and manually ran shell commands on the clone user.

Change-Id: I49ddcbd499944ca9ec05ef4dc10d2e2b231d8b88
(cherry picked from commit db930667a21dac9f0de7cb2fe99175b3b4545bf4)
2021-03-23 11:15:09 +00:00
TreeHugger Robot
abb595130e Merge "Introduce VibrationEffectSegment" into sc-dev am: 11d5b29d7c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13776606

Change-Id: I6ec5517437927a6b9e07af92c4e7a8d3942ee0e8
2021-03-23 09:04:46 +00:00
TreeHugger Robot
11d5b29d7c Merge "Introduce VibrationEffectSegment" into sc-dev 2021-03-23 08:52:21 +00:00
Dmitri Plotnikov
a5ceb34339 Change getStatsStartRealtime to getStatsStartTimestamp
The implementation is now based on BatteryStats.getStartClockTime

Bug: 183434301
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryUsageStatsTest

Change-Id: I55184f981b2583b184d859788837443e58eccb6c
2021-03-22 22:56:39 -07:00
Kweku Adams
4457c44c47 Merge "Expose job stop reasons." into sc-dev am: db348d4435
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13829001

Change-Id: Iea02c2123d84357a3699ad75f7dda3292b8d6548
2021-03-22 21:56:47 +00:00