Commit Graph

3979 Commits

Author SHA1 Message Date
Santos Cordon
9c2886ba5d Merge "Map STATE_VR to STATE_ON for Battery Stats." 2017-03-08 18:40:27 +00:00
TreeHugger Robot
cf8a98af48 Merge "Grumble, nobody likes kibibytes." 2017-03-08 18:16:42 +00:00
Jeff Sharkey
09734df8bc Grumble, nobody likes kibibytes.
All the cool kids are using storage in increments of 1000 instead
of 1024, so find a balance somewhere between the two.  We still round
to nice values like 32GB, 64GB, etc, but we represent them using
kilobytes under the hood.

Test: runtest -x frameworks/base/core/tests/coretests/src/android/os/FileUtilsTest.java
Bug: 28327846
Change-Id: I573aea43790816291e2b5c784b344b51b4444c06
2017-03-07 20:52:29 -07:00
Dianne Hackborn
3744d8ba14 Merge "Fix issue #35813125: API Review: android.os > Bundle" 2017-03-07 23:30:33 +00:00
Dianne Hackborn
11e8636889 Merge "Fix issue #35813031: API Review: RemoteCallbackList" 2017-03-07 23:30:04 +00:00
TreeHugger Robot
aae1cc597d Merge "Expose Instant App API defined in MR1" 2017-03-07 23:20:53 +00:00
Amith Yamasani
a94c4b5b2e Merge "Collect background network data stats in BatteryStats" 2017-03-07 22:40:49 +00:00
Todd Kennedy
9c9fdf27ff Expose Instant App API defined in MR1
These were created in MR1 but couldn't be submitted because
they were defined too late [after API freeze].

Change-Id: Ie6884236776bd26e9d0b557fd125b8c77b0ad93b
Fixes: 34890162
Fixes: 35193180
Fixes: 35193418
Test: manual
2017-03-07 11:40:59 -08:00
Calin Juravle
9108ae1a16 Merge "PackageManager: Clean up code related to foreign dex use" 2017-03-07 18:48:17 +00:00
Calin Juravle
74f0a3450c PackageManager: Clean up code related to foreign dex use
We simplified the way we track whether or not a dex file is used by
other apps. DexManager in the framework keeps track of the data and we
no longer need file markers on disk.

Test: device boots, foreign dex markers are not created anymore

Bug: 32871170
Change-Id: I3660e2f3913a73904181449c2d910af0a0477950
2017-03-06 17:59:12 -08:00
Santos Cordon
e94f05019c Map STATE_VR to STATE_ON for Battery Stats.
Also, sets STATE_VR to be a public API value for Android O release.

Test: Switch to VR mode, ensure "Unexpected screen state: 5" no
longer logs from BatteryStatsImpl
Bug: 35636815

Change-Id: I1f8be334967e1af1f92a3ed571c063e7b00106b1
2017-03-06 13:51:01 -08:00
Amith Yamasani
59fe841e60 Collect background network data stats in BatteryStats
Keep the original values the same, to avoid messing
up existing pipelines and stats, and keep additional
counters for background traffic stats for mobile and
wifi.

Bug: 35677165
Test: cts-tradefed run cts-dev -m CtsDumpsysHostTestCases
Change-Id: I5f5ac3d5b659fe3d0b13703e6666a8751c5d9469
2017-03-06 10:38:36 -08:00
Makoto Onuki
845dcf0471 Merge "Mention the relaxed security check on UM.isUserRunningOrStopping()." 2017-03-06 17:22:55 +00:00
Dianne Hackborn
2510b37518 Fix issue #35813125: API Review: android.os > Bundle
- Renamed deepcopy to deepCopy.
- Clarified docs about when a shallow vs. deep copy happens.

Test: booted and ran

Change-Id: I2b4400770d781ff51423cd1c860454742e1d3c9c
2017-03-03 17:02:29 -08:00
Dianne Hackborn
59359d06c4 Fix issue #35813031: API Review: RemoteCallbackList
Review comments addressed:

- Docs fixed.
- getRegisteredCallbackItem() added.

Test: booted system

Change-Id: Ib5228c566eedc5dcf72933bb375eba4257293cfc
2017-03-03 16:13:25 -08:00
Tobias Thierer
f063264d3a Merge "Move value for the Build.CUR_DEVELOPMENT constant into libcore" am: 3e6c189c68 am: 50351bd85c
am: e8903c666a

Change-Id: I45e9a8b2b084a892f754f27a044d70318eb99772
2017-03-03 12:19:35 +00:00
Tobias Thierer
50351bd85c Merge "Move value for the Build.CUR_DEVELOPMENT constant into libcore"
am: 3e6c189c68

Change-Id: I981b746a28cda09d7a75fa79faeacb2cc58b1fc4
2017-03-03 12:07:59 +00:00
Tobias Thierer
3e6c189c68 Merge "Move value for the Build.CUR_DEVELOPMENT constant into libcore" 2017-03-03 12:02:09 +00:00
Makoto Onuki
5eef50d86b Mention the relaxed security check on UM.isUserRunningOrStopping().
Bug: 35801468
Test: Javadoc only, make.
Change-Id: Iff44217b63e6ce8d354665719a84c37f8c2e569a
2017-03-02 16:38:45 -08:00
Elliott Hughes
6f00e6e977 Merge "Remove the name length limit for system properties."
am: c657b769ab

