Merge tag 'android-4.2.2_r1' of https://android.googlesource.com/platform/packages/apps/Launcher2 into treb

Android 4.2.2 release 1

Conflicts:
	res/layout-land/launcher.xml
	res/layout-port/launcher.xml
	res/layout-sw720dp/launcher.xml
	src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java
	src/com/cyanogenmod/trebuchet/AppsCustomizeTabHost.java
	src/com/cyanogenmod/trebuchet/CellLayout.java
	src/com/cyanogenmod/trebuchet/Launcher.java
	src/com/cyanogenmod/trebuchet/PagedView.java

Change-Id: I415138430337bcd21070b815a80de9c0cdd52239
trebuchet: Avoid NPE on startup

The workspaces are now inflated before the LauncherView, so defer
wallpaper initialization until later.

Change-Id: I8b939ec217e73b4a7c2b14434479982e24315c74
es_ES: Updated spanish translations

- PatchSet 2: Rebased

Change-Id: I1c4512fc1c76db477b1a5cf5bf1b24bdaeda0d29
Trebuchet: Update italian translation

Change-Id: I78f51d3b5f1fa089d052488ea9a93d68b0f95dcb
Merge "Trebuchet: Update italian translation" into cm-10.1
Add Afrikaans translation

Translated Trebuchet to Afrikaans

Change-Id: Idf3b5deee2dbf7f7f66d2a3fcb9105fd805e58bf
Merge "Add Afrikaans translation" into cm-10.1
Launcher: Fix overflow menu button

On rotate screen, at all apps drawer in Trebuchet, the overflow menu icon overlays the market
icon. This changes contains:

1.- Modify the app_customize_pane layout to avoid that overflow button and market button overlap
each other.
2.- Move updateOverflowMenuButton() from runNewAppsAnimation to bindAllApplications. The overflow
button need to be updated every time the all app drawer change.
3.- Fix preferencesVisible assignment. If we are in CM and launcher is Trebuchet and device
has not permanent button, the overflow menu should be displayed.
4.- Fix onCreateOptionsMenu. On AllAppsVisible the menu should be recreated always
5.- Buttons padding (market and overflow) are reduced to avoid a bad visual effect when
both buttons are one beside the other.

Before: https://www.dropbox.com/s/i9vgp6sh35nsnjt/before_phone_portrait.png
After:  https://www.dropbox.com/s/es5j35ny1jf9ey8/after_phone_portrait.png
        https://www.dropbox.com/s/6sztai1hq0w9ngr/after_phone_landscape.png

Patchset 2: Remove unnecessary invalidateOptionsMenu() call

Change-Id: I7ec08ff00ed4705846c0b46639965899b16a143d
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Improve scroll responsiveness.

1) mUsePagingTouchSlop set to false.
   Applist scroll now scrolls with the same
   thresholds used by homescreen scrolling.

2) Early start of scroll as soon as we
   detect that it's okay to scroll.
   Eliminates waiting for next vsync
   and starts scrolling in the current cycle.
   instead of the next.

Above changes help in reducing first touch to
first displacement latencies in scroll usecases.
Improves scroll responsiveness.

Change-Id: Ib45a361b9b6275e64d0a5b5603aa15fdd386a5f8
Launcher: Fixes to overflow menu button

Change-Id: I9b224f66bc25c721db1cd2dd53b397d72c21986e
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>
Fix overflow visibility logic

Change-Id: Id9235c6946a402841cbd8512b118daf8b1be3c49
Revert "Fix overflow visibility logic"

This reverts commit 919296825af7c9028eac0f9c0be6d6c9fbda2184

Change-Id: Iba8cdc0f6d1023b12b7873314df13154f2cf265d
Revert "Improve scroll responsiveness."

This reverts commit ce6b2513bcfb257cfdeb604060708b3833ccb65e

Change-Id: Id1b264c9f4417a2c3f22f3821f446fb9211f4616
Merge "Revert "Improve scroll responsiveness."" into cm-10.1
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
Merge "es_ES: Restore AOSP header" into cm-10.1
Trebuchet: UK translations

- Fixing whitespace errors

Change-Id: Iea0b6b7d5891d3a486bde277402946b2090e5ff4