diff --git a/Android.bp b/Android.bp index c5832441c7..1121a7962f 100644 --- a/Android.bp +++ b/Android.bp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -java_library_static { +android_library { name: "launcher-aosp-tapl", static_libs: [ "androidx.annotation_annotation", @@ -27,5 +27,6 @@ java_library_static { "src/com/android/launcher3/util/SecureSettingsObserver.java", "src/com/android/launcher3/TestProtocol.java", ], + manifest: "tests/tapl/AndroidManifest.xml", platform_apis: true, } diff --git a/Android.mk b/Android.mk index 9d92a9d2e0..06ee66fdd2 100644 --- a/Android.mk +++ b/Android.mk @@ -16,18 +16,6 @@ LOCAL_PATH := $(call my-dir) -# -# Prebuilt Java Libraries -# -include $(CLEAR_VARS) -LOCAL_MODULE := libSharedSystemUI -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_CLASS := JAVA_LIBRARIES -LOCAL_SRC_FILES := quickstep/libs/sysui_shared.jar -LOCAL_UNINSTALLABLE_MODULE := true -LOCAL_SDK_VERSION := current -include $(BUILD_PREBUILT) - include $(CLEAR_VARS) LOCAL_MODULE := libPluginCore LOCAL_MODULE_TAGS := optional @@ -37,14 +25,6 @@ LOCAL_UNINSTALLABLE_MODULE := true LOCAL_SDK_VERSION := current include $(BUILD_PREBUILT) -include $(CLEAR_VARS) -LOCAL_MODULE := libLauncherProtos -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_CLASS := JAVA_LIBRARIES -LOCAL_SRC_FILES := libs/launcher_protos.jar -LOCAL_UNINSTALLABLE_MODULE := true -LOCAL_SDK_VERSION := current -include $(BUILD_PREBUILT) # # Build rule for plugin lib (needed to write a plugin). # @@ -53,7 +33,7 @@ LOCAL_USE_AAPT2 := true LOCAL_AAPT2_ONLY := true LOCAL_MODULE_TAGS := optional -LOCAL_STATIC_JAVA_LIBRARIES := libPluginCore +LOCAL_STATIC_JAVA_LIBRARIES:= libPluginCore LOCAL_SRC_FILES := \ $(call all-java-files-under, src_plugins) diff --git a/SecondaryDisplayLauncher/src/com/android/launcher3/SecondaryDisplayLauncher.java b/SecondaryDisplayLauncher/src/com/android/launcher3/SecondaryDisplayLauncher.java index 12fa46bf44..0a2f18f109 100644 --- a/SecondaryDisplayLauncher/src/com/android/launcher3/SecondaryDisplayLauncher.java +++ b/SecondaryDisplayLauncher/src/com/android/launcher3/SecondaryDisplayLauncher.java @@ -26,12 +26,11 @@ import android.content.Intent; import android.content.SharedPreferences; import android.content.res.Configuration; import android.os.Bundle; -import com.google.android.material.circularreveal.cardview.CircularRevealCardView; -import com.google.android.material.floatingactionbutton.FloatingActionButton; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewAnimationUtils; +import android.view.inputmethod.InputMethodManager; import android.widget.GridView; import android.widget.ImageButton; import android.widget.PopupMenu; @@ -41,6 +40,9 @@ import androidx.fragment.app.FragmentManager; import androidx.lifecycle.ViewModelProvider; import androidx.lifecycle.ViewModelProvider.AndroidViewModelFactory; +import com.google.android.material.circularreveal.cardview.CircularRevealCardView; +import com.google.android.material.floatingactionbutton.FloatingActionButton; + import java.util.HashSet; import java.util.Set; @@ -141,6 +143,16 @@ public class SecondaryDisplayLauncher extends FragmentActivity implements AppPic public void onNewIntent(Intent intent) { super.onNewIntent(intent); + + if (Intent.ACTION_MAIN.equals(intent.getAction())) { + // Hide keyboard. + final View v = getWindow().peekDecorView(); + if (v != null && v.getWindowToken() != null) { + getSystemService(InputMethodManager.class).hideSoftInputFromWindow( + v.getWindowToken(), 0); + } + } + // A new intent will bring the launcher to top. Hide the app drawer to reset the state. showAppDrawer(false); } diff --git a/build.gradle b/build.gradle index 15a35133e3..e296455bec 100644 --- a/build.gradle +++ b/build.gradle @@ -9,6 +9,9 @@ buildscript { } } +final String ANDROID_TOP = "${rootDir}/../../.." +final String FRAMEWORK_PREBUILTS_DIR = "${ANDROID_TOP}/prebuilts/framework_intermediates/" + apply plugin: 'com.android.application' apply plugin: 'com.google.protobuf' @@ -148,16 +151,16 @@ dependencies { implementation "androidx.recyclerview:recyclerview:${ANDROID_X_VERSION}" implementation "androidx.preference:preference:${ANDROID_X_VERSION}" implementation project(':IconLoader') - implementation fileTree(dir: "libs", include: 'launcher_protos.jar') + implementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/libs", include: 'launcher_protos.jar') // Recents lib dependency - withQuickstepImplementation fileTree(dir: "quickstep/libs", include: 'sysui_shared.jar') + withQuickstepImplementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/quickstep/libs", include: 'sysui_shared.jar') // Recents lib dependency for Go - withQuickstepIconRecentsImplementation fileTree(dir: "quickstep/libs", include: 'sysui_shared.jar') + withQuickstepIconRecentsImplementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/quickstep/libs", include: 'sysui_shared.jar') // Required for AOSP to compile. This is already included in the sysui_shared.jar - withoutQuickstepImplementation fileTree(dir: "libs", include: 'plugin_core.jar') + withoutQuickstepImplementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/libs", include: 'plugin_core.jar') testImplementation 'junit:junit:4.12' androidTestImplementation "org.mockito:mockito-core:1.9.5" diff --git a/go/quickstep/res/drawable/clear_all_button.xml b/go/quickstep/res/drawable/clear_all_button.xml new file mode 100644 index 0000000000..acac32de5e --- /dev/null +++ b/go/quickstep/res/drawable/clear_all_button.xml @@ -0,0 +1,22 @@ + + + + + + diff --git a/go/quickstep/res/layout/icon_recents_root_view.xml b/go/quickstep/res/layout/icon_recents_root_view.xml index 6c5095000b..fddb1d347e 100644 --- a/go/quickstep/res/layout/icon_recents_root_view.xml +++ b/go/quickstep/res/layout/icon_recents_root_view.xml @@ -19,10 +19,38 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> - + android:orientation="vertical" + android:visibility="gone"> + +