HOVER: touch to hide (1/2)

- Allow users to configure touching outside to instant hide HOVER notifications

PS: This commit brings back the -> private static final int LONG_FADE_OUT_DELAY along with a new simple method public void startFiveSecHideCountdown(). While i was working on this feature i've noted a bad behavior in hover notification timeout implementation thats was if we just set, for example 15 seconds of timeout, the touch outside would read this as hide timeout in expanded hover notifications. 3 or 5 seconds are good but anything above that is too much. Back to normal with the new method fixing 5 seconds as the maximum

Change-Id: Ic62db979cae3e0a61b025b70f09b725a8bea3016
SystemUI: Fix too long SK bluetooth string

Change-Id: Ib5202b27621e1668e1d4ab4ab09700d4698fcb05
Themes: Make notification list bg themeable

Thanks Thomas Ekelschot :)

Screen of themed resource https://imgur.com/c8t1Zn0

PS2: Add Clark's proposed changes
PS3: Cleanup old color resource in main xml
PS4: Add informative screen

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I8eb4427747c3eb035b416860c3ca47122e45c16f
QuickSettings : Register/unregister cast tile one time

Don't do these operations every time the parent is visible/invisible,
it causes jank.

Repro:

Turn on wifi on a network w/ chromecast
Swipe down quick settings panel really fast

Change-Id: I3dfcd3610abe96e1bfdab06ef3b876ccf5140ceb
QuickSettings : Properly restore lockscreen tile state

The keyguard lock relies on device policy manager service to be active,
currently it fails because it tries to request before its up. Fix that
by registering the request in a receiver

Change-Id: I15e0d980ecf21c8316f4a771e93f4b520c556115
NavTargets : Show highlight for google search

- Show highlight for google now icon
- Update launching logic to upstream
- Don't hideTargets in doFinish

Change-Id: I6027bc30b4bc98bf1dbadd9cb02e46349745bfbb
Merge remote-tracking branch 'upstream/cm-11.0' into cm-11.0
Add system setting for t9 search input locale

Change-Id: I780b3cca1ad2da396b76464a6dab5cc53f621ed2
IconPackHelper: Don't respect an icons original size if too large.

  - Otherwise, if an application isn't following app icon guidelines,
  it can create an OOM situation when creating the new icon based
  on the original resource's height and width.

Change-Id: I9430445da5e393cdbf76ed9ebd9698bf30df6a95
Automatic translation import

Change-Id: I5927a950623fb5ceea027632657880a591cf67af
ProximityWake : Add support for checking proximity when waking device

Change-Id: Ia5ff446d88435773acccc7467e66009000dc20cb
Framework : Fix proximity wakeup reference

Change-Id: Ia40ca6fbf6e37fbb3996f2384f725c30b88c2131
core: Fix permission string

Should always start with lowercase

Change-Id: I5ab97b8a6ca67c4d2460f606f09b4bed8c299401
SystemUI: fix hidden clock style after a reboot

Selecting hidden clock style and rebooting the device results
in both center and default clocks appearing when you'd expect
to see none.

mClockView is null after a reboot so visibility gets never set.
Set default visibility for clocks to gone.

Change-Id: I533af8c28042a5989e0025df133c9ccf1fa3e066
Workaround to update PIE resources on theme changes without need to reboot or eneble/disable

- Here we dettach and attach PIE to simulate disable/enable action
Merge remote-tracking branch 'upstream/cm-11.0' into cm-11.0

Conflicts:
	core/java/android/os/IPowerManager.aidl
	core/java/android/provider/Settings.java
	packages/SystemUI/res/layout/msim_status_bar.xml
	packages/SystemUI/res/layout/status_bar.xml
	services/java/com/android/server/power/PowerManagerService.java
SlimActions: Attempt to fix preloads with PIE in slimroms recent panel

- Do all related with recent panel when "action.equals(ButtonsConstants.ACTION_RECENTS" in a attempt to fix sometimes blank slimroms recent panel in preloads using PIE. SlimActions.java dictates PIE key actions
Filter spam notifications

Change-Id: Ibf2377cd7491c7e0e9e9c9657e9e65eef1876ee3
Filter spam notifications

Change-Id: Ibf2377cd7491c7e0e9e9c9657e9e65eef1876ee3

Conflicts:
	packages/SystemUI/AndroidManifest.xml
	packages/SystemUI/res/menu/notification_popup_menu.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	services/java/com/android/server/NotificationManagerService.java
Launch Heads Up in floating window [1/2]
    AICP'fied.
    To make floating window to work for Hover and Heads Up, notificationhelper
    interface is modified to include a third parameter to indicate whether it's
    called from hover or not.

    To make Heads_Up floating notification work separate from Hover,
    a third parameter is added to the notificationhelper to indicate whether
    we are called from Hover.java. This changes the call.

    PS2-3: Fix authorship
    PS5: separate hover change.
    PS6: change commit message.
    PS7: Merge with Hover change, fix setting preference and code cleanup.
         To make settings work, don't use Boolean with CM CheckBox preference
    PS8: autorship

    Original ChangeId: I530c3d9473e8b0600db047ce2137ee3d44592111