Revert "Fix for framework reboot on format of SD card"

This reverts commit 8f893362b388471bb4ae4807401fd499d26a7d82.
fix soft reboot while formatting

While formatting it's possible to cause a framework crash if the format
opperation is not successful. The 'getCode' function in
NativeDaemonConnectorException can cause a NullPointerException, since
'mEvent' can be null. If an exception is thrown while formatting the
thread will try to create a Toast to notify the user of failure. This
causes a RuntimeException because a Toast cannot be shown from a
background thread. Make sure 'getCode' will not throw a
NullPointerException and also create a handler so that the thread can
send a message in order to create a Toast.

Change-Id: I04c250c46509ae38b0d0a5bfc0e950efbad58305
Fixed broken syntax in ExternalStorageFormatter and NativeDaemonConnectorException

Added missing underscores and incorrect case in variable names
Fixes errors created by https://gerrit.paranoidandroid.co/4004

Change-Id: I9571a08e0fa482135b5e3c6ec30af9c9dbf2edd0
PhoneWindowManager: Fix a couple of issues and cleanup recent PIE rewamp

SystemGestures is unregistered due to default new EdgeGestureService,
still for safety keep a boolean check on requestTransientBars().
Refresh height live.

Change-Id: Iae9c6079c21e65d01eea330fa17f3861a4c2e100
Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Fix resource leaks

Change-Id: I3a201cfd924e467d605351782bd06874c2af725e
Cleanup app->{theme1,theme2...} mapping on uninstall

Change-Id: I24b43e8817db1927d5b43fcf7ad3340269d046ea
Themes: Add '|' delimited list of components to broadcast

Change-Id: I742dcb0f502b6089dee584a92a3792016f2a9799
Themes: Handle apps using "original-package" tag

Before this patch the themes code assumed the pkgName from PackageInfo was equal to the
manifest value. This is not the case however for upgraded system apps that have gone
through a pkg-name change. For example, Trebuchet was "com.android.launcher3" and now
it is "com.cyanogenmod.trebuchet". If the device had wiped data then PM would use the new
pkg-name, but if the system apps were being upgraded then PM would use the old name which is
now different from the manifest name.

Change-Id: Ie7eb1b4e17899d1055535dc890d4f7a7bca9a98a
Make theme change broadcast a protected broadcast.

Change-Id: Ic24c840685d18d133dc73ff2637c041c4775f197
Themes: remove unused code

Change-Id: I5ee8de962c40ddc5fcfbbc0332a9e389223e716c
Themes: Delete icon resources during uninstall

Change-Id: Icf247642f9d246c8826f3394f873e4b434ad2b3f
WallpaperCropper: do not display null bitmaps

It is possible that themes can include a corrupted bitmap,
and the lockscreen will try and display a NULL image resulting in an
empty thumbnail and applying it will cause the app to crash.

Change-Id: Ie0770486a9d58050a5f296a219d844a39937421e
Signed-off-by: Roman Birg <roman@cyngn.com>
fw: media: Handle NPE due to threading race

Change-Id: I6eab5bc3d687edfa6f0839e439b3314bed4fdcea
Themes: Update last postFinish call

* Previous patchset changed postFinish function signature.

Change-Id: Ibe07435e274054c7203504bc4b0877b4df006893
Quicksettings: Set proper dual tiles visibility when recreating them

Every time QS are recreated, set back visibility to GONE, so after applying
a theme with transparent background QS front tile doesn't show its back one behind.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Themes: Fix home button for realz

AOSP doesn't update or refresh home button, its drawable is loaded once.
Refresh home button when refreshing recents and back icons aswell.

Change-Id: Ic691563bddcda00cff985edc2d0980172e81db0d
Signed-off-by: Evan Anderson <evan@thelinuxman.us>