Commit Graph

2625 Commits

Author SHA1 Message Date
Jim Miller
aa1a35ba27 am 2e56339a: am bcedcde8: am 204c2de8: am c7b0435c: resolved conflicts for merge of 1d4247c4 to mnc-dr-dev
* commit '2e56339a4a1133e9aface1c851f1ab67cff72109':
  Improve tracking of screen on reasons.
2015-07-15 22:40:32 +00:00
Jim Miller
2e56339a4a am bcedcde8: am 204c2de8: am c7b0435c: resolved conflicts for merge of 1d4247c4 to mnc-dr-dev
* commit 'bcedcde8093b48c3d013cc57dde42bdd17d6dcb9':
  Improve tracking of screen on reasons.
2015-07-15 22:26:05 +00:00
Jim Miller
c7b0435cc7 resolved conflicts for merge of 1d4247c4 to mnc-dr-dev
Change-Id: I057c529dcd5d48e0dcf256a9d096c5d8b815892a
2015-07-15 14:33:10 -07:00
Dianne Hackborn
280a64e793 Improve tracking of screen on reasons.
- New screen on app op to record the last time each app has
  caused the screen to be turned on.
- New battery stats event that tells us the reason the screen
  has been asked to turn on.
- Propagate out power manager API to specify the reason a caller
  is asking to have the screen turned on.

Note that currently the window flag to turn the screen on bypasses
much of this because it is being handled in the window manager by
just directly telling the power manager to turn the screen on.  To
make this better we need a new API where it can specify who it is
calling the API for.

Change-Id: I667e56cb1f80508d054da004db667efbcc22e971
2015-07-15 09:59:07 -07:00
Dianne Hackborn
e0d96ce96c am 808dd5cc: am 4753b5bc: am 4f73990a: am aa3694f2: am f1f8b9cc: Merge "Fix issue #21626564: MMS should be receivied while Dozing" into mnc-dev
* commit '808dd5cc8af3e26d12c1b5fe80663eb306cc0c20':
  Fix issue #21626564: MMS should be receivied while Dozing
2015-07-15 02:37:04 +00:00
Dianne Hackborn
808dd5cc8a am 4753b5bc: am 4f73990a: am aa3694f2: am f1f8b9cc: Merge "Fix issue #21626564: MMS should be receivied while Dozing" into mnc-dev
* commit '4753b5bcf4877e125a8e38d5bcd2ac46c1744429':
  Fix issue #21626564: MMS should be receivied while Dozing
2015-07-15 02:21:54 +00:00
Dianne Hackborn
aa3694f2b3 am f1f8b9cc: Merge "Fix issue #21626564: MMS should be receivied while Dozing" into mnc-dev
* commit 'f1f8b9cc3ff5774e695568e8f02b018c0fd02844':
  Fix issue #21626564: MMS should be receivied while Dozing
2015-07-15 01:57:21 +00:00
Dianne Hackborn
fd854ee58c Fix issue #21626564: MMS should be receivied while Dozing
We now place whoever is receiving the MMS on the temporary
whitelist while doing so, so they can get network access to
download it.

There was also an issue that needed to be fixed where we
were no longer updating the list of allowed uids while
dozing based on their proc states...  we now do that.

Also did a bit of optimization of the temp white list update
path do the network policy manager, instead of going through
a broadcast we now directly call in to the network policy
manager.  This also allows us to have a synchronous version
of updating the list, so we can know the app has network access
before we tell it to do anything.

Finally added battery stats events for things going on and off
the whitelist so we can diagnose the behavior there.

Change-Id: Ic7fe010af680034d9f8cb014bb135b2addef7455
2015-07-14 18:33:08 -07:00
Jeff Sharkey
dc3e83eae3 am 026d6f97: am de404257: am 556136c8: am c7a60749: am d3719ab0: Merge "Better handling of storage paths." into mnc-dev
* commit '026d6f97d120f7f557a50effd82e6b3b6f032870':
  Better handling of storage paths.
2015-07-14 22:12:28 +00:00
Jeff Sharkey
026d6f97d1 am de404257: am 556136c8: am c7a60749: am d3719ab0: Merge "Better handling of storage paths." into mnc-dev
* commit 'de404257a99d3a94b4d92923248af77817e447ed':
  Better handling of storage paths.
2015-07-14 22:01:16 +00:00
Jeff Sharkey
c7a607496a am d3719ab0: Merge "Better handling of storage paths." into mnc-dev
* commit 'd3719ab07a0ba66c019979ce19c45b77c4aae92e':
  Better handling of storage paths.
