Commit Graph

7820 Commits

Author SHA1 Message Date
Adam Lesinski
ceb24e88cb Merge "BatteryStats: Acquire network stats without BatteryStatsImpl lock" into oc-dev 2017-05-31 22:37:09 +00:00
Joe Onorato
1dfd194f7d Merge "Track Partial wakelock time in background" into oc-dev 2017-05-31 19:26:59 +00:00
Joe Onorato
413b135244 Merge "Fix batterystat Counter misreporting when charging" into oc-dev 2017-05-31 19:26:59 +00:00
Joe Onorato
fe06de1fc2 Merge "Batterystats track background bad ble scan time" into oc-dev 2017-05-31 19:26:59 +00:00
Adam Lesinski
14ae39acbc BatteryStats: Acquire network stats without BatteryStatsImpl lock
Moves the network stats collection under a different lock to
prevent the main BatteryStatsImpl lock from being held while doing I/O.

Bug: 37645919
Bug: 38296815
Test: manual
Change-Id: I0d6b4a7b12b234939cb6eb3a32658b28f61dff4f
2017-05-31 11:55:52 -07:00
Joe Onorato
82ba91ddb4 Turn off logspam
For more information, see https://source.android.com/source/code-style#log-sparingly

Bug: 37252687
Test: development/tools/logblame/app_switch_test
Test: development/tools/logblame/power_toggle_test
Test: development/tools/logblame/medium_idle_test
Change-Id: Ie2f6ef33df7b6c1ea976a8180945651ac9482976
2017-05-30 16:01:02 -07:00
Bookatz
b1f04f372c Batterystats track background bad ble scan time
Allows tracking ble scan time (total and background) for unoptimized
scans. Whether the scan is unoptimized is provided by the bluetooth
code when calling batterystats.

Bug: 38461344
Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Test: run cts-dev -m CtsIncidentHostTestCases -t com.android.server.cts.BatteryStatsValidationTest#testUnoptimizedBleScans
Test: cts-tradefed run cts-dev -m CtsDumpsysHostTestCases -t android.dumpsys.cts.BatteryStatsDumpsysTest

Change-Id: I814482ff663424170eac4b413464d24c14a5cf91
2017-05-26 15:41:03 -07:00
TreeHugger Robot
22c2be0fbc Merge "Use uptime instead of elapsed for measuring duration" into oc-dev 2017-05-26 20:56:12 +00:00
Bookatz
5b5ec326ad Track Partial wakelock time in background
Changed partial wakelock time to be a DualTimer so that it can also
track the time spent while app was in background.

Bug: 62134255
Test: cts-tradefed run cts-dev -m CtsDumpsysHostTestCases -t android.dumpsys.cts.BatteryStatsDumpsysTest
Change-Id: I85cca468ac126ee83a3600800bcfa75c9fc3012f
2017-05-26 11:25:06 -07:00
Amith Yamasani
d0ddeba47b Use uptime instead of elapsed for measuring duration
in time taken to read cpu stats.

This should avoid super long durations > 10 secs that are occasionally
seen in system logs.

Bug: 62104524
Test: manual
Change-Id: I9ed985a61125a207b6d4f6297091bd11b4c78616
2017-05-26 09:46:58 -07:00
TreeHugger Robot
7f874db5aa Merge "Relayout when base inner insets change" into oc-dev 2017-05-25 23:25:49 +00:00
TreeHugger Robot
05d64e8b72 Merge "Port Ic9d9d65c66325904c95ab3966bdcc16e7668278b to oc-dev" into oc-dev 2017-05-25 23:19:56 +00:00
Adam Powell
ad4624b1cc Port Ic9d9d65c66325904c95ab3966bdcc16e7668278b to oc-dev
Port the previous change that was merged DO NOT MERGE for an upstream
branch that filters non-exported activities from ResolverActivity.