Change-Id: I700b379c0482d7d9609183a39a5c9664746ea5aa
2017-03-03 00:30:10 +00:00
Elliott Hughes
c657b769ab Merge "Remove the name length limit for system properties." 2017-03-03 00:22:31 +00:00
Elliott Hughes
33cc60ccc9 Remove the name length limit for system properties.
Bug: http://b/33926793
Test: builds
Change-Id: Ib89b66b7abebc9a28961a0c9032b99947e3db0d6
Merged-In: Ib89b66b7abebc9a28961a0c9032b99947e3db0d6
2017-03-02 14:17:03 -08:00
Elliott Hughes
cb0629eaa1 Merge "Remove the name length limit for system properties." 2017-03-02 22:15:21 +00:00
Shubham Ajmera
2fa62c5c64 Merge "Fix Javadoc for StrictMode#permitUnbufferdIo" am: b8648ae07a am: c847aae2cf
am: 6404cc18bf

Change-Id: I92ee23cc68a6a204f0cb936c6242475a49a27145
2017-03-02 17:41:36 +00:00
Shubham Ajmera
c847aae2cf Merge "Fix Javadoc for StrictMode#permitUnbufferdIo"
am: b8648ae07a

Change-Id: I86adc3e40c083c999b717384ae38e437a17a9557
2017-03-02 17:32:14 +00:00
Treehugger Robot
b8648ae07a Merge "Fix Javadoc for StrictMode#permitUnbufferdIo" 2017-03-02 17:23:45 +00:00
Elliott Hughes
c77001de51 Remove the name length limit for system properties.
Bug: http://b/33926793
Test: builds
Change-Id: Ib89b66b7abebc9a28961a0c9032b99947e3db0d6
2017-03-01 21:16:43 -08:00
Elliott Hughes
7f7ae3f990 Merge "Basic javadoc for android.os.UpdateEngine." am: cbafc8d682 am: 91c1048bc7
am: 99cca40d29

Change-Id: If2513d4265890afc5bf95bb416c701ef66b74ea8
2017-03-02 03:15:10 +00:00
Elliott Hughes
91c1048bc7 Merge "Basic javadoc for android.os.UpdateEngine."
am: cbafc8d682

Change-Id: I927f7e3014d7e27b4e003d2f4f4fdaa7ea0645c5
2017-03-02 03:01:34 +00:00
Garfield Tan
5d3b37b947 Remove DocumentsContract.ACTION_BROWSE.
Test: It builds.
Bug: 35760993
Change-Id: Icdd125d6e6329f703c4682b47b5b9fb80d7e1f27
2017-03-01 12:11:30 -08:00
Shubham Ajmera
ade21170a7 Fix Javadoc for StrictMode#permitUnbufferdIo
Bug: 35813076
Test: no tests
Change-Id: I2f71cad7a7a3f85908b322e2b83ba265c49adbad
2017-03-01 09:26:41 -08:00
Tobias Thierer
8bacd9bd02 Move value for the Build.CUR_DEVELOPMENT constant into libcore
This matches a corresponding libcore change. It is to allow
libcore to use this value as a default when no other value is
explicitly set, e.g. in the system server or during testing
with vogar.

Bug: 34072201
Test: Device boots with CLs from this CL's topic.
Change-Id: Id812339a343ecea84a08bfdf4b873f3b156a13d4
2017-03-01 12:44:01 +00:00
Elliott Hughes
e3ce3e8bab Basic javadoc for android.os.UpdateEngine.
Bug: N/A
Test: N/A
Change-Id: Icb870e7720e8b50082d353e7ea08007e1f4e2fdc
2017-02-28 15:19:32 -08:00
TreeHugger Robot
30a50a02f0 Merge "BatteryManager: rename BATTERY_PROPERTY_BATTERY_STATUS" 2017-02-28 22:33:47 +00:00
Jin Qian
2e88d4b6fe BatteryManager: rename BATTERY_PROPERTY_BATTERY_STATUS
To BATTERY_PROPERTY_STATUS

Test: build
Bug: 35813122
Change-Id: Ia8308def79b79706dbdc3e47f93afa56661a47aa
2017-02-28 10:58:36 -08:00
Dianne Hackborn
a06ec6a943 Add new job scheduler constraints for "battery not low".
Clean up the implementation of boolean constraints so that
they are in a single flags value that gets propagated all of
the way from JobInfo.Builder in to the JobStatus.  Much simpler
and easier to add new constraints!

Also introduce some shell commands to make it easier to write
tests against the job scheduler (and other things tied to power).
One of the big things here is that there is a new sequence number
that propagates with battery updates, which we can look for in
the job scheduler to determine when a change the test has made
to battery state has actually gotten applied, to allow it to
safely and minimally wait until executing the condition being
tested.

