14743 Commits

Author SHA1 Message Date
Svetoslav
7bfbbcb04b Refactor how the print dialog activity is started.
1. Before the print job activity was started asyncronously with
   respect to the print call on to the print manager. This was
   creating a situation where the starting activity may finish
   before the print dialog appears which may lead to an orphaned
   print document adapter with no data to print (as the UI is
   is gone), or strange behaviors where the print dialog starts
   on as a separate task.

   To address this the pending intent for starting the print
   dialog is not started by the print spooler since we cannot
   call into it synchronously as we have to start its process
   and bind to the spooler service which leads to jankyness in
   the client app. Now the pending intent is created by the
   print manager service in the synchronous print call so
   from an app's perspective calling print starts the activity.

   The side effect of this design is that the print dialog
   activity may start before the system is bound to the spooler
   service. In such a case the print activity cannot start
   poking the print spooler state as the system registers
   callback to observe the spooler state. To address this
   the print spooler activity disables the UI and also binds
   to the spooler service which happenes immediately after it
   is started. As soon as the print dialog binds to the
   service it starts the UI.

2. Fixed an bug in the printer adapter of the print dialog that
   was leading to a crash if the only item in the adater is the
   all pritners option and it is selected.

3. Piping the package name that started the printing so we can
   pass it to the storage UI as a hint to open the last location
   the app used.

bug:11127269

Change-Id: Ia93820bdae0b0e7600a0930b1f10d9708bd86b68
2013-10-11 09:11:24 -07:00
Dianne Hackborn
fa8830715d Merge "Fix issue #11175600: Proc stats is aggregating stats in the wrong direction" into klp-dev 2013-10-11 01:29:26 +00:00
Dianne Hackborn
59da67900d Fix issue #11175600: Proc stats is aggregating stats in the wrong direction
Change-Id: I7f06fbde8f52296cb2932003b4da77b2c68a6011
2013-10-10 18:27:24 -07:00
Dianne Hackborn
2c09e8cdf6 Merge "Fix issue #11157301: Bad process stats when apps are binding to long-running services" into klp-dev 2013-10-10 23:11:59 +00:00
Dianne Hackborn
32366b29c4 Fix issue #11157301: Bad process stats when apps are binding to long-running services
We now treat PROCESS_STATE_TOP more specially.  When a process has another
client bound to it that is TOP, it will only allow itself to go in the TOP
state if it is not already running for another significant reason.

Change-Id: Ia3856406bd481bf6e98d55100a5513ccf4060e0d
2013-10-10 16:10:32 -07:00
Jason Monk
8b81a63810 Merge "getProxy in ConnectivityService returns port w/PAC" into klp-dev 2013-10-10 22:52:03 +00:00
Matthew Xie
64be26fad7 Merge "Check callback null condition for register/unregsiter state change callback" into klp-dev 2013-10-10 21:56:20 +00:00
Jason Monk
decd295b13 getProxy in ConnectivityService returns port w/PAC
Changes the PacManager to report message back to ConnectivityService
to send a broadcast once the download has completed.  This allows the
ConnectivityService to store the correct proxy info for getProxy().

This made the problem arise that ProxyProperties was not handling port
while it had PAC.  Added small fix for equals() and parcelization.

The combination of these fixes seems to resolve Bug: 11028616.

Bug: 11168706
Change-Id: I92d1343a8e804391ab77596b8167a2ef8d76b378
2013-10-10 17:01:45 -04:00
Matthew Xie
9b69399399 Check callback null condition for register/unregsiter state change callback
Fix BluetoothPan closing sequence for unregsiter state change callback
bug 11160007

Change-Id: I405ec91a938289fe9541de2ebd9abc1fb938f44a
2013-10-10 12:12:04 -07:00
Alan Viverette
90abd6d1df Merge "Ensure accessibility node cache is synced with service state" into klp-dev 2013-10-10 18:19:25 +00:00
Jeff Sharkey
635892fe35 Merge "Guard against NPE when using existing process." into klp-dev 2013-10-10 17:17:14 +00:00
Jeff Sharkey
2ffa50df6f Guard against NPE when using existing process.
Bug: 11167561
Change-Id: I51ca7daa71504119fb64bc7bc2b7da4e03b13861
2013-10-10 09:52:48 -07:00
Svetoslav Ganov
a18661d592 Coalescing multiple print job notifications.
1. We used to show a single notificaiton for every print job but
   this is against th UX guidelines. Since we have to lead by
   example, this change adds coalescing of multiple notifications.

bug:11155212

2. Print job state callback in the PrintManager now correctly
   invoked on the main thread.

bug:10983508

