systemui: SignalClusterTextView fixes and optimizations

- Optimize the SignalClusterTextView layout, but removing an unnecessary LinearLayout hierarchy
- Optimize the SignalClusterTextView view by hidding the entire view instead the cluster view
- Set start visibility of SignalClusterTextView to gone and update its state in onAttachToWindow
event. This should prevents bug CYAN-4410.
- Prevents NPE in MSIM devices when TEXT style mode is configured for the signal cluster style

Change-Id: Ib91fde693d5013bf058f161cc175923913fdfb7d
JIRA: CYAN-4410
Issue: https://jira.cyanogenmod.org/browse/CYAN-4410
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
base: fix volumen panel traslucent after stream icon click

Change-Id: I290ecb07106198882739a5b734f4d6a89d3eb5fb
JIRA: CYAN-4487
Issue: https://jira.cyanogenmod.org/browse/CYAN-4487
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Automatic translation import

Change-Id: I9792fa3cd6a017d89731d952f7dad85b1a90c5bc
base: LT translations

Fixes/improvements

Change-Id: Ic42ecc0398ba342b410daa324a8d4c4d87065708
Revert some of the latest changes (1/2)

Revert "Keyguard: fix leaking ContentObserver"

This reverts commit 4a4c9eff7740516f565d3fa2a9ca89296e1c0eca.

Revert "Keyguard: fix transparent lockscreen"

This reverts commit 28dc075a8b24eafc72a4b02ff95f3263efff909e.

Revert "base: Transparent Lockscreen from PA"

This reverts commit 0cc1c8e8bd03ab013a059b7ee4f27c3b570f916c.

Revert "Move OnClick Fliptile to PAC settings table."

This reverts commit 05422360f8e7571063a745458dd1a8cb52b3ca57.

Revert "Settings: add methods to put and get boolean values"

This reverts commit 7461748314d258f9f544573eeb76c897f7d81b02.

Revert "PAC Settings"

This reverts commit aa344a73dddc3d1c2056916cd56ab209be027306.

Change-Id: Ib019fbb71a92f0bbb44ab1926e9a594b26bf70be
Signed-off-by: Lokesh Chamane <lokesh.c703@gmail.com>
Lockscreen: See through (1/2)

Add the ability to see through lockscreen.
Adapted to kitkat from jellybean by @BigBrother1984

Signed-off-by: D4rKn3sSyS <jesdga95@gmail.com>
Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

PS2:

* Adding missing sem-colon.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

Change-Id: I9057a6e302a5a824799844f27e8f64ff677a520a

PS3:

* Replace and remove undefined mContext.
* Define the boolean enableScreenRotation inside new method.
* Whitespaces clean up.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

PS4:

* Restore mContext in setKeyguardParams().

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

PS5:

* Fixes for setKeyguardParams() and maybeCreateKeyguardLocked() methods, kitkat changed some things.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

PS6:

* Missing sem-colon.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

PS7: Fix all the things.

* Effects doesn't vanish after first unlock.
* Created condition in updateShowWallpaper() method that just return if see through is activated, he was restoring the wallpaper at second lock.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

PS8: Cosmetic changes.

* Correct java style name to seeThrough() and place it above updateShowWallpaper().

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

PS9: Other cosmetic changes.

* Better name to the see through boolean.
* Removed a space nitpick.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

PS10:

* We had two booleans for the same thing, ditch the one defined in one class only and take the global.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

Change-Id: I06d952f85baf284961a24c8c9f90b29f4aef719a
Lockscreen Blur (1/2)

Change-Id: Ia7bf3c54c63b9429b7455b2b2ad7704c927547ed
Keyguard: fix transparent lockscreen

Change-Id: Icdd8bc5605dd352b03772880764b5ca39d74a3e5
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
Lockscreen Notifications [1/2]

My try on making notifications easily accessable from lockscreen.
Credits to ChameleonOS, I got the notification listener permission and some small other stuff from their ActiveDisplay implementation.

Lockscreen Notifications allow you to manage all your notifications directly on the lockscreen.

