Send out a configuration change when screen size changes due to expanded
desktop.

This kills the status/nav bar hide/show animation, but it's required by
some apps to recalculate their content correctly.
Take mPieScale into account to calculate estimated PIE width

if scaled size of the PIE is over or under the default size
the pie was either no using the whole screen space or
it was cutted off. To solve this take scale value
into account when calculating estimated width

greetings SlimRoms
Disable observer and receiver if PIE is disabled

on high end devices that is maybe not needed. But there
is in general no need to enable the obeserver/receiver
when PIE is disabled (or expanded mode is off)
This change destroy and disables the PIE in most parts
when it is disabled. + a small doubel register
correction

greetings SlimRoms

PatchSet 2:
- remove PieLayout observer completly - thanks Jens

PatchSet 3:
- remove unnecessary call to setupSnapPoints()
- reuse already created snap points

PatchSet 4:
- small corrections on setupSnapPoints() and call
- remove not needed second call of PieController attachTo()
- disable TelephonyManager listener

PatchSet 5:
- fix up detach logic

PatchSet 7:
- cleanup

PatchSet 8:
- Effective Java rule #41
- fixed some pie controller leak
Merge remote-tracking branch 'rascarlo/jb-ras-mr1.1' into HEAD
Add contact lockscreen icon
Merge remote-tracking branch 'rascarlo/jb-ras-mr1.1' into jb-mr1.1
Fix do not show snappoints if triggermask disables edge

as the title says do not show on lockscreen or notification
drawer the snappoints on the disabled edges. Pass
trigger slots and mask trough and take into account

PatchSet 2:
- some refactoring
Pie controls: Introducing a pie delivery service

To make pie controls more reliable, it is neccessary to detect
trigger actions directly from the input stream.
This commit introduces a new system service, that filters all
input events in front of the input dispatcher to detect pie activations.

This commit introduces:
* A new system server local API in the input manager service to register
  secondary input filters. These filters are behind the default
  accessibility filter but before the input event dispatching of
  the android framework.
* A new system service, that binds to the new API to listen for pie
  activation gestures.
* A non-public manager class providing access to the newly created pie
  service.

The service manager name of the service is "pieservice". The non-public
AIDL interface of the service is IPieService.aidl. To register a new
pie activation listener the INJECT_INPUT permission is needed. The
service state can be dumped by the "dumpsys pieservice" command.

Note: This commit only introduces the pie service. There is another
commit, that binds the actual pie controls to the pie service.

Patch Set #1:
* The pie service is currently disabled by default and needs to be
  enabled by device overlays (see config.xml / config_allowPieService).

Patch Set #2:
* Activation fixes
* Debug dump improvements

Patch Set #4:
* Added systrace support (TRACE_INPUT_TAG)
* Switch default to enable service on all devices.
* Moved Position to com.internal.android.utils.pie.*
* Some more code rearrangements

Patch Set #5:
* Rebase

Patch Set #6:
* Cover more corner cases on PieInputFilter
* Adjust gesture time out

Patch Set #7:
* Do not send events that are from the past
* Recycle all events

Patch Set #8:
* Handle binder died events in PieService correctly

Patch Set #10:
* Simplified locking
* SYSTEM_UI_FLAG_HIDE_NAVIGATION support
* Fixed ADW Lauchner bug
Pie controls: A new way of activation

Based on "Pie controls: Introducing a pie delivery service" this
commit binds the pie controls to the newly created pie service.

Patch Set #2:
* Fixed glitch when displaying the search panel at the lock
  screen.

Patch Set #5:
* Switch Position to com.android.internal.util.pie.Position
* Removed legacy and unused code

Patch Set #6:
* Fixed lock screen glitch, finally!

Patch Set #7:
* Rebase

Patch Set #9:
* Moved almost all of the pie logic to PieController

Patch Set #10:
* Remove window completely from WindowManager when not shown

Patch Set #13:
* Fixed Taichi's bug
* Removed observers in PieView

Patch Set #14 & #15:
* Rebase
Merge remote-tracking branch 'rascarlo/jb-ras-mr1.1' into jb-mr1.1
Quiet hours: frameworks part

Signed-off-by: Paul Beeler <sparksco@gmail.com>
Increase pie trigger time to 340, currently we have to swype too fast to get a trigger
Fix up notification LED behaviour

- Commit 5713307e3d2eb457ba148df3683ad09733727506 (in ICS) attempted to
  fix the problem that the notification LED wasn't reenabled after
  turning off the screen again, but introduced another bug in the
  process: If another pending notification with LED at the time when the
  notification with the new magic flag introduced by that commit (which
  was used by phone and MMS apps) was active, the LED still wouldn't be
  turned on at screen off time. Also, this commit didn't handle locking
  correctly.
  This commit essentially reverts 5713307e and makes sure the LED is
  reevaluated when the screen is turned off again.

- This change also makes the assignment of the LED when multiple pending
  notifications want to use the LED more clear: The notification with
  highest priority gets the LED. If multiple notifications with same
  priority exist, the most recent one gets the LED.
Fix up notification LED behaviour

- Commit 5713307e3d2eb457ba148df3683ad09733727506 (in ICS) attempted to
  fix the problem that the notification LED wasn't reenabled after
  turning off the screen again, but introduced another bug in the
  process: If another pending notification with LED at the time when the
  notification with the new magic flag introduced by that commit (which
  was used by phone and MMS apps) was active, the LED still wouldn't be
  turned on at screen off time. Also, this commit didn't handle locking
  correctly.
  This commit essentially reverts 5713307e and makes sure the LED is
  reevaluated when the screen is turned off again.

- This change also makes the assignment of the LED when multiple pending
  notifications want to use the LED more clear: The notification with
  highest priority gets the LED. If multiple notifications with same
  priority exist, the most recent one gets the LED.

Change-Id: I1df0b40cca2af7a08c240677d22d2a95097b7184
Merge remote-tracking branch 'rascarlo/jb-ras-mr1.1' into jb-mr1.1
SystemUI: Clean up old H+ drawables causing issues on manta

These drawables seem to be adapted to fit the old combined
tablet status bar. They mistakenly gets used on manta with
an oversized H+ drawable as a result.
Allow applications to show the navigation bar in expanded desktop mode.

This is used by the settings app to show the navigation bar when editing
it.
Pie Controls: Fix snap points position.

This commit reverts an error, introduced by the second pie
service commit, which causes the positions where the snap points
gets displayed to be inverted.
Pie Controls: Fix sound effects.

After the pie service commits, sound effects were broken for
HOME and BACK keys.

This commit fixes this, by moving the play back of the sound
effect from the injection directly to the onClick().
Merge remote-tracking branch 'rascarlo/jb-ras-mr1.1' into jb-mr1.1