framework:Thread synchronization for UI update

Issue : Framework reboot was observed due to out of sync between
        two threads which inturn causes Null pointer exception
        while updating airplanemode.
Fix : Handled Null pointer exception and the crash is not observed.
CRs-Fixed: 570122

Change-Id: I2e969f6e7726ffcf8648b366ebb54cb2b0afc292
 Frameworks: Statusbar clock and date customizations

Some things changed on kitkat + our old code needed in general a bit
rework. All done with this patchset.

This commit add support for:

- Clock and date enable/disable
- Clock and date position
- AM/PM styles multilang support
- color
- Date format
- Date style

Originally by kufikugel. I only ported it to 5.0

Change-Id: Ic8f534909a1a654a71ec1bc5be556fe3e884583f
Frameworks: Add per app controls for LP keyguard notifications (1/2)

Nice done by google but the UX is a problem especially for ppl who are using a lot apps and just want
to see from important apps the notifications on the lockscreen.

This commit adds the ability to

- enable/disable per app the keyguard notification at all
- enable/disable per app ongoing notifications on the keyguard

We handle this over the app policy conf file like the other per app notification options.

Change-Id: I3e4641c3413ca0a8920b1680ca5f01f6eb4d0225
Dialer lookup

Squashed commit of the following:

commit 780211109f80d07b11d7a0261544b1a0fed10ea0
Author: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
Date:   Fri Mar 7 17:11:02 2014 -0500

    Add people lookup settings keys.

    Change-Id: I2ff9bb7684d04f4f9b640939c7db269873aa3308

commit 0e5ed5ac782c2ee253179a03a2c5842ad3de6831
Author: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
Date:   Fri Jan 31 11:43:10 2014 -0500

    Frameworks: Add settings keys for forward and reverse phone number
    lookup

    Change-Id: I1c4c7825b4361b7a52dd419f83afd7b9fcbe1494

commit 3cd778a712234332f327d7e63050c216f21515ac
Author: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
Date:   Sat Apr 12 15:26:29 2014 -0400

    Add OpenCnam paid account settings keys

    Change-Id: I895b5f2b2a8a8de568e5aa1cea5d66ba490985fc

Change-Id: I68e4214e813695021b64c29ab1d831a944a6275a
frameworks/base: support devices with SoftAp that don't require firmware reload

Partial forward port from ICS.
Original Change-Id: If2db6e8ce675c3214ce645231c7a354f41ea0cc6

Change-Id: Iacb2498ec0f567a0a7c4e0dbf9127b70f09223bd
PackageInstallerSession: use ftruncate if fallocate is ENOTSUP

When posix_fallocate is not supported (e.g. on ext3), fall
back to using ftruncate instead.

Change-Id: I8f7792ed3f43504df21e86cff79ed34f3ba795d7
AppOps: track op persistence by name instead of id

On XML write, include the op name.  On XML read, map
the name back to op id (if it exists).

Persistent AppOp state now follows the op name instead
numeric id.  This allows upgrades between versions of
android that have different code<>name mappings.

Change-Id: Iffc02095b6838a34ff999f8db51c2c6739dd0db8
SystemUI: change back button to hide ime buttom with rotate animation.

Change-Id: Ia9a7716a6797d0442670451e59857d44b579b5f6
allow forcing HighEndGfx mode

people have already started fipping the lomRam prop to enable
transparent status bar, this will enable it with fewer
repercussions

Change-Id: Ied6de65276425fa1e7db0bf9da35f1932a355172
SystemUI: add quick settings pull down with one finger

Logic is currently set to use 1/3 of right hand side of the statusbar to
trigger a quick settings quick pull down, quickly.

Change-Id: I3f536496f724f07d2419a5b2db5fa8f8261609e7
Signed-off-by: Roman Birg <roman@cyngn.com>
SystemUI: fix right hand side gestures on lockscreen

two finger quick pulldown was not accounting for being in the keyguard
adn was eating touch events when it shouldn't be.

Change-Id: I625d48a4002aaaf2d55d7efaed65d892ab7aa13c
Signed-off-by: Roman Birg <roman@cyngn.com>
Also dump widget options in 'dumpsys appwidget'.

