fb: fix reconstruct statusbar illegal argument exception

Finally I got a logcat what is happening in rare cases. If the reconstruct
happens during a notification ticker was send it returns a negative
width value for the static layout and systemUI crashes.

E/AndroidRuntime(  970): java.lang.IllegalArgumentException: Layout: -23 < 0
E/AndroidRuntime(  970):        at android.text.Layout.<init>(Layout.java:138)
E/AndroidRuntime(  970):        at android.text.StaticLayout.<init>(StaticLayout.java:104)
E/AndroidRuntime(  970):        at android.text.StaticLayout.<init>(StaticLayout.java:90)
E/AndroidRuntime(  970):        at android.text.StaticLayout.<init>(StaticLayout.java:68)
E/AndroidRuntime(  970):        at android.text.StaticLayout.<init>(StaticLayout.java:48)
E/AndroidRuntime(  970):        at com.android.systemui.statusbar.phone.Ticker$Segment.getLayout(Ticker.java:72)
E/AndroidRuntime(  970):        at com.android.systemui.statusbar.phone.Ticker$Segment.getText(Ticker.java:91)
E/AndroidRuntime(  970):        at com.android.systemui.statusbar.phone.Ticker.addEntry(Ticker.java:226)
E/AndroidRuntime(  970):        at com.android.systemui.statusbar.phone.PhoneStatusBar.tick(PhoneStatusBar.java:2862)
E/AndroidRuntime(  970):        at com.android.systemui.statusbar.phone.PhoneStatusBar.addNotification(PhoneStatusBar.java:1432)
E/AndroidRuntime(  970):        at com.android.systemui.statusbar.CommandQueue$H.handleMessage(CommandQueue.java:322)

to avoid this check before a new StaticLayout is constructed if the width is < 0 and if this
is the case abort the operation. This is in this case a legit way due that the notification
gets reconstructed during this process later so or so

Change-Id: I6ed68bbb9226101d3573f3d76deb793ddae69627
Forward Port: Hide USB Debugging Icon 1/2
PS2: code style, now on the fly
Change-Id: I459b6172540ad1f9f74289dcbe61abaf417c1b30

Change-Id: I459b6172540ad1f9f74289dcbe61abaf417c1b30

Conflicts:
	core/java/android/provider/Settings.java
	services/java/com/android/server/usb/UsbDeviceManager.java
base: Check for homeAsUp status when collapse actionbar widget

mHomeLayout should be visible if one of DISPLAY_SHOW_HOME or DISPLAY_HOME_AS_UP are set.
collapseItemActionView only checks for DISPLAY_SHOW_HOME, so applications that only uses
DISPLAY_HOME_AS_UP and uses an expandable/collapsible widget (like SearchView) doesn't
properly restore the home layout.
One sample of this behaviour is the DeskClock app. The CitiesActivity doesn't show the homeasup
indicator after collapse the searchview.

aosp change-id: https://android-review.googlesource.com/#/c/71093/

Change-Id: I2f225138771da6bd6b2a468ad616b90c2c0a9d35
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Swap volume buttons when the screen is rotated by 90 or 180 degrees (1/2)

See: http://review.cyanogenmod.org/#/c/14530/

Change-Id: I201febc2827e6fbd347cb0e3f8d3347ad1bc487b

Conflicts:
	core/java/android/provider/Settings.java
	media/java/android/media/AudioManager.java

Change-Id: I323b647066e8c73fac60067141d1add7b2f9962d

Conflicts:
	core/java/android/provider/Settings.java
Statusbar clock font style (1/2)

PS1: Initial
PS2: Int settings

Change-Id: Iafb811b9f819a100940fdeeaa2c657483c039950

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
[1/2] Base: Option to enable Notification Light when screen is on

This makes it possible to let the Notification LED flash even when the screen is on

Change-Id: I58be9646cdc84d4765342a5ab45b4641c3d5daba

Conflicts:
	core/java/android/provider/Settings.java
	services/java/com/android/server/NotificationManagerService.java
Media: Add quality levels for two 4k resolutions for camcorder

Add quality levels for two 4k resoltuions for camcorder

Change-Id: I18bb65487ca8310f26e12e432b9f1c5c84149d99

Conflicts:
	media/java/android/media/CamcorderProfile.java