15059 Commits

Author SHA1 Message Date
Craig Mautner
768836b116 am 231bd6c5: Merge "Dismiss keyguard when resuming visible activities" into klp-dev
* commit '231bd6c514f15cb0b42a04d4fc7fc9631c743686':
  Dismiss keyguard when resuming visible activities
2013-09-30 17:07:07 -07:00
Jason Monk
915015a797 am da51d36c: Merge "Fix Sending PAC Broadcast before downloaded" into klp-dev
* commit 'da51d36c74f62a1c50f3960919cb74c5da178cd2':
  Fix Sending PAC Broadcast before downloaded
2013-09-30 17:06:23 -07:00
Craig Mautner
5c60d6b657 am c449613e: Merge "Revert behavior to perform onResume." into klp-dev
* commit 'c449613ec6ffed7b4605a6708a3341ab2dd5320f':
  Revert behavior to perform onResume.
2013-09-30 16:42:11 -07:00
Alan Viverette
410d4e33c5 Add accessibility display adjustments
BUG: 9057596
Change-Id: I5e7cc05159387cb00701e162d015e2f7ca6cbf4c
2013-09-30 15:38:09 -07:00
Matthew Williams
508a57f58f Merge "Remove blocking from SM before boot completed." into klp-dev 2013-09-30 21:46:59 +00:00
Craig Mautner
aeccbf7720 am 231bd6c5: Merge "Dismiss keyguard when resuming visible activities" into klp-dev
* commit '231bd6c514f15cb0b42a04d4fc7fc9631c743686':
  Dismiss keyguard when resuming visible activities
2013-09-30 14:13:38 -07:00
Jason Monk
179254eb41 am da51d36c: Merge "Fix Sending PAC Broadcast before downloaded" into klp-dev
* commit 'da51d36c74f62a1c50f3960919cb74c5da178cd2':
  Fix Sending PAC Broadcast before downloaded
2013-09-30 14:12:37 -07:00
Craig Mautner
0c5fdaa79b am c449613e: Merge "Revert behavior to perform onResume." into klp-dev
* commit 'c449613ec6ffed7b4605a6708a3341ab2dd5320f':
  Revert behavior to perform onResume.
2013-09-30 14:11:41 -07:00
Matthew Williams
8704fc3dae Remove blocking from SM before boot completed.
Bug: 10916655
Add a stash where the SyncHandler can copy and place
msgs rather than run them. After boot is complete
we iterate through the stash in order and send the
messages off.

Change-Id: I9c175ee79fe60952346003a29225b8687979b44e
2013-09-30 11:20:53 -07:00
Craig Mautner
312ab4bd29 Merge "Don't display hidden activities over home screen." into klp-dev 2013-09-30 18:20:48 +00:00
Carlos Valdivia
d6957d5f8d Merge "Prevent authenticators from using Settings to launch arbitrary activities." into klp-dev 2013-09-30 17:35:45 +00:00
Craig Mautner
19d112d836 Don't display hidden activities over home screen.
Fixes jank exposed in 10881705. Specifically background activity
animating up along with translucent activity. Repro steps on manta:

1. From home start Settings.
2. Press home.
3. From home start Downloads (translucent activity that takes 85% of
screen).
4. Observe that as Downloads zooms up the 15% boundary that should be
dimly transparent are showing Settings.

The cause was that there is a finishing activity in the Downloads task
that was used to launch the DownloadsActivity. The existence of that
activity kept the logic from recognizing that the home activity was
behind the DownloadsActivity, not the Settings activity.

This fix descends through all of the activities in a task sitting on
home and makes sure that they only keep home from showing if such
activities are not finishing and visible.

Change-Id: I607afce6b0000b4db634f2ce40a6c37fcee369d7
2013-09-30 10:34:55 -07:00
Dianne Hackborn
57d96f0e92 Merge "Fix issue #10948509: Crash in procstats when there is no data" into klp-dev 2013-09-30 00:21:48 +00:00
Dianne Hackborn
cb4285537b Fix issue #10948509: Crash in procstats when there is no data
Not dealing with the case where there is a null list.

Also fixed some bugs I found while looking at this:

- When resetting the stats, we would use a newly computed time stamp
  for the total durations rather than the one we used to reset the
  proc/service entries.  This would result in them being able to be
  slightly > 100%.
