Commit Graph

9175 Commits

Author SHA1 Message Date
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
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
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
Kholoud Mohamed
59afb25133 Merge "Exposed some testAPIs in BatteryStatsManager" into sc-dev am: 18f5dc3caa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13815791

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I858cbed3d10bef53afdbda0d19e45dced4b1c4c0
2021-03-12 16:34:41 +00:00
Kholoud Mohamed
18f5dc3caa Merge "Exposed some testAPIs in BatteryStatsManager" into sc-dev 2021-03-12 16:08:34 +00:00
Lajos Molnar
cb45e2e757 Merge "os.Build: add MEDIA_PERFORMANCE_CLASS" into sc-dev am: d419a26c2e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13825824

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia7f637ff11bc2c91cce11ea659a17b3d50742630
2021-03-12 14:56:15 +00:00
Lajos Molnar
d419a26c2e Merge "os.Build: add MEDIA_PERFORMANCE_CLASS" into sc-dev 2021-03-12 14:31:53 +00:00
kholoud mohamed
ceac8bbb50 Exposed some testAPIs in BatteryStatsManager
Added the following testsAPIs to replace the usage
of adb shell commands in tests:
* setChargerAcOnline
* setBatteryLevel
* unplugBattery
* resetBattery
* suspendBatteryInput

Test: atest MixedDeviceOwnerTest#testInstallUpdate using the adb
commands and the new testAPIs
Bug: 182260585

Change-Id: I48c2ad37f6240f4d7a3c437416fdcc0beeed6bd1
2021-03-12 09:58:32 +00:00
Yurii Zubrytskyi
83a05791c4 Merge "[hardening] Use read() instead of mmap() for incfs files" into sc-dev am: e32f0d1c01
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13723059

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3a2edc0b4660b2e751daa41b3250a062a93cdfa6
2021-03-12 08:24:23 +00:00
Yurii Zubrytskyi
e32f0d1c01 Merge "[hardening] Use read() instead of mmap() for incfs files" into sc-dev 2021-03-12 08:07:38 +00:00
Songchun Fan
962e6269ee Merge "[incremental] expose duration metrics to activity manager" into sc-dev am: 096b96158a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13764745

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iadef70f5030547a01b9269e5ef00e123544634d8
2021-03-12 05:37:05 +00:00
Songchun Fan
096b96158a Merge "[incremental] expose duration metrics to activity manager" into sc-dev 2021-03-12 05:34:36 +00:00
TreeHugger Robot
b795450abd Merge "Update the java doc for the directory of audio files" into sc-dev am: 0db27fe207
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13764813

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6818eb72b8df941d8064bc8143aafd01bb106b94
2021-03-12 04:38:15 +00:00
TreeHugger Robot
0db27fe207 Merge "Update the java doc for the directory of audio files" into sc-dev 2021-03-12 04:06:37 +00:00
Peter Collingbourne
6353c57d57 Add support for a hw_timeout_multiplier system property.
In order to test the platform in emulators that are orders of magnitude
slower than real hardware we need to be able to avoid hitting timeouts
that prevent it from coming up properly. For this purpose introduce
a system property, ro.hw_timeout_multiplier, which may be set to
an integer value that acts as a multiplier for various timeouts on
the system.

Bug: 178231152
Change-Id: I6d7710beed0c4c5b1720e74e7abe3a586778c678
Merged-In: I6d7710beed0c4c5b1720e74e7abe3a586778c678
2021-03-11 14:04:18 -08:00
Lajos Molnar
97eb3f1bd2 os.Build: add MEDIA_PERFORMANCE_CLASS
Bug: 175813535
Test: atest android.mediapc.cts.PerformanceClassTest
Test: atest android.os.cts.BuildTest
Change-Id: I66e172f4c619a3277bde1004ba4828e2173f69a0
2021-03-11 13:01:55 -08:00
Brian Quezada
85ca3cd4e0 Merge "Fix dim duration on flip to screen off." into sc-dev am: da2faff59c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13738397

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I27347a7b06c693f29188c58b04f0bc95e3d5a2e3
2021-03-11 20:29:28 +00:00
bquezada
2dccad6f94 Fix dim duration on flip to screen off.
Timeouts are calculated from mLastUserActivityTime, so just calling updatePowerStateLocked will go to locked with almost no dim duration.

Test: Tested with local device.

Bug: 164517126
Change-Id: I084c13fada7613bd745ceb1dc2f7038097d70686
2021-03-11 15:08:09 +00:00