Bug: 34147053
Test: by previous CL
Change-Id: I2d0a018afd5e9c876f82fc5f551f1edc4b2305c8
2017-05-24 12:38:17 -07:00
Bookatz
8c6f3c507f Fix batterystat Counter misreporting when charging
The BatteryStatsImpl.Counter would previously increment the count even
when the timeBase was off. Then, when the timeBase was turned back on,
the count would be decreased back to the correct value. Thus, when the
timeBase was on, the reported count would be correct, but when the
timeBase was off, the reported count would be wrong (too high). Here, we
fix this.
We also make some other minor improvements.

Bug: 36728346
Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Change-Id: I2fa566a8a4cad4cdff0e6caef37b1eef36a3f5c4
2017-05-24 12:00:17 -07:00
Andreas Gampe
d5a44707db Zygote: Allow arbitrary-length wrap property names
The restriction on system property key length has been lifted.
Update the invoke-with code to first check the full-length property.
Then fall back to the truncated version for backwards-compatibility.

Bug: 37276041

Test: m
Test: manual with long package name (Maps)
(cherry picked from commit 4c88a8c684)

Change-Id: Ic27a26a676f7ac5a998a9bea14259725e89b7e37
2017-05-24 11:26:18 -07:00
Ian Lake
67c0b1b51e Relayout when base inner insets change
When using SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN and
fitsSystemWindows="true", there are cases when the
inner insets will change but the content insets will
remain the same.

One case where this happens is when using
windowSoftInputMode="adjustResize|stateHidden",
bringing the keyboard up, hitting the Recents button,
then going back into the app.

By issuing a requestLayout when the base inner insets
change, we ensure that the inner layout is properly
updated, avoiding an empty space where they keyboard
used to be.

Test: Run app from b/37743589#comment6

BUG: 37743589
Change-Id: I7615c51b8f4eee3971b9b95e638011c1d885b3a6
2017-05-24 10:23:17 -07:00
TreeHugger Robot
7c4998e614 Merge "Fix FloatingToolbar refresh on menu changes." into oc-dev 2017-05-23 16:01:37 +00:00
TreeHugger Robot
76ec0575bc Merge "Ensure FloatingActionMode has a non-null FloatingToolbar." into oc-dev 2017-05-23 15:57:49 +00:00
TreeHugger Robot
540cb28c5a Merge "Revert "Changed alert window notifications to use single channel"" into oc-dev 2017-05-23 03:32:43 +00:00
Wale Ogunwale
af38fd7b0f Revert "Changed alert window notifications to use single channel"
This reverts commit 8f7bebca36.

We now want multiple channels so the user can disable which ever ones they like.

Change-Id: I6015cd5f1e3f37a8a01e1db42b57a94087780304
Fixes: 38428796
Bug: 37422870
2017-05-23 01:43:59 +00:00
Sudheer Shanka
fdeb6b8ed3 Merge "Read cpu freq data only when needed." into oc-dev 2017-05-22 23:52:02 +00:00
Abodunrinwa Toki
46850fcaea Fix FloatingToolbar refresh on menu changes.
Also includes some minor code clean ups.

Fixes: 38465735
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
bit CtsWidgetTestCases:android.widget.cts.TextViewTest

Change-Id: Ie87cc256b77b3ec5732f49c000ce4845130fc91c
2017-05-22 23:56:03 +01:00
Abodunrinwa Toki
17293cc8a2 Ensure FloatingActionMode has a non-null FloatingToolbar.
Test: none
Bug: 38472422
Change-Id: I8b1844e0cbbff6dedeb0a89536a4bc27535b56df
2017-05-22 14:16:04 +01:00
Sudheer Shanka
671985f483 Read cpu freq data only when needed.
Bug: 34133340
Test: cts-tradefed run singleCommand cts-dev -m ctsIncidentHostTestCases -t \
      com.android.server.cts.BatteryStatsValidationTest

