Commit Graph

8548 Commits

Author SHA1 Message Date
Lei Yu
240a70f1e5 Merge "Write currentDuration into Parcel" into oc-mr1-dev
am: bd6ff3d3e5

Change-Id: Ibaf3f44a9449a4f92abf3359fba8329f1cbca245
2017-08-14 22:38:04 +00:00
Lei Yu
bd6ff3d3e5 Merge "Write currentDuration into Parcel" into oc-mr1-dev 2017-08-14 22:28:26 +00:00
Fyodor Kupolov
34cac26ea4 Merge "Log timings for shutdown stages" into oc-mr1-dev
am: fe97799d5d

Change-Id: Iee66b180ecec69872ac2e96bb943e9d02afc33df
2017-08-14 21:10:59 +00:00
Fyodor Kupolov
6e3461b67c Log timings for shutdown stages
Renamed BootTimingsTraceLog to TimingsTraceLog. It is now used for
 boot and shutdown logging.

Added measurements for main stages of shutdown in the system server:
ShutdownTiming: SendShutdownBroadcast took to complete: 734ms
ShutdownTiming: ShutdownActivityManager took to complete: 203ms
ShutdownTiming: ShutdownPackageManager took to complete: 17ms
ShutdownTiming: ShutdownBt took to complete: 533ms
ShutdownTiming: ShutdownRadio took to complete: 534ms
ShutdownTiming: ShutdownNfc took to complete: 1536ms
ShutdownTiming: ShutdownRadios took to complete: 1538ms
ShutdownTiming: ShutdownStorageManager took to complete: 906ms
ShutdownTiming: SystemServerShutdown took to complete: 3918ms

Bug: 64569080
Test: shutdown/reboot and check logs
Change-Id: I636c045852cd1ed6be1c58af6608f70e95756389
2017-08-14 11:23:29 -07:00
Sudheer Shanka
76974ee41e Merge "DO NOT MERGE: Update BatteryStatsImpl to handle change in no. of freqs." into oc-mr1-dev
am: 3cb64c2c51

Change-Id: I80f8971b0f0f55ce91a0e1a3d574ae4a577f9257
2017-08-11 01:18:34 +00:00
Sudheer Shanka
3cb64c2c51 Merge "DO NOT MERGE: Update BatteryStatsImpl to handle change in no. of freqs." into oc-mr1-dev 2017-08-11 01:05:43 +00:00
jackqdyulei
610a0a09f2 Write currentDuration into Parcel
This cl writes currentDuration to Parcel, so in battery settings we could
use this data in anomaly detection.

Also note that in getTotalDurationMsLock(aka method1), the logic is:

result = mTotalDurationMs + getCurrentDurationMsLocked(aka method2)

Since now method2 is not zero, we also tweaked the value for
mTotalDurationMs to make method1 return the same value compared with
before.

Since getMaxDurationMsLocked depends on mNesting, which is always zero,
so we don't need to tweak value for mMaxDurationMs

All these methods are covered in BatteryStatsDurationTimerTest

Bug: 64255589
Test: runtest -x BatteryStatsTest
Change-Id: I9168be099d00bb68fedbc5bfbb7bf7f0d9aae85a
2017-08-10 16:44:30 -07:00
Sudheer Shanka
a87245d305 DO NOT MERGE: Update BatteryStatsImpl to handle change in no. of freqs.
Bug: 62240247
Test: cts-tradefed run singleCommand cts-dev -m CtsIncidentHostTestCases -t \
      com.android.server.cts.BatteryStatsValidationTest

Change-Id: I1328fe7bf29229e9563cde6eea80addf2b91ea5d
2017-08-10 15:36:47 -07:00
Narayan Kamath
9ed2834cba Merge "ClassLoaderFactory: Correct broken refactoring from change 19da1cf72e8." into oc-mr1-dev
am: 57ae4db225

