Commit Graph

9190 Commits

Author SHA1 Message Date
TreeHugger Robot
fa5fcd4806 Merge "Add isAppIoBlocked TestApi" 2021-03-23 18:12:43 +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
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
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
Kweku Adams
0aa5738423 Expose job stop reasons.
Provide the various reasons a job could be stopped (via onStopJob) so
developers can react accordingly.

Bug: 171305774
Test: atest frameworks/base/services/tests/mockingservicestests/src/com/android/server/job
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/job
Test: atest CtsJobSchedulerTestCases
Change-Id: I5a19e74d3924de449cc5e4de27445e25cf8e25f5
2021-03-22 11:18:36 -07:00
Jeff Sharkey
0a3f194ecc Merge "Implement per-field matching of ScanRecord." into sc-dev am: 36e23d3471
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13921055

Change-Id: Ic21d89f405561541e09f84d6db2a7ff206c7d208
2021-03-18 23:24:18 +00:00
Jeff Sharkey
36e23d3471 Merge "Implement per-field matching of ScanRecord." into sc-dev 2021-03-18 23:16:45 +00:00
Jeff Sharkey
e6e4c05291 Implement per-field matching of ScanRecord.
As part of building out support for robustly matching Bluetooth LE
devices in the wild, this change checks all "fields" contained in a
ScanRecord against a given BytesMatcher.

To support matching variable-length Eddystone beacons, this change
also expands BytesMatcher to support both exact length and prefix
based rules, which are then used with rules that verify that example
Eddystone and iBeacon values can be detected with these rules:

    Eddystone: ⊆0016AAFE/00FFFFFF
    iBeacon: ⊆00FF4C0002/00FFFFFFFF

Expands testing to confirm all newly added capabilities are working.

Bug: 181812624
Test: atest BluetoothTests:android.bluetooth.le
Test: atest FrameworksCoreTests:android.os.BytesMatcherTest
Change-Id: I1cff8e08604436f4bba6f55aad64c3ce5969bf56
2021-03-18 14:17:28 -06:00
Lais Andrade
601a944e45 Introduce WaveformBuilder to VibrationEffect
Create a new parcelable RampSegment and introduce
VibrationEffect.startWaveform() method that returns a
WaveformBuilder that allows creating step/ramp waveforms that
changes amplitude and frequency of the effect.

Implementations of VibrationThread and InputManagerService for now just
ignore the new segments and keep existing behavior.

Bug: 167947076
Test: VibrationEffectTest
Change-Id: Ibac895b63196e779457efc297f1f5497a7814ae9
2021-03-18 18:06:45 +00:00
Zimuzo Ezeozue
874bc578dd Merge "Fix MANAGE_EXTERNAL_STORAGE permission gid mapping" into sc-dev am: b3705153db
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13904105

Change-Id: I4703fe976a07e5468cf1db5ac5fcdde986d5d93d
2021-03-18 15:07:13 +00:00
Zimuzo Ezeozue
b3705153db Merge "Fix MANAGE_EXTERNAL_STORAGE permission gid mapping" into sc-dev 2021-03-18 15:02:17 +00:00
Lais Andrade
bd992109e0 Introduce VibrationEffectSegment
Create a new parcelable VibrationEffectSegment in the new package
android.os.vibrator, together with three concrete implementations for
the segment types: step, prebaked and primitive.

Remove all implementations of VibrationEffect to allow composition of
any effects, represented now by the concrete type VibrationEffect that
holds a list of segments.

Bug: 167947076
Test: VibrationEffectTest
Change-Id: I79c99e29f436ed77558af764f55633bb4636e034
2021-03-18 11:03:45 +00:00
TreeHugger Robot
06637002db Merge changes I72acc40f,I0a0ce22f into sc-dev am: 3a9304b2be
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13897153

Change-Id: I490db3e17acb74e6bf7e7b54ff411f3269981a3d
2021-03-17 22:44:33 +00:00
Jeff Sharkey
418871ea56 Merge "Expose VPN_UID" am: 58f7a60187 am: 8710bc1755 am: a7913a0656 am: 8c2ee9bc3e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625699

Change-Id: I7700d0615b1452ac1d2cfb157e5ed02e544cea2c
2021-03-17 22:44:20 +00:00
TreeHugger Robot
3a9304b2be Merge changes I72acc40f,I0a0ce22f into sc-dev
* changes:
  Fix UiTranslationManager ErrorProne error.
  Revert "Revert "Add UiTranslationStateCallback.""
