10599 Commits

Author SHA1 Message Date
Joe LaPenna
f2b9b2d85a Revert "Don't dispatch when non-interactive and the display is off."
This reverts commit 2ccf0c8e636fd3be75c3a07f4cf60d72a4cfaa28.

BUG: 22422588
BUG: 25067918

Change-Id: I916c8bb19cd6a73c0be4bd3a0e3112938651e775
2015-11-17 22:26:41 +00:00
Joe LaPenna
d083b37917 Merge "Revert "Enable debugging for DeviceIdle DO NOT MERGE ANYWHERE"" into cw-e-dev 2015-11-17 02:42:22 +00:00
Joe LaPenna
f6ca46d301 Revert "Enable debugging for DeviceIdle DO NOT MERGE ANYWHERE"
This reverts commit 88c7c3e08051f4a2be8ee5194214678a07ff7f01.

Change-Id: I2c6d7d1d076bee0dc905d0986ced55e49481af26
BUG: 23753686
2015-11-17 02:42:10 +00:00
Wale Ogunwale
4ff84631af Initialize DisplayContent base info when object is constructed
It is possible for an external process (e.g. sys-ui) to call into
WM to get the bounds of a stack in between the construction of the
DisplayContent object and SystemServer telling WM that the display
is ready. Incorrect bounds would be returned to the caller in this
case since the baseDisplayWidth/Height is only set when the displayReady
call is made.
We now initialize the base display information when the DisplayContent
object is created so any call to get the logical display rect of the
display will always return the right bounds. This should be okay as the
display manager is initialized way before window manager.

Bug: 22961090
Change-Id: Iebd688ad8f4c08556846fcebb543e58bd2c01414
2015-11-12 20:46:07 -08:00
Jeff Sharkey
2de7e39ffa Merge "Kick movement preconditions onto handler thread." into mnc-dr-dev
am: e10faaa410

* commit 'e10faaa41026863b9d0f7dd6b0c239ff79586dc7':
  Kick movement preconditions onto handler thread.
2015-11-05 20:23:46 +00:00
Joe LaPenna
88c7c3e080 Enable debugging for DeviceIdle DO NOT MERGE ANYWHERE
Also remove DEBUG-related timeout changes to have consistent behavior.

BUG: 24247417
BUG: 25463669
BUG: 23753686

Change-Id: Icfbb1531173477f2649f7f99e3bef9860e5a9ec2
2015-11-05 11:58:48 -08:00
Jeff Sharkey
f131e1aae9 Kick movement preconditions onto handler thread.
The bulk of package moving already occurs on the handler thread,
but one of the precondition steps requires that we make an installd
call to calculate disk space of the app.  If there was already
another long-running installd call going on, we could end up ANR'ing
the caller.

Since movePackage() is already designed to return a moveId and go
async, we can push all the precondition steps onto the handler thread
to prevent the ANR.

Bug: 25490003
Change-Id: I62d555c23bbf81b791f6f4cabc40c3d64c580cf8
2015-11-05 10:28:43 -08:00
Dianne Hackborn
9a13cc6992 Merge "Fix issue #25357209: Could not send SMS or MMS messages, had to reboot" into mnc-dr-dev
am: 71e4984505

* commit '71e49845054a3a7dacc51efc4fe658818caec048':
  Fix issue #25357209: Could not send SMS or MMS messages, had to reboot
2015-11-03 18:27:18 +00:00
Dianne Hackborn
71e4984505 Merge "Fix issue #25357209: Could not send SMS or MMS messages, had to reboot" into mnc-dr-dev 2015-11-03 18:21:23 +00:00
Thierry Strudel
b1fe11fde4 Merge "NetworkTimeUpdateService: Grab a wakelock when manipulating system time" into mnc-dr-dev
am: 1942be506e

* commit '1942be506eb16589e3059fa62ea7b718440fb386':
  NetworkTimeUpdateService: Grab a wakelock when manipulating system time
2015-11-03 06:39:58 +00:00
Thierry Strudel
1942be506e Merge "NetworkTimeUpdateService: Grab a wakelock when manipulating system time" into mnc-dr-dev 2015-11-03 06:35:59 +00:00
Dianne Hackborn
fcc95a6d2c Fix issue #25357209: Could not send SMS or MMS messages, had to reboot
I think what probably happened is that since we only report an app
going in to the "interaction" state as an interaction event to usage
stats, apps that sit around in that state forever will only see one
interaction at the start and never again.  So usage stats could start
thinking they are idle.