Change-Id: I906e9e62198fa37cb4d2f71fce07ed475d61e1bd
2013-10-09 23:43:11 -07:00
Craig Mautner
4ca2aec2be Merge "Add task to list before looking it up." into klp-dev 2013-10-10 00:20:08 +00:00
Alan Viverette
3d1c5a7236 Ensure accessibility node cache is synced with service state
BUG: 11152210
Change-Id: Ibffd2909b6b06568de9344e536a200d8a7abac9d
2013-10-09 17:10:21 -07:00
Craig Mautner
8e79734ba3 Add task to list before looking it up.
Rearranging the order of operations allows a newly added task to be
bumped to the top during window sorting. Also, redundant calls moving
the home task to the bottom when moving an app task to the top are
removed.

Maybe fix 10858941.

Change-Id: Ic42d2e7045175384591644675dd0e8013a7c7528
2013-10-09 16:39:42 -07:00
Christopher Tate
d606be2562 Merge "Don't crash when component enable/disable broadcasts race with uninstall" into klp-dev 2013-10-09 22:18:41 +00:00
Jeff Sharkey
b3da3db34a Merge "Surface outgoing Uri permission grants." into klp-dev 2013-10-09 22:07:11 +00:00
Christopher Tate
06e5fed139 Don't crash when component enable/disable broadcasts race with uninstall
Bug 11154482

Change-Id: I55107fec51bf5efada136052c451f293976360d6
2013-10-09 15:02:17 -07:00
Jeff Sharkey
bcaac0adec Surface outgoing Uri permission grants.
This enables apps to discover and clean up persisted Uri grants when
the underlying Uri becomes invalid, such as when an account is
removed.

Bug: 11142566
Change-Id: Ieeb36cb1155acf226327ebe91cdd30b822d69d1b
2013-10-09 14:32:11 -07:00
Amith Yamasani
b0975540a4 Merge "Avoid deadlock between mUsers and cacheLock" into klp-dev 2013-10-09 20:57:35 +00:00
Dianne Hackborn
efeb6f3c1b Merge "Fix issue #11087316: Can't run dumpsys procstats on user builds in some cases!" into klp-dev 2013-10-09 19:15:35 +00:00
Dianne Hackborn
08b36a47cf Fix issue #11087316: Can't run dumpsys procstats on user builds in some cases!
Once we pass the dump perm check, we are safe.

Change-Id: I58f483573874ca9f8f914fb94137f8a2afafaf25
2013-10-09 12:14:11 -07:00
Craig Mautner
e8a057a9ae Merge "Remove overly tight constraint on drawn Keyguard." into klp-dev 2013-10-09 19:10:45 +00:00
Jeff Sharkey
fcd8a39edb Merge "Install providers enabled after app started." into klp-dev 2013-10-09 17:45:11 +00:00
Adam Lesinski
9d958f6993 Merge "Allow killed task to remove itself" into klp-dev 2013-10-09 17:36:57 +00:00
Craig Mautner
4e8a19c73a Remove overly tight constraint on drawn Keyguard.
The requirement that a window that is invisible will not be drawn is
incorrect. In particular the test fails before a surface has even been
added (mHasSurface == false) or shown (mPolicyVisibility == false).
This was causing the screen to turn on before Keyguard had been drawn
and exposing surfaces that would have normally remained hidden.

Also, don't pass null into KeyguardServiceDelegate.onShown() or we
will immediately turn the screen on before Keyguard is drawn.

Fixes bug 11062635.

Change-Id: I964c7ef186d0a94678020b9c27ca6b79e5433350
2013-10-08 21:32:37 -07:00
Lorenzo Colitti
2845e5196a Merge "Fix captive portal detection on IPv6 networks." into klp-dev 2013-10-09 02:14:43 +00:00
Jeff Sharkey
dd97f4233f Install providers enabled after app started.
When an app has already been started, and a ContentProvider component
is enabled with DONT_KILL_APP, use the existing ProcessRecord to
install the provider.

Bug: 11118692
Change-Id: I990f18b337eb19768ee1db895f1e2eb982046cce
2013-10-08 17:02:26 -07:00
Adam Lesinski
aa52437745 Allow killed task to remove itself
When killing a task from the recents UI, the activities in
the task would be scheduled for destruction, and the task would
be forcefully removed from the ActivityStack, destroying the
ActivityStack in the process if this was the last task. Since the
ActivityStack was removed, any activities calling back to report
their onDestroy was called (or any timeouts that trigger if
activities fail to do this) would be dropped and certain cleanup
routines would not be called.

Tasks and their ActivityStacks are removed automatically when the
activities within them are removed, so this manual removal was
preventing the cleanup routines from running.

bug:10920157
Change-Id: Ied9d4f8fea761a373a9a80a0dfe810590ab411d8
2013-10-08 15:41:18 -07:00
Jeff Sharkey
a6af40cda2 Merge "Add secondary external storage support." into klp-dev 2013-10-08 21:05:36 +00:00
Jeff Sharkey
44cbdec292 Add secondary external storage support.
When SECONDARY_STORAGE is defined by the hardware configuration,
include those paths in the new getExternalCacheDirs() and
getExternalFilesDirs() APIs.  Give secondary volumes valid state
until vold reports back.

