Commit Graph

3062 Commits

Author SHA1 Message Date
Lenka Trochtova
a6791cc935 Merge "Prevent ephemeral user from being re-entered after stop." into nyc-dev am: cfdc99ef5e
am: e8a4797e00

* commit 'e8a4797e003b6e8bb747d033b06c173402c5be96':
  Prevent ephemeral user from being re-entered after stop.
2016-02-24 12:40:45 +00:00
Lenka Trochtova
e8a4797e00 Merge "Prevent ephemeral user from being re-entered after stop." into nyc-dev
am: cfdc99ef5e

* commit 'cfdc99ef5e542f61cd405132fc140b14d9ec1620':
  Prevent ephemeral user from being re-entered after stop.
2016-02-24 12:38:00 +00:00
Lenka Trochtova
1ddda4793c Prevent ephemeral user from being re-entered after stop.
Once the ephemeral user stops, the user's deletion is scheduled.
It takes a while before the user actually disappears and it is not
desirable for the user to be re-entered in the meantime.
Mark the user as disabled on stop and check this flag
in the activity manager to prevent the user from being switched
to again. Also hide the user from user-switching UI.

BUG: 26795729
BUG: 26780152

Change-Id: I83a61674958954b5a210114b88ffa5ae55922c1f
2016-02-24 11:55:58 +01:00
Joe Onorato
8e5ca50db7 Merge changes I4e45afed,I2ea19f9a,I922d6f38 into nyc-dev am: 62b9ff4994
am: 1ba39aa54e

* commit '1ba39aa54e49882df0116b7538f73a6a688cb830':
  Add unit tests for BatteryStatsImpl.
  Turn down the logging a little bit.
  Turn down the logging a little bit.
2016-02-23 21:37:21 +00:00
Joe Onorato
1ba39aa54e Merge changes I4e45afed,I2ea19f9a,I922d6f38 into nyc-dev
am: 62b9ff4994

* commit '62b9ff49947ccfca7d9f2ffe0e34006821080819':
  Add unit tests for BatteryStatsImpl.
  Turn down the logging a little bit.
  Turn down the logging a little bit.
2016-02-23 21:24:01 +00:00
Joe Onorato
abded113bd Add unit tests for BatteryStatsImpl.
- Add a Clocks interface to wrap SystemClock.uptimeMillis and
  SystemClock.elapsedRealtime.
- Make the inner classes static so they can be created independently,
  which meant passing explicit pointers to the BatteryStatsImpl and
  the Uid objects in a lot of places.
- Make several fields protected so they can be accessed by the tests (they are
  still @hidden)
- Add a test suite for the battery stats.
- Add the tests

Change-Id: I4e45afedc64f7050985c28a7eb4f5c1ddbaa63fa
2016-02-23 12:44:22 -08:00
Tony Mak
622c00b810 Merge "Update javadoc of DISALLOW_OUTGOING_CALLS" into nyc-dev am: 38e638696a
am: 8d95e5fd05

* commit '8d95e5fd05d26e538a9867f9341c927d2cb83ff6':
  Update javadoc of DISALLOW_OUTGOING_CALLS
2016-02-23 10:34:34 +00:00
Tony Mak
8d95e5fd05 Merge "Update javadoc of DISALLOW_OUTGOING_CALLS" into nyc-dev
am: 38e638696a

* commit '38e638696a054a23150aadf72c9c98e335bb8d9e':
  Update javadoc of DISALLOW_OUTGOING_CALLS
2016-02-23 10:29:04 +00:00
Tony Mak
38e638696a Merge "Update javadoc of DISALLOW_OUTGOING_CALLS" into nyc-dev 2016-02-23 10:24:50 +00:00
Tao Bao
69d01e2376 Merge "Add support for update-on-boot feature." into nyc-dev am: 9de7952aa9
am: 3dd23af6a0

* commit '3dd23af6a0fb58ce7d1f6f078c765890ca839bd3':
  Add support for update-on-boot feature.
2016-02-22 21:10:21 +00:00
Tao Bao
3dd23af6a0 Merge "Add support for update-on-boot feature." into nyc-dev
am: 9de7952aa9

* commit '9de7952aa945eb06148f82b9f30d7d11a2de5d74':
  Add support for update-on-boot feature.
