Commit Graph

2599 Commits

Author SHA1 Message Date
Paul Crowley
d2c9d0d92c Revert "am 8ae629f6: am 63690fa5: am 140ff7a5: am bac3d093: Merge "Delete the user key when deleting a user." into mnc-dr-dev"
This reverts commit c5da3fe1de, reversing
changes made to d884b41331.
2015-07-14 15:42:29 +01:00
Paul Crowley
c5da3fe1de am 8ae629f6: am 63690fa5: am 140ff7a5: am bac3d093: Merge "Delete the user key when deleting a user." into mnc-dr-dev
* commit '8ae629f6cbda2ad55a1b6f3f508a04dc348ed796':
  Delete the user key when deleting a user.
2015-07-14 12:00:55 +00:00
Paul Crowley
bac3d0936d Merge "Delete the user key when deleting a user." into mnc-dr-dev 2015-07-13 20:53:57 +00:00
Paul Crowley
9e0e69915a Merge "Use mount service to create user dirs." into mnc-dr-dev 2015-07-13 20:53:09 +00:00
Dianne Hackborn
b6fbe91a02 am 782e31df: am 2dc2cdc0: am 1dfeb0b2: am d0e005de: am 0e7d497c: Merge "Fix issue #22328792: Fix scalability issues in AssistStructure" into mnc-dev
* commit '782e31dfcc448eaaab814fd76f42c3390a952037':
  Fix issue #22328792: Fix scalability issues in AssistStructure
2015-07-09 23:29:51 +00:00
Dianne Hackborn
782d498268 Fix issue #22328792: Fix scalability issues in AssistStructure
We can now stream the AssistStructure across processes, avoiding
IPC size limitations for large structures.  There is also a new
API that gets called on the VoiceInteractionSession if there is
a failure retrieving the assist data.

Also fix issue #22351981: Runtime restart due to ANR in system server,
getting rid of a deadlock.

And also tweak object lifecycles to try to avoid keeping around
in an app the previous AssistStructure after we request a new one.

Change-Id: Ifb136a0d31a14e56a8db6b90768d9fc65557a17f
2015-07-09 14:06:47 -07:00
Paul Crowley
7ec733fad3 Delete the user key when deleting a user.
Bug: 19706593

(cherry-picked from commit 85e4e818d8)

Change-Id: Icc6d53a99558317b2ec154f931e481ad9fe64aa3
2015-07-09 17:58:49 +01:00
Paul Crowley
bcf48ed226 Use mount service to create user dirs.
Bug: 19704432

(cherry-picked from commit 9102f5d953)

Change-Id: I64a2c85beef115158feed3953deae32f692e750f
2015-07-09 17:57:35 +01:00
Adam Lesinski
2878e4e825 am 8e82c794: am 3e2b53ff: am 1ad61b33: am 1549adb4: am 7fb1655a: Merge "BatteryStats: Fail gracefully on corrupt battery stats" into mnc-dev
* commit '8e82c794bb944d4a15501854721a476db2dae470':
  BatteryStats: Fail gracefully on corrupt battery stats
2015-07-09 02:31:48 +00:00
Adam Lesinski
7fb1655a89 Merge "BatteryStats: Fail gracefully on corrupt battery stats" into mnc-dev 2015-07-09 01:15:15 +00:00
Adam Lesinski
9ae9cba020 BatteryStats: Fail gracefully on corrupt battery stats
Bug:22328963
Change-Id: Id0b4c6334706e58483d5fdfd2c1137bfb821c409
2015-07-08 17:35:42 -07:00
Jeff Sharkey
333b5b7d34 am b64813bd: am 093be69c: am f3d73162: am 46552cff: am 9d587a97: Merge changes I9971c466,Ib42474fd into mnc-dev
* commit 'b64813bdf08502ded55f7222ea426c7c948cc4e9':
  Kill MediaProvider during drastic changes.
  Use best volume description for MTP.
2015-07-08 23:00:02 +00:00
Jeff Sharkey
28e38bbf44 am 608114f9: am e232afca: am 95661575: am 612aac4e: am c66b90fe: Merge "Generate stable MTP storage IDs." into mnc-dev
* commit '608114f9668be847715a7e8015bda19e4343b535':
  Generate stable MTP storage IDs.
2015-07-08 22:59:55 +00:00
Jeff Sharkey
a83bf1966e Use best volume description for MTP.
Otherwise we end up showing adopted storage devices as "Unknown."