Bug: 10330128, 10330229
Change-Id: Ifa55bfda47fd7c750f462dd26c98792ad462ab91
2013-10-08 12:57:11 -07:00
Lorenzo Colitti
143a2cf413 Fix captive portal detection on IPv6 networks.
Currently the captive portal check URL is generated by
concatenating scheme, "://", IP address, and port. This breaks
for IPv6 because IPv6 addresses in URLs must be enclosed in
square brackets (e.g., http://2001:db8::1/generate_204 is
invalid; should he http://[2001:db8::1]/generate_204 instead).
The resulting MalformedURLException causes isMobileOk to report
that there is no captive portal, even if there is one.

Fortunately the three-arg URL constructor already knows how to
construct URLs with IPv6 addresses. Use that instead of
generating the URL ourselves.

Bug: 10801896
Change-Id: I02605ef62f493a34f25bb405ef02b111543a76fd
2013-10-08 14:15:14 +09:00
Alan Viverette
6930d3805e Merge "Ignore certain WindowManager flags when touch exploration is enabled" into klp-dev 2013-10-08 00:47:23 +00:00
Craig Mautner
b729e99578 Merge "Yet more debugging for 10858941." into klp-dev 2013-10-08 00:16:41 +00:00
Craig Mautner
e2dd83a5b4 Yet more debugging for 10858941.
Change-Id: I258957044cb1a8331124f6abbe53428429c33355
2013-10-07 17:01:41 -07:00
Dianne Hackborn
cade4089e7 Merge "Fix issue #11113111: dumpsys activity service is broken" into klp-dev 2013-10-07 22:30:34 +00:00
Alan Viverette
5a0f4eccfb Ignore certain WindowManager flags when touch exploration is enabled
Specifically, ignore any flags that alter the visibility of the navigation
bar and transparency.

BUG: 11082573
Change-Id: I17264dc55a1c6c3cb9b9cf92d5121799cecee5b8
2013-10-07 15:12:57 -07:00
Jeff Sharkey
bcc77b502b Merge "Add <intent-filter> support to <provider>." into klp-dev 2013-10-07 21:41:45 +00:00
Dianne Hackborn
13c590de1e Fix issue #11113111: dumpsys activity service is broken
Change-Id: Ie02d27b377c562085ef7eb5dea144ce2f382c11d
2013-10-07 14:36:47 -07:00
Jeff Sharkey
85f5f81320 Add <intent-filter> support to <provider>.
For the new documents work, we're only interested in the subset of
ContentProviders that actually implement DocumentsContract.  Instead
of returning all providers, add <intent-filter> support to make it
easier to limit the set of returned ProviderInfo.

Define a well-known action for DocumentsProviders, and start using it
when querying for roots.  Continue supporting the old <meta-data>
approach until all apps have been updated.

Bug: 8599233
Change-Id: I05f049bba21311f5421738002f99ee214447c909
2013-10-07 14:19:13 -07:00
Craig Mautner
e7dd3469ff Merge "Relax conditions for including windows behind dialogs" into klp-dev 2013-10-06 21:29:34 +00:00
Craig Mautner
ade5f387fa Merge "Revert to jb-mr2 handling of app died." into klp-dev 2013-10-06 21:29:05 +00:00
Christopher Tate
eb09f99038 Merge "Make sure to maintain privilege when downgrading bundled apps" into klp-dev 2013-10-06 21:26:19 +00:00
Dianne Hackborn
4bc5909a03 Merge "Fix issue #11050678: Large memory leak in ActivityStack" into klp-dev 2013-10-06 20:28:47 +00:00
Dianne Hackborn
f46bb1d99b Merge "Fix issue #11086275: Thumbnail only created once for top activity" into klp-dev 2013-10-06 20:28:07 +00:00
Craig Mautner
ff174d52bd Relax conditions for including windows behind dialogs
When a dialog has been minimized to recents the windows behind it
won't be visible. Yet we were requiring them to be visible in order to
be included in the ones being restored. This left the background
windows invisible on resume and showed home behind floating dialogs
instead of the activity that launched the dialogs.

Fixes bug 11067724.

Change-Id: Icadd7ec8fe7c73b52982b6ff5b5d98b8fb8476b0
2013-10-06 12:24:56 -07:00
Craig Mautner
dd88879ce1 Merge "Evaluate task on top of home when task is brought to front." into klp-dev 2013-10-06 17:44:38 +00:00
Craig Mautner
1703fd877f Merge "Resume user where they left off." into klp-dev 2013-10-06 17:44:18 +00:00
Craig Mautner
1909125eba Revert to jb-mr2 handling of app died.
Trying to span all potential stacks looking for apps was too complex
and error-prone. Extending the jb-mr2 method across multiple stacks.

Fixes bug 11080696.

Change-Id: I6391ceae4ad6a0955a409c3fb27472219fd5bf6b
2013-10-06 10:39:31 -07:00