Null pointer exception in FileRotator.java

Sometimes a null pointer exception is thrown when examining files
managed by the file rotator.

The logs from the test show that the Wifi state is changed a large
number of times. On every state change, a write operation is
initiated on the file system. This will eventually result in out
of memory and the call to mBasePath.list() in the maybeRotate(...)
method in FileRotator.java will return null so the iteration will
throw a NullPointerException.

Change-Id: I5d5980d9593bc9ec75281169ca27ee591809903f
Disclosing statusbar ticker while DISABLE_NOTIFICATION_TICKER

When secure mode is enabled (pattern, pin or password) it is
disabling the StatusBarManager.DISABLE_NOTIFICATION_TICKER .
If an application is updating a notification, it should not
display the ticker out of security reasons.

But the haltTicker() will use an animation that displays
the old ticker text.

Change-Id: Ida7988ce03401af3ad9fd865bbad3d6ed46a6f38

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
Fix never-ending SIM PIN/PUK unlock progress dialog

If a recreation of the keyguard UI is triggered while waiting
for the SIM PIN/PUK unlock response, the response will be posted
to Views which are not attached to any Window. Since the code
runs in a Binder thread, the work will end up in an unused
work-queue and never be run. This will cause the unlock dialog
to never go away.

The solution is to create a handler which is attached to the UI
thread. Instead of posting via the post method of the View class
we post directly to the handler - hence avoiding that some work
ends up in a unused queue in case of being in detached state.

Change-Id: I9781a1600865705949626f97eb3c7a4f952d2de9
Fix to memory leak leaving WallpaperCropActivity.

After running wallpaper cropper serveral times it crashes with
an OutOfMemotyException.

When leaving WallpaperCropActivity all textures are leaking until end
of process lifetime. This is due to a missing call to function
TiledImageView.destroy which in turn assures TiledImageRenderer
releases held resources.

Resolved by assuring WallpaperCropActivity calls TiledImageView.destroy
from WallpaperCropActivity.onDestroy. In case where onDestroy is not
called resources will be released anyway by process being brought down.

Change-Id: I016b1b9da5f4db8d2b14767edb59fe742415e074
Base: On-The-Go: Allow to toggle between front and back camera

Video Preview:
https://www.youtube.com/watch?v=MnPGn0zwpEw

In case you want to pick that feature, feel free to edit the
commit message to get rid of that ugly video ;)

Change-Id: Ia6422bf5bbd531240e62ee57de316a8e6f94546c
Conflicts:
	packages/SystemUI/src/com/android/systemui/nameless/onthego/OnTheGoDialog.java
Base: On-The-Go: Several fixes

handle camera in surfacetexture
check if notification manager is null before canceling
restart timeout when changing the camera mode
convert settings observer to a local variable
remove redundant try-catch clauses

Change-Id: If637e30f69706dc8b3f1397fafacb24c7bbb5083
Base: On-The-Go: Overlay status- and navigation bar as well

Change-Id: I067981028340cdd53fe112cae9b7a4ddcb7532a8
Base: On-The-Go: Change the way of changing the camera mode

changing it on the fly is too buggy like i have done it.
sometimes things fail and we are getting stuck ;P

on mode change, save the value, create a notification and stop the service.
the notification allows to restart the service.

Change-Id: Ie02f01a4ab2f856cd58fe5fde8c49220bf7efd4b

Conflicts:
	packages/SystemUI/src/com/android/systemui/nameless/onthego/OnTheGoService.java
Merge branch 'kitkat' of https://github.com/TeamHorizon/platform_frameworks_base into kitkat