Commit Graph

8944 Commits

Author SHA1 Message Date
Sudheer Shanka
710971a286 Merge "Add a global setting to turn on/off the proc state cpu times tracking." 2018-01-09 02:28:51 +00:00
TreeHugger Robot
973e7eba7e Merge "Work on issue #70859548: Reduce amount of time spent collecting pss data" 2018-01-09 01:29:00 +00:00
Sudheer Shanka
5c19b897dd Add a global setting to turn on/off the proc state cpu times tracking.
Bug: 66953194
Test: atest core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Test: atest hostsidetests/incident/src/com/android/server/cts/BatteryStatsValidationTest.java
Test: atest core/tests/coretests/src/com/android/internal/os/BstatsCpuTimesValidationTest.java
Change-Id: Id26476ad77c95994f358d8bd59b6c2e6513c4c54
2018-01-08 16:25:16 -08:00
Sudheer Shanka
65e919ae8c Merge "Attribute procstate cpu times to correct battery/screen on/off buckets." 2018-01-08 23:51:40 +00:00
TreeHugger Robot
6557fb49a2 Merge "Notifier: Chained attribution support for noteLongPartialWakeLock[finish|start]" 2018-01-07 23:09:27 +00:00
Robert Berry
5daccec818 Add API to remove recoverable keys
Test: adb shell am instrument -w -e package com.android.server.locksettings.recoverablekeystore com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: Ib69e730467974d34ffe4a700bd6aaf4543a524ae
2018-01-06 19:16:25 +00:00
TreeHugger Robot
65b1cfe0a1 Merge "Re-commit: Smooth scroll RecyclerView on a11y ACTION_SCROLL_*" 2018-01-06 01:16:31 +00:00
TreeHugger Robot
551d9aa68a Merge "Single color scrim" 2018-01-05 23:22:32 +00:00
Lucas Dupin
4dcacd3719 Single color scrim
Removed gradient and kept brightest color.

Test: atest ./tests/Internal/src/com/android/internal/colorextraction/types/TonalTest.java
Test: visual
Bug: 64122537
Change-Id: I75cba32172a5869f3d8a57ab9955bffcba60db76
2018-01-05 13:28:27 -08:00
TreeHugger Robot
bf1b0b04bf Merge "Bugfix: wakeup alarms logging" 2018-01-05 19:29:17 +00:00
TreeHugger Robot
e780e8d2b3 Merge "Add createNewItem() to RingBuffer util class." 2018-01-05 10:59:28 +00:00
Narayan Kamath
e6c4fdc6fb Merge "BatteryStatsImpl: Support chained attribution for BT events." 2018-01-05 09:16:21 +00:00
Narayan Kamath
96a9256fd8 Notifier: Chained attribution support for noteLongPartialWakeLock[finish|start]
Test: BatteryStatsNoteTest
Bug: 62390666
Change-Id: I1f393b475cb18171f4d24f8774f3509a00e2a404
2018-01-05 09:03:41 +00:00
Narayan Kamath
c21066b0e7 Merge "BatteryStats: Add WorkChain support for WiFi events." 2018-01-05 09:02:18 +00:00
TreeHugger Robot
48e5682a58 Merge "Remove unused userId parameter from RecoverableKeyStoreManager." 2018-01-05 08:22:18 +00:00
Jeff Sharkey
8eb783b21e FBE devices now fully support adoptable storage.
We've finished all the underlying work to support adoptable storage
on FBE devices, so remove the code that was disabling it by default.

Introduce feature flag to make it easier to detect devices that
support adoptable storage.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Bug: 29923055, 25861755, 33252673, 37289651
Change-Id: I3630d690c9e66c7e41e316a4263ea2eb1e752ad3
2018-01-04 18:50:14 -07:00
Dmitry Dementyev
1429831ac8 Remove unused userId parameter from RecoverableKeyStoreManager.
Bug: 66499222
Test: adb shell am instrument -w -e package \
com.android.server.locksettings.recoverablekeystore \
com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner

