Commit Graph

9066 Commits

Author SHA1 Message Date
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
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
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
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
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
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
75eb6d7643 Merge "Add resonant frequency and Q factor to VibratorInfo" into sc-dev 2021-03-13 00:59:22 +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
18f5dc3caa Merge "Exposed some testAPIs in BatteryStatsManager" into sc-dev 2021-03-12 16:08:34 +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
e32f0d1c01 Merge "[hardening] Use read() instead of mmap() for incfs files" into sc-dev 2021-03-12 08:07:38 +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
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
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
TreeHugger Robot
3b4857549e Merge "Check and create data and obb dirs after starting zygote process." into sc-dev 2021-03-11 12:02:50 +00:00
Ricky Wai
7d3246a195 Check and create data and obb dirs after starting zygote process.
When data or obb is not cached, it may slow down app starting speed as
we wait the directory is paged before starting zygote.
To improve this, we postpone the dir check after starting zygote process
in ProcessList, so the directory paging and creation can be done in
background without blocking app starting.

As it's possible that dir is not created when zygote needs it, we also a
busy waiting check in zygote to ensure data and obb dirs are created before
we do our work.

Bug: 177248242
Test: Able to boot device and start app after enabling app storage data isolation flag.
Change-Id: I892b7a1a4f8c38331546f9129b8fb43333093aec
Merged-In: I892b7a1a4f8c38331546f9129b8fb43333093aec
(cherry picked from commit ff269b9e8f)
2021-03-11 10:19:22 +00:00
Roman Kiryanov
d6a9f42566 Use ro.boot.qemu to check if the device is an emulator
`ro.kernel.qemu` is deprecated.

Bug: 182291166
Test: presubmit
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: Id42d79af90b1fe7e182a96c53c84248e81a7c259
2021-03-10 23:41:31 -08:00
Alex Buynytskyy
17ff0d81a6 Merge "Remove restriction on new installs before previous is done." into sc-dev 2021-03-11 07:01:57 +00:00
Jeff Sharkey
2dc8341507 Merge "Make FileUtils#createDir threadsafe" am: 5232082243 am: bc1b11029b am: 5c1ad2c60d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1623101

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I89d4a57963e75c0a6000f1f1a9a266b22e28be94
2021-03-11 00:00:09 +00:00
Jeff Sharkey
5c1ad2c60d Merge "Make FileUtils#createDir threadsafe" am: 5232082243 am: bc1b11029b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1623101

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id70ab2f8c4a73d74e6b0e63353e66521bd6c3581
2021-03-10 23:34:36 +00:00
Songchun Fan
b54bb63674 [incremental] expose duration metrics to activity manager
Change existing metrics proto to include:
1) whether the crashed/ANR'd app is incremental
2) the loading progress of the crashed/ANR'd app
3) the duration in milliseconds since the oldest pending read

Example logcat:

03-08 11:21:31.405  1668  5779 E ActivityManager: App crashed on incremental package mytown.police which is 81% loaded.

Example crash metrics:
metric_id: 1111
event_metrics {
  data {
    elapsed_timestamp_nanos: 1141413709431
    atom {
      app_crash_occurred {
        uid: 10348
        event_type: "crash"
        process_name: "mytown.police"
        pid: 21236
        package_name: "mytown.police"
        is_instant_app: FALSE
        foreground_state: FOREGROUND
        error_source: DATA_APP
>>>        is_incremental: true
>>>        loading_progress: 0.81358474
>>>        millis_since_oldest_pending_read: 20092
      }
    }
  }
}

BUG: 180951530
Test: atest CtsStatsdAtomHostTestCases:android.cts.statsdatom.statsd.UidAtomTests#testANROccurred
Test: manual with disabled rest streaming
Change-Id: I931acfed37304fa35f756286b424512490b0e312
2021-03-10 23:20:35 +00:00
Jeff Sharkey
5232082243 Merge "Make FileUtils#createDir threadsafe" 2021-03-10 22:02:14 +00:00
Alex Buynytskyy
8806599460 Remove restriction on new installs before previous is done.
Bug: 160634487
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I1ef1ab39903976bbf4679d148a0ab844402c334e
2021-03-10 16:37:32 +00:00
Charles Chen
ddb41ad5d5 Merge "Relaxed WallpaperManager API assertion" into sc-dev 2021-03-10 08:17:22 +00:00
Songchun Fan
1b76ccfa7c [incremental] expose duration since oldest pending read
As requested by go/incremental-disablement-metrics, we will expose the
duration since oldest pending read as part of the crash/ANR metrics.
This is the first step that exposes the value to Incremental Service.

BUG: 180951530
Test: unit test
Change-Id: Ic67460072556ef01780a1794b40924ca2092060d
2021-03-09 23:06:57 +00:00
Michael Wachenschwanz
02bc36cb4b Utilize measured cpu batteryconsumption in CpuPowerCalculator
Fixes: 180079165
Test: atest CpuPowerCalculator

Change-Id: I6a2cb99e229c86a04fbc9630ecab0a6784387285
2021-03-09 13:28:13 -08:00
Jeff Sharkey
119cf833ad Merge "Update OWNERS file for GraphicsEnvironment" am: 5b7186f65d am: f4a2795bb8 am: dce433b181
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1623124

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7f8d55be3864027ed5f65d6fefd58d13e1b4c175
2021-03-09 20:44:58 +00:00
Jeff Sharkey
dce433b181 Merge "Update OWNERS file for GraphicsEnvironment" am: 5b7186f65d am: f4a2795bb8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1623124

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib9be0b00869616ae72f6a51be4732693b7f66b22
2021-03-09 19:59:04 +00:00
Jeff Sharkey
5b7186f65d Merge "Update OWNERS file for GraphicsEnvironment" 2021-03-09 18:40:42 +00:00
Yiwei Zhang
0400f05249 Update OWNERS file for GraphicsEnvironment
Test: build
Change-Id: I077a9ea03ada04608396f40f153527cc22ea83ca
2021-03-09 18:25:37 +00:00
Lais Andrade
9080ab7c85 Merge "Clarify delay parameter documentation in VibrationEffect" am: 2b9f0c7623 am: cdbc51fa52 am: 3afe20a305
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1622280

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If2edda8cecdd7d7d8f16d0505629fc9c71805274
2021-03-09 13:50:00 +00:00
Lais Andrade
3afe20a305 Merge "Clarify delay parameter documentation in VibrationEffect" am: 2b9f0c7623 am: cdbc51fa52
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1622280

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iba4b8b136fae23b31a4f20ad54e66104876745b1
2021-03-09 13:05:43 +00:00
Aaron Huang
3913bb35c1 Add a new API in BatteryStatsManager for connectivity service am: 3ae5bdab6e am: 584e64df05
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1475899

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic4f99588f81a9545e91593311d6d4e8e6c64659e
2021-03-09 11:49:44 +00:00
Lais Andrade
2b9f0c7623 Merge "Clarify delay parameter documentation in VibrationEffect" 2021-03-09 11:46:43 +00:00
Aaron Huang
584e64df05 Add a new API in BatteryStatsManager for connectivity service am: 3ae5bdab6e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1475899

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I97fc5426d302d6084e8434daa3f6c9b2389be449
2021-03-09 11:11:49 +00:00