Bug: 20275423
Change-Id: Ib42474fd5b3284b1e8eca7de8a4cfbb71a34a107
2015-07-08 09:29:24 -07:00
Jeff Sharkey
a4da90dbab am 28339797: am 6e77499a: am fb10a760: am 79204a32: am 15369c6c: Merge "Fix volume naming when surfaced over MTP." into mnc-dev
* commit '28339797043834e5f1cd196363ef3cfdd66607ad':
  Fix volume naming when surfaced over MTP.
2015-07-08 02:05:19 +00:00
Jeff Sharkey
5af1835d67 Generate stable MTP storage IDs.
It ends up that MediaProvider is persisting MTP storage IDs in its
database, so we need to make sure we generate stable IDs over time,
otherwise we can end up looking into a black hole.

Bug: 22256092
Change-Id: I6a75c239aac1b71fd5f6df0df69b24971079a086
2015-07-07 17:46:16 -07:00
Jeff Sharkey
7a788a865e Fix volume naming when surfaced over MTP.
Otherwise we show everything as "Unknown."

Bug: 22256092
Change-Id: I19fe8a25aff02db8ca9aff288e6715d469f65327
2015-07-07 14:40:28 -07:00
Jeff Sharkey
3aeb218d0d am 6480393a: am c2e16e9b: am 63ba1d9e: am d58ddd82: am 246d6984: Merge "Handle missing migration source volume." into mnc-dev
* commit '6480393a0dc4d96de6f58cf0a1420e82bc8203a0':
  Handle missing migration source volume.
2015-07-07 00:30:45 +00:00
Jeff Sharkey
3bb8c85418 Merge commit '1db64c19' into merge3
Change-Id: I0aea6817876a5820a7d67a4de5bef0f86ce702a2
2015-07-06 17:25:00 -07:00
Jeff Sharkey
ef10ee0145 Handle missing migration source volume.
Users can try migrating primary storage while the current location
is missing/unmounted.  Fail gracefully instead of runtime restarting.

Bug: 21927076
Change-Id: I40645f8ccea05154e7cbacd188f6cba5f4dbbdc4
2015-07-05 14:34:13 -07:00
Jeff Sharkey
6dce4964b4 Reconcile private volumes when mounted.
Many things can happen while a private volume is ejected, so we need
to reconcile newly mounted volumes against known state.

First, user IDs can be recycled, so we store the serial number in the
extended attributes of the /data/user/[id] directory inode.  Since a
serial number is always unique, we can quickly determine if a user
directory "10" really belongs to the current user "10".  When we
detect a mismatched serial number, we destroy all data belonging to
that user.  Gracefully handles upgrade case and assumes current serial
number is valid when none is defined.

Second, we destroy apps that we find no record of, either due to
uninstallation while the volume was unmounted, or reinstallation on
another volume.

When mounting a volume, ensure that data directories exist for all
current users.  Similarly, create data directories on all mounted
volumes when creating a user.  When forgetting a volume, gracefully
uninstall any apps that had been installed on that volume.

Bug: 20674082, 20275572
Change-Id: I4e3448837f7c03daf00d71681ebdc96e3d8b9cc9
2015-07-04 17:08:42 -07:00
Jeff Sharkey
6c1721509a am b959b1aa: am c6913187: am a5ed2c4d: Merge "Better handling of trim/benchmark results." into mnc-dev
* commit 'b959b1aaea9fa64e3eb6cee7ce8e64d8a10657a3':
  Better handling of trim/benchmark results.
2015-07-04 07:28:34 +00:00
Dianne Hackborn
9776c69790 am 9fac4c59: am 71b97214: am 36e52cdc: Merge "Device idle fixes: issue #22209630 and issue #22225665" into mnc-dev
* commit '9fac4c590568ae86efe597456955cc4a42ddc8d9':
  Device idle fixes: issue #22209630 and issue #22225665
2015-07-04 07:27:47 +00:00
Jeff Sharkey
a5ed2c4dd3 Merge "Better handling of trim/benchmark results." into mnc-dev 2015-07-02 00:09:16 +00:00
Jeff Sharkey
e8a4b66960 Better handling of trim/benchmark results.
Request benchmarking of devices once per week during normal fstrim
maintenance window.  Tunable parameter gives us the ability to change
frequency through global setting.

Track individual benchmark and trim results for each volume, and
use scrubbed volume identifier (based on adoptiong age) when logging
stats to drop box.  Track last benchmark and trim time for each
volume separately.