Fix this by having the activity manager report an interaction event
for such long running applications at least once a day.

Also, because it is correct and for paranoia by protected us another
way, system uids should never go in to standby.

Change-Id: I8a3805bfca86cbe78560488a649ecd07427da99a
2015-11-02 16:15:35 -08:00
Svetoslav Ganov
c4c1866228 Merge "Don\'t try overriding system fixed permissions on install" into mnc-dr-dev
am: a47f9dad2b

* commit 'a47f9dad2bd70b594e445a6a448877122f28517a':
  Don't try overriding system fixed permissions on install
2015-11-02 21:04:25 +00:00
Svet Ganov
4f7883ce61 Don't try overriding system fixed permissions on install
bug:25397466

Change-Id: Ie92ec000a94b757178ddfdd9384407535f4af9db
2015-11-02 19:45:00 +00:00
Jeff Sharkey
e63509b509 PackageSettingBase needs to copy volume UUID.
am: 3b1c6e03f6

* commit '3b1c6e03f67ba8e4a4f4a98e996c7ceabf36affa':
  PackageSettingBase needs to copy volume UUID.
2015-11-02 17:51:53 +00:00
Jeff Sharkey
3b1c6e03f6 PackageSettingBase needs to copy volume UUID.
When copying all fields from one PackageSettingBase to another, we
also need to copy volumeUuid, which had previously been missed.

Without this, packages using sharedUserId that are installed on
adopted storage devices will be destroyed, since after reboot we
think they actually belong on internal storage (where volumeUuid is
null).

Bug: 25334169
Change-Id: I223361bd1e19e7d5dd78626682ac7c5cbecb9fa1
2015-10-31 14:04:37 -07:00
Jeff Sharkey
637d05eb5c Merge "Handle "uninstalled" apps when pruning app-ops." into mnc-dr-dev
am: a975732a83

* commit 'a975732a8302893a40cdc444f893bf09b7669173':
  Handle "uninstalled" apps when pruning app-ops.
2015-10-30 21:37:17 +00:00
Jeff Sharkey
a975732a83 Merge "Handle "uninstalled" apps when pruning app-ops." into mnc-dr-dev 2015-10-30 21:32:28 +00:00
Jeff Sharkey
e2ed23e6b2 Handle "uninstalled" apps when pruning app-ops.
During system boot, we prune app-ops belonging to apps that have
been uninstalled.  However, apps installed on adopted storage devices
haven't been scanned at this point, so they appear to be uninstalled.

To avoid pruning app-ops for these apps, we need a getPackageUid()
variant that also considers "uninstalled" apps for which we still
have PackageSetting values.

Bug: 25206071
Change-Id: I1820f674d45c5ddc1c5f10ed7d859e7025005e28
2015-10-29 19:04:15 -07:00
Thierry Strudel
8c842179bf NetworkTimeUpdateService: Grab a wakelock when manipulating system time
Bug: 24986869
Change-Id: Iab4e5ce6be0b5279ce85f868037ba256ee62c0ac
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2015-10-29 18:15:59 -07:00
Carlos Valdivia
1fd46d1581 Get rid of getTypesVisibleToCaller log spam.
am: 02bffab9dc

* commit '02bffab9dc6cc50dd0efdb4bff4feaa9672de5ea':
  Get rid of getTypesVisibleToCaller log spam.
2015-10-29 23:51:51 +00:00
Carlos Valdivia
02bffab9dc Get rid of getTypesVisibleToCaller log spam.
Bug: 25062620
Change-Id: Ia3080c501a288522a5b1de88d50f365357418ba8
2015-10-29 16:41:21 -07:00
Svetoslav Ganov
35151fbc8b Merge "Make SYSTEM_ALERT_WINDOW development permission" into mnc-dr-dev
am: 2658cb002a

* commit '2658cb002abae9341c9a82bfeaed764ba5bf97c8':
  Make SYSTEM_ALERT_WINDOW development permission
2015-10-29 01:16:46 +00:00
Svetoslav Ganov
2658cb002a Merge "Make SYSTEM_ALERT_WINDOW development permission" into mnc-dr-dev 2015-10-29 01:10:46 +00:00
Ching Tzung Lin
36da2a208e Merge "Consolidates config_windowOutsetBottom and circular_display_mask_offset" into cw-e-dev 2015-10-28 17:25:24 +00:00
Svetoslav
01af6a42a6 Make SYSTEM_ALERT_WINDOW development permission
bug:25329324