2016-02-22 20:09:58 +00:00
Tao Bao
9de7952aa9 Merge "Add support for update-on-boot feature." into nyc-dev 2016-02-22 19:24:25 +00:00
Tony Mak
eb83ab52b2 Update javadoc of DISALLOW_OUTGOING_CALLS
It is no longer true that we always forward the intent to personal side
after the introcution of work dialer.

Change-Id: I07b247c15d366278a07afab76b23c9d8847b01ef
2016-02-22 18:36:08 +00:00
Polina Bondarenko
4f2d2d3b42 Merge "Added hardwareproperties SystemService" into nyc-dev am: 280c5b2155
am: 5fc731e826

* commit '5fc731e82661aa31904e1473b651525256cc4f4a':
  Added hardwareproperties SystemService
2016-02-22 09:36:32 +00:00
Polina Bondarenko
5fc731e826 Merge "Added hardwareproperties SystemService" into nyc-dev
am: 280c5b2155

* commit '280c5b2155feae857ad514dff81adbfe73e398e9':
  Added hardwareproperties SystemService
2016-02-22 09:32:37 +00:00
Polina Bondarenko
280c5b2155 Merge "Added hardwareproperties SystemService" into nyc-dev 2016-02-22 09:27:21 +00:00
Adam Lesinski
6cad213183 Remove extraneous field from batterystats dumpsys am: 2208e743e4
am: b3d7561883

* commit 'b3d756188309c555f0374315da7ff90bc8dbe65a':
  Remove extraneous field from batterystats dumpsys
2016-02-19 21:14:33 +00:00
Adam Lesinski
b3d7561883 Remove extraneous field from batterystats dumpsys
am: 2208e743e4

* commit '2208e743e4c2da29008f6503c2d678c7e28e7812':
  Remove extraneous field from batterystats dumpsys
2016-02-19 21:08:51 +00:00
Adam Lesinski
2208e743e4 Remove extraneous field from batterystats dumpsys
Change-Id: Iea913e993e61d114c499e6218ad0abf9a8e80690
2016-02-19 21:03:43 +00:00
Tao Bao
e8a403d57c Add support for update-on-boot feature.
Add a separate system service RecoverySystemService to handle recovery
related requests (calling uncrypt to de-encrypt the OTA package on the
/data partition, setting up bootloader control block (aka BCB) and etc).

We used to trigger uncrypt in ShutdownThread before rebooting into
recovery. Now we expose new SystemApi (RecoverySystem.processPackage())
to allow the caller (e.g. GmsCore) to call that upfront before
initiating a reboot. This will reduce the reboot time and get rid of the
progress bar ("processing update package"). However, we need to reserve
the functionality in ShutdownThread to optionally call uncrypt if
finding that's still needed.

