Commit Graph

2831 Commits

Author SHA1 Message Date
Amith Yamasani
8f18dd4dfa Merge "Don't store a static instance of UserManager" 2015-10-30 18:19:08 +00:00
Amith Yamasani
c0688301de Don't store a static instance of UserManager
Otherwise the context within it can't be GCed.
It's better to leave the caching to the ContextImpl.

Bug: 25308506
Change-Id: I9be3ba5b1bb6cdc88b77520b2fbd72d9b72ef30d
2015-10-30 10:40:03 -07:00
Dianne Hackborn
2e44107bf7 Implement shell commands for battery and activity services.
The battery service just implements the existing commands that
are available through dump.

The activity service implements the small set of commands that
are available through dump (not the rest of the dump commands),
and also introduces some of the simple "am" shell commands as
a proof-of-concept of moving those into the service implementation.

Change-Id: If5ff80930dde787703e2682e43c36ce1dab05d69
2015-10-29 16:39:43 -07:00
Makoto Onuki
a3c1250a2f Fix javadoc
Change-Id: Iade890cd14bcac844f8ccc1ddde90120600fd64a
2015-10-28 10:18:32 -07:00
Makoto Onuki
068c54a5be Layer user restrictions
- Now DPMS remembers user restrictions set by DO / PO in their ActiveAdmin.

- User restrictions set by DO/PO will no longer be saved by UserManger.  Instead,
when needed, UMS will consult DPMS to build "effective" user restrictions.

- UM.getUserRestrictions() will now always return "effective" user restrictions.

- DPMS migrates existing user restrictions per the eng spec.

- Also now UM.setUserRestrictions() will crash.  UMS.setUserRestrictions() has
been removed.
This was needed because UM.setUserRestrctions(UM.getUserRestrictions()) will no
longer be a valid use like it used to be.

- Also introduced a fined-grained lock for user restrictions in UM to avoid
deadlock between DPMS and also for better performance.

Bug 23902097

Change-Id: If0e1e49344e2f3e9226532d00777976d1eaa7df3
2015-10-27 14:26:06 -07:00
Adrian Roos
f8ae610e8c Merge "Revert "Revert "Track ashmem memory usage in Parcel""" into mnc-dr-dev am: 93a6b4c129 am: a53bbb652b am: 5e5f718d23
am: 989b719e64

* commit '989b719e649266f41353ff5266cabd5b42a297a5':
  Revert "Revert "Track ashmem memory usage in Parcel""
2015-10-23 18:37:05 +00:00
Adrian Roos
989b719e64 Merge "Revert "Revert "Track ashmem memory usage in Parcel""" into mnc-dr-dev am: 93a6b4c129 am: a53bbb652b
am: 5e5f718d23

* commit '5e5f718d236234f3a4bc5826dc805b6b8c53283c':
  Revert "Revert "Track ashmem memory usage in Parcel""
2015-10-23 18:25:02 +00:00
Adrian Roos
a53bbb652b Merge "Revert "Revert "Track ashmem memory usage in Parcel""" into mnc-dr-dev
am: 93a6b4c129

* commit '93a6b4c12904bd1804a540d006c183851b0aea33':
  Revert "Revert "Track ashmem memory usage in Parcel""
2015-10-23 17:29:13 +00:00
Adrian Roos
0450565d9a Revert "Revert "Track ashmem memory usage in Parcel""
This reverts commit e2adb2cf0f.

Bug: 25004154
Change-Id: I9b432d1ebc39f3bbcd7afdefc403f0fb6ced8158
2015-10-22 17:49:38 -07:00
Ian Pedowitz
ab49c51342 Merge "Revert "Track ashmem memory usage in Parcel"" into mnc-dr-dev am: 09fd4ecf90 am: b402735fc0 am: 07129d53b5
am: d3511518f9

* commit 'd3511518f927eead41fb33c56803104672dcffc2':
  Revert "Track ashmem memory usage in Parcel"
2015-10-22 22:53:24 +00:00
Ian Pedowitz
d3511518f9 Merge "Revert "Track ashmem memory usage in Parcel"" into mnc-dr-dev am: 09fd4ecf90 am: b402735fc0
am: 07129d53b5

* commit '07129d53b5380ec556fa14c7506a26b6776e629a':
  Revert "Track ashmem memory usage in Parcel"
2015-10-22 22:46:06 +00:00
Ian Pedowitz
b402735fc0 Merge "Revert "Track ashmem memory usage in Parcel"" into mnc-dr-dev
am: 09fd4ecf90