Bug: 21831325
Change-Id: I53b3ed788f7820c2e5bceb2840339f5b4aada3f0
2015-07-01 15:48:34 -07:00
Dianne Hackborn
3b16cf4f47 Device idle fixes: issue #22209630 and issue #22225665
Issue #22209630: Only allow whitelisted apps to put apps on the temp whitelist

We now check whether the calling app is a system uid or in the whitelist
and, if not, throw an exception.

Issue #22225665: Alarm still goes off in idle mode (doze)

Fix a bug where we were not clearing the calling identity when coming
through the dump command to the service, and as a result when we would
eventually call out to the alarm manager it wouldn't do what we want.
This was only broken when being controlled by the shell.

Also adjust the network policy manager service's handling of device
idle transitions to only toggle the device idle state, which gets rid
of the long delay we have coming out of idle mode.  And add in a bit
of logging around going in/out of idle mode to try to understand where
things may be slow in the future.

Change-Id: I4a41f790e9b0bb31330314b94111557d479f2ba5
2015-07-01 15:05:04 -07:00
Adam Lesinski
77fa075e6d am 57a32403: am 4718afcd: am 14b57010: Merge "BatteryStats: Record cpu power usage from /proc/uid_cputime" into mnc-dev
* commit '57a324033bcb348a9c0d4d4774f7d5ebb4b56a41':
  BatteryStats: Record cpu power usage from /proc/uid_cputime
2015-07-01 01:20:31 +00:00
Adam Lesinski
14b5701029 Merge "BatteryStats: Record cpu power usage from /proc/uid_cputime" into mnc-dev 2015-07-01 00:40:25 +00:00
Adam Lesinski
e8e322fe3c am 0a7b6d6c: am 509dbdb6: am 49a2a698: Merge "Add helper function to extract app ID from shared app gid." into mnc-dev
* commit '0a7b6d6cf9c73d63339dc0b4cb7867cb90b038db':
  Add helper function to extract app ID from shared app gid.
2015-06-30 23:53:18 +00:00
Amith Yamasani
1df60ca5f1 am 67abd3b3: am da3d7b2b: am 2b64ec47: Merge "Don\'t allow non-admins to adopt sd card for internal storage" into mnc-dev
* commit '67abd3b356794b316e647a9ad20a24b09406823f':
  Don't allow non-admins to adopt sd card for internal storage
2015-06-30 23:43:31 +00:00
Adam Lesinski
49a2a6985d Merge "Add helper function to extract app ID from shared app gid." into mnc-dev 2015-06-30 23:16:20 +00:00
Amith Yamasani
2b64ec470c Merge "Don't allow non-admins to adopt sd card for internal storage" into mnc-dev 2015-06-30 23:00:08 +00:00
Adam Lesinski
f4216d30cd Add helper function to extract app ID from shared app gid.
Bug:22008744
Change-Id: Ifadc7df3777dd74932833f4d22a0e285d7bdaf95
2015-06-30 15:00:22 -07:00
Amith Yamasani
462ac3a2aa Don't allow non-admins to adopt sd card for internal storage
Bug: 21883016
Change-Id: I9af3eeffd860b076e69bb02a3dc06edba5f95898
2015-06-30 14:21:01 -07:00
Christopher Tate
510ac7fcf0 am c2487836: am 46a23872: am c4c239bf: Merge "Don\'t crash in JNI: add DeadObjectException(String msg) ctor" into mnc-dev
* commit 'c2487836618e93e0e2e6f1ca42670ebb73e5c629':
  Don't crash in JNI: add DeadObjectException(String msg) ctor
2015-06-30 00:25:49 +00:00
Christopher Tate
e56db0e3fa Don't crash in JNI: add DeadObjectException(String msg) ctor
Bug 22104446

Change-Id: I0a538119269fe45955130e4e3d0d0bae8ee64993
2015-06-29 16:04:57 -07:00
Nicolas Prevot
2f37bd3921 am d1d1a700: am 64c0c4da: am 6fd49936: Merge "Rename ALLOW_PARENT_APP_LINKING to ALLOW_PARENT_PROFILE_APP_LINKING" into mnc-dev
* commit 'd1d1a700501242cca06b5729c2bd888d6f2d4d52':
  Rename ALLOW_PARENT_APP_LINKING to ALLOW_PARENT_PROFILE_APP_LINKING
