Trebuchet: fix uninstall app from shortcut

When uninstalling an app from a shortcut, there are 2 incorrect cases:

1.- If the user proceeds with the uninstall process, all the shortcuts references are removed
from the workspace, except the one used to start that process, because the shortcut is
removed from the workspace, but not from the favorites database. A reboot of the device
will restore the shortcut into the workspace again.

2.- If the user cancels the uninstall process, the shortcut used is not restored, because
it was removed in the drag&drop process.

This change restore the shortcut prior to start the uninstall process. For restoring the
shortcuts the patchset verifies 3 conditions:

1.- If the shortcut was in the desktop, the shortcut is restored in the same position.

2.- If the shortcut was contained by a folder with one or two shortcuts, then the folder
is removed in the darg&drop, so the folder is recreated in the same location, and all its
shortcuts are restored

3.- If the shortcut was contained by a folder with more than 2 shortcuts, the shortcut is
restored in the same folder.

If the user proceeds with the uninstall process then as the shortcut is present in the
workspace, the shortcut will be removed.

Change-Id: I95e2684d01cabd0d5a04f17c896c72cad2b14d38
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Trebuchet: fix Dutch translation

Will fix a typo and error in the Dutch translations.

Change-Id: I551ee1c12d781a4ea7512d685b73e588879823fd
es_ES: Restore AOSP header

Change-Id: Ic5203c4afddb855e316b6a04151244182328db9b
Corrected misspelling of Accordion

Change-Id: I4b7ff094ab24b7a5399f6d340412aa1b37679064
Trebuchet: UK translations

- Fixing whitespace errors

Change-Id: Iea0b6b7d5891d3a486bde277402946b2090e5ff4
Trebuchet: Updated Polish translation

Patch Set 2: Minor correction
Patch Set 3: Correction
Patch Set 4: Changed 'szuflada' for 'lista'

Change-Id: I90d7958c6d70cb2f23619f8afb825213e0adce5b
Trebuchet: fix coherence in French translation

    * Patch Set 1: initial commit
    * Patch Set 2: backslash missed

Change-Id: I0e7994e0dd6e576b13b06c5eda215968d115cf52
Trebuchet: Add overlayable config for tablet workspace grid size

Tablets with a 4x3 screen such as the HP Touchpad do not
work well with automatic grid size setting. This problem is described in
CyanogenMod Issue 5798: Trebuchet Tablet. This fixes that issue.

This creates a flag in config that can be overlayed at
build time to allow user settings to adjust grid size.

The maximum settable row and column counts are also overlayable.

This is a port of: http://review.cyanogenmod.org/#/c/21067/
which was merged into jellybean.

The default behavior is unchanged.
Rebased.

Change-Id: I3d7cf5e121a423a0033310eee88e498bc080af3c
Trebuchet: Added arrays.xml for Polish language

Change-Id: I895197cd8387b2ac40964180b1b70051a7de7e87
Update German translation.

Change-Id: I939b20784b51efe5043ca2c7289aede388deee33
Trebuchet: Centers vertically the wallpaper

Actually, the wallpaper is not center vertically (both, with wallpaperhack and
without wallpaperhack). This patch modifies:

* Replaces the WallpaperOffsetInterpolator class by the Launcher2 implementation.
* Fixes mWallpaperHack. onDraw now centers the y vertically.
* Disable mWallpaperHack when there is only one homescreen (otherwise a black screen is displayed).

Change-Id: Ia5e0763c9a31609db8f7826f619ed808041e97e7
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
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: Default workspace fixes

* Replace AnalogClockWidget by cLock Widget
* Add "no telephony" workspaces files. New favorites:
    - Phone -> Email
    - Contacts -> Calendar
    - Mms -> Contacts
    - Browser -> Browser
* Add sw600dp and sw700dp update workspaces files

Patchset 2-4: CleanUp

Change-Id: If21559c59995326b93689f89291446a9962274cb
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>
Trebuchet: Fix default cLock widget size on home screen

Patchset 2: Replaced PowerWidget by Apollo

Change-Id: I847be86e5488732512c26e6495322272a18f75b5
Merge pull request #1 from xLaMbChOpSx/cm-10.1

Trebuchet Update - CM-10.1-M3
Trebuchet: Update italian translation

Change-Id: Ideba314e3cd49a99e09f8aa75cd4a8582f0a6617
Trebuchet: RU translations

Change-Id: Ib529f978470aebfeb2e5f37bbebd8adb49efa103
Trebuchet: updated "carousel" transition effect

fixed vertical drawer support
changed pivotY to half the screen height, so
it looks better now

Change-Id: I152ec456e80de7342d9f06985aa060c40407f856
Trebuchet: Fix vertical position of wallpaper when mWallpaperHack is activated

Fix vertical aligment of wallpaper when Wallpaper Quick Render setting is activated.
See http://review.cyanogenmod.org/35227

Change-Id: I3b2b7b59ebce995724bcc2fe3f2aa079c7abafee
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>