DocumentsUI: Remove catch-all statements

This removes several "catch (Exception)" statements which violates the Android code
style guidelines and hides problems.

I left some catch-all statements in, as they seem to be intended like this (grep for
"catch (Exception").

I suggest we do not merge this before we are sure that we fixed any problems. One problem
is a crash when deleting items (I'm currently working to fix that).

PS 2: Add exception to log.
Change-Id: I483c320c7ee256acd993dd2a509c031fa5e3f09e
DocumentsUI: Handle NPE gracefully

Cherry-picked from OmniROM.

http://jira.omnirom.org/browse/OMNI-956

Change-Id: I8d50d71a9c91486dfc9e5da01538c6b5a626f054
Recents: ClearAll: Fix glitch on quick double tap

To reproduce:
Open five or more apps, open recents and tap twice very quick on
clear all button.

Setup a boolean to control the thread starting, don't relaunch if
clearAll's run() has been executed and is already firing up childs.

Along with this https://gerrit.paranoidandroid.co/#/c/4346/ UI/UX should
look great no matter how crazy and how many times the user click on recents.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I0d393838c23e2585222cf7b181c2f7a6385494cd
Quicksettings: Add separate dimension for dual switch icon

Support Themers (for ex the ones who change QS icon sizes).
Right now it streams default one that is themed, and a bigger icon
theme will mess it up.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
PEEK: Sensors improvements

- Bring some fixes to the algorithm thanks to @D4rKn3sSyS
- Cleanup

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Themes: Fix wallpaper chooser crash

Fix AOSPA-477
Merge "DocumentsUI: Remove catch-all statements" into kitkat
Merge "DocumentsUI: Handle NPE gracefully" into kitkat
Merge "Themes: Fix wallpaper chooser crash" into kitkat
Themes: Add categories to theme change intent.

The following categories are available:

org.cyanogenmod.intent.category.MODS_HOMESCREEN
org.cyanogenmod.intent.category.MODS_LOCKSCREEN
org.cyanogenmod.intent.category.MODS_ICONS
org.cyanogenmod.intent.category.MODS_FONTS
org.cyanogenmod.intent.category.MODS_BOOTANIM
org.cyanogenmod.intent.category.MODS_NOTIFICATIONS
org.cyanogenmod.intent.category.MODS_ALARMS
org.cyanogenmod.intent.category.MODS_RINGTONES
org.cyanogenmod.intent.category.MODS_OVERLAYS

Change-Id: Ic444278d1d712cb6207bb10574a471524a8fed41
PIE: Improve assistant handling

Run it from SearchPanelView and determinate before, at PieMenu creation,
if we have any assistant available or not.

Some cleanup too.

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I986a5e5257f432acd58dd2d75fc13f2b772c7453
Merge "PEEK: Sensors improvements" into kitkat
Merge "Quicksettings: Add separate dimension for dual switch icon" into kitkat
Merge "Themes: Add categories to theme change intent." into kitkat
VolumePanel: Fix Theme Engine support with On-The-Spot dialog

Our on the spot feature needs to write to system. Since VolumePanel when is
recreated uses theme engine context (and in this case is fked), pass to on the spot dialog always the
first system initialized one. Thanks to @David96 helping find this out :)

This way we lose theming for the safe headset on the spot dialog,
but we're already finding a really good fix, we have something already :)

Fix AOSPA-482

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I492cd8e24b09d856d23697b84113664379703cf1
Merge "VolumePanel: Fix Theme Engine support with On-The-Spot dialog" into kitkat
Merge branch 'kitkat' of https://github.com/AOSPA/android_frameworks_base into kitkat