Commit Graph

4529 Commits

Author SHA1 Message Date
Jeff Sharkey
b2a9f55488 Merge "Remove a bunch of deprecated @SystemApi." into oc-mr1-dev
am: c2e09129e0

Change-Id: I26089a2aef16845f2e2935e95810457e287bd0e1
2017-08-12 03:25:49 +00:00
Jeff Sharkey
8478911f5e Remove a bunch of deprecated @SystemApi.
Verified that nobody should be using these APIs, and they've been
deprecated long enough that we can remove them.

Bug: 62341924, 62263907, 62264550
Test: make -j32 update-api && make
Change-Id: I9a2333ca13e4984b71374aa7ffed081e5106c67e
2017-08-11 14:45:47 -06: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
Sudheer Shanka
d732136ed1 Merge "Update ConnOnActivityStartTest to be hermetic." into oc-mr1-dev
am: 06668b5f73

Change-Id: I34efad16363ca2b21374967bfabfc8fa2f36ee94
2017-08-10 23:06:43 +00:00
Sudheer Shanka
06668b5f73 Merge "Update ConnOnActivityStartTest to be hermetic." into oc-mr1-dev 2017-08-10 22:52:40 +00: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
John Reck
20933d0454 Merge "SharedMemory API changes" into oc-mr1-dev
am: edf3384307

Change-Id: Ib5f641f37e73fc6b236fe90c229bb3855025375c
2017-08-10 19:53:25 +00:00
TreeHugger Robot
edf3384307 Merge "SharedMemory API changes" into oc-mr1-dev 2017-08-10 19:41:53 +00:00
Evan Rosky
becff025d7 Merge "Added focus behavior changes to Build.VERSION documentation." into oc-mr1-dev
am: 003bd7e3ec

Change-Id: I8f7bc93c2eaab34ec2a84b4b1dde71ffb7ef5575
2017-08-10 19:33:19 +00:00
Evan Rosky
003bd7e3ec Merge "Added focus behavior changes to Build.VERSION documentation." into oc-mr1-dev 2017-08-10 19:21:29 +00:00
Christine Franks
8d34391599 Merge "Allow SMS and calling for demo users" into oc-dr1-dev am: 4387d3a523
am: 966f37ae23

Change-Id: Ia968a0cb57ffd0898d5b048a850ab1f3c469b35d
2017-08-09 20:23:10 +00:00
Christine Franks
966f37ae23 Merge "Allow SMS and calling for demo users" into oc-dr1-dev
am: 4387d3a523

Change-Id: I163963c15c009eaf70907203cf941e182409eafc
2017-08-09 20:15:33 +00:00
Christine Franks
97a5480a1d Allow SMS and calling for demo users
Bug: 62712426
Test: manual - restrictions are unset in demo mode
Change-Id: I151fbfb8222e768403a7e5ba1fcf868ba35a1f22
2017-08-09 10:24:38 -07:00
Sudheer Shanka
b8f2316fb4 Update ConnOnActivityStartTest to be hermetic.
Bug: 38432755
Test: runtest -x services/tests/servicestests/src/com/android/server/net/ConnOnActivityStartTest.java
Change-Id: Ie847ec0a202021a2b2cf16bb2d720650c9ee847d
2017-08-08 22:34:46 -07:00
Todd Poynor
589ce7dfc5 Merge "thermalservice: Add ThermalService java interfaces" into oc-mr1-dev
am: 590f519f24

Change-Id: I1397add21609288770d46f21d8a23cf55e6e9a75
2017-08-08 01:23:35 +00:00
TreeHugger Robot
590f519f24 Merge "thermalservice: Add ThermalService java interfaces" into oc-mr1-dev 2017-08-08 01:15:41 +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
Todd Poynor
875e5c7451 thermalservice: Add ThermalService java interfaces
Binder service ThermalService broadcasts thermal events to registered
listeners.

Test: manual: marlin with modified thermal-engine.conf and temporary
      java thermal event listener
Bug: 30982366
Change-Id: I11f7fd18feff3b9af0eecc3fd3a13d54c0b97ff0
(cherry picked from commit dd05582eab)
2017-08-07 23:08:36 +00:00
John Reck
e4f60cce85 SharedMemory API changes
Hides getFd & getFileDescriptor due to lifecycle concenrs.
Adds ASharedMemory_dupFromJava to allow sharing a shared
memory region between Java & Native as safe as possible.
Mis-use results in an FD leak instead of double-close.

Bug: 64394076
Test: SharedMemory CTS tests
Change-Id: I01a5eb978fc4e99559a79baac75754c32f13bdc4
2017-08-07 15:36:10 -07:00
Yi Jin
311cc0b99d Merge "Only replace new line characters if the wakelock name contains one The original operation creates new string everytime which is expensive" into oc-mr1-dev
am: 8ce50255c5

