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
ActivityManager: Donot take launcher screenshot.

Currently ActivityManger takes screenshot for all activities
on an activity switch, for maintaining the screenshots in recent
app list. This can be skipped for launcher, as launcher is not
present in the recent app list.

Change-Id: I22f7cda2c63483ab50e0df4428151503892b7d9b
Remove opaque check in preparing dirty region

Since preserve swap is enabled, we need to clear the color buffer
when the scissor rect is prepared for a new process. This prevents
garbage being present from the previous process in the color buffer.

CRs-Fixed: 549755

Change-Id: Icd12ae388077b8c9ed329c37314e896500078543
(cherry picked from commit 48b6a9767317e08a24e189c9cbee21043543682a)
(cherry picked from commit 777610a5ddf19cebcad30b7e9a481e9dfe38b74c)
Fix stencil buffer bug.

Stencil test is enabled by setStencilFromClip(), but not disabled
in some use case, which causes some of the pixels are discarded by
mistake in draws followed. Disable stencil test when there is no
dirty clip.

CRs-Fixed: 539456

Change-Id: I318fb47212e49e2da89bcbfd161a1689ef91b02f
Kill app longpress back (1/2)

derp
Revert "Recents: Clear all button for recent apps."

This reverts commit a7b4b9f13744716c1afe0bab429ba9222466a35f.
Use BaseNetworkObserver in Tethering.

Tethering currently inherits from the AIDL interface
INetworkManagementEventObserver, so it has to provide no-op
implementations of all the interface's methods. Inherit from
BaseNetworkObserver and get rid of the no-ops.

[Cherry-pick of f4e90eac87bc31611ddd80c46fc924d35ce66c1c]

Bug: 9180552
Change-Id: I74859b0d77951005651aaaa418185857e40eeedb
Minor cleanups to NetdCallbackReceiver.onEvent.

- Clean up identical error messages.
- Fix the array length check for InterfaceAddressChange.

[Cherry-pick of 59be800e7fe81842aa8c77b91319f58ab165983d]

Bug: 9180552
Change-Id: Id871f481445b530c3ad749725f1548df0e3a1228
Pass DNS server info notifications to observers.

These are sent if the device receives IPv6 Router Advertisements
with DNS server configuration options. Currently, nothing listens
to them; in a future change we will use them as IPv6 DNS servers.

[Cherry-pick of 416740ad4d9132005a71dc0883334e852235a18a]

Bug: 9180552
Change-Id: I05000c0cd3867a68ab390102e8470b6912a9d3aa
Fix NPE in ConnectivityService

Could occur when requestRouteToHostAddress is called on a network
with no associated tracker.  Code later in the method handles
this case gracefully but code introduced in JB throws an exception.

Change-Id: I6c8a0e313ecbcca120aeb5dd0802a72114749aa1
Added DevUtils

Credits to cm
Time & Data actions
fb: set correct providers default value am/pm

fresh install shows am/pm on english timezones which
does not fit with the aosp default behaviour. Go inline with
it and hide it as default. User can change it then

Change-Id: I503818a16772f30260222ec5beed15e6654345a1
increase touch sensitivity

Change-Id: I77e6aeca3667808e630dc142a2e561d3ddddef80
Fix battery icon with percentage showing "!" and percentage only color when under 14%

Change-Id: I559fd4d9fbb7f9599fe1b3cf75602b7ad7e2e301
Keyguard: disable music transport control debug

Change-Id: Ia4361d0850334dc0944559c40409c9062cf02e47
SystemUI: Navigation Bar: Rotate the search light in landscape

The current search light icon is an arrow pointing upwards, so
while in portrait it points to the direction to be swiped to access
Google Now (and the customizable shortcuts), in landscape it points
upward as well which looks out of place, and swiping upwards reveals
that you have to swipe towards the left to access those targets.
Rotate it by 270 degrees to make it point towards the right direction
(i.e. Towards the lockscreen widgets)

Change-Id: I19670fdb1f5ab7814c05264330cb8097a206639a
[1/2] Forward port power connect/disconnect notification support

Original commit info:

    [1/2] Power connect/disconnect notification support

    part 1/2: frameworks/base PowerUI and Settings
    http://review.cyanogenmod.org/#/c/35241/

    part 2/2: packages/apps/Settings Sound settings
    http://review.cyanogenmod.org/#/c/35242/

    Change-Id: I36a6b9f924d2cd52191a8e83a744745b37c5b068

Change-Id: Ib865e1c296cb8e1d957b2a48616c88ceaba5c008

Needed
Custom purity platlogo
Use LinkAddress in address notifications.

Currently address{Updated,Removed} pass in the address as a
string such as "fe80::1/64". Use LinkAddresses instead, since
that's what it is.

This makes the code more robust in the unlikely case that netd
passes in an invalid string. In the future we can move flags and
scope into the LinkAddress itself and simplify the code further.

Bug: 9180552
Change-Id: I66599f9529cf421caa7676fdd0141bb110b8589e