Change-Id: I852a6b01c196240571aed51342fc5e2310c080d6
2017-08-10 15:41:36 +00:00
Narayan Kamath
57ae4db225 Merge "ClassLoaderFactory: Correct broken refactoring from change 19da1cf72e8." into oc-mr1-dev 2017-08-10 15:34:22 +00:00
Narayan Kamath
590b90f533 ClassLoaderFactory: Correct broken refactoring from change 19da1cf72e.
Bug: 64493351
Test: cts-tradefed run cts-dev -t android.appsecurity.cts.ClassloaderSplitsTest -m CtsAppSecurityHostTestCases
Change-Id: Ib4868c1e0320002f5122193621e9ab56fe34819f
2017-08-10 12:15:17 +01:00
Dianne Hackborn
a6a33976a3 Merge "Go: add features for low ram / normal ram devices." into oc-mr1-dev
am: c75f43c1ab

Change-Id: Icf9405de74c4d137b9c8cd0981846a08862ef231
2017-08-10 04:43:52 +00:00
TreeHugger Robot
c75f43c1ab Merge "Go: add features for low ram / normal ram devices." into oc-mr1-dev 2017-08-10 04:35:09 +00:00
Makoto Onuki
bb4f580494 Merge "DropBoxManagerService: Don't store redundant information" into oc-mr1-dev
am: 75590ffa84

Change-Id: Id0037c455e0e37f7896d06aeedda9b7cdca35f63
2017-08-10 00:26:35 +00:00
Dianne Hackborn
2a103f126f Go: add features for low ram / normal ram devices.
Automatically populated from ActivityManager.isLowRamDevice().

Test: manual

Change-Id: I027b8ae0205c9793a91ffdd2635479610a62aff9
2017-08-09 17:14:00 -07:00
Makoto Onuki
ff94e0351a DropBoxManagerService: Don't store redundant information
Filenames can be calculated from other fields, so there's no need to
store them.

This will reduce the average EntryFile size from 160b to 28b, so in theory
it could save 132 KB for 1000 entries.

- Also switched from HashMap to ArrayMap, which should help a bit too.

- Also fixed unit tests and added more.

Bug: 20890386
Test: bit FrameworksServicesTests:com.android.server.DropBoxTest
Test: Boot, check the dropbox directory, run dumpsys dropbox, reboot and repeat.

Change-Id: If567750f478318acd621864d1d4ef2ed41f214bd
2017-08-09 12:07:40 -07:00
Christofer Åkersten
3d210b8776 Merge "Inherit theme dark/light scheme for MediaRouter dialogs/button" into oc-mr1-dev
am: 8466b0179e

Change-Id: I20d05a76666eeb9e8a720f41f71da120feb6fb46
2017-08-09 17:05:28 +00:00
Christofer Åkersten
8466b0179e Merge "Inherit theme dark/light scheme for MediaRouter dialogs/button" into oc-mr1-dev 2017-08-09 16:45:51 +00:00
Andrew Sapperstein
3c813a7e72 Merge "Make accessibilityInversionEnabled public" into oc-dr1-dev am: 3108a06656
am: 264fd594ca

Change-Id: I8fd65434b9b5118f6060e7e12029fe3eaae370f2
2017-08-09 13:26:20 +00:00
Andrew Sapperstein
264fd594ca Merge "Make accessibilityInversionEnabled public" into oc-dr1-dev
am: 3108a06656

Change-Id: Ic37ee35914b714144228b77b192edf835bf9627e
2017-08-09 13:06:21 +00:00
Jason Monk
9c6fb7d931 Merge "resolve merge conflicts of de0c539dd4 to oc-mr1-dev" into oc-mr1-dev
am: 45144930b2

Change-Id: Idb6ca3b703653a3f7d6e07b54789cb67a3ab910a
2017-08-09 12:29:41 +00:00
Jason Monk
45144930b2 Merge "resolve merge conflicts of de0c539dd4 to oc-mr1-dev" into oc-mr1-dev 2017-08-09 12:15:19 +00:00
Adrian Roos
826ec83acb Merge "FRP: Fix crash after lockout" into oc-mr1-dev
am: c2ca590e8e