2021-03-17 22:36:49 +00:00
Jeff Sharkey
8c2ee9bc3e Merge "Expose VPN_UID" am: 58f7a60187 am: 8710bc1755 am: a7913a0656
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625699

Change-Id: I4899b2fe5733d24797d33a48069f15a9d4686bb5
2021-03-17 22:26:17 +00:00
Jeff Sharkey
a7913a0656 Merge "Expose VPN_UID" am: 58f7a60187 am: 8710bc1755
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625699

Change-Id: Idb15fe2671eac19159cc7f58319cdff7d4663bee
2021-03-17 22:00:22 +00:00
TreeHugger Robot
a29e65b78b Merge "BatteryStats measured energy for Wifi & Bluetooth" into sc-dev am: 56a4ea5684
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13837769

Change-Id: I7c052d430702bace881e6d0d461e1047c9f00e35
2021-03-17 21:14:04 +00:00
Treehugger Robot
e8cdcb7f6c Merge "Use ro.boot.qemu to check if the device is an emulator" am: 62d82e0b33 am: 4ba8fde9ba am: de535f6eb2 am: 83a6070d12
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625662

Change-Id: I8b388bc7f1881b8939b7ba04631466624439fece
2021-03-17 21:07:25 +00:00
Peter Collingbourne
1dec957d68 Merge "Add support for a hw_timeout_multiplier system property." am: 7fe1ca63df am: 3c8dbe30d6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556750

Change-Id: Iaec0f4e259ebb1251c534fbf01081f89272c44b7
2021-03-17 20:49:31 +00:00
Jeff Sharkey
58f7a60187 Merge "Expose VPN_UID" 2021-03-17 20:38:41 +00:00
Zim
782dc19e95 Fix MANAGE_EXTERNAL_STORAGE permission gid mapping
In Android R, we introduced a platform.xml based
mapping. Unfortunately, it only worked for signature|preinstalled
apps.

To support apps granted the appop (via special app access
permissions), we now check the permission and appop grant state
explicitly and grant the app the external_storage gid appropriately

Test: Manual
Bug: 165515144

Change-Id: Ib91e1b3a7e54ac2c83fb1d94446bed06fd44bcf6
2021-03-17 19:42:18 +00:00
Peter Collingbourne
7fe1ca63df Merge "Add support for a hw_timeout_multiplier system property." 2021-03-17 18:18:51 +00:00
TreeHugger Robot
56a4ea5684 Merge "BatteryStats measured energy for Wifi & Bluetooth" into sc-dev 2021-03-17 16:32:53 +00:00
Treehugger Robot
83a6070d12 Merge "Use ro.boot.qemu to check if the device is an emulator" am: 62d82e0b33 am: 4ba8fde9ba am: de535f6eb2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625662

Change-Id: Ia613c23fb779697882f9928b15684fb1ff97e9cd
2021-03-17 16:09:12 +00:00
lucaslin
e4ea3d4c84 Expose VPN_UID
ConnectivityService will be a part of mainline module, so it
cannot access hidden API. Expose VPN_UID for ConnectivityService
to access.

Bug: 170598012
Test: m
Change-Id: I9f74fb97ba27e5feacf1820cf75e28ad73516d7d
2021-03-17 19:04:01 +08:00
Nathalie Le Clair
68b58cbe05 Merge "Document intents triggering CEC power control messages" into sc-dev am: 30664e5ebd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13876965

Change-Id: If7aac6bba487a850c47c07707f47bbf03bc62ee5
2021-03-17 08:05:59 +00:00
Nathalie Le Clair
30664e5ebd Merge "Document intents triggering CEC power control messages" into sc-dev 2021-03-17 08:01:39 +00:00
Ahaan Ugale
93b9882eb8 Revert "Revert "Add UiTranslationStateCallback.""
This reverts commit 7c8010211d.

Reason for revert: Original change broke the build. This is a clean
revert. The next change in the relation chain here fixes the error.

Bug: 177500482
Bug: 182896753
Test: mmma frameworks/base/ RUN_ERROR_PRONE=true
CTS-Coverage-Bug: 182853869
Change-Id: I0a0ce22feb2e54769103f8f4eecbffe425099412
2021-03-17 07:55:59 +00:00
Adam Bookatz
4127267e49 BatteryStats measured energy for Wifi & Bluetooth
Measured energy data for Wifi is received, processed, attributed
to uids, and delivered. Same for Bluetooth.