* commit '09fd4ecf90c7ae2536a6848e8c88c4878e0e0c24':
  Revert "Track ashmem memory usage in Parcel"
2015-10-22 22:32:37 +00:00
Ian Pedowitz
e2adb2cf0f Revert "Track ashmem memory usage in Parcel"
This reverts commit ab3f972403.

Bug: 25169267
Bug: 25191602
Bug: 25004154
Change-Id: Ic51e62515273e4687359dfd9ff770a4d06c0c667
2015-10-22 22:09:04 +00:00
Adrian Roos
b531762c89 Merge "Track ashmem memory usage in Parcel" into mnc-dr-dev am: 33e1d376eb am: 655c12edb0
am: fda65d780e

* commit 'fda65d780eea9f696b087deb8d532b87e44877b6':
  Track ashmem memory usage in Parcel
2015-10-22 01:02:27 +00:00
Adrian Roos
655c12edb0 Merge "Track ashmem memory usage in Parcel" into mnc-dr-dev
am: 33e1d376eb

* commit '33e1d376ebd643cba5b507d0005b87d49e246bb5':
  Track ashmem memory usage in Parcel
2015-10-22 00:49:52 +00:00
Adrian Roos
ab3f972403 Track ashmem memory usage in Parcel
Bug: 25004154
Change-Id: Id9d5656dd0605f1b50525596b75601309f67ebdc
(cherry picked from commit 4701a496a5)
2015-10-22 00:31:47 +00:00
Adrian Roos
bc14a194e0 Merge "Track ashmem memory usage in Parcel" 2015-10-22 00:31:17 +00:00
Adrian Roos
4701a496a5 Track ashmem memory usage in Parcel
Bug: 25004154
Change-Id: Id9d5656dd0605f1b50525596b75601309f67ebdc
2015-10-21 16:52:15 -07:00
Tao Bao
48d7b31b4b Merge "Clean up the uncrypted OTA package on bootup." am: 5d562d4d2f am: ac140e7f76
am: db33bfc2a9

* commit 'db33bfc2a96c38eba5b67c82cb4fee69c52b80ad':
  Clean up the uncrypted OTA package on bootup.
2015-10-21 18:22:13 +00:00
Tao Bao
db33bfc2a9 Merge "Clean up the uncrypted OTA package on bootup." am: 5d562d4d2f
am: ac140e7f76

* commit 'ac140e7f7690979378897546e7934381f62922ab':
  Clean up the uncrypted OTA package on bootup.
2015-10-21 18:05:18 +00:00
Tao Bao
ac140e7f76 Merge "Clean up the uncrypted OTA package on bootup."
am: 5d562d4d2f

* commit '5d562d4d2fe5697468e5b93b183ed8ea42e115a2':
  Clean up the uncrypted OTA package on bootup.
2015-10-21 17:51:53 +00:00
Dianne Hackborn
ccbf4e4211 Merge "Initial implementation of light-weight idle mode." 2015-10-20 17:51:34 +00:00
Dianne Hackborn
08c47a5dec Initial implementation of light-weight idle mode.
This mode turns on after the screen has been off for 15 minutes,
and then cycles through 15 minutes of idle and 1 minute of
maintenance, ragardless of whether the device is moving around.

It currently only impacts network access and sync/job scheduling.
It does not remove access to wake locks or alarms for any apps.
It also doesn't report in the public API that the device is in
idle mode (since it isn't modifying the behavior of the power
manager) -- this is probably what we desire, since we don't want
stuff like GCM to be reporting these frequent changes.

We'll probably at least want to have the alarm manager do some
kind of more aggressive batching of alarms in this most (not allowing
more than one wakeup every minute?).  That's for the future.

Also updated batterystats to include this new information, which
means the format of some of the data has changed -- device_idle
is no longer a flag, but an enum of (off, light, full), and there
is no information about time spent in light modes.

Also added new data about the maximum duration spent in both light
and full idle modes, to get a better understanding of how those
are behaving.

And did a little cleanup of DeviceIdleController, removing the
sensing alarm which was redundant with the regular alarm.

Change-Id: Ibeea6659577dc02deff58f048f97fcd9b0223307
2015-10-20 10:43:14 -07:00
Tao Bao
87212ad6a8 Clean up the uncrypted OTA package on bootup.
An OTA package needs to be uncrypted before rebooting into recovery if
it sits on an encrypted /data partition. Once uncrypt gets started, we
cannot re-run it on the package again. Because the file may have been
fully or particially uncrypted and we may end up with a corrupt file
under recovery. Always clean up the package when the device boots into
the normal system to avoid that.