Change-Id: I9191e85e58094d0326bf3b36c290e8b92e23dbd2
2017-08-09 10:05:49 +00:00
Adrian Roos
c2ca590e8e Merge "FRP: Fix crash after lockout" into oc-mr1-dev 2017-08-09 09:54:22 +00:00
Christofer Åkersten
d51640ba50 Inherit theme dark/light scheme for MediaRouter dialogs/button
Bug: 64291950
Test: manual
Change-Id: I20694ce512a794a3c6574108b80dcfb4979b3b39
2017-08-09 15:48:16 +09:00
Sudheer Shanka
9107e37ca7 Merge "Change logging format in KernelUidCpuFreqTimeReader." into oc-mr1-dev
am: bd9884a331

Change-Id: I0ce73c459ff188dd3ace6480fa02d2e6aaab85f2
2017-08-09 05:51:02 +00:00
Sudheer Shanka
bd9884a331 Merge "Change logging format in KernelUidCpuFreqTimeReader." into oc-mr1-dev 2017-08-09 05:38:18 +00:00
Sudheer Shanka
40c43f1b09 Change logging format in KernelUidCpuFreqTimeReader.
TimeUtils.formatForLogging takes currentTimeMillis as
argument, not elapsedRealTime.

Bug: 63041570
Test: visual inspection of logs
Change-Id: I4b880f64a8ead9a6a4a37fa4b9691edfc38a12db
2017-08-08 15:54:44 -07:00
Andrew Sapperstein
5a71a0f520 Make accessibilityInversionEnabled public
Need to use it in Settings.

Bug: 64256644
Test: existing
Change-Id: I9f9d2655e35ee2ad0dc9f9980cc9993f7b084025
2017-08-08 13:57:49 -07:00
Jason Monk
0b99402f87 resolve merge conflicts of de0c539dd4 to oc-mr1-dev
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I3f5eb2a0481fb09b98c0c522c82c233350c06375
2017-08-08 16:27:14 -04:00
Jason Monk
b4302182bc Move shutdown UI to sysui (when possible)
Test: click restart or power off in global actions
Change-Id: I0dc30a9772bbfb3cd3c3568f157e854fef87bf87
Fixes: 63576195
Fixes: 64125291
2017-08-08 09:13:51 -04:00
Adrian Roos
eb83d9c0cc Merge "FRP: Enable credential-based factory reset protection by default" into oc-mr1-dev
am: 956491b867

Change-Id: Ib8dd7a7a1805f9a2b00525ae9bd6ebcbc572f2fa
2017-08-08 12:02:27 +00:00
TreeHugger Robot
956491b867 Merge "FRP: Enable credential-based factory reset protection by default" into oc-mr1-dev 2017-08-08 11:53:46 +00:00
Adrian Roos
b7d81d9a20 FRP: Fix crash after lockout
Change-Id: Ie8cd85c6afd61a03dfe730432702c11c29c11cce
Fixes: 37746493
Test: Trigger FRP, enter wrong credential 10 times, verify no crash.
2017-08-08 13:08:01 +02:00
Bookatz
8344812329 Merge "Bump parcel version to reset batterystats" into oc-mr1-dev
am: 26e02181a0

Change-Id: I5bbd8149000295ffdbad32a8e1877669e7642005
2017-08-08 06:11:30 +00:00
TreeHugger Robot
26e02181a0 Merge "Bump parcel version to reset batterystats" into oc-mr1-dev 2017-08-08 06:03:18 +00:00
Sudheer Shanka
b60349a5e1 Merge "Track per-cluster times of each uid in microsec." into oc-mr1-dev
am: e913d8235c

Change-Id: I7915fe5d7df2b2ac49f2b97afba486782a1c8208
2017-08-07 23:43:22 +00:00
Adam Bookatz
e4fa69b956 Merge "Package wakeup alarms are now on screen-off timebase" into oc-mr1-dev
am: 0a1ae1bc56

Change-Id: Ie4b8379cd5bc6622ecc07868cdcf4eac0af1cf61
2017-08-07 23:33:44 +00:00
Sudheer Shanka
e913d8235c Merge "Track per-cluster times of each uid in microsec." into oc-mr1-dev 2017-08-07 23:32:50 +00:00
Adam Bookatz
0a1ae1bc56 Merge "Package wakeup alarms are now on screen-off timebase" into oc-mr1-dev 2017-08-07 23:22:31 +00:00
Colin Cross
205ba7160b Merge "Use class retention for VisibleForTesting annotations" am: 5724841581 am: 94d5456d0e am: a5538805d9
am: 2130e26bca