- There was a bug in how we split a single process state into its
  per-package representation, where we would but the cloned process
  state into the new package's entry (instead of properly for its
  own package entry), to be immediately overwritten by the new
  process state we make for that package.  This could result in
  bad data for processes that have multiple packages.
- There was a bug in resetting service stats, where we wouldn't
  update the overall run timestamp, allowing that time to sometimes
  be > 100%.
- There was a bug in computing pss data for processes with multiple
  packages, where the pss data was not distributed across all of the
  activity per-package process states.
- There was a bug in computing the zram information that would cause
  it to compute the wrong value, and then never be displayed.

Finally a little code refactoring so that ProcessState and ServiceState
can now share a common implementation for the table of duration values.

Change-Id: I5e0f4e9107829b81f395dad9419c33257b4f8902
2013-09-29 17:14:15 -07:00
Craig Mautner
564e8e6f54 Merge "Ensure correct window ordering." into klp-dev 2013-09-29 14:26:12 +00:00
Craig Mautner
64ce6b78cc Merge "Don't kill home process with the rest of its package." into klp-dev 2013-09-29 14:25:08 +00:00
Craig Mautner
5a0c54a511 Merge "Remove home package name methods." into klp-dev 2013-09-29 14:24:28 +00:00
Carlos Valdivia
5bab9daf3c Prevent authenticators from using Settings to launch arbitrary activities.
Various authenticator results such as getAuthToken and addAccount might
result in an Intent returned to the AccountManager caller. A malicious
authenticator could exploit the fact that the Settings are a system app,
lead the user to launch add account for their account type and thus get
Settings to use the intent to start some arbitrary third parties Activity.

The fix is to make sure that the UID of the app associated with Activity
to be launched by the supplied intent and the Authenticators UID share
the same signature.  This means that an authenticator implementer can only
exploit apps they control.

Bug: 7699048
Change-Id: I34330454c341e6a8422ca1ed3b390466a0feedce
2013-09-29 05:23:16 -07:00
Craig Mautner
5ee6d19fd7 Ensure correct window ordering.
Make sure that moveStackWindowsLocked() is called every time that the
stack ordering changes. This will rebuild the window list. Previously
the call was being made after the moveStack() call which got forgotten
in the addAppToken() causing the home stack to obscure incoming phone
and video calls.

Fixes bug 10023223.
Fixes bug 10678010.
Maybe fixes bug 10858941.

Change-Id: I59922dc979a19210008eac1f528704984c63c886
2013-09-28 15:58:38 -07:00
Craig Mautner
8025935573 Remove home package name methods.
Do not use the shortcut of the package name to identify the home
activity.

Fixes bug 10963726.
Fixes bug 10920950.

Change-Id: I725781a26672b055a816994aee6ea458a7f07c88
2013-09-28 13:49:16 -07:00
Craig Mautner
f31ea07d64 Don't kill home process with the rest of its package.
Killing the GEL search results was killing everything in its package.
This fix keeps the home process from being killed when a task in its
package is killed.

Fixes bug 10927223.

Change-Id: I56e75f0a0118885a1604cbd70320bbdb4f8cf1a2
2013-09-28 13:46:38 -07:00
Svetoslav
d8dbc13b47 Ignore historical printer records for installed services
When loading historical records for previously used printers we
now ignore the ones whose target print service is not installed.

bug:10955652

