OmniSwitch: fix IndexOutOfBoundsException

This might not be the final solution but for now
fix the crash

05 17:54:17.560 E/AndroidRuntime(18708): java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
04-05 17:54:17.560 E/AndroidRuntime(18708):     at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
04-05 17:54:17.560 E/AndroidRuntime(18708):     at java.util.ArrayList.get(ArrayList.java:308)
04-05 17:54:17.560 E/AndroidRuntime(18708):     at android.widget.ArrayAdapter.getItem(ArrayAdapter.java:337)
04-05 17:54:17.560 E/AndroidRuntime(18708):     at org.omnirom.omniswitch.ui.SwitchLayout.onDismiss(SwitchLayout.java:326)
04-05 17:54:17.560 E/AndroidRuntime(18708):     at org.omnirom.omniswitch.ui.SwipeDismissHorizontalListViewTouchListener.onAnimationEnd(SwipeDismissHorizontalListViewTouchListener.java:408)
04-05 17:54:17.560 E/AndroidRuntime(18708):     at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1056)
04-05 17:54:17.560 E/AndroidRuntime(18708):     at android.animation.ValueAnimator.access00(ValueAnimator.java:50)

Change-Id: Iea4e5f8883b9d291091a901ff94637b11c3c5b0f
OmniSwitch: fixes for handling disabled apps

Disabling apps is not sending a removed intent so make
sure we remove disabled apps from favorites on next update.
Also listen to PACKAGE_CHANGED to update package list
in that case and only if service is really running.

Change-Id: I73838d21f3e21988afd195df3cde59f862bc3ac2
OmniSwitch: quick switcher

-added back button support
-added quick switcher settings
-added quick switcher button config

PS10:
-fixed division by zero - thanks Juan
-added item limit preference

PS11:
-quick switcher depends on drag handle
-fix drag handle switch
-next try - division by zero fix - thanks Menno

PS12:
-fixed timing issue - thanks Cory

PS13:
-added showcase for quick switcher
-remove start and stop service broadcaset and
INTERACT_ACROSS_USERS_FULL permissions since we dont
need it anymore with the simplified recents integration
requires https://gerrit.omnirom.org/6953
-listem to ACTION_SHUTDOWN intent to save local prefs
-fixed back key handling

PS14:
-added ordering support for action buttons - coudnt resist :)

PS15:
-tweaking horizontal scroller

PS16:
-uprev version

Change-Id: I845598bb706089c788e8d829d7d4ebfb7928eb73
OmniSwitch: Immersive mode button

PS13:
-make image a little bit smaller to match the rest
-cleanup

PS14:
-more cleanup

Change-Id: Ief338c252f0c7b9819040a48cc374d1f208854cc
OmniSwitch: FR translation

PS2-4: rebase and add translation
PS5: correction

Change-Id: I69737662768f122aa72f5962106df1a8298c167b
OmniSwitch: center action buttons again

Change-Id: Ida6292d1cdcab26094f49b8fa06877caf5795bc7
OmniSwitch: Add IT-Translation

 1.Update
 2.Fix error

Change-Id: Ia733fc2713e0c8c7215e1e75d5229a3c9e40ab7b
OmniSwitch: CA translation

Change-Id: Ie39e05c28d5013d7b65f3544c1a3c271e79ef9ec
OmniSwitch: ES translation

Change-Id: I2cf680b91a0ee89da6ebe854c0bfb8ec951c18e7
OmniSwitch: cleanup and bugfixes

-enhanced favorite handling
-disable debug by default
-added hu translation
-support color picker dialog rotation
-added FavoritePreference
-adapted landscape size calculation
-minor fixes

Change-Id: I1ab416c7a573e903a2dd884069bd61f58fff1f9d