Commit Graph

9046 Commits

Author SHA1 Message Date
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
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
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
Aaron Huang
c4f2a30c20 Merge changes I1d1f0d2d,Ifbd4a978
* changes:
  Communicate with BatteryStatsService through BatteryStatsManager
  Add a new API in BatteryStatsManager for connectivity service
2021-03-09 10:33:56 +00:00
Wei Sheng Shih
db3d82a4e3 Merge "Starting window performance tuning.(8/N)" into sc-dev 2021-03-09 08:00:12 +00:00
Aaron Huang
3ae5bdab6e Add a new API in BatteryStatsManager for connectivity service
Connectivity service(CS) is going to be a mainline module and
currently it uses IBatteryStats to communicate with battery
stats service directly. CS cannot use this way after becomes
a mainline module so add new system APIs to communicate with
battery stats service through BatteryStatsManger.

The new API reportNetworkInterfaceForTransports requires
system-only permission NETWORK_STACK or MAINLINE_NETWORK_STACK
so that given the only caller was in ConnectivityService.

This change only add new surface, the usage in CS will be
updated in follow-up CL.

Bug: 171686421
Test: builds, boot, mobile and wifi work.
Change-Id: Ifbd4a9784ed7664751e69d530f8204e292fa6b39
Merged-In: Ifbd4a9784ed7664751e69d530f8204e292fa6b39
2021-03-09 06:24:50 +00:00
Remi NGUYEN VAN
8fffc13f67 Merge changes I1d1f0d2d,Ifbd4a978 into sc-dev
* changes:
  Communicate with BatteryStatsService through BatteryStatsManager
  Add a new API in BatteryStatsManager for connectivity service
2021-03-09 05:49:43 +00:00
Peter Collingbourne
127cb3ff8f Merge "Add support for a hw_timeout_multiplier system property." into sc-dev 2021-03-09 04:35:45 +00:00
wilsonshih
11598e8243 Starting window performance tuning.(8/N)
Create splashscreen thread with priority -10 in shell for starting
window controller, the definition is moved from
AMS#TOP_APP_PRIORITY_BOOST to Process#THREAD_PRIORITY_TOP_APP_BOOST.

Create and set SplashScreenView object on the starting window after the
first simple view on the starting window drawn, in this way the
transition can be prepare early than wait the actually view was draw,
which can save some time.

Bug: 73289295
Bug: 131311659
Test: atest StartingSurfaceDrawerTests ShellTaskOrganizerTests
Test: atest SplashscreenTests
Change-Id: Ibb430a66d6b329e74d62de047fbf37205cb66a96
2021-03-09 11:13:03 +08:00
Makoto Onuki
b4f60382b0 Merge "[Bugfix] Fix after performing adb shell am hang and kill this process, the phone can not resume from hang state" am: 4d83226663 am: 8f8ffd02f2 am: 245befadf1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1601731

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iaa4e7308cc56c407bd8a45a50a33e796d338a472
2021-03-09 03:05:01 +00:00
Makoto Onuki
245befadf1 Merge "[Bugfix] Fix after performing adb shell am hang and kill this process, the phone can not resume from hang state" am: 4d83226663 am: 8f8ffd02f2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1601731

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ieff6dfbeda11d1ae6fd6cd9a28cd622f2cec7045
2021-03-09 02:19:25 +00:00
Makoto Onuki
4d83226663 Merge "[Bugfix] Fix after performing adb shell am hang and kill this process, the phone can not resume from hang state" 2021-03-09 01:10:27 +00:00
Lais Andrade
66a26003e8 Clarify delay parameter documentation in VibrationEffect
Make it clear in the javadoc for addPrimitive method the start point of the delay parameter, which is right after the previous primitive in the composition has finished.

Fix: 150715908
Test: N/A
Change-Id: Ic88b0d8a31a193b8b1726a9541d9e5955b729866
2021-03-09 00:22:45 +00:00
Michael Wachenschwanz
b95b1a2eff Merge changes from topic "cpuEnergyAttribution" into sc-dev
* changes:
  Accumulate charge instead of energy in BatteryStatsImpl
  Accumulate and attribute measured Cpu energy in BatteryStats
2021-03-08 23:46:08 +00:00
Michael Wright
2a3dac7f76 Add resonant frequency and Q factor to VibratorInfo
Bug: 181276733
Test: atest VibratorInfoTest VibratorManagerService
Change-Id: I206da897fba7c1b065979aa3fb165cc536fbaf6c
2021-03-08 23:44:50 +00:00
Jacob Abrams
1d5dbcaaf4 Make FileUtils#createDir threadsafe
Prior to this change the createDir method would return false if invoked
around the same time on two different threads for the same directory.

Test: manual
Change-Id: I34ba4f645a034f47917054af4b299f916a9cfa67
2021-03-08 14:35:44 -08:00
Michael Wachenschwanz
68b8157e4e Accumulate charge instead of energy in BatteryStatsImpl
Track battery voltage along side the measured energy to calculate
battery charge consumption per EnergyConsumer. This better represents
a consumer's impact on battery. Also change numerous variable/method
names from energy units to charge units.

Bug: 180079165
Fixes: 173765509
Test: atest FrameworksCoreTests:com.android.internal.power.MeasuredEnergyStatsTest
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsNoteTest
Test: atest ScreenPowerCalculatorTest
Test: atest FrameworksServicesTests:com.android.server.am.MeasuredEnergySnapshotTest

Change-Id: I5e727cebf1252cc7b1645a53282de2281c68ae85
2021-03-08 11:53:59 -08:00
Ivan Chiang
2955012211 Update the java doc for the directory of audio files
Test: build
Bug: 181350427
Change-Id: I7ad390fa3a11f9bffc5c088d311c1d2af7838a3e
2021-03-08 09:32:30 +00:00
Aaron Huang
558b3177d7 Add a new API in BatteryStatsManager for connectivity service
Connectivity service(CS) is going to be a mainline module and
currently it uses IBatteryStats to communicate with battery
stats service directly. CS cannot use this way after becomes
a mainline module so add new system APIs to communicate with
battery stats service through BatteryStatsManger.

The new API reportNetworkInterfaceForTransports requires
system-only permission NETWORK_STACK or MAINLINE_NETWORK_STACK
so that given the only caller was in ConnectivityService.

This change only add new surface, the usage in CS will be
updated in follow-up CL.

Bug: 171686421
Test: builds, boot, mobile and wifi work.
Change-Id: Ifbd4a9784ed7664751e69d530f8204e292fa6b39
2021-03-08 14:59:13 +08:00
Dmitri Plotnikov
32a183264b Merge "Add batteryTimeRemaining and chargeTimeRemaining to BatteryUsageStats" into sc-dev 2021-03-06 01:56:32 +00:00
Dmitri Plotnikov
cf2929ffe9 Add batteryTimeRemaining and chargeTimeRemaining to BatteryUsageStats
Bug: 158137862
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryChargeCalculatorTest
Change-Id: I247a593de242a2864eef16b7c9ea956209f60cbe
2021-03-05 13:57:47 -08:00
Alex Buynytskyy
18a94794d6 Merge "Check if IncFs supports fs-verity before trying to enable it." into sc-dev 2021-03-05 21:39:26 +00:00
Jeff Sharkey
34229aaf73 Merge "General BytesMatcher utility class." into sc-dev 2021-03-05 18:12:15 +00:00