Since Wifi power analysis is done via two methods (ControllerActivity data
or packet data), depending on what is available on the device, the
measured energy method also takes into account these two methods for
attribution purposes.

For Bluetooth, the only raw data is ControllerActivity data, so it is
simpler.

In both cases, if that data already contains energy data from the
ControllerActivity, but the device also
has measured energy data, then the controller energy data is used for
normalization but is otherwise replaced by the measured energy data. In
other words, the measured energy data is treated preferentially.

Also fixes a minor bug in BSI.initMeasuredEnergyStatsLocked() which
had a stray early return line.

Test: atest BatteryStatsTests
Bug: 174818228
Change-Id: Id4728fcd5e6f226664e578a4c19c4aaa5246ff4b
2021-03-16 18:00:19 -07:00
Treehugger Robot
de535f6eb2 Merge "Use ro.boot.qemu to check if the device is an emulator" am: 62d82e0b33 am: 4ba8fde9ba
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625662

Change-Id: I039b17ca0bf956ee3d86c72edcbf81957938ae4b
2021-03-16 17:17:20 +00:00
Martijn Coenen
9301f3e89d Merge "Revert "Add UiTranslationStateCallback."" into sc-dev am: bbf8db50b8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13886494

Change-Id: Ia9f629ec0881a6251f04feddfbcf678b9725bff4
2021-03-16 16:59:10 +00:00
Martijn Coenen
bbf8db50b8 Merge "Revert "Add UiTranslationStateCallback."" into sc-dev 2021-03-16 16:43:52 +00:00
Nathalie Le Clair
2ee5363ba9 Document intents triggering CEC power control messages
Specific to Android TV playback devices sending power control messages
to the HDMI-connected TV.

Bug: 170097638
Test: make
Change-Id: I97907d9d6a4522425306ad2cc9d10aef1f4c8869
2021-03-16 15:27:29 +00:00
Martijn Coenen
7c8010211d Revert "Add UiTranslationStateCallback."
This reverts commit 30704c1b85.

Reason for revert: breaks errorprone, b/182896753

Change-Id: I05f4e2dba321bc77713be701f76b07c66cb0d103
2021-03-16 15:04:08 +00:00
Ahaan Ugale
4329a2da4e Merge "Add UiTranslationStateCallback." into sc-dev am: 65509f464f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13845588

Change-Id: I4b4094ee6d7df6e1e871ff947810c29bbb767ba3
2021-03-16 06:09:33 +00:00
Ahaan Ugale
65509f464f Merge "Add UiTranslationStateCallback." into sc-dev 2021-03-16 05:44:45 +00:00
Ahaan Ugale
30704c1b85 Add UiTranslationStateCallback.
This is primarily intended for Input Methods, so they can offer
complementary translation experiences to the UI Translation.

But it could also be useful to the applications being translated too, so
it's added to UiTranslationManager.

The states are intentionally different from the ones in the View API -
these are about the UI Translation feature lifecycle, whereas the View
states are about the display states (shown/hidden).

Bug: 177500482
Test: manual - with a sample IME
CTS-Coverage-Bug: 182853869
Change-Id: I8255e18c29a229c8ea3b89098b76124ee8955bdc
2021-03-16 03:28:00 +00:00
TreeHugger Robot
16c352596d Merge "Add resonant frequency and Q factor to VibratorInfo" into sc-dev am: 75eb6d7643
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13704745

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idd19e15c439529c1696f8444d755ed4025442d14
2021-03-13 01:26:01 +00:00
TreeHugger Robot
75eb6d7643 Merge "Add resonant frequency and Q factor to VibratorInfo" into sc-dev 2021-03-13 00:59:22 +00:00
TreeHugger Robot
ab5f4e5080 Merge "Utilize measured cpu batteryconsumption in CpuPowerCalculator" into sc-dev am: ff51356f0d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13781505

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie49d4f2f2e8df3dc65b91200eb31acb68d4242c8
2021-03-12 21:06:20 +00:00
TreeHugger Robot
ff51356f0d Merge "Utilize measured cpu batteryconsumption in CpuPowerCalculator" into sc-dev 2021-03-12 20:51:44 +00:00