Bug: 24973532
Change-Id: I91682c103d1f2b603626c4bf8d818bced71e3674
2015-10-19 14:49:09 -07:00
Jeff Sharkey
e1ed980d4c am de0b34ea: am d56756fd: am 535726f6: am 0c15693e: Merge "Update docs to reflect adoptable behavior." into mnc-dr-dev
* commit 'de0b34ea14cfd5a5d219ee6e3d15ca4b04b6ce2e':
  Update docs to reflect adoptable behavior.
2015-10-16 16:45:35 +00:00
Jeff Sharkey
de0b34ea14 am d56756fd: am 535726f6: am 0c15693e: Merge "Update docs to reflect adoptable behavior." into mnc-dr-dev
* commit 'd56756fdee9fce3d08bea769710d7173bcbc263a':
  Update docs to reflect adoptable behavior.
2015-10-16 16:38:29 +00:00
Xiaohui Chen
f04f3005b0 Merge "Add UserHandle.isSystem() api" 2015-10-16 16:29:44 +00:00
Jeff Sharkey
535726f637 am 0c15693e: Merge "Update docs to reflect adoptable behavior." into mnc-dr-dev
* commit '0c15693e8de6f89fab7ca3d582f0a8605a54df9f':
  Update docs to reflect adoptable behavior.
2015-10-16 16:25:38 +00:00
Jeff Sharkey
0c15693e8d Merge "Update docs to reflect adoptable behavior." into mnc-dr-dev 2015-10-16 16:18:38 +00:00
Xiaohui Chen
fd5b77444e Add UM.isSameProfileGroup()
This optimizes the performance to check if two users are in the same
profile group.

Change-Id: I493a3475b848487836f4dbe01529c63165ace483
2015-10-15 22:02:07 +00:00
Xiaohui Chen
1fa7680c9c Add UserHandle.isSystem() api
This is added in order to deprecate the isOwner() api.

Bug: 24869636
Change-Id: I80a7a5559525faf261b9d9c7a8593e6ff5db4b22
2015-10-15 12:09:32 -07:00
Dianne Hackborn
85525040dd am 1e46ee93: am 522222bc: am f96ca344: am 75765dbe: am e34445f1: Merge "Docs only change: update build version docs." into mnc-dev
* commit '1e46ee937c94247ab0fe2b0ff1e2b9b26a9f02fa':
  Docs only change: update build version docs.
2015-10-15 03:21:28 +00:00
Dianne Hackborn
1e46ee937c am 522222bc: am f96ca344: am 75765dbe: am e34445f1: Merge "Docs only change: update build version docs." into mnc-dev
* commit '522222bc9bbfb6d62e101eaa6af2668277143e19':
  Docs only change: update build version docs.
2015-10-15 01:16:00 +00:00
Dianne Hackborn
f96ca3441e am 75765dbe: am e34445f1: Merge "Docs only change: update build version docs." into mnc-dev
* commit '75765dbe48ed38d7044f458062510a9082750049':
  Docs only change: update build version docs.
2015-10-15 01:05:54 +00:00
Dianne Hackborn
75765dbe48 am e34445f1: Merge "Docs only change: update build version docs." into mnc-dev
* commit 'e34445f11a6a14dd30ba0e018b82e852ef82ecbc':
  Docs only change: update build version docs.
2015-10-15 01:01:12 +00:00
Jeff Sharkey
59d28dc820 Update docs to reflect adoptable behavior.
Update storage related docs on Context to be consistent, and to call
out relevant Environment methods.  Start calling it "shared" storage,
and only mention external for historical reasons.  Mention that there
isn't much benefit to using emulated storage over private data
directories to help guide developers to safer locations.

Point out which paths can change over time, so developers know to
only persist relative paths.

Update Environment docs to reflect how they behave for the new
class of adopted storage devices.

Bug: 24251945
Change-Id: Ie5ab337649b4740dfd7594997bbb19c4969cfd2f
2015-10-14 14:41:23 -07:00
Dianne Hackborn
c890c56085 am a7036ce1: am 05222c34: am 829920ed: am 34c120dc: Merge ""Fix" issue #24357296: Debug.getMemoryInfo doesn\'t include EGL mtrack..." into mnc-dr-dev
* commit 'a7036ce15a4a540fd556e220a89feffb3b88b11a':
  "Fix" issue #24357296: Debug.getMemoryInfo doesn't include EGL mtrack...