Change-Id: Ib235e166820b95b5cd0a496b6146ea353abdf844
2017-05-19 17:09:48 -07:00
Adam Bookatz
1effe000b8 Merge "Cumulative wakelock time per uid" into oc-dev 2017-05-19 18:24:44 +00:00
Jorim Jaggi
906fe92759 Merge "Fix underdraw during resizing" into oc-dev 2017-05-19 15:42:51 +00:00
Jorim Jaggi
853d17d838 Fix underdraw during resizing
Since we hide the navigation bar background during resizing, we
need to fill it with the fallback background.

This was always an issue but somehow in OC we are displaying
garbage instead of black.

Test: Open Contacts/Dialer, resize, make sure no underdraw is
happening. Also test a couple of other apps.
Fixes: 36206155

Change-Id: I6b02060ef4acf36c2529d49063a61034f9261696
2017-05-19 14:53:55 +02:00
Sudheer Shanka
aff7c3c71e Merge "More unit tests for classes needed in reading uid times per cpu freq." into oc-dev 2017-05-18 17:42:17 +00:00
Selim Cinek
63e8bfe1c5 Merge changes I858017b8,Ife32b600 into oc-dev
* changes:
  Improved the media color extraction algorithm
  Fixed broken coretests
2017-05-17 15:59:07 +00:00
Bookatz
c8c44960c0 Cumulative wakelock time per uid
Currently, the time for each partial wakelock was tracked. If one
wants the total time that a uid held partial wakelocks (over all of its
wakelocks), they could sum over all the uid's partial wakelock
totalTimes, but this would underestimate the value because totalTimes
are pooled amongst all uids. Alternatively, they could sum over all the
uid's partial wakelock totalDurations, but this would overestimate the
value because totalDurations are not pooled within the uid (so there
will be double-counting if two wakelocks are held simultaneously). This
cl adds a new timer that specifically tracks the actual total time that
the uid spent holding wakelocks, and also provides the ability to see
how much time the uid was in the background when doing so.

Bug: 38198272
Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java

Change-Id: I20ea3546338c44ffdf06859bc840d9059fb18321
2017-05-16 14:01:28 -07:00
Sudheer Shanka
59f5c00b41 More unit tests for classes needed in reading uid times per cpu freq.
Bug: 34133340
Test: runtest -c com.android.internal.os.LongSamplingCounterArrayTest frameworks-core
      runtest -c com.android.internal.os.KernelUidCpuFreqTimeReaderTest frameworks-core
Change-Id: I4c64efd9b3d91a72c585b9e4b0e6b277297005a4
2017-05-15 19:07:37 -07:00
TreeHugger Robot
648e127fcb Merge "Changed alert window notifications to use single channel" into oc-dev 2017-05-15 22:25:43 +00:00
Wale Ogunwale
8f7bebca36 Changed alert window notifications to use single channel
Per UX request.

Change-Id: Iefe1be52743519af5ee1481b59613c87f16bdf7d
Fixes: 37422870
Test: Verify alert window notification channel.
2017-05-15 13:08:23 -07:00
Selim Cinek
6ce7cf7cda Fixed broken coretests
The MessagingLinearLayout and the ImageFloatingTextView tests were
broken.

Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/widget/MessagingLinearLayoutTest.java
Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/widget/ImageFloatingTextViewTest.java
Change-Id: Ife32b600e2082400a8ee2f86310a51fd88c1b80c
Fixes: 38182087
2017-05-15 12:05:56 -07:00
Amith Yamasani
ba4ac09d23 Merge "Map isolated processes to correct uid" into oc-dev 2017-05-15 17:36:36 +00:00
Sumir Kataria
260d6c6e8c Merge "Use placeholderCount-1 if using default layout." into oc-dev 2017-05-15 16:35:32 +00:00
Peeyush Agarwal
101ab58e26 Fix broken MenuItem coretests
- Fix MenuItemImpl setShortcut bug caused when method signature was
changed after API review
- Remove outdated MenuItem coretests and move others to CTS