Test: New BatteryConstraintTest suite added.

Change-Id: I11076d90b80ec25ee604c29b6a6dc2337fd867ce
2017-02-27 10:54:06 -08:00
TreeHugger Robot
3471880ab0 Merge "Improve service docs around user unlocking." 2017-02-24 23:17:44 +00:00
Jeff Sharkey
bb4988ad7d Improve service docs around user unlocking.
Also delete some @removed methods that never shipped to reduce
confusion.

Test: builds, boots
Bug: 30434803
Change-Id: I18773182f62f0f62bd4e36c9c3098372483a374f
2017-02-24 09:02:53 -07:00
Netta P
958d0a5036 Protobufferize PowerManager dumpsys
Bug: 34230125
Test: cts-tradefed run cts-dev -m CtsIncidentHostTestCase -t com.android.server.cts.PowerIncidentTest
Change-Id: Ib71563cfc9ca95c297111430d8bbe2ce88d7a41d
2017-02-23 15:19:11 -08:00
Jeff Sharkey
373d01766f Add queryStatsForPackage() API.
This gives developers a way to collect package-level stats, even if
it means we have to use manual calculation for sharedUserId apps.

Also round size of storage devices to nice power-of-two values so we
do a better job of matching retail packaging.

Test: builds, boots
Bug: 35294241
Change-Id: I24946c443bb9dc4b0411a8149a0656702ac1fd24
2017-02-22 15:48:51 -07:00
Jeff Sharkey
458428ea66 Split cache clearing into two phases.
Use newly defined "V2_DEFY_QUOTA" flag to split cache clearing into
two phases: clearing data for apps above their quotas, and then
pushing deeper by clearing data for apps below their quotas.

Add placeholder comments for other data types that we're planning to
add shortly.  Route all clearing behavior through this new method,
which remains guarded behind a flag for now.

Test: builds, boots
Bug: 34692014
Change-Id: I678d7b4e2bf6c837dd8a9adbc36a53015907f75f
2017-02-22 11:47:17 -07:00
Jeff Sharkey
d5d5e926eb Clear cache space when allocating bytes.
Fleshes out remainder of allocation implementation, where we offer
to clear cached data to satisfy the allocation request.  To prevent
abuse, we never let apps allocate into either the minimum cache space
or low storage space.

Clean up quota APIs to require the caller to pass in the path they're
interested in, and we resolve the underlying filesystem for them.

Defines settings that can be used to tweak the minimum cache space.

Test: builds, boots
Bug: 34690590
Change-Id: I85bc07399f91ee4aa568a8a54c615646bf748ad4
2017-02-21 11:50:55 -07:00
Leonard Mosescu
de021d8162 Merge "Adding "attach-agent" to ActivityManagerShellCommand" am: 05dfd10254 am: db0803b4e8
am: 7bf598cbd9

Change-Id: If7b73860cc8249b997d5e9a7a4d149732b08449b
2017-02-16 23:37:48 +00:00
Leonard Mosescu
02758a9a80 Adding "attach-agent" to ActivityManagerShellCommand
This new command is used to attach runtime agents to a running application:

attach-agent <PROCESS> <FILE>
   Attach an agent to the specified <PROCESS>,
   which may be either a process name or a PID.

Test: m test-art-host, manual testing:
    . invalid syntax, missing arguments
    . invalid syntax, extra arguments
    . invalid numeric PID
    . invalid process name
    . valid process, not debuggable
    . valid process, missing agent
    . valid process, valid agent

Bug: 31682382

Change-Id: I61cc8bf20addb1702acc8e7aae65b2f9ed7c5ca0
Merged-In: Ife88dbf23991dde7945d9208e54cd014bb7ecdc6
2017-02-16 13:19:41 -08:00
Todd Kennedy
8094e09089 Revert "Revert "remove app-ephemeral""
This reverts commit c2f0d886f4.

Test: Manual
2017-02-15 14:43:17 -08:00
Guang Zhu
d80ba8abc8 Merge "Revert "remove app-ephemeral"" 2017-02-15 21:47:34 +00:00
Guang Zhu
c2f0d886f4 Revert "remove app-ephemeral"
Bug: 35390781

This reverts commit 4eb7cea562.

Change-Id: I94567d333b40f99f7a2573125259f4ab575a0519
2017-02-15 21:43:38 +00:00
Todd Kennedy
93a8e2c7d1 Merge "remove app-ephemeral" 2017-02-15 19:48:22 +00:00
Todd Kennedy
4eb7cea562 remove app-ephemeral
instant apps are no longer stored in a separate folder. they
are now stored along side other full apps in the apps directory.

Bug: 25119046
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Change-Id: I6669be797987169a0b9cca78f80539c908812f9e
2017-02-15 07:06:02 -08:00
Narayan Kamath
669afcc9d0 Zygote: Add support for explicit preloading of resources.
Add a --preload-default command that instructs the zygote to preload
resources. The command is a no-op if resources have already been
preloaded.

Test: manual.
Change-Id: I4a846a7d911fa929af472d9071ffbff6df424176
2017-02-15 10:25:48 +00:00