fb: add ticker entries only if we are not recreating statusbar
if both happens at the same time it will result in an systemUI crash.
Funny that since 2 years where this method exist no one discovered it.
Due to the new theme lightsensor mode we have way more switches so
maybe thats why I got it now

whatever we had already a check but the tick method can be called from
outside as well so just check if we are in the recreation or not and return
if we are in recreation process. Old check is now redundant and can be
removed

Change-Id: I0feeaaa16d14fc631124d155dc18ba346f788796
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
Fix for fb: add ticker entries only if we are not recreating statusbar
https://github.com/DarkCyanogenMod/android_frameworks_base/commit/e07b9bf7b87d2538c2ad64fbe53e91076e243019
Add Music Tile (1/2)
Tap to play/pause. Longpress for next track

Author: kufikugel

Change-Id: I7bde0969adc2de15fbf8c3243d0d216006cf363a