Launcher3: import reversed google now lib

* Imported from https://github.com/patriksletmo/launcherclient/

Change-Id: I84582ae812b8ecb0d694ae2396843effdcf1219c

Launcher3: support google now tab

Change-Id: I6efc1d5186e0f1bd4fa78ae7231999b984ce7222

LauncherClient: make sure service is connected before trying to unbind

Change-Id: If092db391be12db4f89ed292d1a2f5f9daef8c17

Launcher3: animate workspace when animating the Google now page

Change-Id: I6306d8eeee5ef87b3faf1d9dcb6825e67eb65d45

Launcher3: make Google now left page optional

* Always destroy the launcher client when disabled, don't just disable the scrolling page.

Change-Id: Ic9a990c03c29e3ef280242c7a2d8b3bb0d049566

Launcher3: cleanup launcher tab preference

 Remove preference is search package is not available
 Consolidate BroadcastReceiver and IntentFilter

[OmniChange]

Launcher3: Add OnStart and OnStop to LuncherClient

Launcher3: Add ChangeListener for GoogleFeed

Change-Id: Idcdf7380ce25a66f1dc6c3cd993ae76d089cdd36

[On A11]
Updated to use the new LauncherOverlay plugin

[On A12]
Replace isAppInstalled with isAvailableApp
Remove previous Launchertab
Remove previous Google LauncherClient.
No more needed to edit the Launcher.java :-)

Add prebuilt libGoogleFeed.jar for the new LauncherClient with:
 * ClientOptions
 * dump(String, PrintWriter)
 * hideOverlay(Int)
 * reattachOverlay
 * showOverlay(boolean)

Imported from https://github.com/LineageOS/android_packages_apps_Trebuchet/commit/100eaee2247996010137dc5a1422e65c629d34f6
Added the new OverlayCallbackImpl from LOS.

Launcher3: move libGoogleFeed.jar to vendor/gapps

and only GAPPS builds will add it
for all other there is a mock impl

Launcher3: move overlay lib to common repo

Change-Id: Ief90e95a657aea1182f76c656eb8dfdafc3db505

fixup! QuickStep: Google Feed integration

Change-Id: Ic9ae500a93b930590e22eddb0fefe04deb584300

Change-Id: Ief90e95a657aea1182f76c656eb8dfdafc3db505
diff --git a/Android.bp b/Android.bp
index c661986..9aeb3d4 100644
--- a/Android.bp
+++ b/Android.bp
@@ -272,8 +272,9 @@
 
 // Library with all the source code and dependencies for building Quickstep
 android_library {
-    name: "Launcher3QuickStepLib",
+    name: "Launcher3QuickStepLibGoogle",
     srcs: [
+        "src_overlay/google/com/android/launcher3/overlay/OverlayCallbackImpl.java",
         ":launcher-src",
         ":launcher-quickstep-src",
         ":launcher-build-config",
@@ -287,6 +288,37 @@
     // in QuickstepResLib to take precendece, so it should be the final
     // dependency. See b/208647810 for how this can go wrong.
     static_libs: [
+        "OmniLib",
+        "//vendor/omni:libGoogleFeed",
+        "SystemUI-statsd",
+        "QuickstepResLib",
+    ],
+    manifest: "quickstep/AndroidManifest.xml",
+    platform_apis: true,
+    min_sdk_version: "current",
+    // TODO(b/319712088): re-enable use_resource_processor
+    use_resource_processor: false,
+}
+
+android_library {
+    name: "Launcher3QuickStepLibMock",
+    srcs: [
+        "src_overlay/mock/com/android/launcher3/overlay/OverlayCallbackImpl.java",
+        "src_overlay/mock/com/google/android/libraries/gsa/launcherclient/LauncherClientCallbacks.java",
+        ":launcher-src",
+        ":launcher-quickstep-src",
+        ":launcher-build-config",
+    ],
+    resource_dirs: [],
+    libs: [
+        "framework-statsd",
+    ],
+    // Note the ordering here is important when it comes to resource
+    // overriding. We want the most specific resource overrides defined
+    // in QuickstepResLib to take precendece, so it should be the final
+    // dependency. See b/208647810 for how this can go wrong.
+    static_libs: [
+        "OmniLib",
         "SystemUI-statsd",
         "QuickstepResLib",
     ],
@@ -301,7 +333,7 @@
 android_app {
     name: "Launcher3QuickStep",
 
-    static_libs: ["Launcher3QuickStepLib"],
+    defaults: ["omni_launcher3_defaults"],
     optimize: {
         enabled: false,
     },