Change-Id: I0086464846bab9424764dd0d726692d96a0f1207
2015-10-27 18:12:06 -07:00
Dianne Hackborn
26654c92ca Fix issue #25289999: Lower device idle alarm limit to 10 mins.
am: 7682b26ea1

* commit '7682b26ea164ba1078495e24910f22d73766c192':
  Fix issue #25289999: Lower device idle alarm limit to 10 mins.
2015-10-27 19:46:12 +00:00
Dianne Hackborn
7682b26ea1 Fix issue #25289999: Lower device idle alarm limit to 10 mins.
This helps with some cases where perisistent network connections
need a more frequent keep alive signal.  Actually make it 9
minutes to ensure that things needing a 10 minute cycle will
execute within that time.

Change-Id: Ife8c7b7f7f82b108d5a6c1624bd6115e6087c3be
2015-10-27 10:23:38 -07:00
Puneet Kumar
fc12c7c1b7 Merge "Prevent recents from coming up when in SUW" into mnc-dr-dev
am: ca9c43b27b

* commit 'ca9c43b27b9e3bc007e731fe3a214cbed3edf8f3':
  Prevent recents from coming up when in SUW
2015-10-24 15:42:33 +00:00
Puneet Kumar
ca9c43b27b Merge "Prevent recents from coming up when in SUW" into mnc-dr-dev 2015-10-24 15:20:28 +00:00
Michael Wright
d847ad5555 Prevent recents from coming up when in SUW
Bug: 25229538
Change-Id: I141c4eb928a5ce7f9858922862fe3dc1d3a33a90
2015-10-24 13:24:15 +01:00
Ching Tzung Lin
f6e4c9da5f Consolidates config_windowOutsetBottom and circular_display_mask_offset
Three phases involved:
phase 1: change all code references to circurlar_display_mask_offset to
config_windowOutsetBottom, and mark circular_display_mask_offset
deprecated.

phase 2: remove circular_display_mask_offset from device overlays

phase 3: remove circular_display_mask_offset symbol and default setting.

Bug:25220421
Change-Id: Ia3f77610dbbb964eb58c6b28f6206799d56c44c2
2015-10-23 15:49:52 -07:00
Ching Tzung Lin
e94b3ba099 Merge "Factor chin size into dimension checking to determine if CircularDisplayMask can be turned on." into cw-e-dev 2015-10-23 18:05:52 +00:00
Dianne Hackborn
9161871f83 Merge "DO NOT MERGE Fix issue #24118803: The screen doesn\'t turn off..." into mnc-dr-dev
am: b32e020d23

* commit 'b32e020d237cfd94cdfe8c589900a899dc14413a':
  DO NOT MERGE Fix issue #24118803: The screen doesn't turn off...
2015-10-23 17:09:45 +00:00
Dianne Hackborn
b32e020d23 Merge "DO NOT MERGE Fix issue #24118803: The screen doesn't turn off..." into mnc-dr-dev 2015-10-23 17:04:55 +00:00
Dianne Hackborn
7730cd2740 DO NOT MERGE Fix issue #24118803: The screen doesn't turn off...
...after more than 60 minutes left

The sensing timeout alarm was being cancelled immediately after it
was scheduled it.  Now only cancel it when we are done sensing or
have reset activity.

Change-Id: Id0440cda7dd1b81bf871f16dfb015df6284cf6af
2015-10-22 17:40:23 -07:00
Ching Tzung Lin
9c57af4c5a Factor chin size into dimension checking to determine if
CircularDisplayMask can be turned on.

Bug:24797866
Change-Id: I1b8061a8d00dca1877c1360f6fab228a1d72a70a
2015-10-22 15:14:48 -07:00
Nicolas Prévot
f31628f58b Merge "Don\'t resolve cross-profile app links without intent picker." into mnc-dr-dev
am: 6666b29cf7

* commit '6666b29cf7c5ddaeae3d66606a9982f7c5cc8686':
  Don't resolve cross-profile app links without intent picker.
2015-10-22 20:35:19 +00:00
Anthony Hugh
0a3270e00a Merge "Give watch Home app location permissions by default" into cw-e-dev 2015-10-22 17:22:21 +00:00
Nicolas Prevot
ff91ef8ed1 Don't resolve cross-profile app links without intent picker.
If ALLOW_CROSS_PROFILE_APP_LINKING has been set:
If there is an app with status always across profiles, and some
apps without status always in the current profile: show an intent
picker instead of directly resolving across profiles.

