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.

Change-Id: I3f4844815005acab111853fa707cd461f83e2efe
Frameworks: 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

Change-Id: Iccfc8362c0019e3b6ff4bd8066c313c67116c014
Framworks: 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

Change-Id: I8ef8797e7d4f8ee73d31a8296f5747415567bbda
Don't collpase expanded status bar after onClick on torch tile
Add a option to hide power off option for power menu on lock screen (1/2):

Some security apps require the device to be turned on to allow the
owner to have full remote control over the device in the event that
the device is stolen.  Having the power off option on lockscreen
can allow anyone to power off the device even when a lockscreen pin,
password or facelock is being used.

Signed-off-by: Paul Beeler <sparksco@gmail.com>
Don't show reboot menu on keyguard, this can be a security risk
Signed-off-by: Paul Beeler <sparksco@gmail.com>
Frameworks: 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

Change-Id: I0413ffe86169c5d1cb906598d6006bbf1463770b
Don't include flags in configuration change if their value hasn't changed.

This makes the check in updateFrom() match the logic in diff().

Change-Id: I3ab4e8460f7fbf985ef55b9514a8aa90d401d486
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

Signed-off-by: Paul Beeler <sparksco@gmail.com>
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

Signed-off-by: Paul Beeler <sparksco@gmail.com>
Quiet hours:  Minor cleanups

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
remove volume rocker music control
Revert "Launch music player on headset connect"

This reverts commit b72bce257a65540462c0103c6d7a3fd0ada40d2d.
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.

JIRA:CYAN-652
Change-Id: I1df0b40cca2af7a08c240677d22d2a95097b7184
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.

Signed-off-by: Paul Beeler <sparksco@gmail.com>
NavigationBar : Only inflate once

Since the navbar now has updateResources(), there is no need to reinflate
it upon a theme change.

Change-Id: Ie4753a767a1cb45eb459ee692d16067f83cc7d23