Change-Id: Ibf09724839cbdbf7172462ce0368278c7e65155f
2018-01-04 17:31:50 -08:00
Maurice Lam
e4a03006e6 Merge "Revert "Fixed RTL alignment issue in suggested language list"" 2018-01-04 22:05:12 +00:00
Tej Singh
6f724c4b9e Bugfix: wakeup alarms logging
Log wakeup alarms regardless of whether or not the device is on battery

Test: ran cts tests
Change-Id: Ib582bbb82da51f60a3bb75e940d53f0552c3ca86
2018-01-04 11:09:07 -08:00
Narayan Kamath
0ebc96ce8f BatteryStatsImpl: Support chained attribution for BT events.
These changes are slightly different than the ones for Wifi etc.
We need to keep track of the list of WorkChains attributed to a given
UID in order to log stop events for each of them if the BT process
crashes (or goes away) and we receive a call to noteResetBluetooth..[].

Test: BatteryStatsTests
Bug: 62390666

Change-Id: I4aaa2260cdc509ca08c4fa4838df77cda870ef75
2018-01-04 16:35:53 +00:00
Narayan Kamath
728c8a0874 BatteryStats: Add WorkChain support for WiFi events.
The changes are straightforward, the only change outside of BatteryStats
is to use the new WorkSource.isEmpty API to account for WorkChains in a
given WorkSource.

Bug: 62390666
Test: BatteryStatsBackgroundStatsTest, BatteryStatsNoteTest, WifiLockManagerTest
Change-Id: I1dff43b6f2a09877e3af4442bfe8a8fd80b1ba74
2018-01-04 14:18:22 +00:00
Maurice Lam
22e6c7b95c Revert "Fixed RTL alignment issue in suggested language list"
This reverts commit a2c1917e37.

Reason for revert: b/71341685

Change-Id: I453d9e38143645f9b9d62d874eb8a84e3133b555
2018-01-03 20:25:24 +00:00
Ahmed ElArabawy
f88571ffa1 Proper calculation for overall WiFi MC statistics
In current implementations the WiFi MC statistcs are calculating by
aggregating the per uid statistics accross all UIDs. This does not
result in the correct values in case of time overlapping acquisitions of
MC wakelocks by same or different UIDs
This commit creates a separate Timer instance that tracks the actual
time spent with MC Enabled.

Bug: 69854369
Test: Manual Test

Change-Id: I78533f48300bc9faccc374d684698dae647bde5d
Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
2018-01-03 09:06:42 -08:00
Ricky Wai
62bc5f84be Merge "Make Network watchlist use ConfigUpdater to get watchlist" 2018-01-03 14:16:40 +00:00
Narayan Kamath
695cf72f26 Support chained attribution for alarm related WorkSources.
.. those passed down via the AlarmManager.set() variant that takes
a WorkSource. This required a minor re-arrangement of code in
the ActivityManager. We now treat WorkSources as opaque in the
AlarmManager and simply push them down to the AM (and eventually
to BatteryStats) where they are picked apart.

Test: BatteryStatsNoteTest, AlarmManagerTest
Bug: 62390666
Change-Id: I118f1a1d16aafa41b4f401f1a6a3ba4d2d5eca8f
2018-01-03 09:16:56 +00:00
Sudheer Shanka
e544d16220 Attribute procstate cpu times to correct battery/screen on/off buckets.
- Remove redundant 'mPluggedCounts' data from LongSamplingCounterArray
- Update relevant tests

Bug: 66953194
Test: atest core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Test: atest hostsidetests/incident/src/com/android/server/cts/BatteryStatsValidationTest.java
Test: atest core/tests/coretests/src/com/android/internal/os/BstatsCpuTimesValidationTest.java
Change-Id: I1f32eef0d4a0fe3b6124c07d016cf0ff8967b956
2018-01-02 17:59:27 -08:00
Alan Viverette
f51fa7deac Always allow button stacking
Previously did not allow stacking on small screens, which resulted in
buttons clipping at the ending edge of the dialog.