Change-Id: I0ece40e7e6fb98d3c029bd26d6b35fbcb1ee66c0
2017-08-07 21:26:37 +00:00
Makoto Onuki
a0518fb7ac Merge "Reduce duplicate strings due to the package cache." into oc-mr1-dev
am: ce3e863f31

Change-Id: I67798ee72499d25bed4fc902baf7e92909dffdca
2017-08-07 21:24:33 +00:00
TreeHugger Robot
8ce50255c5 Merge "Only replace new line characters if the wakelock name contains one The original operation creates new string everytime which is expensive" into oc-mr1-dev 2017-08-07 21:10:49 +00:00
TreeHugger Robot
ce3e863f31 Merge "Reduce duplicate strings due to the package cache." into oc-mr1-dev 2017-08-07 21:05:42 +00:00
Jeff Sharkey
1ad38fe278 Merge "Fix broken javadocs." into oc-mr1-dev
am: b79eb54d36

Change-Id: I283e3914833b01969308afbd2fad1889e0497338
2017-08-06 16:45:10 +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
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
Makoto Onuki
4501c61d65 Reduce duplicate strings due to the package cache.
Change from the previous attempt:
- Fixed the helper class.  The original version had a few bugs.
- Bundle.readFromParcel() now handles a Parcel with a read-write helper
properly.

** Comparison **
The following charts are the actual measurement with and without the fix,
using "dumpsys system".
- The red bar is "total private dirty".
- The X axsis is time since boot.

Without fix:
- #1 First boot:
-- https://docs.google.com/spreadsheets/d/1CbmU8cQQQw7n7tyqbZi3beRHNuzqcmJgdvzDpi40Q1I/edit#gid=1971317391
-- Private dirty stabilizes at ~16.8M.
-- Loading system packages took 1.8 seconds.

- #2 Second boot:
-- https://docs.google.com/spreadsheets/d/1CbmU8cQQQw7n7tyqbZi3beRHNuzqcmJgdvzDpi40Q1I/edit#gid=982210726
-- Private dirty stabilizes at ~17.5M.
-- Loading system packages took 0.5 seconds.

With fix:
- #3 First boot:
-- https://docs.google.com/spreadsheets/d/1R6lL0AnAp93HnrqWujJFNgOjj6wvGicgDlbDAevbc3g/edit#gid=791764875
-- Private dirty stabilizes at around the same level as #1.
-- Loading system packages took 1.9 seconds.

- #4 Second boot:
-- https://docs.google.com/spreadsheets/d/1CbmU8cQQQw7n7tyqbZi3beRHNuzqcmJgdvzDpi40Q1I/edit#gid=1820894299
-- Private dirty stabilizes at around the same level as #1.
-- Loading system packages took 0.7 seconds.