BUG:25109215

Change-Id: I74a67d231284ce912121ea0818109fbf904183e8
2015-10-22 18:16:39 +01:00
Lorenzo Colitti
bdc458048a Merge "Reinstate CHANGE_NETWORK_STATE as a normal permission." into mnc-dr-dev
am: 809dcade99

* commit '809dcade9906001f6aa51a68aa783e20bb1d7c0d':
  Reinstate CHANGE_NETWORK_STATE as a normal permission.
2015-10-22 06:18:43 +00:00
Lorenzo Colitti
809dcade99 Merge "Reinstate CHANGE_NETWORK_STATE as a normal permission." into mnc-dr-dev 2015-10-22 06:15:05 +00:00
Dianne Hackborn
75c2993c91 Merge "Hopefully fix issue #25153459: Sandboxed_process1 thrashing" into mnc-dr-dev
am: 676534e008

* commit '676534e00805e8102ea1458eba2b2cab1dbe7b3d':
  Hopefully fix issue #25153459: Sandboxed_process1 thrashing
2015-10-22 00:40:35 +00:00
Dianne Hackborn
865907db09 Hopefully fix issue #25153459: Sandboxed_process1 thrashing
There is a race where if you unbind to a service before its
process has come up, we would leave the service record active
and keep it running.  Fix this by checking the service state
after its process up and proceed to bring it down if it is no
longer needed.

Also added a similar check when restarting a service, just in
case there are other ways we can get into this situation.

And while I am at it, I tweaked the broadcast queue dump output
a bit to hopefully make it a lot easier to figure out how long
it is taking to process broadcasts.

Change-Id: I46b98f1fe394ab8039ea4cc81fb5d3afb6391a31
2015-10-21 17:15:37 -07:00
Lorenzo Colitti
d542705066 Reinstate CHANGE_NETWORK_STATE as a normal permission.
This is a partial revert of http://ag/738523 , but not a full
revert because M apps that have gone through the WRITE_SETTINGS
route to obtain permission to change network state should
continue to have permission to do so.

Specifically:

1. Change the protection level of CHANGE_NETWORK_STATE back from
   "signature|preinstalled|appop|pre23" to "normal". This allows
   apps that declare CHANGE_NETWORK_STATE in their manifest to
   acquire it, even if they target the M SDK or above.
2. Change the ConnectivityManager permission checks so that they
   first check CHANGE_NETWORK_STATE, and then ask Settings
   if the app has the WRITE_SETTINGS runtime permission.
3. Slightly simplify the code in the Settings provider code that
   deals specifically with the ability to change network state.
4. Make the ConnectivityService permissions checks use the
   ConnectivityManager code to avoid code duplication.
5. Update the ConnectivityManager public Javadoc to list both
   CHANGE_NETWORK_STATE and WRITE_SETTINGS.

Bug: 21588539
Bug: 23597341
Change-Id: Ic06a26517c95f9ad94183f6d126fd0de45de346e
2015-10-22 08:33:45 +09:00
Todd Kennedy
d12f298da4 Merge "Maintain shared user list on OTA" into mnc-dr-dev
am: 0cd10ec8cf

* commit '0cd10ec8cf7a896bbdfc0639bf5f9c663c46edbb':
  Maintain shared user list on OTA
2015-10-21 20:38:28 +00:00
Todd Kennedy
0cd10ec8cf Merge "Maintain shared user list on OTA" into mnc-dr-dev 2015-10-21 20:33:31 +00:00
Jeff Sharkey
0b639c78f1 Narrow permission re-granting to specific volume.
am: 052366ca4e

* commit '052366ca4e6138b583d08535bd1837deb7cd58d0':
  Narrow permission re-granting to specific volume.
2015-10-21 20:32:42 +00:00
Todd Kennedy
68f6715bb2 Maintain shared user list on OTA
When a package is removed during an OTA, we weren't removing it from the
shared user list. This means anyone asking for the packages for a shared
UID would continue to see the old package.

Bug: 24906701
Change-Id: Ifb6d64195e6b8af7454e19591611af66a40cbd10
2015-10-21 13:22:01 -07:00
Anthony Hugh
52c6f9ecb3 Merge "Watch dialer should have phone permission fixed" into cw-e-dev 2015-10-21 18:52:51 +00:00