2015-06-29 17:41:26 +00:00
Nicolas Prevot
6fd49936ae Merge "Rename ALLOW_PARENT_APP_LINKING to ALLOW_PARENT_PROFILE_APP_LINKING" into mnc-dev 2015-06-29 17:08:34 +00:00
Dianne Hackborn
21002cf256 am c063f1cf: am 97abd672: am d5f387bc: Merge "Looks like MNC is gonna be API 23." into mnc-dev
* commit 'c063f1cf50c4f4b015c763af8476a25a0df7f45b':
  Looks like MNC is gonna be API 23.
2015-06-27 01:07:16 +00:00
Adam Lesinski
a7a4cccf7d BatteryStats: Record cpu power usage from /proc/uid_cputime
For now we are just recording the power usage and not using it
to calculate battery power usage or app blame. If it looks like
it is accurate, we'll adopt the values from the kernel instead of
estimating ourselves.

Bug:21498425
Change-Id: I6617e3c0ff279a65f4ff84472082f36fe4beb336
2015-06-26 17:45:43 -07:00
Dianne Hackborn
2e5cad7868 Looks like MNC is gonna be API 23.
Change-Id: I9c9c62209c949b1a16ed53eafc259e88e2ddb69a
2015-06-26 16:15:55 -07:00
Jeff Sharkey
aedb56fd18 Merge commit 'b02c73d5' into manualmerge
Change-Id: I3ec37c9d45d685c2393087bdefa6ab512cc70062
2015-06-26 09:32:09 -07:00
Jeff Sharkey
9527b223a9 Let's reinvent storage, yet again!
Now that we're treating storage as a runtime permission, we need to
grant read/write access without killing the app.  This is really
tricky, since we had been using GIDs for access control, and they're
set in stone once Zygote drops privileges.

The only thing left that can change dynamically is the filesystem
itself, so let's do that.  This means changing the FUSE daemon to
present itself as three different views:

/mnt/runtime_default/foo - view for apps with no access
/mnt/runtime_read/foo - view for apps with read access
/mnt/runtime_write/foo - view for apps with write access

There is still a single location for all the backing files, and
filesystem permissions are derived the same way for each view, but
the file modes are masked off differently for each mountpoint.

During Zygote fork, it wires up the appropriate storage access into
an isolated mount namespace based on the current app permissions.  When
the app is granted permissions dynamically at runtime, the system
asks vold to jump into the existing mount namespace and bind mount
the newly granted access model into place.

Bug: 21858077
Change-Id: I62fb25d126dd815aea699b33d580e3afb90f8fd2
2015-06-25 22:25:48 -07:00
Nicolas Prevot
f0029c1ddb Rename ALLOW_PARENT_APP_LINKING to ALLOW_PARENT_PROFILE_APP_LINKING
Also improve the javadoc.

BUG:21701782
Change-Id: I88a75ccfa71b0d5df2f4779987cf0fff56001fd3
2015-06-25 19:54:12 -07:00
Xiaohui Chen
b1cc316dce Merge "Introduce system user and primary user." 2015-06-23 22:44:03 +00:00
Xiaohui Chen
70f6c38644 Introduce system user and primary user.
Bug: 19913735
Change-Id: I2c7855915d778cf80a7154314321ddd90e2eaaac
2015-06-23 15:25:37 -07:00
Hiroshi Yamauchi
ac4d8aab79 am 26898e57: am 189ebe5d: am a1ee09c8: Merge "Clarify art.gc.gc-count-rate-histogram runtime stat." into mnc-dev
* commit '26898e575ca3d977a643657f125b254aed9e0211':
  Clarify art.gc.gc-count-rate-histogram runtime stat.
2015-06-23 21:29:56 +00:00
Dianne Hackborn
4874bd161f am 9a5ea4e9: am 67e2aab1: am b7412897: Merge "Fix issue #21254610: StrictMode uses Log.wtf which crashes apps on L+" into mnc-dev
* commit '9a5ea4e9ca9ba965dc940a2b65224cd5e4ff033b':
  Fix issue #21254610: StrictMode uses Log.wtf which crashes apps on L+
2015-06-23 18:23:12 +00:00
Hiroshi Yamauchi
a1ee09c843 Merge "Clarify art.gc.gc-count-rate-histogram runtime stat." into mnc-dev 2015-06-23 18:14:50 +00:00
Dianne Hackborn
b74128978a Merge "Fix issue #21254610: StrictMode uses Log.wtf which crashes apps on L+" into mnc-dev 2015-06-23 16:46:37 +00:00