Change-Id: I3c4199fa186374bc8adc2d3068bba102c6da4df8
2017-08-07 20:15:17 +00:00
Colin Cross
2130e26bca Merge "Use class retention for VisibleForTesting annotations" am: 5724841581 am: 94d5456d0e
am: a5538805d9

Change-Id: I83547deec96de1a26318c30d9ed01865d1be4254
2017-08-07 19:56:23 +00:00
Colin Cross
a5538805d9 Merge "Use class retention for VisibleForTesting annotations" am: 5724841581
am: 94d5456d0e

Change-Id: I3309ee0b936eb9d36a453beb084be31e046c1bf5
2017-08-07 19:44:57 +00:00
Colin Cross
94d5456d0e Merge "Use class retention for VisibleForTesting annotations"
am: 5724841581

Change-Id: Iaa9262ad627b49d58b46760d7aecd3a985c3a79a
2017-08-07 19:32:21 +00:00
Colin Cross
5be3cbad27 Use class retention for VisibleForTesting annotations
The VisibleForTesting annotations are used by proguard to prevent
stripping code that is needed at runtime for tests.  The annotations
were marked with source retention, which worked fine with Jack's
proguard implementation.  When we switched back to javac + proguard,
the VisibleForTesting annotations are gone by the time proguard
sees the classes, so the annotated classes and methods can still
be stripped.

Move the VisibleForTesting annotation to class retention, which
matches guava's equivalent annotation.

Bug: 64365384
Test: m -j MtpDocumentsProvider &&
      javap -cp out/target/common/obj/APPS/MtpDocumentsProvider_intermediates/classes-proguard.jar com.android.mtp.MtpRoot

Change-Id: I63a467c2f0a21383eb9e4c9563fd6de2d994a373
Merged-In: I63a467c2f0a21383eb9e4c9563fd6de2d994a373
(cherry picked from commit 8e846143dd)
2017-08-07 11:07:15 -07:00
Adrian Roos
8370e472cd FRP: Enable credential-based factory reset protection by default
Bug: 64436700
Change-Id: I3aed6313e3b6b7e6d6e65c9e822ff123b8cd52cd
Test: Set up PIN, add Google Account, adb shell reboot-bootloader; fastboot -w; verify credential-based unlocking is possible using the PIN from before factory reset
2017-08-07 16:16:00 +00:00
Jeff Sharkey
67f9d5070a Fix broken javadocs.
Bug: 64337634
Test: make -j32 doc-comment-check-docs
Change-Id: I20fdd3dcddef09111d35946c41c596c7689effa6
2017-08-06 07:37:08 -06:00
Bookatz
38d5d59a75 Bump parcel version to reset batterystats
Due to new changes in batterystats definitions (especially for wakeup
alarms), we should force batterystats to reset its data for all devices
with these changes. This can be done by increasing the parcel version
number. This is being done in a separate submission to avoid merge
conflicts.

Test: none
Bug: 64149996
Change-Id: I59cf2064e38694d485b18a2bf20ceaa65f6458c4
2017-08-04 15:24:51 -07:00
Bookatz
98d4d5cf3f Package wakeup alarms are now on screen-off timebase
Previously, wakeup alarms (for an app) were using the battery-on
timebase. Now they will instead use the battery-on-screen-off timebase.
In this way, apps won't be penalized for wakeups that occurred when
the device was being actively used anyway.

Also bumps up report version to 25.
Also bumps up parcel version.

Change-Id: I1b692a9137ff28d535e7a06b539f713b54a85ea9
Fixes: 64149996
Test: manually verified count doesn't increase when screen-on
2017-08-04 15:23:51 -07:00
Amith Yamasani
26f8f5c868 Merge "Ignore isolated uid's process state in BatteryStats tracking" into oc-dr1-dev
am: 5a800cf069

Change-Id: I4b2e2dc81baea8078b0bca1db357e234bda27bf7
2017-08-03 23:18:32 +00:00