Package manager start up time with and without the fix:
- (Ignored ones that are too fast; probably the thermal throttling didn't kick in.)
- https://docs.google.com/spreadsheets/d/1CbmU8cQQQw7n7tyqbZi3beRHNuzqcmJgdvzDpi40Q1I/edit#gid=499396796
- Before: 3.5 seconds (average of 5 reboots)
- After: 3.6 seconds (average of 5 reboots)

Package scan speed comparison:
- With the fix, first boot.
08-03 08:49:56.851  1000   779   779 I PackageManager: Finished scanning system apps. Time: 2133 ms, packageCount: 143 , timePerPackage: 14 , cached: 0
08-03 08:49:56.971  1000   779   779 I PackageManager: Finished scanning non-system apps. Time: 121 ms, packageCount: 11 , timePerPackage: 11 , cached: 0

- With the fix, second boot.
08-03 08:53:29.387  1000   779   779 I PackageManager: Finished scanning system apps. Time: 484 ms, packageCount: 143 , timePerPackage: 3 , cached: 143
08-03 08:53:29.424  1000   779   779 I PackageManager: Finished scanning non-system apps. Time: 37 ms, packageCount: 11 , timePerPackage: 3 , cached: 11

** Conclusion **
- This CL wil slightly slow down the boot time (0.2 seconds on a thermal-throttled bullhead), but
the system server's ram consumption will go down to the no-cache level.

- Using the package cache is still faster than not using it.

Test: build, boot, reboot, adb-install, reboot
Test: bit FrameworksCoreTests:android.content.pm.PackageParserTest
Test: bit FrameworksServicesTests:com.android.server.pm.PackageParserTest
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsOsTestCases -t android.os.cts.BundleTest

Bug: 64112468
Change-Id: I30691a032cb1dd1c7f6c1966a096c2f0d07a09cb
2017-08-04 14:19:32 -07:00
Yi Jin
0248336d4c Only replace new line characters if the wakelock name contains one
The original operation creates new string everytime which is expensive

Bug: 64272195
Test: NA
Change-Id: Id93d588a7d5a6b6c192a057fcd4296bd1c508516
(cherry picked from commit 8529150860)
2017-08-04 20:52:53 +00:00
Yi Jin
a92f00b750 Merge "There must not have newline character in wakelock name" into oc-mr1-dev
am: 10841a9670

Change-Id: I832c6e037d74d44de610facc58ed4e0deda6c667
2017-08-04 02:27:58 +00:00
Yi Jin
1533ffdc3e There must not have newline character in wakelock name
Bug: 64272195
Test: N/A
Change-Id: I07a7d9b9dfbf69acba0123bf4ec6e309c2a5a359
(cherry picked from commit dd214c2d36)
2017-08-03 22:56:15 +00:00
John Reck
639afe25f3 Merge "Address API review comments" into oc-mr1-dev
am: dd5afab0d4

Change-Id: Ia6f1c19275c2a06d35a344bb2e14c376c9794088
2017-08-03 02:18:54 +00:00
TreeHugger Robot
dd5afab0d4 Merge "Address API review comments" into oc-mr1-dev 2017-08-03 02:10:16 +00:00
Dianne Hackborn
5a0d703564 Merge "Improve docs about exceptions through Binder." into oc-mr1-dev
am: 6e3af279ab

Change-Id: Ia69e8ed7db5210284fbfea95be2a2b0a7c6e3052
2017-08-02 17:59:17 +00:00
Sundong Ahn
014ca608c7 Merge "Merge "Add hwbinder library" am: 49e2a9a612 am: 811027ede7 am: 2785be7572" into oc-dr1-dev-plus-aosp
am: a4fb234a4c

Change-Id: I026ca8c33ef2fce7d40e2daec8db970d6b578f25
2017-08-02 17:27:38 +00:00
John Reck
f995f9a87a Address API review comments
Also make it less error-prone to use unmap() incorrectly.
Bug: 64264008
Test: CTS tests pass

Change-Id: I21559676e7a850b76db4b61a31e43833396c6087
2017-08-02 10:24:18 -07:00
Sundong Ahn
30538850f2 Merge "Add hwbinder library" am: 49e2a9a612 am: 811027ede7
am: 2785be7572

Change-Id: Ia545b163166465cafa3d4ecbb0a5d0d911224b22
2017-08-02 17:14:55 +00:00
Sundong Ahn
2785be7572 Merge "Add hwbinder library" am: 49e2a9a612
am: 811027ede7

Change-Id: Idec0d080a65d96ff866969f47e9902e40e800fdf
2017-08-02 17:05:56 +00:00
Sundong Ahn
811027ede7 Merge "Add hwbinder library"
am: 49e2a9a612

Change-Id: I3c7528dcf98bf3b92843594172531fd30a5f29d4
2017-08-02 16:57:50 +00:00
Dianne Hackborn
18482aef9e Improve docs about exceptions through Binder.
Test: built

Change-Id: I5b6af61daa373c92f7d7b3b341a20fbd9e691da9
2017-08-01 17:46:23 -07:00
Dianne Hackborn
47e6cc34bb Merge "Fix issue #64224738: Document return value of IBinder.transact()" into oc-mr1-dev 2017-08-01 20:01:32 +00:00
Makoto Onuki
f6764fb7f7 Merge "Revert "Reduce duplicate strings due to the package cache."" into oc-mr1-dev 2017-08-01 16:11:27 +00:00
Sundong Ahn
28cc6e88fd Add hwbinder library
HAL impls will depend hwbinder.jar instead of framework.jar on
build-time, but on runtime framework.jar will be used.

This is to cut the circular dependency when using configstore from
Android framework. Also added JNI call to HwBinder.java to cut
configstore's dependency on systemproperty in framework.jar.

Note that hwbinder.jar is LOCAL_UNINSTALLABLE_MODULE and so it won't be
installed in an actual image.

Bug: 35771640
Test: build & run
Change-Id: I2420298cf9df5d6bbcead3e4451b703ce9bc3e29
2017-08-01 11:26:18 +09:00
TreeHugger Robot
0b8f281637 Merge "Add documentation on oneway transaction ordering." into oc-mr1-dev 2017-08-01 02:21:21 +00:00
Makoto Onuki
63e624a61e Revert "Reduce duplicate strings due to the package cache."
The pool is just broken.... I need to fix it and re-evaluate.

This reverts commit e86a29c6e6.

Change-Id: I296df71e76ffff1d1d0fc8a50e3493e20c124a7b
2017-08-01 00:42:33 +00:00
Dianne Hackborn
4cd650c008 Fix issue #64224738: Document return value of IBinder.transact()
Also add appropriate @NonNull and @Nullable annotations.

Test: built

Change-Id: I22de48105ef685baf594cfc004dd3e27e2ba09e9
2017-07-31 17:39:17 -07:00
Dianne Hackborn
6f12f2233e Add documentation on oneway transaction ordering.
Test: built
Change-Id: I4d2e336327a4ce9c8f76d49037c894e981bdf571
2017-07-31 17:02:51 -07:00