Trebuchet: Hotseat fixes

This change fixes some of the bugs of HotSeat on landscape mode:
* Fixed distance algorithm for XY spatial (not only for X axis)
* Fixed cellX and cellY database handling when items are added in landscape mode
* Fixed cellX and cellY transtions when add new items
* Restore the current hotseat page on rotation

Patchset 2: Fixed create new folder in vertical hotseat
Patchset 3: Fixed broken mTransposeLayoutWithOrientation != true (large screen devices)
            Fixed delete existing folder in vertical hotseat
Patchset 4: Fixed destroy animation when a folder is destroyed in vertical hotseat
            Rebased

Change-Id: I8b0faa5b6fde42d80e0d98226fca07eead04223c
JIRA: CYAN-315
Issue: https://jira.cyanogenmod.org/browse/CYAN-315
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Fix icon scaling problem between workspace and hotseat.
Improve performance when showing previews and cut down on lag.
Trebuchet: Centers horizontally the drawer on vertical orientation

The drawer (AppsCustomizePagedView) disable the use of centers
horizontally && vertical every page. There is no problem with that on
device with fixed grid, and on devices with isLargeScreen on horizontal
orientation aligning the cellpagedview the top looks good. But when
orientation is vertical, the cellpagedview is aligned to the left.
In this case, this change forces the cellpagedview to center horizontally,
which give to the cellpagedview the same good look than horizontal orientation.

[before] https://sharecloud.ruesga.com/public.php?service=files&t=5fee1bd3e68fd28eafcaff13357956db

[after] https://sharecloud.ruesga.com/public.php?service=files&t=0beb9a41d6ad86fef089fb9f643ff51c

Change-Id: I20a996c60dd5d89b004ceee216ce5aea18b0466f
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Trebuchet: Force reload wallpaper dimension on screen size change

This ensures that the wallpaper dimensions are adjusted when a screen size change occurs,
for example when the expanded desktop feature is activated on devices without hard keys.

Change-Id: I4be96034a609afb2dd18e346b04ffacfed4e7043
JIRA: CYAN-790
Issue: https://jira.cyanogenmod.org/browse/CYAN-790
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Enable screen stretch by default

 * I don't know anyone who doesn't want this.

Change-Id: I2b5091a79d9ec32841d5f9b93a7c6c11357b9d04
Trebuchet: force close in dock (Trebuchet) with raised default page count

Use the same ui_homescreen_default_screen's algorithm to fix overflow default values

Change-Id: I2f529dc902fd736c2e36ff92cdf001bd23518236
JIRA: CYAN-757
Issue: https://jira.cyanogenmod.org/browse/CYAN-757
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
added "carousel" transition effect

removed German translations again,
fixed whitespace errors,
fixed upper-/lowercase mistakes

Change-Id: Ia502eede0e8140f49bc61141252ad0c862e0720b
Trebuchet: Fix NPE

This change fixes a NPE for the overflow menu. Steps:
1.- A device with no physical menu
2.- Install another launcher (xe Launcher2) (overflow menu is only displayed when Trebuchet runs
outside CM or when multiple launchers exists)
3.- Access AllAppDrawer and tap the overflow menu
4.- Tap again the overflow menu or rotate the screen and tap the overflow menu.
5.- NPE

The overflow menu is not recreated in onCreateOptionsMenu when isWorkspaceLocked(). The change
checks if the user is on the AllAppDrawer and forces the recreation of the menu.

Change-Id: Id68dd1f7b0c09a2f62b5f6d4fbef6f217bf98e82
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Trebuchet Settings: add setDisplayHomeAsUpEnabled

patch 3: cleaner imports

Change-Id: Ib7150bf248feb343042b1b8cc20775bae1d27279
Trebuchet: Labels on dock items

Patchset 4: Discard item scale and use paddings to adjust the workspace
Patchset 5: mHideDockIconLabels = false on vertical hotseat
Patchset 6: Fixed FolderIcon typo
            Fixed inline style
            Remove Workspace injection on Launcher class
            Use isLargeScreen to show text in vertical hotseat

Change-Id: I00c57a28b4c7110b66ec6f856df8865006a76699
JIRA: CYAN-523
Issue: https://jira.cyanogenmod.org/browse/CYAN-523
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Signed-off-by: iceandfire <arhamjamal@gmail.com>

Conflicts:
	res/values-sw340dp/dimens.xml
	res/values/cm_strings.xml
	res/values/dimens.xml
	res/xml/preferences_dock.xml
	src/com/th/onager/Launcher.java
PagedView: Prevent NPE

Change-Id: Ic8f0e1b5a5800c6da13feda2255b79b3ece852e6
DeleteDropTarget: Fix ghost allapps button

Change-Id: Idbd70100be2a47539fc399073d1f4f049c81c03b
Workspace: Fix wallpaper offset landscape

Change-Id: I3b283efbe69f68fd088154b9ed2fe59ceb3336ac
Hotseat: Disable hitsPreviousPage if hotseat is vertical

Change-Id: I224b345fb1196602111c2209d134093e2dfee891
Trebuchet: Remove workspace items of hidden apps

Remove the shortcut and widget associated to an app when this become hidden
for user setting.

Change-Id: I4ce8f545ef879d711fbbd8ab8572dcd7386dfa75
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Trebuchet: Lock homescreen

Allow lock shortcuts and folders positions in the workspace, hotseat and apps and widgets drawer.
When is enabled the system avoids to move any shortcut or folder, change its names and
access to widgets.

Patchset 2: Fixed typo

Change-Id: I832da526cf1eb32752218656a7c2dafc53010236
JIRA: CYAN-686
Issue: https://jira.cyanogenmod.org/browse/CYAN-686
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Signed-off-by: iceandfire <arhamjamal@gmail.com>

Conflicts:
	res/values/cm_strings.xml
	res/xml/preferences_general.xml
	src/com/th/onager/Launcher.java
Trebuchet: Use preference provider to lock/unlock homescreen

mSharedPreferences uses "com.cyanogenmod.trebuchet.prefs", while the Preferences activity uses
"com.cyanogenmod.trebuchet_preferences". Use PreferenceProvider to sync lock/unlock homescreen.

Change-Id: Ib9312a9f8cffe3f009b8cd8d9b9789d459c1bd96
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Signed-off-by: iceandfire <arhamjamal@gmail.com>

Conflicts:
	src/com/th/onager/preference/PreferencesProvider.java
Fix build

Signed-off-by: iceandfire <arhamjamal@gmail.com>
Merge branch 'jb-mr1' of github.com:TeamHorizon/packages_apps_onager into jb-mr1