Fix incorrent page range parsing when custom print options used.

We have APIs for a print service to declare an activity with custom
print options. In this activity the service can add custom properties
as well as change the standard ones such as pages to print. The ranges
of selected pages from the custom activity was incorrectly parsed
resulting in an off by one error in what is shown to the user and as a
result getting an exception when trying to print.

bug:11719051

Change-Id: Id04c94608178895f1d47381a63133f0eba7645e1
Notify apps when insets change.

Activities that handle their own configuration get layout when hidden
and the configuration changes but not when the content insets change
if they are hidden. They need to get a fresh layout for both
situations.

Fixes bug 11544694.

Change-Id: Iff3a9adb72ea7dfc3e5cd38e1b9cd7cf2006f8f5
Mask OOBE when filtering recent documents.

There is a data ownership issue related to recent documents Cursors,
and the loader and UI threads can end up traversing the same Cursor
at runtime.  This change masks OOBE crashes caused by this race until
we have time to fix cleanly.

Bug: 11736668
Change-Id: I2039a5edcf341fcaedacc2f08bde96fc5a271782
Harden against transiently unavailable backup transports

The init & clear operations are particularly important to ensure
delivery when at all possible, so we retry those periodically
if the transport is unavailable when we first attempt them.

Now with 100% less build break.

Bug 11716868

Change-Id: I2af4e93788068cfac97c0a48d3568c561eefa23d
Only scan for wifi display when there is no active connections

Bug: 11717053
Change-Id: I4ab73f6517fbfb8fcc131b89d0e934380dcf69e0
Make action bar media router icons blue again.

This partially reverts commit e7ae644522f692c204d0233f91e77c7841bdfe53.

Bug: 11790271
Change-Id: Ib83dbede4472ba08bcf79bf9009d690278841723
Revert "PreferencesFragment showing the breadcrumb area in single pane mode."

This reverts commit 2b8795a9db2d494c38d34fd113a9153880a555c0.

Change-Id: If8dcc7190cbe66af09945d8b23a3e1d8fd791b1d
Revert "PreferenceFragment showing the breadcrumb when not needed."

This reverts commit 7db97b0a29c613afb78c2734bf2504324a71963d.

Change-Id: Iefe9807fd75baf04e61ec59b508e438320c80fe3
Fix issue #11790471: Crash removed home buttons and notification bar/shade

Whoops persistent processes are, well, persistent.  Don't remove
services from them.  We'll be keeping that process record around.

Change-Id: I29e9fb6f704efdf0caad5e0307a7adbb416eed3b
Stop wifi display discovery when no longer needed.

Keep track of how many clients are requesting scans and scan
continuously until all of them are gone then explicitly terminate the
scan instead of letting it time out as before.

Suspend wifi display scans while connecting or connected to a remote
display.  This is handled by both the display manager and media router
since neither has complete information about what is happening.
Much of this code will no longer be needed once wifi display support
is integrated directly into the media router service.

Ensure that we don't attempt to scan or connect to wifi displays
while the wifi display feature is off.

Infer when a connection attempt fails and unselect the wifi display
route automatically so it doesn't appear to be connecting forever.

Fix issues around correctly canceling and retrying connection attempts.
Often we would cancel but not retry.

Improved connection reliability somewhat.  It seems that discovery must
already be in progress in order for a connection attempt to succeed.

Ensure QuickSettings uses exactly the same logic as the MediaRouteButton
to determine when the remote display tile should be made visible.

Bug: 11717053
Change-Id: I18afc977b0e8c26204b8c96adaa79f05225f7b6e
Camera: add ISO mode support

Change-Id: Ied2075f950269990d836fc768b2c6c36088d494f
Camera: add additional ISO modes (2/2)

Change-Id: I3460c3de4cbef467430673146a9ddb2fdc8f5032
Fix Photosphere/Camera FCs

Photosphere is setting a few parameters "blindly"
while the API says it should check the device capabilities first.

On TF101 (and probably other devices) the camera HAL doesn't handle
FLASH_MODE & SCENE_MODE and so it sends the required RuntimeException
for these, which makes Photosphere FC the Camera app.

=> Fix: check device capabilities & ignore these 2 parameters if the device doesn't support them.

Fix based on following Team EOS patch: https://review.teameos.org/#/c/1598/

Change-Id: Idd80299802e9213a3c40414ace3d516d39f47783