Change-Id: Ia002c4b93d453ecb94be9312371ec71853a9774b
PhoneWindowmanager: disable panic mechanism when PolicyControl activated.

Change-Id: I5cf5f681237bbd17ec0fe2d041dd782cfb4b72f0
Show confirmation for deleted screenshot.

Change-Id: I4a36cf06bf252e5e15fe08fbd054dc64a0a507ae
Show live wallpapers in the recents view on high-end devices

Change-Id: Iefbf4f292b6a9bfdb516f154cc2976db2ba86cde
SystemUI: PhoneStatusBarView: disable DEBUG_GESTURES

Change-Id: I3911c464d1f008ac2c96a1104761007fad41a3ae
Signed-off-by: Roman Birg <roman@cyngn.com>
SystemUI: Add double tap to sleep

* Make it more reliable
* Add it to keyguard
* Add a content observer to not always query Settings.System on every
touch event

Change-Id: I292c4d9d9f810843590b7a9ec6e15b99ac44009d
Signed-off-by: Roman Birg <roman@cyngn.com>
[1/2] frameworks/base: Battery and Notification Lights

PS2: *) Add back a few missing pieces
     *) Do not clear light state in onPanelRevealed(),
        update lights on ACTION_SCREEN_ON instead

PS3: *) Wrap long lines
     *) Disable config_multiColorNotificationLed by default
     *) Revert config_defaultNotificationLedOff
        from 1000 back to AOSP default of 2000

PS4: *) Clear lights in onPanelRevealed() if
        keyguard is not active.

PS5: Coding style tuning

Pulled together from:

Author: DvTonder <david.vantonder@gmail.com>
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Mon Nov 4 00:57:51 2013 +0000
Framework: Port CM9 features to CM10
Change-Id: Ibd63116df90b06f6ce6adb8a0343059bbb999bfb

Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Date:   Sun Dec 8 15:24:41 2013 +0700
BatteryService: fix FC on boot until battery stat is present
updateLightsLocked() can be called from CM's added SettingsObserver
when battery stat is not present, causing an FC and a loop until
battery stat is present.
Change-Id: Ic4438fe50e98f1aa05ae1d0d26240bf9410fd92f

Author: Sam Mortimer <sam@mortimer.me.uk>
Date:   Tue Dec 31 16:22:05 2013 -0800
[2/2] Framework: instant led test
Adds support a new notification extra boolean
EXTRA_FORCE_SHOW_LIGHTS.  Used by settings
notification light picker to force lights on
when the screen is on.
Change-Id: If0a42d32b28fe8c02ef5f7dd148db7eb478fac17

Author: Danny Baumann <dannybaumann@web.de>
Date:   Wed Apr 24 11:09:55 2013 +0200
Allow creating custom dialogs in DialogPreference.
This allows creating non-AlertDialogs while still using the click and
state handling of DialogPreference.
Change-Id: I54fd7d6d6b9f6a49fef1ae95e0178838b3edfa56

Author: Michael Bestas <mikeioannina@gmail.com>
Date:   Mon Aug 18 04:56:28 2014 +0300
Add support for single color notification LED (1/2)
Change-Id: I367af77036da9e87c6dd0df552ce4c56d945a44d

Change-Id: I564fdb6ca6c5bbcf890afa4b9a2f9fa7bf8b9604
SystemUI: Revert all caf statusbar icon additions

This is still a not to the endd thought nightmare + that we do not really need it right now.

Roll back for now till it is completely overworked.

Change-Id: I7ce9226535680303ff99139cfd3083d52608b88a

Conflicts:

	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g_fully.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g_fully_roam.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g_roam.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g_fully.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g_fully_roam.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g_roam.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g_fully.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g_fully_roam.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g_roam.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2g_in.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2g_inout.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2g_no.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2g_out.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g_fully.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g_fully_roam.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g_roam.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3g_in.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3g_inout.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3g_no.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3g_out.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g_fully.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g_fully_roam.png
	packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g_roam.png