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
api: update current public api

Summary: Fixes build in some cases due to SETTINGS_TO_BACKUP being visible

Test Plan: verified here

Reviewers: randall.rushing, jriordan001, anders3408, synergy

Reviewed By: synergy

Differential Revision: http://review.codefirex.com/D464
Merge tag 'android-4.4.2_r2' of https://android.googlesource.com/platform/frameworks/base into kk-devel

Android 4.4.2 Release 2

Conflicts:
	services/java/com/android/server/display/WifiDisplayController.java
Finally proper handling of Power Dialog override settings (1 of 2)

Summary:
The easiest way is to introduce another BrodacastReceier. When override
is enabled, we take down the alert-producing receiver and register our
receiver. Our receiver simply records values but does not act on them.
That way, if alerts are enabled again, the values are up to date.

Test Plan: works, but test when we're done with upstream merges

Reviewers: synergy, anders3408, jriordan001, raymanfx, donald.munn, rlasalle15

Reviewed By: synergy

Differential Revision: http://review.codefirex.com/D469
Bring in weather classes so all the things can get weather!

Summary:
WeatherInfo is a Parcelable bundle of weather state along with
numerous utility methods to easily access and manipulate
weather data and icons.

WeatherAdapter and it's WeatherListener callback is a wrapper
class simplifying the handling of updates from WeatherService

WeatherView now utilizes WeatherAdapter

Test Plan: play and merge

Reviewers: synergy, anders3408, jriordan001, raymanfx, donald.munn, rlasalle15

Differential Revision: http://review.codefirex.com/D483
Statusbar Battery - much credit, respect, and love to @CyanogenMod
Weather - stability and bug fixes

-- call setCurrentScale when getInfoFromBundle is called
-- create WeatherInfo object in WeatherAdapter constructor
   (squashes possible NPE if getLastKnownWeather is called before
    and update comes in. this is fine as the WeatherProvider is
    already online)
Revert "Revert "Legacy CodefireX SystemUi features squashed""

Summary: This reverts commit 3b0823214b26c2a133a4d7d38ed9779e4fb58542.

Test Plan: let's try this again

Reviewers: synergy, anders3408, jriordan001, raymanfx, donald.munn, rlasalle15

Differential Revision: http://review.codefirex.com/D492
Merge remote-tracking branch 'cfx/kk-devel' into peexl