Return: Custom Carrier Label [1/2]

PS 3 : Fix code style
PS 5 : Rebase
PS 6 : Fix derp

Change-Id: Ic865e3c5204ab05f1e9ab0e081a54b155b577086
fb: use on virtual POWER_KEY own global menu handling

we use the POWER_KEY down event to call the global menu from SlimActions
to allow to add shorcuts to the global menu.

Handle this undependent of non virtual key events and call the global menu
directly without vibration and without delay.

Just put it into the message que and done

Change-Id: I7d9af04605696d41bee949cfd99f6de4c4be6baa

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
SystemUI: Pimp-up Media Tile (1/1)

Allow double-click to start a sleep timer
	for the currently playing media.

PS:
- clearer button descriptions on different states
- if timer is in progress restore and show the time the
  user had set up and notify that he is in timer progress

Change-Id: I7848523e7bc3d9577361ff55f010a9909d46e665

Conflicts:
	packages/SystemUI/AndroidManifest.xml
	packages/SystemUI/src/com/android/systemui/quicksettings/MusicTile.java
fb: finally fix carrier lable shows on first boot sometimes

Issue:
- boot up
- directly open via fast QS pulldown QS
- sometimes carrier label is shown

Expected behaviour: should not show

Fix: Visibility is directly set when the settings observer is registered first time.
If no update was done on the carrier label before the user pulled QS down the first time
it showed up. Vary rare case that this can happen
but should be handled. To fix it do not set the visibility directly and call the
updateCarrierAndWifiLabelVisibility(boolean) method to handle the correct visibility.

As well last cleanup on notification shorcuts...move the check if it is
active or not to the visbility method itself. Way cleaner

And remove the previous attempt to fix the above described issue due
it did not fix it at all

Change-Id: I901beb987c21fe0cdb7a5d9f16f850f4297c15f4

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
fb: TRDS change auto detect light conditions method

Currently on critical light conditions it still switches to often between
on and off which results in bad UX and in worse cases to unusable phone
due that it is permanently switching. To prevend that slacken the light mode
level detection and set it when it goes to dark mode way more higher (LIGHT_CONDITION)
and when into light mode back to lower level (DARK_CONDITION)

PS
- 25 looks good

Change-Id: I665f3141fe31f26ca371d10593ff95174d68fc9e

Conflicts:
	services/java/com/android/server/UiModeManagerService.java
Notification : Fix app info long-press

Addresses http://code.google.com/p/cyanogenmod/issues/detail?id=7060

Change-Id: I45c0e1b73c08ceffef02db244b947bfcedf3b20a
Initialize pointer members to NULL to avoid illegal reference

mBitmap and mTexture is not initialized to NULL which causes
illegal address access when it fails to be created from
oversized bitmap.
Cherry-picked from AOSP: https://android-review.googlesource.com/#/c/79320/

Change-Id: Iea54bec8788bc5f3a10040fdb43f416c0d41a14c
MediaFocusControl: Deny audio focus if notification stream is 0

Previously audio focus would be granted regardless of notification
volume, meaning that if notifications are muted the media stream would
still be dimished for focus. By checking if STREAM_NOTIFICATION is 0 and
if a notification stream is requesting focus, this is no longer an issue.

Change-Id: Ie10a64e58ce77174a3bbdeaa936646d40c24404f
Signed-off-by: Evan Anderson <evan1124@gmail.com>
Set Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE default value

To be able to customize the "WiFi scan always available"
setting we need to set a default value.

Change-Id: I3673f2613ab9b6a947aed7e29d4cc876140c2180
Fix error checking in MemoryFile.

mmap returns MAP_FAILED on failures, not 0 (NULL).
Also, convert some C style casts to C++ since they
make intent clearer.

Change-Id: I367993c73e9ee576f11ebe76e530d2c2f27c662d
Fixed incorrect calculation of dirty invalidation area

Padding was already taken into consideration before calling
invalidateDrawable in ProgressBar.

Change-Id: I75f25b0b7ee87d394422c58888ed3a1cca5d06a8
Harden against transiently unavailable backup transports

The init & clear operations are particularly important to ensure
delivery when at all possible, so we retry those periodically
if the transport is unavailable when we first attempt them.

Now with 100% less build break.

Bug 11716868

Change-Id: I2af4e93788068cfac97c0a48d3568c561eefa23d
Handle backup transport registration dynamically

Bug 11369873

Change-Id: I9bbdcc21ce25159c6645690123b5d03c553b0ddc
4Merge branch 'wx44' of https://github.com/WeaponX1/weapon_frameworks_base into wx44