Features:
- Pocket mode turn screen on when phone is pulled out of pocket and turn it off when phone gets back in pocket
- Hide low priority notifications
- Hide non-clearable notifications
- Allow dismissing even non-clearable notifications from lockscreen
- Just turn screen on when there's currently a notification pending
- Toggle between expanded and normal notification view by longpressing
- Wake on new notification
- Configure notification count displayed at once
- Privacy Mode: disable showing notification content.
- Blacklist apps - thanks to ChameleonOS for the original implementation and @Der-Schubi for bringing it to lockscreen notifications
- Show all/dismiss all button

Overlay setting:
dynamic width is disabled by default, to enable it for a specific device, add
<bool name="config_lnDynamicWidth">true</bool>
to yourdevicetree/overlay/frameworks/base/packages/Keyguard/res/values/config.xml

PS3: Disabled by default
PS4: Removed many whitespaces
----------------------------------------------------
PS1: Initial upload for PAC
PS2: Rebase
PS3: Rebase
PS4: Fix build

Change-Id: Ife8cbe1ef86691c391de061964bf4d14be03a59f
Signed-off-by: kecinzer <kecinzer@gmail.com>
Signed-off-by: Lokesh Chamane <lokesh.c703@gmail.com>
[1/2] Base: Lockscreen notifications: Option to disable dynamic width

Change-Id: I1e52e2fe9d3f989db2d8e3f6cba75cf95fddcd4e
Fix FC party when Lockscreen Notifications are disabled

Change-Id: I40233f7847203cf39c4d7147d0940c05554d5e64
Merge "base: fix volumen panel traslucent after stream icon click" into cm-11.0
Automatic translation import

Change-Id: Id6c0958b4444adc3a39c86128bf608c169de3a57
MSIM: Add support for cell info

Add suport for getAllCellInfo in MSIM

Change-Id: I9d61723b4c73f595dafd18275532f80a9a6390ff
CRs-Fixed: 654445
IndexOutOfBoundsException observed rarely in ProcessStats

Sometime IndexOutOfBoundsException is observed in ProcessStats
while allocating longs array. This could be due to synchronization.
This fix will return if array index is >= size.

Change-Id: I1df34152c95f2ff61829da07f750e79a6f1efab3
CRs-fixed: 626638
Fix a resource race bug in PathCache

When enabled defer rendering, it will do precache for DrawPathOp.
The paint used for creating PathTask in precache just get the address
of mFilteredPaint of OpenGLRenderer. So for the following defer
operation like DrawTextOp has possibility change the mFilteredPaint
by getPaint while another WorkerThread in PathCache is using the paint
which pointed to the same address of mFilteredPaint to generate bitmap.
As a result, it will generate a wrong bitmap for generateTexture in
PathCache. To fix it, do a copy of paint when creating PathTask.

CRs-Fixed: 664244

Change-Id: I5516f5b143458b88d3573d15b7ebb34f688800c7
base: App crash when select suggestion's length more than specified.

App crashed by catch IndexOutOfBoundsException which raised
by check span range when select suggested string.The root
cause is that the editor will truncate the suggested string
which length is more than it specified, but it also set span
use the suggestion's original length.

Update the suggestion's real length after editor replace the
original string to suggested.

Change-Id: I2d765701934a9e68be172cb87a104590f3cdeceb
CRs-Fixed: 532211
Applications crash observed while selecting words from suggestion list

While selecting words from suggestion list, applications are crashing as
textview span are going out of index. For textinput where spaces are not
allowed length difference shall be calculated properly to avoid Index
out of bound situations.

Change-Id: I360318cf9241abbb7f58ad1ddf3f3c8d364f17d1
CRs-Fixed: 642057
MMS: Fix Messaging will force close after tap one item in suggestion list

The span end is larger than string's length, it caused IndexOutOfBounds
exception.

Check the span end to avoid the IndexOutOfBounds exception.

CRs-Fixed: 555378

Change-Id: Iaf1cbe8db8704b3112afb6207982750b650fe5c5
Fixing IndexOutOfBounds Exception in ActivityManager

Bypass the iteration to avoid the exception during
the execution of ensureActivityVisibleLocked() because
startSpecificActivityLocked() within the loop may delete
the elements from History stack.

Change-Id: I195da10a8e9161572bdb653ad3021998d4f2a939
CRs-Fixed: 651963