In order to support the update-on-boot feature, we also add new
SystemApis scheduleUpdateOnBoot() and cancelScheduledUpdate() into
android.os.RecoverySystem. They allow the caller (e.g. GmsCore) to
schedule / cancel an update by setting up the BCB, which will be read by
the bootloader and the recovery image. With the new SystemApis, an
update package can be processed (uncrypt'd) in the background and
scheduled to be installed at the next boot.

Bug: 26830925
Change-Id: Ic606fcf5b31c54ce54f0ab12c1768fef0fa64560
2016-02-19 11:31:45 -08:00
Polina Bondarenko
f8754ac212 Added hardwareproperties SystemService
Add HardwarePropertiesManagerService which call native methods to
get CPU, GPU, battery temperatures, CPU usage info, fan speeds.
Restrict hardware properties retrieval only for device and profile
owners.

Bug: 26945055
Change-Id: I4d6b30b78e575532d5e9cfa59ef6cd81355439d4
2016-02-19 18:24:29 +01:00
Colin Cross
41bf778441 resolve merge conflicts of bd45c08468 to nyc-dev-plus-aosp
am: 4bf50e486f

* commit '4bf50e486f85d7a9630ded3e36216710c9d1f97d':
  Add dumpsys meminfo --unreachable
2016-02-19 06:32:06 +00:00
Colin Cross
4bf50e486f resolve merge conflicts of bd45c08468 to nyc-dev-plus-aosp
Change-Id: Ifdf52646440b65ca4b3aadc8bba212b5f1fd0c0d
2016-02-18 22:27:04 -08:00
Colin Cross
bd45c08468 Merge "Add dumpsys meminfo --unreachable"
am: 916ea08119

* commit '916ea081196a47ef3257910a71fa7a7ac609ddb1':
  Add dumpsys meminfo --unreachable
2016-02-19 06:14:50 +00:00
Adam Lesinski
d09e35a69b Merge branch \'nyc-dev\' of /usr/local/google/game/mirror/googleplex-android_googlesource_com/platform/frameworks/base into nyc-dev am: cfd49456ec
am: 1720dd8618

* commit '1720dd86180c27e80fb191ed70be38cbfefc36af':
  Push mapping of package name to appId to kernel.
2016-02-18 22:40:01 +00:00
Jeff Sharkey
2271ba3627 Push mapping of package name to appId to kernel.
The new sdcardfs kernel driver needs to know this mapping for
deriving UID permissions, so push the data through /config when
supported by the kernel.  This also has the nice benefit of letting
us push only the deltas of what actually changes, instead of
re-parsing the entire "packages.list" file.

The mappings for newly installed apps are pushed before the app is
allowed to run, removing some latent race conditions.  Also cleans
up stale mappings when packages are uninstalled, and whenever the
system server reboots.

Bug: 19160983
Change-Id: Iace92efb69616c96b34c0d9d911e4b54e5fd8a67
2016-02-18 15:01:15 -07:00
Felipe Leme
c774bd9614 Merge "Fixed typo on Storage Access Framework." into nyc-dev am: 79c11a8c55
am: e14f8583c5

* commit 'e14f8583c518e476da7f4c677c99dc29b62d87d1':
  Fixed typo on Storage Access Framework.
2016-02-18 00:01:17 +00:00
Felipe Leme
bd6a1fc76e Merge "Removed Intent.OPEN_EXTERNAL_DIRECTORY." into nyc-dev am: 014a0d11c7
am: ac6f61dd27

* commit 'ac6f61dd27c0a11b8ee8c3121849094ddb4bb9d9':
  Removed Intent.OPEN_EXTERNAL_DIRECTORY.
2016-02-17 23:56:52 +00:00
Felipe Leme
ba2707d9dc Merge "Initial implementation of StorageManager.getVolumesList()." into nyc-dev am: 3c3770d8fe
am: f3fb06dd3d

* commit 'f3fb06dd3da173011eb04ea1d44f498ac7cb1152':
  Initial implementation of StorageManager.getVolumesList().
2016-02-17 23:55:41 +00:00
Felipe Leme
79c11a8c55 Merge "Fixed typo on Storage Access Framework." into nyc-dev 2016-02-17 22:51:02 +00:00
Felipe Leme
53fcc756d0 Fixed typo on Storage Access Framework.
BUG: 26742218
Change-Id: I9b695ebe2176f186fc63b20f624e40dd9e257bc3
2016-02-17 14:45:52 -08:00
Felipe Leme
014a0d11c7 Merge "Removed Intent.OPEN_EXTERNAL_DIRECTORY." into nyc-dev 2016-02-17 22:43:20 +00:00
Felipe Leme
3c3770d8fe Merge "Initial implementation of StorageManager.getVolumesList()." into nyc-dev 2016-02-17 22:42:40 +00:00
Felipe Leme
34a9d52719 Removed Intent.OPEN_EXTERNAL_DIRECTORY.
Such intent is now encapsulated by StorageVolume.createAccessIntent().

BUG: 26742218

Change-Id: I2e2bd71126ecd74981f77b0af7d069f51aaece74
2016-02-17 14:38:25 -08:00
Felipe Leme
04a5d40cf3 Initial implementation of StorageManager.getVolumesList().
This change makes StorageManager.getVolumesList(),
StorageManager.getPrimaryVolume(),  and StorageVolume public and adds a
buildAccessIntent() in the latter to automatically generate the
ACTION_OPEN_EXTERNAL_DIRECTORY intent, but it doesn't change the
ACTION_OPEN_EXTERNAL_DIRECTORY implementation yet (i.e., it still takes an URI with the physical path of the directory, instead of a StorageVolume and
a directorny name).

BUG: 26742218

Change-Id: I36c59c42b6579e125ec7f03c3af141260875a491
2016-02-17 13:14:39 -08:00
Steve McKay
2d9344d5d9 Merge "Remove "HOME" directory. Use "Documents" instead." into nyc-dev am: 25a7ee08f6
am: 40cc8409e1

* commit '40cc8409e1c0255e44ce3ca2818dae9f636f9c7a':
  Remove "HOME" directory. Use "Documents" instead.
2016-02-17 18:00:54 +00:00
Steve McKay
ab3b8936dc Remove "HOME" directory. Use "Documents" instead.
Use "Folder" as home icon for now.

Bug:27148009
Change-Id: I9f57bba1c8e51ae7887861923f5baa8f69ec2e6e
2016-02-16 14:52:35 -08:00
Dianne Hackborn
f1c710b6ef Merge "Add separate information about user whitelist." 2016-02-12 01:14:28 +00:00
Dianne Hackborn
190f2cb720 Add separate information about user whitelist.
Use this in the alarm manager to allow user whitelisted apps
to have free access to scheduling alarms.

Coming next: lifting sync/job restrictions.

Change-Id: Ib36bd811f866c7af43845edf051e7972397cea22
2016-02-11 16:23:04 -08:00
Dianne Hackborn
b39ee5ed8e Merge "Implement transient extras for jobs." 2016-02-11 20:54:53 +00:00
Dianne Hackborn
ba60473a65 Implement transient extras for jobs.
You can now associate an arbitrary Bundle of extras with a job,
as long as the job is not persisted.

Also implement deep-copy of Bundle.

Change-Id: I7890d627492b664d9b1f039e8cb82f8868de7be3
2016-02-11 11:28:48 -08:00
Philipp Weiß
09f8568059 Merge "DPM.createAndManageUser should work even with DISALLOW_ADD_USER set" into nyc-dev 2016-02-11 17:17:39 +00:00
phweiss
e9c440638e DPM.createAndManageUser should work even with DISALLOW_ADD_USER set
For this, the DPM calls a new function
UserManagerInternal.createUserEvenWhenDisallowed() instead of
UserManager.createUser(). This calls
UserManagerService.createUserInternalUnchecked().

Also, only the system user is allowed to call this method, otherwise
a security exception is thrown.

Bug: 26952210
Bug: 26786199
Change-Id: I69c16354898d68592d13f5f53b840551f7ad4779
2016-02-11 14:43:18 +01:00
Jeff Davidson
7f036f8bce Merge "Expose APIs to analyze UIDs in UserHandle/Process." into nyc-dev 2016-02-11 00:52:02 +00:00
Jeff Davidson
48aa86bd0b Expose APIs to analyze UIDs in UserHandle/Process.
Clients of the NetworkStatsManager public APIs may get UIDs belonging
to other users, and UIDs which don't actually represent applications.
These APIs allow clients to understand whether a given ID belongs to
the same user as themselves, and whether an ID represents an
application or something else (e.g. a system UID).

Change-Id: Ia56d5891521ce98e5594c41da8f9d756819deb66
2016-02-10 15:20:33 -08:00
Jeff Sharkey
8212ae0aee Consistent naming for internal storage APIs.
Also completely remove a few confusingly named deprecated APIs.

Change-Id: Ia7e4ea3190a97f0a7dfa9bebf2118da0866ec38f
2016-02-10 15:03:33 -07:00
Tao Bao
6af1d75a0c Merge "Add system APIs for A/B update." into nyc-dev 2016-02-08 22:07:05 +00:00
Tao Bao
43cd1bcb10 Add system APIs for A/B update.
Add android.os.UpdateEngine and UpdateEngineCallback classes that
communicate with the update engine via binder APIs for A/B update.

Bug: 26695366
Change-Id: I2471858d28df5443bc0b56d9a20281ccebde4484
2016-02-08 10:38:35 -08:00
Paul Crowley
faeb3eb0ba Password security for FBE disk encryption keys
Add the means to protect FBE keys with a combination of an auth token
from Gatekeeper, and a hash of the password. Both of these must be
passed to unlock_user_key. Keys are created unprotected, and
change_user_key changes the way they are protected.

Bug: 22950892
Change-Id: Ie13bc6f82059ce941b0e664a5b60355e52b45f30
2016-02-08 15:58:29 +00:00
Colin Cross
84b1e3554b Add dumpsys meminfo --unreachable
dumpsys meminfo --unreachable will search the native heap for
allocations that are unreachable.

Change-Id: I40ab1c261cb222ca71d04ab8408f355bcb18ed94
2016-02-08 00:06:34 -08:00