2015-07-14 21:18:26 +00:00
Mathieu Chartier
f8cc20031e am 82f91da7: am ad4a285a: am ebac4d1b: Merge "Change conditionallyCheckInstanceCounts to use countInstancesOfClasses"
* commit '82f91da700445c4606faea45ac8f0dc9f2857471':
  Change conditionallyCheckInstanceCounts to use countInstancesOfClasses
2015-07-14 20:47:32 +00:00
Mathieu Chartier
82f91da700 am ad4a285a: am ebac4d1b: Merge "Change conditionallyCheckInstanceCounts to use countInstancesOfClasses"
* commit 'ad4a285af619ea29f79dbe4da19061c49f24a8c9':
  Change conditionallyCheckInstanceCounts to use countInstancesOfClasses
2015-07-14 20:27:42 +00:00
Adrian Roos
b483aebdd3 am 1d9a312c: am 3d2c2980: am a2231a75: am 9c013a21: Merge "Show charging speed on Keyguard" into mnc-dr-dev
* commit '1d9a312c2c6a372071572fb32e10de19e67482d6':
  Show charging speed on Keyguard
2015-07-14 20:15:27 +00:00
Jeff Sharkey
983294596e Better handling of storage paths.
Give more details about why we failed to create storage paths, and
search for underlying volumes using canonical paths.

Bug: 22135060
Change-Id: I75d3584403ece310438b05f5b9fe72d94c9096c6
2015-07-14 13:08:22 -07:00
Adrian Roos
9c013a2117 Merge "Show charging speed on Keyguard" into mnc-dr-dev 2015-07-14 19:17:07 +00:00
Marco Nelissen
1cdd6e83fb am b2fef7a8: am f12612c8: am 48c78cfb: am c56668eb: am 3ced9617: Merge "Use original path if translated path doesn\'t exist" into mnc-dev
* commit 'b2fef7a81f39c38eff79897e7af02fff20b829cb':
  Use original path if translated path doesn't exist
2015-07-14 18:47:52 +00:00
Ian Pedowitz
fbb4a38c7c resolved conflicts for merge of 30efac5a to master
Change-Id: I0dad4cf10ed01cbf49e33f0c2ed1d6f8a1c893e0
2015-07-14 11:38:49 -07:00
Adrian Roos
7b04311d88 Show charging speed on Keyguard
Bug: 8099739
Change-Id: I2e5c21dd7ec028ce47fb03ab71e74f7fccaa9e36
2015-07-14 18:22:39 +00:00
Marco Nelissen
c56668eb22 am 3ced9617: Merge "Use original path if translated path doesn\'t exist" into mnc-dev
* commit '3ced96178b1b132705e773736cbb707a3a0cd951':
  Use original path if translated path doesn't exist
2015-07-14 17:36:07 +00:00
Marco Nelissen
aa41103668 Use original path if translated path doesn't exist
Bug: 22376538
Change-Id: I2f6af4fa31c097e2e2d619a068cf83721091c450
2015-07-14 08:25:23 -07:00
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
Ian Pedowitz
d7be214ca4 resolved conflicts for merge of 8cee6587 to mnc-dr-dev
Change-Id: I0b2ed52214bb097d7fd69434afd0c6c890b5afb3
2015-07-13 22:58:29 -07:00
Svet Ganov
6ee871e598 Teach storage appops.
For modern apps targeting M SDK and up the external storage state
is deterined by granted permissions. For apps targeting older SDK
the storage access is determined by app ops correspning to the
storage permissions as the latter are always granted.

When app ops change we do not remount as we kill the app process
in both cases enabling and disabling an app op since legacy code
is not prepared for dynamic behavior where an operation that failed
may next succeed. Hence, we remount when we start the app.

For modern apps we don't kill the app process on a permission
grant, therefore we synchronously remount the app storage.

bug:22104923

Change-Id: I601c19c764a74c2d15bea6630d0f5fdc52bf6a5a
2015-07-13 18:22:30 -07: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
Mathieu Chartier
d288a26672 Change conditionallyCheckInstanceCounts to use countInstancesOfClasses
countInstancesOfClasses allows passing multiple classes unlike
countInstanceOfClass. This provides a speedup since we dont traverse
the heap multiple times.

Changed ActivityThread.dumpMemInfo to do a GC since countInstancesOfClass
no longer does GC before counting.

https://code.google.com/p/android/issues/detail?id=177552

Change-Id: Ia85684f40cf59a52aa71a8479c711a994651209b
2015-07-10 15:33:59 -07: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