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
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
Remove unused views when we return to keyguard

This fixes a bug where launching the camera would move
the camera view to the root hierarchy.  In insecure mode, a
subsequent dismiss() comes in and tears down the view hierachy
before the event can be processed, which left the view in the
root hierarchy.

The fix is to remove all children when we reconstruct keyguard.

Fixes bug 10640209

Change-Id: Ia67a93cd219d2b906b6e3bdd04cc355eeffe857e
Merge "Update navbar camera icon and widget background assets in keyguard." into klp-dev
Add gravity settings to PopupWindow/ListPopupWindow/PopupMenu

Allow calling code to specify left/right/start/end gravity when
showing a popup attached to an anchor. This allows easy alignment of
either the right or left edges of the popup and anchor view.

Bug 10728401

Change-Id: Ie0844a04ea0576fa67b0972f5873aaa4c5b823f6
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
Fix for Text fading on RTL app names is done at the beginning...

This is a fix for bug 10918591 [Android][bidid][HH] "Text fading on RTL
app names is done at the beginning of the text, not at the end."

The old logic for getting the fade edge was not symmetric with respect
to the text direction - when the text was centered, it basically
always placed the fade edge at the left, which of course is appropriate
for LTR text but not RTL. This patch makes the two paths symmetric
and sensitive to text direction.

Change-Id: Ief7604aeb659d474864468d2f102a53f5b43d09e
add Wallet Instant Buy and Google Cloud Platform to the Google services landing page.

Change-Id: I196ac5955477cd822bbf78a9cd4fd53a3d8fbd5f
am a8f519ff: add Wallet Instant Buy and Google Cloud Platform to the Google services landing page.

* commit 'a8f519ff9cb38e97db34f5a7bac95a9e09ed5ade':
  add Wallet Instant Buy and Google Cloud Platform to the Google services landing page.
am 194925f9: am a8f519ff: add Wallet Instant Buy and Google Cloud Platform to the Google services landing page.

* commit '194925f9e894d35991920edbaa0681c1aea48120':
  add Wallet Instant Buy and Google Cloud Platform to the Google services landing page.
Merge "Fix Sending PAC Broadcast before downloaded" into klp-dev
am ef4e5e61: am 194925f9: am a8f519ff: add Wallet Instant Buy and Google Cloud Platform to the Google services landing page.

* commit 'ef4e5e6182e020d0dd349848b38a33e0c33491b4':
  add Wallet Instant Buy and Google Cloud Platform to the Google services landing page.
Merge "Fix for Text fading on RTL app names is done at the beginning..." into klp-dev
Docs: In the section "Determine if You Have an Internet Connection," I added to the code snippet so that it also checks whether activeNetwork is null.
Bug: 10797360

Change-Id: I95344c2200cad5efb6457a9cb8fcd0e87298dcda
Merge "Make fading transitions work better" into klp-dev
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
Merge "Add gravity settings to PopupWindow/ListPopupWindow/PopupMenu" into klp-dev
Merge "Dismiss keyguard when resuming visible activities" into klp-dev
Printers in the list of printers change position.

1. The printers in the printers list of settings change position if
   they are updated. The settings app is using hidden platform APIs
   the this change fixes.

2. Enable ProGuard for the PrintSpooler.

3. Added icons on the list of printers so the user knows which
   print service used the printer. Now the user can know when
   he is using cloud print and maybe incurring data costs vs
   local printer discovered by a vendor plug in.

bug:10955751

Change-Id: I292f48b424cb561218fdb424d0388f4d786d8339
Merge "Printers in the list of printers change position." into klp-dev