Change-Id: Iaa36cb657556197018b192c24c4043e6395c74a2
Fixes: 37507002
Test: manual
2018-01-02 16:18:48 -05:00
Yangster-mac
2087716f2b 1/ Support nested message and repeated fields in statsd.
2/ Filter gauge fields by FieldMatcher.
3/ Wire up wakelock attribution chain.
4/ e2e test: wakelock duration metric with aggregated predicate dimensions.
5/ e2e test: count metric with multiple metric condition links for 2 predicates and 1 non-sliced predicate.

Test: statsd unit test passed.

Change-Id: I89db31cb068184a54e0a892fad710966d3127bc9
2018-01-01 10:01:36 -08:00
Sudheer Shanka
d20627f50c Add createNewItem() to RingBuffer util class.
Test: atest tests/net/java/com/android/internal/util/RingBufferTest.java
Change-Id: Idec1f354fc702ead0603341806c6c4ff863c0522
2017-12-31 00:05:36 -08:00
Eugene Susla
cb37da8b13 Merge "Add a 'unbounded method refs only' clause to PooledLambda javadoc" 2017-12-27 18:17:23 +00:00
Narayan Kamath
bbab9c4e28 Merge "Support WorkChains for WakeLock start / stop / change events." 2017-12-27 08:43:37 +00:00
TreeHugger Robot
550e8ec8fa Merge "Fixed RTL alignment issue in suggested language list" 2017-12-22 19:22:08 +00:00
TreeHugger Robot
14cddc465b Merge "Implement generateAndStoreKey" 2017-12-22 19:10:24 +00:00
susanta.patra
a2c1917e37 Fixed RTL alignment issue in suggested language list
Suggested language list alignment should be as per the default locale.

Test: 1. RTL language
      2. Settings>System>Languages & input>Languages>Add a language>English
      3. Check the alignment
Bug: 70360392

Change-Id: I934b1061fb897ac69270a493562defba4a5a1a35
Signed-off-by: susanta.patra <susanta.patra@lge.com>
2017-12-22 09:41:30 -08:00
Narayan Kamath
8182202ac8 Support WorkChains for WakeLock start / stop / change events.
Log WorkChains associated with a given WorkSource to statsd whenever
a wakelock is acquired / released or changes.

Test: WorkSourceTest, manual.
Bug: 62390666

Change-Id: I1720ba8b1778d38067398caac7cf92c4d375f816
2017-12-22 16:21:07 +00:00
Robert Berry
cfc990a49d Implement generateAndStoreKey
For now just returns raw key material. In the future we will need to
change this to use the KeyStore move api. (Once that has been
implemented.)

Test: adb shell am instrument -w -e package com.android.server.locksettings.recoverablekeystore com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I8aee4da81f0f853503f570dae8d74e1d29f124cc
2017-12-22 15:54:30 +00:00
Ricky Wai
ebe3624628 Make Network watchlist use ConfigUpdater to get watchlist
Bug: 63908748
Test: test_network_watchlist_full.sh samples/network-watchlist-sample.xml

Change-Id: I9dcca568d3f19f2937786c9c184324b43dc08ff2
2017-12-22 11:49:51 +00:00
Robert Berry
bd4c43c686 Update recoverKeys to return raw material
This is a temporary solution, while the KeyStore team works on adding a
move API to KeyStore. (At which point this will be updated to instead
return 'move tokens', allowing the user to move the key from the system's
keystore to their own, without ever seeing the raw material.)