2015-10-13 01:59:54 +00:00
Dianne Hackborn
a7036ce15a am 05222c34: am 829920ed: am 34c120dc: Merge ""Fix" issue #24357296: Debug.getMemoryInfo doesn\'t include EGL mtrack..." into mnc-dr-dev
* commit '05222c3440d1ba207fe6f87037a8297f33f3318a':
  "Fix" issue #24357296: Debug.getMemoryInfo doesn't include EGL mtrack...
2015-10-13 00:20:42 +00:00
Dianne Hackborn
829920ede0 am 34c120dc: Merge ""Fix" issue #24357296: Debug.getMemoryInfo doesn\'t include EGL mtrack..." into mnc-dr-dev
* commit '34c120dc6142c861cb131c900cdee3c19f81ce51':
  "Fix" issue #24357296: Debug.getMemoryInfo doesn't include EGL mtrack...
2015-10-12 23:00:20 +00:00
Dianne Hackborn
b02ce29144 "Fix" issue #24357296: Debug.getMemoryInfo doesn't include EGL mtrack...
...due to lack of permissions

Still doesn't, but an alternative is now offered.

Change-Id: I7b9da709c96ed7790c70d686c30c7855f3979778
2015-10-12 15:14:16 -07:00
Dianne Hackborn
9461b6f91f Add new "shell command" feature to Binder objects.
IBinder has a new common interface for sending shell commands
to it.  This can be implemented by system services to provide
a shell interface to the service, without needing to have separate
shell java code.

This includes changes to DeviceIdleController to implement the
shell interface for all of the commands it has been providing
through dumpsys.

Change-Id: I76518ea6719d1d08a8ad8722a059c7f5fd86813a
2015-10-12 10:38:41 -07:00
Wale Ogunwale
012904e43a Merge "Added SDK version code for N." 2015-10-06 14:40:41 +00:00
Wale Ogunwale
79113108a8 Added SDK version code for N.
Change-Id: Id0ca002650842299f076a3f181b3455cd8a0f06b
2015-10-05 17:17:11 -07:00
Xiaohui Chen
2102dcb9e7 Do not check consistency on eng build.
Change-Id: I2fe728a970753131473b98676fb0b763e774ab1c
2015-10-02 16:45:55 -07:00
Adam Lesinski
1619ed4706 Fix security issues when using Parcel.setDataPosition() with untrusted input
When seeking forward in the Parcel, adding the extracted size to the Parcel.dataPosition()
can result in an overflow. Guard against this.

Bug:23909429
Change-Id: If37cdebbf05a92810300363d1a6ecd8b42b6da26
2015-10-01 20:48:23 +00:00
Fyodor Kupolov
85f3402d31 Merge "Check multi-user support in isUserSwitcherEnabled" 2015-09-30 21:58:19 +00:00
Daniel Erat
12f63ce616 am f0e87446: am d3e3d889: am c3f37589: Merge "Update instructions in IPowerManager.aidl."
* commit 'f0e8744620cc95464dcb7622f3582d70cb7bc364':
  Update instructions in IPowerManager.aidl.
2015-09-30 21:54:54 +00:00
Daniel Erat
f0e8744620 am d3e3d889: am c3f37589: Merge "Update instructions in IPowerManager.aidl."
* commit 'd3e3d8896ea0f2eba1424b57ac8a5b5d9287000c':
  Update instructions in IPowerManager.aidl.
2015-09-30 21:39:01 +00:00
Daniel Erat
d3e3d8896e am c3f37589: Merge "Update instructions in IPowerManager.aidl."
* commit 'c3f37589e04a52c109c63f6411db444500d4f92c':
  Update instructions in IPowerManager.aidl.
2015-09-30 21:30:31 +00:00
Fyodor Kupolov
cd86ebf1c9 Check multi-user support in isUserSwitcherEnabled
isUserSwitcherEnabled now returns false if multi-user is disabled(
supportsMultipleUsers() returns false).

Removed GUEST_USER_ENABLED setting and replaced with DPM.getGuestUserDisabled
check. It currently always returns false, but will be replaced with an actual
policy check.

Bug: 17571233
Change-Id: I41853e8b321b2537952cac5d92e88bfdb8cbd9a8
2015-09-30 14:08:01 -07:00