Change-Id: Ib295e7d88ed3c308ef6d8a11bdc1792ebbb6d526
2013-09-27 18:46:24 -07:00
Jim Miller
fb2e3c8d47 Merge "Fix permissions on WindowManagerService.showAssistant()" into klp-dev 2013-09-28 01:18:17 +00:00
Svetoslav Ganov
b415525a16 Merge "Print job files and print job records not always cleaned up." into klp-dev 2013-09-28 01:06:51 +00:00
Craig Mautner
16e6e203c0 Merge "Centralize handleAppDied and fix return to home." into klp-dev 2013-09-28 00:43:56 +00:00
Svetoslav Ganov
dd68da2741 Print job files and print job records not always cleaned up.
1. We want the files for a print job to be removed as early as possible
   typically because the print job was cancelled, completed, the app
   or the spooler crashed during print job construction. We were keeping
   around in the spooler and hence to disc infos for jobs that are in
   final state since the app that created them may hold a reference to
   a local print job objec whose info it can access to get the latest
   print job state potentially after the job reached final state. The
   issue was that we were persisting to disc created print jobs which
   were during construction which requires careful handling for the
   various cases above. This is tricky and error prone.

   We used to tell the spooler to forget the print jobs infos when the
   app that created them died. The implementation to forget a print
   job was not careful and was nuking currently running print jobs in
   addition to the ones in a terminal state. Further, if the app dies
   before a print job is completed we were left with a stale print
   job in the spooler since we missed the signal to forget it (assuming
   we forget only inactive jobs). These issues suggest that the approach
   is problematic.

   Now we have a cache of print job infos for the jobs an app created.
   This cache is updated when the state of a print jobs changes using
   the new print job state observation code. When the app dies we
   remove the cached jobs for that app. Now if the app calls to get
   the print jobs it gets the cached ones, i.e. the print jobs it
   created during its lifetime, plus the print jobs that are still
   active fetched from the spooler. Note that transient state cannot
   be kept in the spooler since we unbind from it if there is no
   work and it may get killed.

2. Improved the print sub-system logging code to show the cached
   print job infos for apps and also dump the print job PDF file
   names.

bug:10958357

Change-Id: I6f7c1968b6b7ba5be182a10df044ff7ea1fc3a61
2013-09-27 17:26:44 -07:00
Craig Mautner
6b74cb5df5 Centralize handleAppDied and fix return to home.
The home activity was being returned to when any activity in a task
that was launched from home crashed. If there were still activities
left in the task then the crash should have brought up those
activities next, not home.

This may be a partial fix for crashes where the back stack was showing
up under launcher icons. Bug 10858941.

Change-Id: I840a25bd8395bfce46f4e21b112d78b12884706d
2013-09-27 17:02:21 -07:00
Jim Miller
6c9df5054a Fix permissions on WindowManagerService.showAssistant()
Since binder call permissions are not transitive by design,
the proper way to fix this is to have the call talk directly
to keyguard from the navigation bar.

Fixes bug 9409008

Change-Id: Ibd90a79bb638c969b514455a2ad93c6ff668222d
2013-09-27 16:29:36 -07:00
Michael Wright
5b6803c913 Merge "Move EventHub over to using EPOLLWAKEUP when available" 2013-09-27 22:48:32 +00:00
Craig Mautner
0756632aa0 Dismiss keyguard when resuming visible activities
If an activity is visible behind the keyguard when it is launched
by another activity then there would be no call to dismissKeyguard.
Because the other activity is pausing the call to dismissKeyguard
is skipped in startActivityLocked(). And because it is already
visible the call to ActivityRecord.windowsVisible() is never made and
the call to reportActivityVisibleLocked() which calls
dismissKeyguard() is also never made.

This change recognizes when an activity is resumed and visible and
calls dismissKeyguard() in that case.

Fixes bug 10732489.

Change-Id: I3de1350a55231aaa14dadc8709fd0fcf4960742c
2013-09-26 17:41:05 -07:00
Jason Monk
da51d36c74 Merge "Fix Sending PAC Broadcast before downloaded" into klp-dev 2013-09-26 23:23:19 +00:00
Jason Monk
d443479a45 Fix Sending PAC Broadcast before downloaded
The PacManager now waits until the local proxy is bound and the PAC file
is downloaded before sending out the proxy broadcast.

Bug: 10895515
Change-Id: Iaa7fc0989b52453aeeb720b44df0fca0fcb959ca
2013-09-26 23:06:32 +00:00
Craig Mautner
5314a40b96 Revert behavior to perform onResume.
Back out changes from CLs ag/363992 and ag/363859. These introduced
the bugs found in bug 10917435 which is now fixed. Note that backing
out these changes reintroduces bug 10732489.

Change-Id: Ic5105dd4cfc8bf79c6f06188283d1ee3680c370c
2013-09-26 14:24:02 -07:00
Christopher Tate
a4c4c9fb12 am a63816c1: am 4e9c7d8b: Merge "Sigh." into klp-dev
* commit 'a63816c1bb4e9dc93df3fe498eca74cde1f45bc3':
  Sigh.
2013-09-26 14:18:20 -07:00
Svetoslav Ganov
ea641208a0 am ef724232: am c6afd813: Merge "PackageManager#queryIntentServices breaks its contract." into klp-dev
* commit 'ef7242326ad76e7cef6d21b3e83f2510acf8beeb':
  PackageManager#queryIntentServices breaks its contract.
