Logging to help find the cause of widget crash in clock widget.

This will continue to crash as before, but will show some useful
information in the exception.

Bug: 7450247

Change-Id: Ib3160a5f64154517791d165973c12294ecd09901
Fix bug: swiped apps in Recents come back on rotate

Bug: 7409398
Fixing issue where you can still click on a widget on a side page. (Bug 7568412)

Change-Id: I7105bc6b06e850e6029d12b0fe36fad00b538e1a
Cannot move edit text cursor to first position using character granularity.

Navigating over text backwards by character does not allow the cursor to get
at the beginning of the text and it stops one position before the start. Now
the cursor can get to index zero which is before the first character.

bug:7307336

Change-Id: I109b579835cc080907b20b01e0cf07811e962c6c
clarify Geofence.createCircle() param ranges

This commit adds the valid ranges to the latitude/longitude
parameters in Geofence.createCircle()'s javadoc.

Bug: 7172696
Change-Id: Iff6e3c3723d3fd9b6393bbc827ec5755c0d034af
Improve debugging for issue #7586414: AlarmManager wakelocks held

In alarm manager, print a summary of the top 10 alarms by time
being executed.  Keep track of execution time (and wake count) of
each type of alarm for each application so this can be printed in
the summary (and used to compute the top 10 alarms).  Rework how
the alarm summary stats are tracked so that we don't need to hold
on to the full Intent for each stat and can get the Intent information
at the time the alarm is sent rather than waiting for whatever Intent
comes back in the result.

Also in the battery stats: sort the kernel wake locks by time, add
a new section showing all partial wake locks across all applications
sorted by time.

Finally a new LocalLog class that is used by AlarmManager to log
important warning messages, so these can also be later found in
its dumpsys output.

Change-Id: Icc07810053e60fb623a49937e696819cb8352b06
New timings for default & fallback notification vibration.

Bug: 7599791
Change-Id: Ieae1cba864537b192be013e4f00131bcc59c6369
Quiet down a lot of logging.

Also fix a little problem where the USER_STARTED broadcasts
were not being sent as ordered broadcasts(!).

Change-Id: I3aa3e0a9b3900967cdd2d115ee103371b0a50c41
Remove overzealous mutate() sanity check in LayerDrawable

Child drawables of a LayerDrawable should be able to mutate() as a
no-op even if they !canConstantState.

Bug 7622311

Change-Id: I32c00961310f23aaf9ad868c419cbefb9d27a1d2
Retain configuration change info and sync access.

- If a window was hidden while the configuration changed and then
changed back WindowManagerService would not know that the change
had ever happened and wouldn't notify the window of this. Most
windows wouldn't care but because Keyguard inflates layouts while
it is hidden...

Bug 7094175 fixed?
Bug 7501099 fixed!

Change-Id: If27f5f1d333602dac7719dd39dbdf3fe7954aa06
Stop caching stream duration, it might change (increase) dynamically.

Change-Id: Ia829f47602e6961f24464da36a0162b8c1d7d6c8
related-to-bug: 6870049
Clean up behavior of type arguments for MediaRouter#getSelectedRoute

MediaRouter's policy so far has been around a single selected route,
but when route types are entirely orthogonal this should not be the
case. However we still don't want to get into a situation where we
have multiple, very different routes selected for different types at
the same time, we still want to have more of an element of
predictability.

Behavior of getSelectedRoute is now:

* If the selected route matches at least one type with the requested
  type flags, it is still considered selected for that request.

* If the caller specifically requested the selected user route and the
  currently selected route is not a user route, return null.

* If the requested type flags do not match any types with the selected
  route, return the default system route.

Note that this is "any" behavior instead of "all" - this matches
existing usage of the method. We may consider adding an "all" variant
later on.

Bug 7588042

Change-Id: I3a79d8153ca6b882fd3ef6b9b1de8f538873dec2
Fix bug #7621927 Radio button/TextView drawable regression in 4.2

- as we remove the 9 patch padding trick, we need also to do the correct
positioning of the radio / checkbox / star during draw

Change-Id: I02b67bef9c0f2dc1c0c65361de14ab20ce9b881d
Use the same interrupt/resume logic for all functor calls

bug:7093396

The functor was able to change the renderer's blend mode without it
being restored in process mode. This single path of updating gl caches
reduces likelihood of this occurring in the future.

Change-Id: Ie367532f9c683299f02bc4f635d7cb31f96db39f
WFD: Fallback to PIN mode if PBC is not supported

Bug: 7627641
Change-Id: Ibba6114f907c67f1cb60c460d5b65479f2d1b148
Making sure keyguard and homescreen only display eligible widgets (issue 7550090)

Change-Id: I25acb7bde2e8e5ac3185a009f5c7151b81f0ae19
Secure a handful of framework broadcasts

At least one of these was getting spoofed in the wild.
We don't want to go too far this late in the game, but this is a good start.

bug:7622253
Change-Id: Id8ec2778b15fe001e6fd0d5a010181bb21c52ad8
Fix bug #7617883 RelativeLayout is not having the correct width when in RTL mode

- fix onMeasure() in RTL mode: need to compute width before computing layout params
that are used for layout
- fix getRelatedView() so that it uses the resolved rules
- add some extra "final" statements

Change-Id: I7c3bf841cd18c5f77b010a9be20fa78069e88d94
Cleaner initial boot.

This does some cleanup of the initial boot, especially when
booting in "no core apps" mode for encryption/decryption.

Change-Id: Ifb3949f580e52f54559e603c4b0b104f6bac2f6c
Fix time-related ScaleGestureDetector methods

Bug 7626515

Change-Id: Ie7abf9c166284a74b4e7bcf9de25520cf08e3b2d