Bug: 38114634
Test: Run `cts-tradefed run cts-dev -m CtsViewTestCases -t
android.view.cts.MenuTest`

Change-Id: Iebb7e314cbb3f812fcfeb3f95797f1cf1bcfbae2
(cherry picked from commit d70d2e6efc)
2017-05-15 13:56:59 +00:00
Amith Yamasani
8ee74aa3ba Map isolated processes to correct uid
This was missed in a recent addition to track cpu times at freq.

Bug: 34133340
Test: manual
Change-Id: Ie3720a76a1201c787601bb7419cb9eba47b2aa27
2017-05-12 17:30:12 -07:00
Selim Cinek
0ac4b7d108 Merge "Fixed an issue where the media notification wouldn't have contrast" into oc-dev 2017-05-12 23:42:49 +00:00
TreeHugger Robot
80fc1af120 Merge "Batterystats BLE results counter takes in count" into oc-dev 2017-05-12 21:57:18 +00:00
Sudheer Shanka
5df9c5570e Merge "Add time spent by uid per cpu frequency to batterystats." into oc-dev 2017-05-12 18:02:43 +00:00
Selim Cinek
389edcd7c5 Fixed an issue where the media notification wouldn't have contrast
Because we were relying on the output to go in the right direction
already, this could be wrong. We're now only following the given
lightness direction if it is even possible to satisfy contrast.

Test: runtest -x core/tests/coretests/src/android/app/NotificationTest.java
Change-Id: I06d934a6b5c328ebbf0cf707030b0d707ccb5ab4
Fixes: 38182819
2017-05-12 10:06:41 -07:00
Bookatz
4ebc064c30 Batterystats BLE results counter takes in count
There would likely be too many BLE scan result calls for batterystats to
be healthy. Therefore, the caller can supply a count by which to increase the
counter, instead of doing it one result at a time.

Bug: 37720787
Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Change-Id: Ib8b2e8d250036be24c6c3dac477bc8d34fe498a6
2017-05-12 09:00:20 -07:00
TreeHugger Robot
fa0b28220b Merge changes from topic 'onarevert' into oc-dev
* changes:
  Create a NotificationChannel for ONA.
  Revert "Delete old WifiNotificationController strings."
2017-05-12 04:40:26 +00:00
Sudheer Shanka
9b735c5c1a Add time spent by uid per cpu frequency to batterystats.
Currently we have total user and system cpu time spent by the uid
in the batterystats. This change will add times spent by the uid
at each different cpu frequency to the batterystats dump which will
help in better understanding the battery usage.

Bug: 34133340
Test: manual
Change-Id: I567dc75875eb58543c0e71572d0b440e87dbb4b9
2017-05-11 20:56:46 -07:00
TreeHugger Robot
120d7b219d Merge "BatteryStats: Stop reading kernel memory stats when unvailable" into oc-dev 2017-05-12 00:20:47 +00:00
TreeHugger Robot
89d64cbbd9 Merge "Make batterystats less chatty" into oc-dev 2017-05-12 00:15:56 +00:00
Sumir Kataria
db688af9d9 Use placeholderCount-1 if using default layout.
Bug: 37092598
Test: Updated ResolverActivityTest, Manual testing

Change-Id: I57ddd48c24830ac9a31a87013ca1d9b2e5714631
2017-05-11 13:07:46 -07:00
Adam Lesinski
61d2d37233 BatteryStats: Stop reading kernel memory stats when unvailable
Bug: 37689111
Test: manual
Change-Id: Ib14e4db14870a47da4f4d72bee613486fb976b78
2017-05-11 13:05:46 -07:00
Makoto Onuki
3f8e29715c Make batterystats less chatty
Fix 36869686
Test: manual

Change-Id: Ia5092222acd508e5539cd64ffe015a18036c9d83
2017-05-11 10:52:37 -07:00