2013-09-26 14:18:16 -07:00
Christopher Tate
a63816c1bb am 4e9c7d8b: Merge "Sigh." into klp-dev
* commit '4e9c7d8ba3caa8b558e2a1de796c100a562445ae':
  Sigh.
2013-09-26 14:14:54 -07:00
Svetoslav Ganov
ef7242326a am c6afd813: Merge "PackageManager#queryIntentServices breaks its contract." into klp-dev
* commit 'c6afd813ac2ddaa576fc7866479e933627622248':
  PackageManager#queryIntentServices breaks its contract.
2013-09-26 14:14:51 -07:00
Christopher Tate
4e9c7d8ba3 Merge "Sigh." into klp-dev 2013-09-26 21:10:39 +00:00
Svetoslav Ganov
c6afd813ac Merge "PackageManager#queryIntentServices breaks its contract." into klp-dev 2013-09-26 21:10:19 +00:00
Amith Yamasani
38a1192950 am 946395ec: am d2534f8c: Merge "Don\'t remove restrictions files that are valid" into klp-dev
* commit '946395ec7f2413640818c5ed73dd11966606da54':
  Don't remove restrictions files that are valid
2013-09-26 14:07:49 -07:00
Amith Yamasani
946395ec7f am d2534f8c: Merge "Don\'t remove restrictions files that are valid" into klp-dev
* commit 'd2534f8c05ccdf692f1e265ae719b67290d15050':
  Don't remove restrictions files that are valid
2013-09-26 14:04:21 -07:00
Amith Yamasani
d2534f8c05 Merge "Don't remove restrictions files that are valid" into klp-dev 2013-09-26 21:02:10 +00:00
Jeff Sharkey
9f68c10424 am 66ee877f: am 8c6c0419: Merge "Tighten flags enforcement, API to test Uris." into klp-dev
* commit '66ee877f5d27b4dd4081702ad216359971e1b8b3':
  Tighten flags enforcement, API to test Uris.
2013-09-26 13:40:34 -07:00
Jeff Sharkey
66ee877f5d am 8c6c0419: Merge "Tighten flags enforcement, API to test Uris." into klp-dev
* commit '8c6c04197e58be6f3e46ba6a38f5d16e4fb091fa':
  Tighten flags enforcement, API to test Uris.
2013-09-26 13:37:21 -07:00
Jeff Sharkey
8c6c04197e Merge "Tighten flags enforcement, API to test Uris." into klp-dev 2013-09-26 20:33:29 +00:00
Christopher Tate
ae269d5727 Sigh.
Bug 10746233

Change-Id: I18c84f2bd53a511fc86be42b5d72062650e5b289
2013-09-26 13:23:43 -07:00
Amith Yamasani
fc95e70abd Don't remove restrictions files that are valid
This fixes a bug in parsing the package name from a file name. The suffix
was not taken into account, resulting in all restrictions files being
removed on switching to a user.

Bug: 10947554
Change-Id: I62725bbbdc0e15609872de3896130d4acbc35386
2013-09-26 13:20:17 -07:00
Jeff Sharkey
ee2f7df9ee Tighten flags enforcement, API to test Uris.
Check and throw if callers request invalid grant flags.  Add API to
test if a Uri is backend by a DocumentsProvider.

Bug: 10919391, 10935608
Change-Id: Ifa6afefb95983558c8c64dc15ddf650e9fe07080
2013-09-26 13:14:45 -07:00
Svetoslav Ganov
cb247866ac PackageManager#queryIntentServices breaks its contract.
PackageManager#queryIntentServices javadoc contract states that this
method (and the like) never returns null, rather an empty list if
no result is found. However, there is a path in the PackageManagerService
that returns null, thus breaking the contract. Handling the null list
explicitly.

bug:10930560

Change-Id: I708c51b8b7075e529145c8b0bf159efd6b697532
2013-09-26 12:34:49 -07:00
Svetoslav Ganov
af1066d917 am 4609d9a9: am 5cab967b: Merge "Adding hidden APIs for observing the print jobs state." into klp-dev
* commit '4609d9a9ebc17d804d31d5241968157439c92a57':
  Adding hidden APIs for observing the print jobs state.
2013-09-26 12:28:59 -07:00