Test: adb shell am instrument -w -e package com.android.server.locksettings.recoverablekeystore com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I2241a6da15d50c26a7b384d4e5b6f78366fb9300
2017-12-22 11:35:14 +00:00
Siddharth Ray
331962242a Merge "Obtain cellular related battery statistics" 2017-12-21 19:53:54 +00:00
Sudheer Shanka
fa4bda70c3 Merge "Update BatteryStatsImpl to track per-procstate cpu times." 2017-12-21 03:51:40 +00:00
TreeHugger Robot
0be794a14c Merge "Add more methods to RecoverableKeyStoreLoader." 2017-12-21 02:01:15 +00:00
TreeHugger Robot
da8d32efbb Merge changes from topic "work_mode_api1"
* changes:
  Add access control to trySetWorkModeEnabled and make it public
  Merge setQuietModeEnabled and trySetQuietModeDisabled into one API
2017-12-21 01:20:28 +00:00
Siddharth Ray
a1fd057c85 Obtain cellular related battery statistics
API to obtain cellular battery stats for power
drain diagnostics.

Test: Manual

BUG:67647477
Change-Id: Iffdb1471cd55847b6454313c94497ab2cd6533cc
2017-12-20 14:56:29 -08:00
Dmitry Dementyev
b8b030bdbb Add more methods to RecoverableKeyStoreLoader.
1) Methods to get key status.
2) Register pending intent to get notification about new recovery
snapshots.

Test: none
Bug: 66499222
Change-Id: I4d5f8c1a6581b5e08f4589e19961d93c499689e1
2017-12-20 12:07:24 -08:00
Eugene Susla
38343bc35c Re-commit: Smooth scroll RecyclerView on a11y ACTION_SCROLL_*
This is consistent with the behavior of ListView and ScrollView for that action

This was previously reverted due to suspected perf regression which ended up
being unrelated. Re-committing this.

Bug: 63778054
Test: Go through bug steps and ensute it's fixed
Change-Id: I633294512f08ec31a0325c540881bbbcbcefe016
2017-12-20 10:48:07 -08:00
Eugene Susla
4b7c919e72 Communicate relevantEvents=0 for packages excluded from whitelist
Together with checking isObservableEventType this will result in a11y events
not being generated for packages that are excluded form a11y-service(s)
package whitelist

Test: cts-tradefed run singleCommand cts -d --module CtsAccessibilityServiceTestCases
Change-Id: Id65607aaccc7af7d870d009d609917ff3c6d0712
2017-12-20 10:41:12 -08:00
Dianne Hackborn
052e3149da Work on issue #70859548: Reduce amount of time spent collecting pss data
This slightly reduces the frequency we collect pss data, adjusting
some timings and adding back separate timings for when the device
is asleep.  (Though note that the "same asleep" timings are currently
the same as "same awake," because those are already pretty infrequent.)

Also add some statistics to procstats to keep track of how many
pss samples have been taken, generally why, and how long they took

Bug: 70859548
Test: manual
Change-Id: If3c6cbd4ab045d2e4c00b48fe4257c4ec5ae3f33
2017-12-19 16:08:30 -08:00
Sudheer Shanka
b2f83c16d6 Update BatteryStatsImpl to track per-procstate cpu times.
BatteryStatsImpl will track this data by reading from
/proc/uid/<uid>/time_in_state whenever process state changes
and will include this data as part of batterystats dump.

Bug: 66953194
Test: atest core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Test: atest hostsidetests/incident/src/com/android/server/cts/BatteryStatsValidationTest.java
Test: atest core/tests/coretests/src/com/android/internal/os/BstatsCpuTimesValidationTest.java

Change-Id: Ibb3e07f518aaf7eea2a00bb95b95dc5f7e09552e
2017-12-19 15:52:25 -08:00
TreeHugger Robot
6348ddcd04 Merge "Make TOP_SLEEPING procstate more like a cached process." 2017-12-19 18:47:19 +00:00
TreeHugger Robot
0817c33271 Merge "Add RecoverableKeyStoreLoader implementation in LockSettingsService." 2017-12-19 03:17:29 +00:00