Merge "Adding a case when there is only 1 system shortcut on the Popup Container" into tm-qpr-dev
diff --git a/Android.bp b/Android.bp
index 0a55675..4adbf53 100644
--- a/Android.bp
+++ b/Android.bp
@@ -313,3 +313,138 @@
baseline_filename: "lint-baseline-launcher3.xml",
},
}
+
+// Build rule for Launcher3 Go app for Android Go devices.
+android_app {
+ name: "Launcher3Go",
+
+ static_libs: ["Launcher3CommonDepsLib"],
+
+ srcs: [
+ "src/**/*.java",
+ "src_ui_overrides/**/*.java",
+ "go/src/**/*.java",
+ ],
+
+ resource_dirs: ["go/res"],
+
+ optimize: {
+ proguard_flags_files: ["proguard.flags"],
+ },
+
+ sdk_version: "current",
+ min_sdk_version: "current",
+ target_sdk_version: "current",
+ privileged: true,
+ system_ext_specific: true,
+ overrides: [
+ "Home",
+ "Launcher2",
+ "Launcher3",
+ "Launcher3QuickStep",
+ ],
+ required: ["privapp_whitelist_com.android.launcher3"],
+
+ additional_manifests: [
+ "AndroidManifest.xml",
+ "AndroidManifest-common.xml",
+ ],
+
+ manifest: "go/AndroidManifest.xml",
+ jacoco: {
+ include_filter: ["com.android.launcher3.*"],
+ }
+
+}
+
+// Build rule for Quickstep app.
+android_app {
+ name: "Launcher3QuickStep",
+
+ static_libs: ["Launcher3QuickStepLib"],
+ optimize: {
+ enabled: false,
+ },
+
+ platform_apis: true,
+ min_sdk_version: "current",
+ target_sdk_version: "current",
+
+ privileged: true,
+ system_ext_specific: true,
+ overrides: [
+ "Home",
+ "Launcher2",
+ "Launcher3",
+ ],
+ required: ["privapp_whitelist_com.android.launcher3"],
+
+ resource_dirs: ["quickstep/res"],
+
+ additional_manifests: [
+ "quickstep/AndroidManifest-launcher.xml",
+ "AndroidManifest-common.xml",
+ ],
+
+ manifest: "quickstep/AndroidManifest.xml",
+ jacoco: {
+ include_filter: ["com.android.launcher3.*"],
+ }
+
+}
+
+// Build rule for Launcher3 Go app with quickstep for Android Go devices.
+android_app {
+ name: "Launcher3QuickStepGo",
+
+ static_libs: [
+ "SystemUI-statsd",
+ "SystemUISharedLib",
+ "LauncherGoResLib",
+ ],
+
+ platform_apis: true,
+ min_sdk_version: "current",
+ target_sdk_version: "current",
+
+ srcs: [
+ "src/**/*.java",
+ "quickstep/src/**/*.java",
+ "go/src/**/*.java",
+ "go/quickstep/src/**/*.java",
+ ],
+
+ resource_dirs: [
+ "go/quickstep/res",
+ "go/res",
+ "quickstep/res",
+ ],
+
+ optimize: {
+ proguard_flags_files: ["proguard.flags"],
+ enabled: true,
+ },
+
+ privileged: true,
+ system_ext_specific: true,
+ overrides: [
+ "Home",
+ "Launcher2",
+ "Launcher3",
+ "Launcher3QuickStep",
+ ],
+ required: ["privapp_whitelist_com.android.launcher3"],
+
+ additional_manifests: [
+ "go/AndroidManifest.xml",
+ "go/AndroidManifest-launcher.xml",
+ "AndroidManifest-common.xml",
+ ],
+
+ manifest: "quickstep/AndroidManifest.xml",
+ jacoco: {
+ include_filter: ["com.android.launcher3.*"],
+ }
+
+}
+
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 1bc8b28..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,147 +0,0 @@
-#
-# Copyright (C) 2013 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-#
-# Build rule for Launcher3 Go app for Android Go devices.
-#
-include $(CLEAR_VARS)
-LOCAL_USE_AAPT2 := true
-LOCAL_MODULE_TAGS := optional
-LOCAL_STATIC_ANDROID_LIBRARIES := Launcher3CommonDepsLib
-
-LOCAL_SRC_FILES := \
- $(call all-java-files-under, src) \
- $(call all-java-files-under, src_ui_overrides) \
- $(call all-java-files-under, go/src)
-
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/go/res
-
-LOCAL_PROGUARD_FLAG_FILES := proguard.flags
-
-LOCAL_SDK_VERSION := current
-LOCAL_MIN_SDK_VERSION := 26
-LOCAL_PACKAGE_NAME := Launcher3Go
-LOCAL_PRIVILEGED_MODULE := true
-LOCAL_SYSTEM_EXT_MODULE := true
-LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3 Launcher3QuickStep
-LOCAL_REQUIRED_MODULES := privapp_whitelist_com.android.launcher3
-
-LOCAL_FULL_LIBS_MANIFEST_FILES := \
- $(LOCAL_PATH)/AndroidManifest.xml \
- $(LOCAL_PATH)/AndroidManifest-common.xml
-
-LOCAL_MANIFEST_FILE := go/AndroidManifest.xml
-LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.*
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-LOCAL_LICENSE_PACKAGE_NAME := Android Launcher3
-LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
-include $(BUILD_PACKAGE)
-
-#
-# Build rule for Quickstep app.
-#
-include $(CLEAR_VARS)
-LOCAL_USE_AAPT2 := true
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_STATIC_ANDROID_LIBRARIES := Launcher3QuickStepLib
-LOCAL_PROGUARD_ENABLED := disabled
-
-ifneq (,$(wildcard frameworks/base))
- LOCAL_PRIVATE_PLATFORM_APIS := true
-else
- LOCAL_SDK_VERSION := system_current
- LOCAL_MIN_SDK_VERSION := 26
-endif
-LOCAL_PACKAGE_NAME := Launcher3QuickStep
-LOCAL_PRIVILEGED_MODULE := true
-LOCAL_SYSTEM_EXT_MODULE := true
-LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3
-LOCAL_REQUIRED_MODULES := privapp_whitelist_com.android.launcher3
-
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/quickstep/res
-
-LOCAL_FULL_LIBS_MANIFEST_FILES := \
- $(LOCAL_PATH)/quickstep/AndroidManifest-launcher.xml \
- $(LOCAL_PATH)/AndroidManifest-common.xml
-
-LOCAL_MANIFEST_FILE := quickstep/AndroidManifest.xml
-LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.*
-
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-LOCAL_LICENSE_PACKAGE_NAME := Android Launcher3
-LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
-include $(BUILD_PACKAGE)
-
-
-#
-# Build rule for Launcher3 Go app with quickstep for Android Go devices.
-#
-include $(CLEAR_VARS)
-LOCAL_USE_AAPT2 := true
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- SystemUI-statsd \
- SystemUISharedLib
-ifneq (,$(wildcard frameworks/base))
- LOCAL_PRIVATE_PLATFORM_APIS := true
-else
- LOCAL_SDK_VERSION := system_current
- LOCAL_MIN_SDK_VERSION := 26
-endif
-LOCAL_STATIC_ANDROID_LIBRARIES := LauncherGoResLib
-
-LOCAL_SRC_FILES := \
- $(call all-java-files-under, src) \
- $(call all-java-files-under, quickstep/src) \
- $(call all-java-files-under, go/src) \
- $(call all-java-files-under, go/quickstep/src)
-
-LOCAL_RESOURCE_DIR := \
- $(LOCAL_PATH)/go/quickstep/res \
- $(LOCAL_PATH)/go/res \
- $(LOCAL_PATH)/quickstep/res
-
-LOCAL_PROGUARD_FLAG_FILES := proguard.flags
-LOCAL_PROGUARD_ENABLED := full
-
-LOCAL_PACKAGE_NAME := Launcher3QuickStepGo
-LOCAL_PRIVILEGED_MODULE := true
-LOCAL_SYSTEM_EXT_MODULE := true
-LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3 Launcher3QuickStep
-LOCAL_REQUIRED_MODULES := privapp_whitelist_com.android.launcher3
-
-LOCAL_FULL_LIBS_MANIFEST_FILES := \
- $(LOCAL_PATH)/go/AndroidManifest.xml \
- $(LOCAL_PATH)/go/AndroidManifest-launcher.xml \
- $(LOCAL_PATH)/AndroidManifest-common.xml
-
-LOCAL_MANIFEST_FILE := quickstep/AndroidManifest.xml
-LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.*
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-LOCAL_LICENSE_PACKAGE_NAME := Android Launcher3
-LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
-include $(BUILD_PACKAGE)
-
-
-# ==================================================
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/go/quickstep/src/com/android/launcher3/AppSharing.java b/go/quickstep/src/com/android/launcher3/AppSharing.java
index e717937..cb1f1c7 100644
--- a/go/quickstep/src/com/android/launcher3/AppSharing.java
+++ b/go/quickstep/src/com/android/launcher3/AppSharing.java
@@ -16,6 +16,8 @@
package com.android.launcher3;
+import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_SYSTEM_SHORTCUT_APP_SHARE_TAP;
+
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -123,6 +125,8 @@
@Override
public void onClick(View view) {
+ ActivityContext.lookupContext(view.getContext())
+ .getStatsLogManager().logger().log(LAUNCHER_SYSTEM_SHORTCUT_APP_SHARE_TAP);
if (!isEnabled()) {
showCannotShareToast(view.getContext());
return;
diff --git a/quickstep/protos_overrides/launcher_atom_extension.proto b/quickstep/protos_overrides/launcher_atom_extension.proto
index a1566f0..f5a277b 100644
--- a/quickstep/protos_overrides/launcher_atom_extension.proto
+++ b/quickstep/protos_overrides/launcher_atom_extension.proto
@@ -22,6 +22,7 @@
// Wrapper message for containers used at the quickstep level.
// Message name should match with launcher_atom_extension.proto message at
// the AOSP level.
+// Next ID = 3
message ExtendedContainers {
reserved 2; // Deleted fields
@@ -31,10 +32,16 @@
}
// Represents on-device search result container.
+// Next ID = 4
message DeviceSearchResultContainer{
optional int32 query_length = 1;
optional SearchAttributes search_attributes = 2;
+ // [0, m], m varies based on the display density and resolution
+ // To indicate the location of the tapped on-device search result.
+ // For application, it will be the column number in the apps row.
+ optional int32 grid_x = 3;
+ // Next ID = 4
message SearchAttributes{
// True if results are based on spell corrected query
diff --git a/quickstep/res/drawable/split_instructions_background.xml b/quickstep/res/drawable/split_instructions_background.xml
new file mode 100644
index 0000000..6d0e7db
--- /dev/null
+++ b/quickstep/res/drawable/split_instructions_background.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2022 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
+ android:shape="rectangle">
+ <solid android:color="?androidprv:attr/colorAccentPrimary" />
+ <corners android:radius="@dimen/split_instructions_radius" />
+</shape>
\ No newline at end of file
diff --git a/quickstep/res/layout/split_instructions_view.xml b/quickstep/res/layout/split_instructions_view.xml
new file mode 100644
index 0000000..91fb05c
--- /dev/null
+++ b/quickstep/res/layout/split_instructions_view.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2022 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<com.android.quickstep.views.SplitInstructionsView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="@drawable/split_instructions_background"
+ android:paddingRight="@dimen/split_instructions_horizontal_padding"
+ android:paddingLeft="@dimen/split_instructions_horizontal_padding"
+ android:paddingTop="@dimen/split_instructions_vertical_padding"
+ android:paddingBottom="@dimen/split_instructions_vertical_padding"
+ android:elevation="@dimen/split_instructions_elevation"
+ android:visibility="gone">
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/split_instructions_text"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:gravity="center"
+ android:textColor="?androidprv:attr/textColorOnAccent"
+ android:text="@string/toast_split_select_app" />
+</com.android.quickstep.views.SplitInstructionsView>
\ No newline at end of file
diff --git a/quickstep/res/layout/taskbar_all_apps.xml b/quickstep/res/layout/taskbar_all_apps.xml
index d402469..34d4b23 100644
--- a/quickstep/res/layout/taskbar_all_apps.xml
+++ b/quickstep/res/layout/taskbar_all_apps.xml
@@ -34,6 +34,10 @@
android:visibility="gone" />
<include
+ layout="@layout/search_results_rv_layout"
+ android:visibility="gone" />
+
+ <include
layout="@layout/all_apps_rv_layout"
android:visibility="gone" />
diff --git a/quickstep/res/values-hi/strings.xml b/quickstep/res/values-hi/strings.xml
index 3a0adc9..643b1d5 100644
--- a/quickstep/res/values-hi/strings.xml
+++ b/quickstep/res/values-hi/strings.xml
@@ -89,7 +89,7 @@
<string name="blocked_by_policy" msgid="2071401072261365546">"ऐप्लिकेशन या आपका संगठन इस कार्रवाई की अनुमति नहीं देता"</string>
<string name="skip_tutorial_dialog_title" msgid="2725643161260038458">"क्या आपको नेविगेशन ट्यूटोरियल छोड़ना है?"</string>
<string name="skip_tutorial_dialog_subtitle" msgid="544063326241955662">"इसे बाद में <xliff:g id="NAME">%1$s</xliff:g> ऐप्लिकेशन पर देखा जा सकता है"</string>
- <string name="gesture_tutorial_action_button_label_cancel" msgid="3809842569351264108">"अभी नहीं"</string>
+ <string name="gesture_tutorial_action_button_label_cancel" msgid="3809842569351264108">"रद्द करें"</string>
<string name="gesture_tutorial_action_button_label_skip" msgid="394452764989751960">"छोड़ें"</string>
<string name="accessibility_rotate_button" msgid="4771825231336502943">"स्क्रीन घुमाएं"</string>
<string name="taskbar_edu_opened" msgid="3950252793551919129">"टास्कबार ट्यूटोरियल दिखाया गया"</string>
diff --git a/quickstep/res/values-land/dimens.xml b/quickstep/res/values-land/dimens.xml
index f233bde..732f511 100644
--- a/quickstep/res/values-land/dimens.xml
+++ b/quickstep/res/values-land/dimens.xml
@@ -15,7 +15,8 @@
limitations under the License.
-->
<resources>
- <dimen name="overview_task_margin">8dp</dimen>
+ <!-- Overview actions -->
+ <dimen name="overview_actions_top_margin">12dp</dimen>
<!-- Tips Gesture Tutorial -->
<dimen name="gesture_tutorial_feedback_margin_start_end">126dp</dimen>
diff --git a/quickstep/res/values-nb/strings.xml b/quickstep/res/values-nb/strings.xml
index 1650a5c..250724e 100644
--- a/quickstep/res/values-nb/strings.xml
+++ b/quickstep/res/values-nb/strings.xml
@@ -87,7 +87,7 @@
<string name="toast_split_select_app" msgid="5453865907322018352">"Trykk på en annen app for å bruke delt skjerm"</string>
<string name="toast_split_app_unsupported" msgid="3271526028981899666">"Appen støtter ikke delt skjerm."</string>
<string name="blocked_by_policy" msgid="2071401072261365546">"Appen eller organisasjonen din tillater ikke denne handlingen"</string>
- <string name="skip_tutorial_dialog_title" msgid="2725643161260038458">"Vil du hoppe over navigeringsveiledning?"</string>
+ <string name="skip_tutorial_dialog_title" msgid="2725643161260038458">"Vil du hoppe over navigeringsveiledningen?"</string>
<string name="skip_tutorial_dialog_subtitle" msgid="544063326241955662">"Du kan finne dette i <xliff:g id="NAME">%1$s</xliff:g>-appen senere"</string>
<string name="gesture_tutorial_action_button_label_cancel" msgid="3809842569351264108">"Avbryt"</string>
<string name="gesture_tutorial_action_button_label_skip" msgid="394452764989751960">"Hopp over"</string>
diff --git a/quickstep/res/values/dimens.xml b/quickstep/res/values/dimens.xml
index 3072a3e..0fd3c4a 100644
--- a/quickstep/res/values/dimens.xml
+++ b/quickstep/res/values/dimens.xml
@@ -239,7 +239,7 @@
<dimen name="navigation_key_padding">0dp</dimen>
<!-- Floating rotation button -->
- <dimen name="floating_rotation_button_diameter">40dp</dimen>
+ <dimen name="floating_rotation_button_diameter">52dp</dimen>
<dimen name="floating_rotation_button_min_margin">20dp</dimen>
<dimen name="floating_rotation_button_taskbar_left_margin">20dp</dimen>
<dimen name="floating_rotation_button_taskbar_bottom_margin">10dp</dimen>
diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java
index 9f35401..b20752d 100644
--- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java
+++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java
@@ -31,7 +31,6 @@
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.Utilities.mapBoundToRange;
-import static com.android.launcher3.Utilities.postAsyncCallback;
import static com.android.launcher3.anim.Interpolators.ACCEL_1_5;
import static com.android.launcher3.anim.Interpolators.AGGRESSIVE_EASE;
import static com.android.launcher3.anim.Interpolators.DEACCEL_1_5;
@@ -184,6 +183,10 @@
public static final int SPLIT_DIVIDER_ANIM_DURATION = 100;
public static final int CONTENT_ALPHA_DURATION = 217;
+ public static final int TASKBAR_TO_APP_DURATION = 600;
+ // TODO(b/236145847): Tune TASKBAR_TO_HOME_DURATION to 383 after conflict with unlock animation
+ // is solved.
+ public static final int TASKBAR_TO_HOME_DURATION = 300;
protected static final int CONTENT_SCALE_DURATION = 350;
protected static final int CONTENT_SCRIM_DURATION = 350;
@@ -483,6 +486,9 @@
? new float[]{1, mContentScale}
: new float[]{mContentScale, 1};
+ // Pause expensive view updates as they can lead to layer thrashing and skipped frames.
+ mLauncher.pauseExpensiveViewUpdates();
+
if (mLauncher.isInState(ALL_APPS)) {
// All Apps in portrait mode is full screen, so we only animate AllAppsContainerView.
final View appsView = mLauncher.getAppsView();
@@ -524,7 +530,15 @@
workspace.forEachVisiblePage(
view -> viewsToAnimate.add(((CellLayout) view).getShortcutsAndWidgets()));
- viewsToAnimate.add(mLauncher.getHotseat());
+ // Do not scale hotseat as a whole when taskbar is present, and scale QSB only if it's
+ // not inline.
+ if (mDeviceProfile.isTaskbarPresent) {
+ if (!mDeviceProfile.isQsbInline) {
+ viewsToAnimate.add(mLauncher.getHotseat().getQsb());
+ }
+ } else {
+ viewsToAnimate.add(mLauncher.getHotseat());
+ }
viewsToAnimate.forEach(view -> {
view.setLayerType(View.LAYER_TYPE_HARDWARE, null);
@@ -581,9 +595,6 @@
}
}
- // Pause expensive view updates as they can lead to layer thrashing and skipped frames.
- mLauncher.pauseExpensiveViewUpdates();
-
endListener = () -> {
viewsToAnimate.forEach(view -> {
SCALE_PROPERTY.set(view, 1f);
@@ -1698,15 +1709,6 @@
return;
}
- if (!mLauncher.hasBeenResumed()) {
- // If launcher is not resumed, wait until new async-frame after resume
- mLauncher.addOnResumeCallback(() ->
- postAsyncCallback(mHandler, () ->
- onCreateAnimation(transit, appTargets, wallpaperTargets,
- nonAppTargets, result)));
- return;
- }
-
if (mLauncher.hasSomeInvisibleFlag(PENDING_INVISIBLE_BY_WALLPAPER_ANIMATION)) {
mLauncher.addForceInvisibleFlag(INVISIBLE_BY_PENDING_FLAGS);
mLauncher.getStateManager().moveToRestState();
diff --git a/quickstep/src/com/android/launcher3/taskbar/BaseTaskbarContext.java b/quickstep/src/com/android/launcher3/taskbar/BaseTaskbarContext.java
index 4e1f54c..b4052e3 100644
--- a/quickstep/src/com/android/launcher3/taskbar/BaseTaskbarContext.java
+++ b/quickstep/src/com/android/launcher3/taskbar/BaseTaskbarContext.java
@@ -19,7 +19,6 @@
import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
-import com.android.launcher3.DeviceProfile;
import com.android.launcher3.DeviceProfile.DeviceProfileListenable;
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
import com.android.launcher3.util.Themes;
@@ -36,8 +35,6 @@
protected final LayoutInflater mLayoutInflater;
private final List<OnDeviceProfileChangeListener> mDPChangeListeners = new ArrayList<>();
- protected DeviceProfile mDeviceProfile;
-
public BaseTaskbarContext(Context windowContext) {
super(windowContext, Themes.getActivityThemeRes(windowContext));
mLayoutInflater = LayoutInflater.from(this).cloneInContext(this);
@@ -49,18 +46,10 @@
}
@Override
- public final DeviceProfile getDeviceProfile() {
- return mDeviceProfile;
- }
-
- @Override
public final List<OnDeviceProfileChangeListener> getOnDeviceProfileChangeListeners() {
return mDPChangeListeners;
}
- /** Updates the {@link DeviceProfile} instance to the latest representation of the screen. */
- public abstract void updateDeviceProfile(DeviceProfile dp);
-
/** Callback invoked when a drag is initiated within this context. */
public abstract void onDragStart();
diff --git a/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java b/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java
index ca30e72..6df31e5 100644
--- a/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java
@@ -171,7 +171,9 @@
isResumed,
fromInit,
/* startAnimation= */ true,
- QuickstepTransitionManager.CONTENT_ALPHA_DURATION);
+ !isResumed
+ ? QuickstepTransitionManager.TASKBAR_TO_APP_DURATION
+ : QuickstepTransitionManager.TASKBAR_TO_HOME_DURATION);
}
@Nullable
diff --git a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java
index cbdbdb9..01cf23b 100644
--- a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java
@@ -35,6 +35,7 @@
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_QUICK_SETTINGS_EXPANDED;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SCREEN_PINNING;
+import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_VOICE_INTERACTION_WINDOW_SHOWING;
import static com.android.systemui.shared.system.ViewTreeObserverWrapper.InsetsInfo.TOUCHABLE_INSETS_REGION;
import android.animation.ArgbEvaluator;
@@ -105,6 +106,7 @@
private static final int FLAG_DISABLE_BACK = 1 << 9;
private static final int FLAG_NOTIFICATION_SHADE_EXPANDED = 1 << 10;
private static final int FLAG_SCREEN_PINNING_ACTIVE = 1 << 11;
+ private static final int FLAG_VOICE_INTERACTION_WINDOW_SHOWING = 1 << 12;
private static final int MASK_IME_SWITCHER_VISIBLE = FLAG_SWITCHER_SUPPORTED | FLAG_IME_VISIBLE;
@@ -207,9 +209,12 @@
boolean isInKidsMode = mContext.isNavBarKidsModeActive();
boolean alwaysShowButtons = isThreeButtonNav || isInSetup;
- // Make sure to remove nav bar buttons translation when notification shade is expanded or
- // IME is showing (add separate translation for IME).
- int flagsToRemoveTranslation = FLAG_NOTIFICATION_SHADE_EXPANDED | FLAG_IME_VISIBLE;
+ // Make sure to remove nav bar buttons translation when any of the following occur:
+ // - Notification shade is expanded
+ // - IME is showing (add separate translation for IME)
+ // - VoiceInteractionWindow (assistant) is showing
+ int flagsToRemoveTranslation = FLAG_NOTIFICATION_SHADE_EXPANDED | FLAG_IME_VISIBLE
+ | FLAG_VOICE_INTERACTION_WINDOW_SHOWING;
mPropertyHolders.add(new StatePropertyHolder(mNavButtonInAppDisplayProgressForSysui,
flags -> (flags & flagsToRemoveTranslation) != 0, AnimatedFloat.VALUE,
1, 0));
@@ -443,6 +448,8 @@
| SYSUI_STATE_QUICK_SETTINGS_EXPANDED;
boolean isNotificationShadeExpanded = (sysUiStateFlags & shadeExpandedFlags) != 0;
boolean isScreenPinningActive = (sysUiStateFlags & SYSUI_STATE_SCREEN_PINNING) != 0;
+ boolean isVoiceInteractionWindowShowing =
+ (sysUiStateFlags & SYSUI_STATE_VOICE_INTERACTION_WINDOW_SHOWING) != 0;
// TODO(b/202218289) we're getting IME as not visible on lockscreen from system
updateStateForFlag(FLAG_IME_VISIBLE, isImeVisible);
@@ -453,6 +460,7 @@
updateStateForFlag(FLAG_DISABLE_BACK, isBackDisabled);
updateStateForFlag(FLAG_NOTIFICATION_SHADE_EXPANDED, isNotificationShadeExpanded);
updateStateForFlag(FLAG_SCREEN_PINNING_ACTIVE, isScreenPinningActive);
+ updateStateForFlag(FLAG_VOICE_INTERACTION_WINDOW_SHOWING, isVoiceInteractionWindowShowing);
if (mA11yButton != null) {
// Only used in 3 button
@@ -522,7 +530,7 @@
if (button.getVisibility() == View.VISIBLE) {
parent.getDescendantRectRelativeToSelf(button, mTempRect);
if (mHitboxExtender.extendedHitboxEnabled()) {
- mTempRect.bottom += mContext.mDeviceProfile.getTaskbarOffsetY();
+ mTempRect.bottom += mContext.getDeviceProfile().getTaskbarOffsetY();
}
outRegion.op(mTempRect, Op.UNION);
}
@@ -750,6 +758,8 @@
appendFlag(str, flags, FLAG_NOTIFICATION_SHADE_EXPANDED,
"FLAG_NOTIFICATION_SHADE_EXPANDED");
appendFlag(str, flags, FLAG_SCREEN_PINNING_ACTIVE, "FLAG_SCREEN_PINNING_ACTIVE");
+ appendFlag(str, flags, FLAG_VOICE_INTERACTION_WINDOW_SHOWING,
+ "FLAG_VOICE_INTERACTION_WINDOW_SHOWING");
return str.toString();
}
diff --git a/quickstep/src/com/android/launcher3/taskbar/StashedHandleViewController.java b/quickstep/src/com/android/launcher3/taskbar/StashedHandleViewController.java
index b797807..f472427 100644
--- a/quickstep/src/com/android/launcher3/taskbar/StashedHandleViewController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/StashedHandleViewController.java
@@ -43,7 +43,8 @@
public static final int ALPHA_INDEX_STASHED = 0;
public static final int ALPHA_INDEX_HOME_DISABLED = 1;
- private static final int NUM_ALPHA_CHANNELS = 2;
+ public static final int ALPHA_INDEX_ASSISTANT_INVOKED = 2;
+ private static final int NUM_ALPHA_CHANNELS = 3;
/**
* The SharedPreferences key for whether the stashed handle region is dark.
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
index ed1001c..d1994e7 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
@@ -27,6 +27,7 @@
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_FOLDER_OPEN;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_QUICK_SETTINGS_EXPANDED;
+import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_VOICE_INTERACTION_WINDOW_SHOWING;
import android.animation.AnimatorSet;
import android.animation.ValueAnimator;
@@ -111,6 +112,7 @@
private final WindowManager mWindowManager;
private final @Nullable RoundedCorner mLeftCorner, mRightCorner;
+ private DeviceProfile mDeviceProfile;
private WindowManager.LayoutParams mWindowLayoutParams;
private boolean mIsFullscreen;
// The size we should return to when we call setTaskbarWindowFullscreen(false)
@@ -135,7 +137,7 @@
TaskbarNavButtonController buttonController, ScopedUnfoldTransitionProgressProvider
unfoldTransitionProgressProvider) {
super(windowContext);
- mDeviceProfile = dp;
+ mDeviceProfile = dp.copy(this);
final Resources resources = getResources();
@@ -146,7 +148,7 @@
mIsUserSetupComplete = SettingsCache.INSTANCE.get(this).getValue(
Settings.Secure.getUriFor(Settings.Secure.USER_SETUP_COMPLETE), 0);
mIsNavBarForceVisible = SettingsCache.INSTANCE.get(this).getValue(
- Settings.Secure.getUriFor(Settings.Secure.NAV_BAR_FORCE_VISIBLE), 0);
+ Settings.Secure.getUriFor(Settings.Secure.NAV_BAR_KIDS_MODE), 0);
mIsNavBarKidsMode = SettingsCache.INSTANCE.get(this).getValue(
Settings.Secure.getUriFor(Settings.Secure.NAV_BAR_KIDS_MODE), 0);
@@ -198,8 +200,9 @@
new TaskbarAutohideSuspendController(this),
new TaskbarPopupController(this),
new TaskbarForceVisibleImmersiveController(this),
- new TaskbarAllAppsController(this),
- new TaskbarInsetsController(this));
+ new TaskbarAllAppsController(this, dp),
+ new TaskbarInsetsController(this),
+ new VoiceInteractionWindowController(this));
}
public void init(@NonNull TaskbarSharedState sharedState) {
@@ -214,8 +217,14 @@
}
@Override
+ public DeviceProfile getDeviceProfile() {
+ return mDeviceProfile;
+ }
+
+ /** Updates {@link DeviceProfile} instances for any Taskbar windows. */
public void updateDeviceProfile(DeviceProfile dp) {
- mDeviceProfile = dp;
+ mControllers.taskbarAllAppsController.updateDeviceProfile(dp);
+ mDeviceProfile = dp.copy(this);
updateIconSize(getResources());
AbstractFloatingView.closeAllOpenViewsExcept(this, false, TYPE_REBIND_SAFE);
@@ -230,7 +239,6 @@
mDeviceProfile.updateIconSize(1, resources);
float iconScale = taskbarIconSize / mDeviceProfile.iconSizePx;
mDeviceProfile.updateIconSize(iconScale, resources);
- mDeviceProfile.updateAllAppsIconSize(1, resources); // Leave all apps unscaled.
}
@VisibleForTesting
@@ -240,12 +248,20 @@
return super.getStatsLogManager();
}
- /** Creates LayoutParams for adding a view directly to WindowManager as a new window */
+ /** @see #createDefaultWindowLayoutParams(int) */
public WindowManager.LayoutParams createDefaultWindowLayoutParams() {
+ return createDefaultWindowLayoutParams(TYPE_NAVIGATION_BAR_PANEL);
+ }
+
+ /**
+ * Creates LayoutParams for adding a view directly to WindowManager as a new window.
+ * @param type The window type to pass to the created WindowManager.LayoutParams.
+ */
+ public WindowManager.LayoutParams createDefaultWindowLayoutParams(int type) {
WindowManager.LayoutParams windowLayoutParams = new WindowManager.LayoutParams(
MATCH_PARENT,
mLastRequestedNonFullscreenHeight,
- TYPE_NAVIGATION_BAR_PANEL,
+ type,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
| WindowManager.LayoutParams.FLAG_SLIPPERY,
PixelFormat.TRANSLUCENT);
@@ -462,6 +478,8 @@
fromInit);
mControllers.navButtonController.updateSysuiFlags(systemUiStateFlags);
mControllers.taskbarForceVisibleImmersiveController.updateSysuiFlags(systemUiStateFlags);
+ mControllers.voiceInteractionWindowController.setIsVoiceInteractionWindowVisible(
+ (systemUiStateFlags & SYSUI_STATE_VOICE_INTERACTION_WINDOW_SHOWING) != 0, fromInit);
}
/**
@@ -606,7 +624,9 @@
/** Removes the given view from WindowManager. See {@link #addWindowView}. */
public void removeWindowView(View view) {
- mWindowManager.removeViewImmediate(view);
+ if (view.isAttachedToWindow()) {
+ mWindowManager.removeViewImmediate(view);
+ }
}
protected void onTaskbarIconClicked(View view) {
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarControllers.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarControllers.java
index 449e0a7..d7b50b0 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarControllers.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarControllers.java
@@ -52,6 +52,7 @@
public final TaskbarForceVisibleImmersiveController taskbarForceVisibleImmersiveController;
public final TaskbarAllAppsController taskbarAllAppsController;
public final TaskbarInsetsController taskbarInsetsController;
+ public final VoiceInteractionWindowController voiceInteractionWindowController;
@Nullable private LoggableTaskbarController[] mControllersToLog = null;
@@ -80,7 +81,8 @@
TaskbarPopupController taskbarPopupController,
TaskbarForceVisibleImmersiveController taskbarForceVisibleImmersiveController,
TaskbarAllAppsController taskbarAllAppsController,
- TaskbarInsetsController taskbarInsetsController) {
+ TaskbarInsetsController taskbarInsetsController,
+ VoiceInteractionWindowController voiceInteractionWindowController) {
this.taskbarActivityContext = taskbarActivityContext;
this.taskbarDragController = taskbarDragController;
this.navButtonController = navButtonController;
@@ -99,6 +101,7 @@
this.taskbarForceVisibleImmersiveController = taskbarForceVisibleImmersiveController;
this.taskbarAllAppsController = taskbarAllAppsController;
this.taskbarInsetsController = taskbarInsetsController;
+ this.voiceInteractionWindowController = voiceInteractionWindowController;
}
/**
@@ -126,13 +129,15 @@
taskbarAllAppsController.init(this, sharedState.allAppsVisible);
navButtonController.init(this);
taskbarInsetsController.init(this);
+ voiceInteractionWindowController.init(this);
mControllersToLog = new LoggableTaskbarController[] {
taskbarDragController, navButtonController, navbarButtonsViewController,
taskbarDragLayerController, taskbarScrimViewController, taskbarViewController,
taskbarUnfoldAnimationController, taskbarKeyguardController,
stashedHandleViewController, taskbarStashController, taskbarEduController,
- taskbarAutohideSuspendController, taskbarPopupController, taskbarInsetsController
+ taskbarAutohideSuspendController, taskbarPopupController, taskbarInsetsController,
+ voiceInteractionWindowController
};
mAreAllControllersInitialized = true;
@@ -172,6 +177,7 @@
taskbarAllAppsController.onDestroy();
navButtonController.onDestroy();
taskbarInsetsController.onDestroy();
+ voiceInteractionWindowController.onDestroy();
mControllersToLog = null;
}
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt b/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt
index 21d7af9..e4f82d2 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt
@@ -18,9 +18,11 @@
import android.graphics.Insets
import android.graphics.Region
import android.view.InsetsState.ITYPE_BOTTOM_MANDATORY_GESTURES
+import android.view.InsetsState
import android.view.WindowManager
import com.android.launcher3.AbstractFloatingView
import com.android.launcher3.AbstractFloatingView.TYPE_TASKBAR_ALL_APPS
+import com.android.launcher3.DeviceProfile
import com.android.launcher3.anim.AlphaUpdateListener
import com.android.launcher3.taskbar.TaskbarControllers.LoggableTaskbarController
import com.android.quickstep.KtR
@@ -38,6 +40,9 @@
val taskbarHeightForIme: Int = context.resources.getDimensionPixelSize(
KtR.dimen.taskbar_ime_size)
private val contentRegion: Region = Region()
+ private val deviceProfileChangeListener = { _: DeviceProfile ->
+ onTaskbarWindowHeightOrInsetsChanged()
+ }
// Initialized in init.
private lateinit var controllers: TaskbarControllers
@@ -57,43 +62,34 @@
)
)
- windowLayoutParams.providedInternalInsets = arrayOfNulls<Insets>(ITYPE_SIZE)
- windowLayoutParams.providedInternalImeInsets = arrayOfNulls<Insets>(ITYPE_SIZE)
-
onTaskbarWindowHeightOrInsetsChanged()
windowLayoutParams.insetsRoundedCornerFrame = true
+ context.addOnDeviceProfileChangeListener(deviceProfileChangeListener)
}
- fun onDestroy() {}
+ fun onDestroy() {
+ context.removeOnDeviceProfileChangeListener(deviceProfileChangeListener)
+ }
fun onTaskbarWindowHeightOrInsetsChanged() {
- var reducingSize = getReducingInsetsForTaskbarInsetsHeight(
- controllers.taskbarStashController.contentHeightToReportToApps)
+ var contentHeight = controllers.taskbarStashController.contentHeightToReportToApps
+ contentRegion.set(0, windowLayoutParams.height - contentHeight,
+ context.deviceProfile.widthPx, windowLayoutParams.height)
+ var tappableHeight = controllers.taskbarStashController.tappableHeightToReportToApps
+ for (provider in windowLayoutParams.providedInsets) {
+ if (provider.type == ITYPE_EXTRA_NAVIGATION_BAR) {
+ provider.insetsSize = Insets.of(0, 0, 0, contentHeight)
+ } else if (provider.type == ITYPE_BOTTOM_TAPPABLE_ELEMENT
+ || provider.type == ITYPE_BOTTOM_MANDATORY_GESTURES) {
+ provider.insetsSize = Insets.of(0, 0, 0, tappableHeight)
+ }
+ }
- contentRegion.set(0, reducingSize.top,
- context.dragLayer.width, windowLayoutParams.height)
- windowLayoutParams.providedInternalInsets[ITYPE_EXTRA_NAVIGATION_BAR] = reducingSize
- windowLayoutParams.providedInternalInsets[ITYPE_BOTTOM_MANDATORY_GESTURES] = reducingSize
- reducingSize = getReducingInsetsForTaskbarInsetsHeight(
- controllers.taskbarStashController.tappableHeightToReportToApps)
- windowLayoutParams.providedInternalInsets[ITYPE_BOTTOM_TAPPABLE_ELEMENT] = reducingSize
- windowLayoutParams.providedInternalInsets[ITYPE_BOTTOM_MANDATORY_GESTURES] = reducingSize
-
- reducingSize = getReducingInsetsForTaskbarInsetsHeight(taskbarHeightForIme)
- windowLayoutParams.providedInternalImeInsets[ITYPE_EXTRA_NAVIGATION_BAR] = reducingSize
- windowLayoutParams.providedInternalImeInsets[ITYPE_BOTTOM_TAPPABLE_ELEMENT] = reducingSize
- windowLayoutParams.providedInternalImeInsets[ITYPE_BOTTOM_MANDATORY_GESTURES] = reducingSize
- }
-
- /**
- * WindowLayoutParams.providedInternal*Insets expects Insets that subtract from the window frame
- * height (i.e. WindowLayoutParams#height). So for Taskbar to report bottom insets to apps, it
- * actually provides insets from the top of its window frame.
- * @param height The number of pixels from the bottom of the screen that Taskbar insets.
- */
- private fun getReducingInsetsForTaskbarInsetsHeight(height: Int): Insets {
- return Insets.of(0, windowLayoutParams.height - height, 0, 0)
+ var imeInsetsSize = Insets.of(0, 0, 0, taskbarHeightForIme)
+ for (provider in windowLayoutParams.providedInsets) {
+ provider.imeInsetsSize = imeInsetsSize
+ }
}
/**
@@ -144,13 +140,10 @@
override fun dumpLogs(prefix: String, pw: PrintWriter) {
pw.println(prefix + "TaskbarInsetsController:")
pw.println("$prefix\twindowHeight=${windowLayoutParams.height}")
- pw.println("$prefix\tprovidedInternalInsets[ITYPE_EXTRA_NAVIGATION_BAR]=" +
- "${windowLayoutParams.providedInternalInsets[ITYPE_EXTRA_NAVIGATION_BAR]}")
- pw.println("$prefix\tprovidedInternalInsets[ITYPE_BOTTOM_TAPPABLE_ELEMENT]=" +
- "${windowLayoutParams.providedInternalInsets[ITYPE_BOTTOM_TAPPABLE_ELEMENT]}")
- pw.println("$prefix\tprovidedInternalImeInsets[ITYPE_EXTRA_NAVIGATION_BAR]=" +
- "${windowLayoutParams.providedInternalImeInsets[ITYPE_EXTRA_NAVIGATION_BAR]}")
- pw.println("$prefix\tprovidedInternalImeInsets[ITYPE_BOTTOM_TAPPABLE_ELEMENT]=" +
- "${windowLayoutParams.providedInternalImeInsets[ITYPE_BOTTOM_TAPPABLE_ELEMENT]}")
+ for (provider in windowLayoutParams.providedInsets) {
+ pw.println("$prefix\tprovidedInsets: (type=" + InsetsState.typeToString(provider.type)
+ + " insetsSize=" + provider.insetsSize
+ + " imeInsetsSize=" + provider.imeInsetsSize + ")")
+ }
}
-}
\ No newline at end of file
+}
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java
index 052c695..591b32f 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java
@@ -19,19 +19,21 @@
import static com.android.launcher3.taskbar.TaskbarStashController.FLAG_IN_STASHED_LAUNCHER_STATE;
import static com.android.launcher3.taskbar.TaskbarStashController.TASKBAR_STASH_DURATION;
import static com.android.launcher3.taskbar.TaskbarViewController.ALPHA_INDEX_HOME;
+import static com.android.systemui.animation.Interpolators.EMPHASIZED;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
+import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.BaseQuickstepLauncher;
-import com.android.launcher3.DeviceProfile;
import com.android.launcher3.LauncherState;
+import com.android.launcher3.QuickstepTransitionManager;
import com.android.launcher3.Utilities;
import com.android.launcher3.statemanager.StateManager;
import com.android.launcher3.util.MultiValueAlpha;
@@ -45,7 +47,6 @@
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.StringJoiner;
-import java.util.function.Consumer;
import java.util.function.Supplier;
/**
@@ -54,6 +55,9 @@
*/
public class TaskbarLauncherStateController {
+ private static final String TAG = TaskbarLauncherStateController.class.getSimpleName();
+ private static final boolean DEBUG = false;
+
public static final int FLAG_RESUMED = 1 << 0;
public static final int FLAG_RECENTS_ANIMATION_RUNNING = 1 << 1;
public static final int FLAG_TRANSITION_STATE_RUNNING = 1 << 2;
@@ -100,7 +104,11 @@
}
updateStateForFlag(FLAG_TRANSITION_STATE_RUNNING, true);
if (!mShouldDelayLauncherStateAnim) {
- applyState();
+ if (toState == LauncherState.NORMAL) {
+ applyState(QuickstepTransitionManager.TASKBAR_TO_HOME_DURATION);
+ } else {
+ applyState();
+ }
}
}
@@ -123,7 +131,12 @@
MultiValueAlpha taskbarIconAlpha = mControllers.taskbarViewController.getTaskbarIconAlpha();
mIconAlphaForHome = taskbarIconAlpha.getProperty(ALPHA_INDEX_HOME);
mIconAlphaForHome.setConsumer(
- (Consumer<Float>) alpha -> mLauncher.getHotseat().setIconsAlpha(alpha > 0 ? 0 : 1));
+ alpha -> {
+ mLauncher.getHotseat().setIconsAlpha(alpha > 0 ? 0 : 1);
+ if (mLauncher.getDeviceProfile().isQsbInline) {
+ mLauncher.getHotseat().setQsbAlpha(alpha > 0 ? 0 : 1);
+ }
+ });
mIconAlignmentForResumedState.finishAnimation();
onIconAlignmentRatioChangedForAppAndHomeTransition();
@@ -270,6 +283,11 @@
ObjectAnimator resumeAlignAnim = mIconAlignmentForResumedState
.animateToValue(toAlignmentForResumedState)
.setDuration(duration);
+ if (DEBUG) {
+ Log.d(TAG, "mIconAlignmentForResumedState - "
+ + mIconAlignmentForResumedState.value
+ + " -> " + toAlignmentForResumedState + ": " + duration);
+ }
resumeAlignAnim.addListener(new AnimatorListenerAdapter() {
@Override
@@ -306,6 +324,11 @@
if (isRecentsAnimationRunning) {
gestureAlignAnim.setDuration(duration);
}
+ if (DEBUG) {
+ Log.d(TAG, "mIconAlignmentForGestureState - "
+ + mIconAlignmentForGestureState.value
+ + " -> " + toAlignmentForGestureState + ": " + duration);
+ }
gestureAlignAnim.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
@@ -331,6 +354,7 @@
.setDuration(duration));
}
+ animatorSet.setInterpolator(EMPHASIZED);
if (start) {
animatorSet.start();
}
@@ -375,6 +399,12 @@
mIconAlignmentForLauncherState.finishAnimation();
animatorSet.play(mIconAlignmentForLauncherState.animateToValue(toAlignment)
.setDuration(duration));
+ if (DEBUG) {
+ Log.d(TAG, "mIconAlignmentForLauncherState - "
+ + mIconAlignmentForLauncherState.value
+ + " -> " + toAlignment + ": " + duration);
+ }
+ animatorSet.setInterpolator(EMPHASIZED);
}
}
@@ -397,46 +427,42 @@
onIconAlignmentRatioChanged(this::getCurrentIconAlignmentRatioBetweenAppAndHome);
}
- private void onIconAlignmentRatioChanged(Supplier<Float> alignmentSupplier) {
+ private void onIconAlignmentRatioChanged(Supplier<AnimatedFloat> alignmentSupplier) {
if (mControllers == null) {
return;
}
- float alignment = alignmentSupplier.get();
+ AnimatedFloat animatedFloat = alignmentSupplier.get();
float currentValue = mIconAlphaForHome.getValue();
- boolean taskbarWillBeVisible = alignment < 1;
+ boolean taskbarWillBeVisible = animatedFloat.value < 1;
boolean firstFrameVisChanged = (taskbarWillBeVisible && Float.compare(currentValue, 1) != 0)
|| (!taskbarWillBeVisible && Float.compare(currentValue, 0) != 0);
+ updateIconAlignment(animatedFloat.value, animatedFloat.getEndValue());
+
// Sync the first frame where we swap taskbar and hotseat.
if (firstFrameVisChanged && mCanSyncViews && !Utilities.IS_RUNNING_IN_TEST_HARNESS) {
- DeviceProfile dp = mLauncher.getDeviceProfile();
-
- // Do all the heavy work before the sync.
- mControllers.taskbarViewController.createIconAlignmentControllerIfNotExists(dp);
-
ViewRootSync.synchronizeNextDraw(mLauncher.getHotseat(),
mControllers.taskbarActivityContext.getDragLayer(),
- () -> updateIconAlignment(alignment));
- } else {
- updateIconAlignment(alignment);
+ () -> {});
}
}
- private void updateIconAlignment(float alignment) {
+ private void updateIconAlignment(float alignment, Float endAlignment) {
mControllers.taskbarViewController.setLauncherIconAlignment(
- alignment, mLauncher.getDeviceProfile());
+ alignment, endAlignment, mLauncher.getDeviceProfile());
// Switch taskbar and hotseat in last frame
setTaskbarViewVisible(alignment < 1);
mControllers.navbarButtonsViewController.updateTaskbarAlignment(alignment);
}
- private float getCurrentIconAlignmentRatioBetweenAppAndHome() {
- return Math.max(mIconAlignmentForResumedState.value, mIconAlignmentForGestureState.value);
+ private AnimatedFloat getCurrentIconAlignmentRatioBetweenAppAndHome() {
+ return mIconAlignmentForResumedState.value > mIconAlignmentForGestureState.value
+ ? mIconAlignmentForResumedState : mIconAlignmentForGestureState;
}
- private float getCurrentIconAlignmentRatioForLauncherState() {
- return mIconAlignmentForLauncherState.value;
+ private AnimatedFloat getCurrentIconAlignmentRatioForLauncherState() {
+ return mIconAlignmentForLauncherState;
}
private void setTaskbarViewVisible(boolean isVisible) {
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java
index ef7bab9..06262c0 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java
@@ -148,7 +148,7 @@
// Config change might be handled without re-creating the taskbar
if (mTaskbarActivityContext != null) {
if (dp != null && dp.isTaskbarPresent) {
- mTaskbarActivityContext.updateDeviceProfile(dp.copy(mContext));
+ mTaskbarActivityContext.updateDeviceProfile(dp);
}
mTaskbarActivityContext.onConfigurationChanged(configDiff);
}
@@ -274,8 +274,8 @@
return;
}
- mTaskbarActivityContext = new TaskbarActivityContext(mContext, dp.copy(mContext),
- mNavButtonController, mUnfoldProgressProvider);
+ mTaskbarActivityContext = new TaskbarActivityContext(mContext, dp, mNavButtonController,
+ mUnfoldProgressProvider);
mTaskbarActivityContext.init(mSharedState);
if (mActivity != null) {
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarView.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarView.java
index 6f88d64..6a43cc5 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarView.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarView.java
@@ -20,6 +20,7 @@
import android.graphics.Canvas;
import android.graphics.Rect;
import android.util.AttributeSet;
+import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
@@ -31,6 +32,7 @@
import androidx.core.graphics.ColorUtils;
import com.android.launcher3.BubbleTextView;
+import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Insettable;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
@@ -78,6 +80,8 @@
// Only non-null when device supports having an All Apps button.
private @Nullable AllAppsButton mAllAppsButton;
+ private View mQsb;
+
public TaskbarView(@NonNull Context context) {
this(context, null);
}
@@ -117,6 +121,9 @@
new ViewGroup.LayoutParams(mIconTouchSize, mIconTouchSize));
mAllAppsButton.setPadding(mItemPadding, mItemPadding, mItemPadding, mItemPadding);
}
+
+ // TODO: Disable touch events on QSB otherwise it can crash.
+ mQsb = LayoutInflater.from(context).inflate(R.layout.search_container_hotseat, this, false);
}
private int getColorWithGivenLuminance(int color, float luminance) {
@@ -166,6 +173,7 @@
if (mAllAppsButton != null) {
removeView(mAllAppsButton);
}
+ removeView(mQsb);
for (int i = 0; i < hotseatItemInfos.length; i++) {
ItemInfo hotseatItemInfo = hotseatItemInfos[i];
@@ -242,6 +250,11 @@
int index = Utilities.isRtl(getResources()) ? 0 : getChildCount();
addView(mAllAppsButton, index);
}
+ if (mActivityContext.getDeviceProfile().isQsbInline) {
+ addView(mQsb, Utilities.isRtl(getResources()) ? getChildCount() : 0);
+ // Always set QSB to invisible after re-adding.
+ mQsb.setVisibility(View.INVISIBLE);
+ }
mThemeIconsBackground = calculateThemeIconsBackground();
setThemedIconsBackgroundColor(mThemeIconsBackground);
@@ -273,7 +286,12 @@
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
int count = getChildCount();
- int spaceNeeded = count * (mItemMarginLeftRight * 2 + mIconTouchSize);
+ int countExcludingQsb = count;
+ DeviceProfile deviceProfile = mActivityContext.getDeviceProfile();
+ if (deviceProfile.isQsbInline) {
+ countExcludingQsb--;
+ }
+ int spaceNeeded = countExcludingQsb * (mItemMarginLeftRight * 2 + mIconTouchSize);
int navSpaceNeeded = ApiWrapper.getHotseatEndOffset(getContext());
boolean layoutRtl = isLayoutRtl();
int iconEnd = right - (right - left - spaceNeeded) / 2;
@@ -292,10 +310,25 @@
mIconLayoutBounds.bottom = mIconLayoutBounds.top + mIconTouchSize;
for (int i = count; i > 0; i--) {
View child = getChildAt(i - 1);
- iconEnd -= mItemMarginLeftRight;
- int iconStart = iconEnd - mIconTouchSize;
- child.layout(iconStart, mIconLayoutBounds.top, iconEnd, mIconLayoutBounds.bottom);
- iconEnd = iconStart - mItemMarginLeftRight;
+ if (child == mQsb) {
+ int qsbStart;
+ int qsbEnd;
+ if (layoutRtl) {
+ qsbStart = iconEnd + mItemMarginLeftRight;
+ qsbEnd = qsbStart + deviceProfile.qsbWidth;
+ } else {
+ qsbEnd = iconEnd - mItemMarginLeftRight;
+ qsbStart = qsbEnd - deviceProfile.qsbWidth;
+ }
+ int qsbTop = (bottom - top - deviceProfile.hotseatQsbHeight) / 2;
+ int qsbBottom = qsbTop + deviceProfile.hotseatQsbHeight;
+ child.layout(qsbStart, qsbTop, qsbEnd, qsbBottom);
+ } else {
+ iconEnd -= mItemMarginLeftRight;
+ int iconStart = iconEnd - mIconTouchSize;
+ child.layout(iconStart, mIconLayoutBounds.top, iconEnd, mIconLayoutBounds.bottom);
+ iconEnd = iconStart - mItemMarginLeftRight;
+ }
}
mIconLayoutBounds.left = iconEnd;
}
@@ -367,6 +400,13 @@
return mAllAppsButton;
}
+ /**
+ * Returns the QSB in the taskbar.
+ */
+ public View getQsb() {
+ return mQsb;
+ }
+
// FolderIconParent implemented methods.
@Override
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java
index 3dd7932..0cbd0d1 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java
@@ -16,6 +16,7 @@
package com.android.launcher3.taskbar;
import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY;
+import static com.android.launcher3.LauncherAnimUtils.VIEW_ALPHA;
import static com.android.launcher3.Utilities.squaredHypot;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASKBAR_ALLAPPS_BUTTON_TAP;
@@ -35,12 +36,15 @@
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.Utilities;
+import com.android.launcher3.anim.AlphaUpdateListener;
import com.android.launcher3.anim.AnimatorPlaybackController;
+import com.android.launcher3.anim.Interpolators;
import com.android.launcher3.anim.PendingAnimation;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.folder.FolderIcon;
import com.android.launcher3.icons.ThemedIconDrawable;
import com.android.launcher3.model.data.ItemInfo;
+import com.android.launcher3.util.HorizontalInsettableView;
import com.android.launcher3.util.ItemInfoMatcher;
import com.android.launcher3.util.LauncherBindableItemsContainer;
import com.android.launcher3.util.MultiValueAlpha;
@@ -63,7 +67,8 @@
public static final int ALPHA_INDEX_STASH = 2;
public static final int ALPHA_INDEX_RECENTS_DISABLED = 3;
public static final int ALPHA_INDEX_NOTIFICATION_EXPANDED = 4;
- private static final int NUM_ALPHA_CHANNELS = 5;
+ public static final int ALPHA_INDEX_ASSISTANT_INVOKED = 5;
+ private static final int NUM_ALPHA_CHANNELS = 6;
private final TaskbarActivityContext mActivity;
private final TaskbarView mTaskbarView;
@@ -205,23 +210,16 @@
}
/**
- * Creates the icon alignment controller if it does not already exist.
- * @param launcherDp Launcher device profile.
- */
- public void createIconAlignmentControllerIfNotExists(DeviceProfile launcherDp) {
- if (mIconAlignControllerLazy == null) {
- mIconAlignControllerLazy = createIconAlignmentController(launcherDp);
- }
- }
-
- /**
* Sets the taskbar icon alignment relative to Launcher hotseat icons
* @param alignmentRatio [0, 1]
* 0 => not aligned
* 1 => fully aligned
*/
- public void setLauncherIconAlignment(float alignmentRatio, DeviceProfile launcherDp) {
- createIconAlignmentControllerIfNotExists(launcherDp);
+ public void setLauncherIconAlignment(float alignmentRatio, Float endAlignment,
+ DeviceProfile launcherDp) {
+ if (mIconAlignControllerLazy == null) {
+ mIconAlignControllerLazy = createIconAlignmentController(launcherDp, endAlignment);
+ }
mIconAlignControllerLazy.setPlayFraction(alignmentRatio);
if (alignmentRatio <= 0 || alignmentRatio >= 1) {
// Cleanup lazy controller so that it is created again in next animation
@@ -232,11 +230,13 @@
/**
* Creates an animation for aligning the taskbar icons with the provided Launcher device profile
*/
- private AnimatorPlaybackController createIconAlignmentController(DeviceProfile launcherDp) {
+ private AnimatorPlaybackController createIconAlignmentController(DeviceProfile launcherDp,
+ Float endAlignment) {
mOnControllerPreCreateCallback.run();
PendingAnimation setter = new PendingAnimation(100);
+ DeviceProfile taskbarDp = mActivity.getDeviceProfile();
Rect hotseatPadding = launcherDp.getHotseatLayoutPadding(mActivity);
- float scaleUp = ((float) launcherDp.iconSizePx) / mActivity.getDeviceProfile().iconSizePx;
+ float scaleUp = ((float) launcherDp.iconSizePx) / taskbarDp.iconSizePx;
int borderSpacing = launcherDp.hotseatBorderSpace;
int hotseatCellSize = DeviceProfile.calculateCellWidth(
launcherDp.availableWidthPx - hotseatPadding.left - hotseatPadding.right,
@@ -253,14 +253,13 @@
}
int collapsedHeight = mActivity.getDefaultTaskbarWindowHeight();
- int expandedHeight = Math.max(collapsedHeight,
- mActivity.getDeviceProfile().taskbarSize + offsetY);
+ int expandedHeight = Math.max(collapsedHeight, taskbarDp.taskbarSize + offsetY);
setter.addOnFrameListener(anim -> mActivity.setTaskbarWindowHeight(
anim.getAnimatedFraction() > 0 ? expandedHeight : collapsedHeight));
+ boolean isToHome = endAlignment != null && endAlignment == 1;
for (int i = 0; i < mTaskbarView.getChildCount(); i++) {
View child = mTaskbarView.getChildAt(i);
-
int positionInHotseat;
if (FeatureFlags.ENABLE_ALL_APPS_IN_TASKBAR.get()
&& child == mTaskbarView.getAllAppsButtonView()) {
@@ -268,13 +267,46 @@
// as its convenient for animation purposes.
positionInHotseat = Utilities.isRtl(child.getResources())
? -1
- : mActivity.getDeviceProfile().numShownHotseatIcons;
+ : taskbarDp.numShownHotseatIcons;
if (!FeatureFlags.ENABLE_ALL_APPS_BUTTON_IN_HOTSEAT.get()) {
- setter.setViewAlpha(child, 0, LINEAR);
+ setter.setViewAlpha(child, 0,
+ isToHome
+ ? Interpolators.clampToProgress(LINEAR, 0f, 0.17f)
+ : Interpolators.clampToProgress(LINEAR, 0.72f, 0.84f));
}
} else if (child.getTag() instanceof ItemInfo) {
positionInHotseat = ((ItemInfo) child.getTag()).screenId;
+ } else if (child == mTaskbarView.getQsb()) {
+ boolean isRtl = Utilities.isRtl(child.getResources());
+ float hotseatIconCenter = isRtl
+ ? launcherDp.widthPx - hotseatPadding.right + borderSpacing
+ + launcherDp.qsbWidth / 2f
+ : hotseatPadding.left - borderSpacing - launcherDp.qsbWidth / 2f;
+ float childCenter = (child.getLeft() + child.getRight()) / 2f;
+ float halfQsbIconWidthDiff = (launcherDp.qsbWidth - taskbarDp.iconSizePx) / 2f;
+ setter.addFloat(child, ICON_TRANSLATE_X,
+ isRtl ? -halfQsbIconWidthDiff : halfQsbIconWidthDiff,
+ hotseatIconCenter - childCenter, LINEAR);
+
+ int qsbContentHeight = child.getHeight() - child.getPaddingTop()
+ - child.getPaddingBottom();
+ float scale = ((float) taskbarDp.iconSizePx) / qsbContentHeight;
+ setter.addFloat(child, SCALE_PROPERTY, scale, 1f, LINEAR);
+
+ setter.addFloat(child, VIEW_ALPHA, 0f, 1f,
+ isToHome
+ ? Interpolators.clampToProgress(LINEAR, 0f, 0.35f)
+ : Interpolators.clampToProgress(LINEAR, 0.84f, 1f));
+ setter.addOnFrameListener(animator -> AlphaUpdateListener.updateVisibility(child));
+
+ float qsbInsetFraction = halfQsbIconWidthDiff / launcherDp.qsbWidth;
+ if (child instanceof HorizontalInsettableView) {
+ setter.addFloat((HorizontalInsettableView) child,
+ HorizontalInsettableView.HORIZONTAL_INSETS, qsbInsetFraction, 0,
+ LINEAR);
+ }
+ continue;
} else {
Log.w(TAG, "Unsupported view found in createIconAlignmentController, v=" + child);
continue;
diff --git a/quickstep/src/com/android/launcher3/taskbar/VoiceInteractionWindowController.kt b/quickstep/src/com/android/launcher3/taskbar/VoiceInteractionWindowController.kt
new file mode 100644
index 0000000..946873e
--- /dev/null
+++ b/quickstep/src/com/android/launcher3/taskbar/VoiceInteractionWindowController.kt
@@ -0,0 +1,109 @@
+package com.android.launcher3.taskbar
+
+import android.graphics.Canvas
+import android.view.WindowManager
+import android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY
+import com.android.launcher3.views.BaseDragLayer
+import com.android.systemui.animation.ViewRootSync
+import java.io.PrintWriter
+
+private const val TASKBAR_ICONS_FADE_DURATION = 300L
+private const val STASHED_HANDLE_FADE_DURATION = 180L
+
+/**
+ * Controls Taskbar behavior while Voice Interaction Window (assistant) is showing.
+ */
+class VoiceInteractionWindowController(val context: TaskbarActivityContext)
+ : TaskbarControllers.LoggableTaskbarController {
+
+ private val taskbarBackgroundRenderer = TaskbarBackgroundRenderer(context)
+
+ // Initialized in init.
+ private lateinit var controllers: TaskbarControllers
+ private lateinit var separateWindowForTaskbarBackground: BaseDragLayer<TaskbarActivityContext>
+ private lateinit var separateWindowLayoutParams: WindowManager.LayoutParams
+
+ private var isVoiceInteractionWindowVisible: Boolean = false
+
+ fun init(controllers: TaskbarControllers) {
+ this.controllers = controllers
+
+ separateWindowForTaskbarBackground =
+ object : BaseDragLayer<TaskbarActivityContext>(context, null, 0) {
+ override fun recreateControllers() {
+ mControllers = emptyArray()
+ }
+
+ override fun draw(canvas: Canvas) {
+ super.draw(canvas)
+ taskbarBackgroundRenderer.draw(canvas)
+ }
+ }
+ separateWindowForTaskbarBackground.recreateControllers()
+ separateWindowForTaskbarBackground.setWillNotDraw(false)
+
+ separateWindowLayoutParams = context.createDefaultWindowLayoutParams(
+ TYPE_APPLICATION_OVERLAY)
+ separateWindowLayoutParams.isSystemApplicationOverlay = true
+ }
+
+ fun onDestroy() {
+ setIsVoiceInteractionWindowVisible(visible = false, skipAnim = true)
+ }
+
+ fun setIsVoiceInteractionWindowVisible(visible: Boolean, skipAnim: Boolean) {
+ if (isVoiceInteractionWindowVisible == visible) {
+ return
+ }
+ isVoiceInteractionWindowVisible = visible
+
+ // Fade out taskbar icons and stashed handle.
+ val taskbarIconAlpha = if (isVoiceInteractionWindowVisible) 0f else 1f
+ val fadeTaskbarIcons = controllers.taskbarViewController.taskbarIconAlpha
+ .getProperty(TaskbarViewController.ALPHA_INDEX_ASSISTANT_INVOKED)
+ .animateToValue(taskbarIconAlpha)
+ .setDuration(TASKBAR_ICONS_FADE_DURATION)
+ val fadeStashedHandle = controllers.stashedHandleViewController.stashedHandleAlpha
+ .getProperty(StashedHandleViewController.ALPHA_INDEX_ASSISTANT_INVOKED)
+ .animateToValue(taskbarIconAlpha)
+ .setDuration(STASHED_HANDLE_FADE_DURATION)
+ fadeTaskbarIcons.start()
+ fadeStashedHandle.start()
+ if (skipAnim) {
+ fadeTaskbarIcons.end()
+ fadeStashedHandle.end()
+ }
+
+ if (context.isGestureNav && controllers.taskbarStashController.isInAppAndNotStashed) {
+ moveTaskbarBackgroundToLowerLayer()
+ }
+ }
+
+ /**
+ * Hides the TaskbarDragLayer background and creates a new window to draw just that background.
+ */
+ private fun moveTaskbarBackgroundToLowerLayer() {
+ val taskbarBackgroundOverride = controllers.taskbarDragLayerController
+ .overrideBackgroundAlpha
+ if (isVoiceInteractionWindowVisible) {
+ // First add the temporary window, then hide the overlapping taskbar background.
+ context.addWindowView(separateWindowForTaskbarBackground, separateWindowLayoutParams)
+ ViewRootSync.synchronizeNextDraw(separateWindowForTaskbarBackground, context.dragLayer
+ ) {
+ taskbarBackgroundOverride.updateValue(0f)
+ }
+ } else {
+ // First reapply the original taskbar background, then remove the temporary window.
+ taskbarBackgroundOverride.updateValue(1f)
+ ViewRootSync.synchronizeNextDraw(separateWindowForTaskbarBackground, context.dragLayer
+ ) {
+ context.removeWindowView(separateWindowForTaskbarBackground)
+ }
+ }
+ }
+
+ override fun dumpLogs(prefix: String, pw: PrintWriter) {
+ pw.println(prefix + "VoiceInteractionWindowController:")
+ pw.println("$prefix\tisVoiceInteractionWindowVisible=$isVoiceInteractionWindowVisible")
+ }
+}
\ No newline at end of file
diff --git a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsContainerView.java b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsContainerView.java
index 0ea2aa0..51fa4d9 100644
--- a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsContainerView.java
+++ b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsContainerView.java
@@ -44,9 +44,10 @@
}
@Override
- protected BaseAllAppsAdapter getAdapter(AlphabeticalAppsList<TaskbarAllAppsContext> mAppsList,
+ protected BaseAllAppsAdapter<TaskbarAllAppsContext> createAdapter(
+ AlphabeticalAppsList<TaskbarAllAppsContext> appsList,
BaseAdapterProvider[] adapterProviders) {
- return new AllAppsGridAdapter<>(mActivityContext, getLayoutInflater(), mAppsList,
+ return new AllAppsGridAdapter<>(mActivityContext, getLayoutInflater(), appsList,
adapterProviders);
}
}
diff --git a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsContext.java b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsContext.java
index 1cdbdb2..e2f7522 100644
--- a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsContext.java
+++ b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsContext.java
@@ -19,7 +19,6 @@
import static android.view.KeyEvent.KEYCODE_BACK;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
-import static com.android.launcher3.AbstractFloatingView.TYPE_REBIND_SAFE;
import static com.android.systemui.shared.system.ViewTreeObserverWrapper.InsetsInfo.TOUCHABLE_INSETS_REGION;
import android.content.Context;
@@ -78,14 +77,13 @@
TaskbarStashController taskbarStashController) {
super(taskbarContext.createWindowContext(TYPE_APPLICATION_OVERLAY, null));
mTaskbarContext = taskbarContext;
- mDeviceProfile = taskbarContext.getDeviceProfile();
+ mWindowController = windowController;
mDragController = new TaskbarDragController(this);
mOnboardingPrefs = new OnboardingPrefs<>(this, Utilities.getPrefs(this));
mDragLayer = new TaskbarAllAppsDragLayer(this);
TaskbarAllAppsSlideInView slideInView = (TaskbarAllAppsSlideInView) mLayoutInflater.inflate(
R.layout.taskbar_all_apps, mDragLayer, false);
- mWindowController = windowController;
mAllAppsViewController = new TaskbarAllAppsViewController(
this,
slideInView,
@@ -102,6 +100,11 @@
}
@Override
+ public DeviceProfile getDeviceProfile() {
+ return mWindowController.getDeviceProfile();
+ }
+
+ @Override
public TaskbarDragController getDragController() {
return mDragController;
}
@@ -142,15 +145,6 @@
}
@Override
- public void updateDeviceProfile(DeviceProfile dp) {
- mDeviceProfile = dp;
-
- AbstractFloatingView.closeAllOpenViewsExcept(this, false, TYPE_REBIND_SAFE);
-
- dispatchDeviceProfileChanged();
- }
-
- @Override
public void onDragStart() {}
@Override
diff --git a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java
index eaf9384..61b038e 100644
--- a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java
@@ -19,6 +19,7 @@
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
import static com.android.launcher3.AbstractFloatingView.TYPE_ALL;
+import static com.android.launcher3.AbstractFloatingView.TYPE_REBIND_SAFE;
import android.content.Context;
import android.graphics.PixelFormat;
@@ -31,7 +32,6 @@
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.DeviceProfile;
-import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
import com.android.launcher3.appprediction.PredictionRowView;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.model.data.AppInfo;
@@ -55,7 +55,7 @@
* Application data may be bound while the window does not exist, so this controller will store
* the models for the next all apps session.
*/
-public final class TaskbarAllAppsController implements OnDeviceProfileChangeListener {
+public final class TaskbarAllAppsController {
private static final String WINDOW_TITLE = "Taskbar All Apps";
@@ -70,6 +70,7 @@
}
};
+ private DeviceProfile mDeviceProfile;
private TaskbarControllers mControllers;
/** Window context for all apps if it is open. */
private @Nullable TaskbarAllAppsContext mAllAppsContext;
@@ -79,7 +80,8 @@
private int mAppsModelFlags;
private List<ItemInfo> mPredictedApps;
- public TaskbarAllAppsController(TaskbarActivityContext context) {
+ public TaskbarAllAppsController(TaskbarActivityContext context, DeviceProfile dp) {
+ mDeviceProfile = dp;
mTaskbarContext = context;
mProxyView = new TaskbarAllAppsProxyView(mTaskbarContext);
mLayoutParams = createLayoutParams();
@@ -146,7 +148,6 @@
this,
mControllers.taskbarStashController);
mAllAppsContext.getDragController().init(mControllers);
- mTaskbarContext.addOnDeviceProfileChangeListener(this);
TaskStackChangeListeners.getInstance().registerTaskStackListener(mTaskStackListener);
Optional.ofNullable(mAllAppsContext.getSystemService(WindowManager.class))
.ifPresent(m -> m.addView(mAllAppsContext.getDragLayer(), mLayoutParams));
@@ -170,8 +171,8 @@
* This method should be called after an exit animation finishes, if applicable.
*/
void maybeCloseWindow() {
- if (AbstractFloatingView.getOpenView(mAllAppsContext, TYPE_ALL) != null
- || mAllAppsContext.getDragController().isSystemDragInProgress()) {
+ if (mAllAppsContext != null && (AbstractFloatingView.hasOpenView(mAllAppsContext, TYPE_ALL)
+ || mAllAppsContext.getDragController().isSystemDragInProgress())) {
return;
}
mProxyView.close(false);
@@ -184,13 +185,25 @@
/** Destroys the controller and any All Apps window if present. */
public void onDestroy() {
TaskStackChangeListeners.getInstance().unregisterTaskStackListener(mTaskStackListener);
- mTaskbarContext.removeOnDeviceProfileChangeListener(this);
Optional.ofNullable(mAllAppsContext)
.map(c -> c.getSystemService(WindowManager.class))
- .ifPresent(m -> m.removeView(mAllAppsContext.getDragLayer()));
+ .ifPresent(m -> m.removeViewImmediate(mAllAppsContext.getDragLayer()));
mAllAppsContext = null;
}
+ /** Updates {@link DeviceProfile} instance for Taskbar's All Apps window. */
+ public void updateDeviceProfile(DeviceProfile dp) {
+ mDeviceProfile = dp;
+ Optional.ofNullable(mAllAppsContext).ifPresent(c -> {
+ AbstractFloatingView.closeAllOpenViewsExcept(c, false, TYPE_REBIND_SAFE);
+ c.dispatchDeviceProfileChanged();
+ });
+ }
+
+ DeviceProfile getDeviceProfile() {
+ return mDeviceProfile;
+ }
+
private LayoutParams createLayoutParams() {
LayoutParams layoutParams = new LayoutParams(
TYPE_APPLICATION_OVERLAY,
@@ -205,11 +218,6 @@
return layoutParams;
}
- @Override
- public void onDeviceProfileChanged(DeviceProfile dp) {
- Optional.ofNullable(mAllAppsContext).ifPresent(c -> c.updateDeviceProfile(dp));
- }
-
/**
* Proxy view connecting taskbar drag layer to the all apps window.
* <p>
diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java b/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java
index 429f209..6427e09 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java
@@ -131,9 +131,14 @@
@Override
public void onBackPressed(Launcher launcher) {
- TaskView taskView = launcher.<RecentsView>getOverviewPanel().getRunningTaskView();
+ RecentsView recentsView = launcher.getOverviewPanel();
+ TaskView taskView = recentsView.getRunningTaskView();
if (taskView != null) {
- taskView.launchTasks();
+ if (recentsView.isTaskViewFullyVisible(taskView)) {
+ taskView.launchTasks();
+ } else {
+ recentsView.snapToPage(recentsView.indexOfChild(taskView));
+ }
} else {
super.onBackPressed(launcher);
}
diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java b/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java
index f2162b0..2d7fe69 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java
@@ -191,6 +191,9 @@
1 - ALL_APPS_SCRIM_OPAQUE_THRESHOLD,
1 - ALL_APPS_SCRIM_VISIBLE_THRESHOLD));
config.setInterpolator(ANIM_VERTICAL_PROGRESS, EMPHASIZED_ACCELERATE);
+ if (!isTablet) {
+ config.setInterpolator(ANIM_WORKSPACE_FADE, INSTANT);
+ }
} else if (fromState == NORMAL && toState == ALL_APPS) {
if (mActivity.getDeviceProfile().isTablet) {
config.setInterpolator(ANIM_VERTICAL_PROGRESS, EMPHASIZED_DECELERATE);
diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java
index 4da1d41..8faabc9 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java
@@ -86,7 +86,7 @@
@Override
protected boolean canInterceptTouch(MotionEvent ev) {
mDidTouchStartInNavBar = (ev.getEdgeFlags() & EDGE_NAV_BAR) != 0;
- return super.canInterceptTouch(ev);
+ return super.canInterceptTouch(ev) && !mLauncher.isInState(HINT_STATE);
}
@Override
diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
index 21728ad..b3e2d91 100644
--- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
+++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
@@ -234,7 +234,6 @@
STATE_LAUNCHER_BIND_TO_SERVICE;
public static final long MAX_SWIPE_DURATION = 350;
- public static final long HOME_DURATION = StaggeredWorkspaceAnim.DURATION_MS;
public static final float MIN_PROGRESS_FOR_OVERVIEW = 0.7f;
private static final float SWIPE_DURATION_MULTIPLIER =
@@ -575,7 +574,7 @@
protected void notifyGestureAnimationStartToRecents() {
Task[] runningTasks;
- if (mIsSwipeForStagedSplit) {
+ if (mIsSwipeForSplit) {
int[] splitTaskIds = TopTaskTracker.INSTANCE.get(mContext).getRunningSplitTaskIds();
runningTasks = mGestureState.getRunningTask().getPlaceholderTasks(splitTaskIds);
} else {
@@ -1141,7 +1140,9 @@
mInputConsumerProxy.enable();
}
if (endTarget == HOME) {
- duration = HOME_DURATION;
+ duration = mActivity.getDeviceProfile().isTaskbarPresent
+ ? StaggeredWorkspaceAnim.DURATION_TASKBAR_MS
+ : StaggeredWorkspaceAnim.DURATION_MS;
// Early detach the nav bar once the endTarget is determined as HOME
if (mRecentsAnimationController != null) {
mRecentsAnimationController.detachNavigationBarFromApp(true);
@@ -1284,15 +1285,18 @@
? runningTaskTarget.taskInfo.launchCookies
: new ArrayList<>();
boolean isTranslucent = runningTaskTarget != null && runningTaskTarget.isTranslucent;
+ boolean hasValidLeash = runningTaskTarget != null
+ && runningTaskTarget.leash != null
+ && runningTaskTarget.leash.isValid();
boolean appCanEnterPip = !mDeviceState.isPipActive()
- && runningTaskTarget != null
+ && hasValidLeash
&& runningTaskTarget.allowEnterPip
&& runningTaskTarget.taskInfo.pictureInPictureParams != null
&& runningTaskTarget.taskInfo.pictureInPictureParams.isAutoEnterEnabled();
HomeAnimationFactory homeAnimFactory =
createHomeAnimationFactory(cookies, duration, isTranslucent, appCanEnterPip,
runningTaskTarget);
- mIsSwipingPipToHome = !mIsSwipeForStagedSplit && appCanEnterPip;
+ mIsSwipingPipToHome = !mIsSwipeForSplit && appCanEnterPip;
final RectFSpringAnim[] windowAnim;
if (mIsSwipingPipToHome) {
mSwipePipToHomeAnimator = createWindowAnimationToPip(
@@ -1394,9 +1398,6 @@
}
}
- /**
- * TODO(b/195473090) handle multiple task simulators (if needed) for PIP
- */
private SwipePipToHomeAnimator createWindowAnimationToPip(HomeAnimationFactory homeAnimFactory,
RemoteAnimationTargetCompat runningTaskTarget, float startProgress) {
// Directly animate the app to PiP (picture-in-picture) mode
@@ -1676,7 +1677,7 @@
boolean wasVisible = mWasLauncherAlreadyVisible || mGestureStarted;
mActivityInterface.onTransitionCancelled(wasVisible, mGestureState.getEndTarget());
- if (mRecentsAnimationTargets != null) {
+ if (mRecentsAnimationTargets != null && wasVisible) {
setDividerShown(true /* shown */, true /* immediate */);
}
@@ -1793,12 +1794,13 @@
mSwipePipToHomeAnimator.getFinishTransaction(),
mSwipePipToHomeAnimator.getContentOverlay());
mIsSwipingPipToHome = false;
- } else if (mIsSwipeForStagedSplit) {
+ } else if (mIsSwipeForSplit) {
// Transaction to hide the task to avoid flicker for entering PiP from split-screen.
PictureInPictureSurfaceTransaction tx =
new PictureInPictureSurfaceTransaction.Builder()
.setAlpha(0f)
.build();
+ tx.setShouldDisableCanAffectSystemUiFlags(false);
int[] taskIds = TopTaskTracker.INSTANCE.get(mContext).getRunningSplitTaskIds();
for (int taskId : taskIds) {
mRecentsAnimationController.setFinishTaskTransaction(taskId,
@@ -1996,9 +1998,11 @@
* Applies the transform on the recents animation
*/
protected void applyScrollAndTransform() {
- // No need to apply any transform if there is ongoing swipe-pip-to-home animator since
- // that animator handles the leash solely.
- boolean notSwipingPipToHome = mRecentsAnimationTargets != null && !mIsSwipingPipToHome;
+ // No need to apply any transform if there is ongoing swipe-to-home animator
+ // swipe-to-pip handles the leash solely
+ // swipe-to-icon animation is handled by RectFSpringAnim anim
+ boolean notSwipingToHome = mRecentsAnimationTargets != null
+ && mGestureState.getEndTarget() != HOME;
boolean setRecentsScroll = mRecentsViewScrollLinked && mRecentsView != null;
for (RemoteTargetHandle remoteHandle : mRemoteTargetHandles) {
AnimatorControllerWithResistance playbackController =
@@ -2008,7 +2012,7 @@
getScaleProgressDueToScroll()), mDragLengthFactor);
}
- if (notSwipingPipToHome) {
+ if (notSwipingToHome) {
TaskViewSimulator taskViewSimulator = remoteHandle.getTaskViewSimulator();
if (setRecentsScroll) {
taskViewSimulator.setScroll(mRecentsView.getScrollOffset());
diff --git a/quickstep/src/com/android/quickstep/AnimatedFloat.java b/quickstep/src/com/android/quickstep/AnimatedFloat.java
index 6c7a885..a166553 100644
--- a/quickstep/src/com/android/quickstep/AnimatedFloat.java
+++ b/quickstep/src/com/android/quickstep/AnimatedFloat.java
@@ -133,4 +133,11 @@
public boolean isAnimatingToValue(float endValue) {
return isAnimating() && mEndValue != null && mEndValue == endValue;
}
+
+ /**
+ * Returns the value we are animating to, or {@code null} if we are not currently animating.
+ */
+ public Float getEndValue() {
+ return mEndValue;
+ }
}
diff --git a/quickstep/src/com/android/quickstep/BaseActivityInterface.java b/quickstep/src/com/android/quickstep/BaseActivityInterface.java
index 2fcd286..52abb92 100644
--- a/quickstep/src/com/android/quickstep/BaseActivityInterface.java
+++ b/quickstep/src/com/android/quickstep/BaseActivityInterface.java
@@ -56,11 +56,9 @@
import com.android.launcher3.touch.PagedOrientationHandler;
import com.android.launcher3.util.DisplayController;
import com.android.launcher3.util.DisplayController.NavigationMode;
-import com.android.launcher3.util.WindowBounds;
import com.android.launcher3.views.ScrimView;
import com.android.quickstep.util.ActivityInitListener;
import com.android.quickstep.util.AnimatorControllerWithResistance;
-import com.android.quickstep.util.SplitScreenBounds;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.TaskView;
import com.android.systemui.shared.recents.model.ThumbnailData;
@@ -258,7 +256,7 @@
private void calculateTaskSizeInternal(Context context, DeviceProfile dp,
Rect potentialTaskRect, float maxScale, int gravity, Rect outRect) {
- PointF taskDimension = getTaskDimension(context, dp);
+ PointF taskDimension = getTaskDimension(dp);
float scale = Math.min(
potentialTaskRect.width() / taskDimension.x,
@@ -270,47 +268,29 @@
Gravity.apply(gravity, outWidth, outHeight, potentialTaskRect, outRect);
}
- private static PointF getTaskDimension(Context context, DeviceProfile dp) {
+ private static PointF getTaskDimension(DeviceProfile dp) {
PointF dimension = new PointF();
- getTaskDimension(context, dp, dimension);
+ getTaskDimension(dp, dimension);
return dimension;
}
/**
* Gets the dimension of the task in the current system state.
*/
- public static void getTaskDimension(Context context, DeviceProfile dp, PointF out) {
- if (dp.isMultiWindowMode) {
- WindowBounds bounds = SplitScreenBounds.INSTANCE.getSecondaryWindowBounds(context);
- out.x = bounds.availableSize.x;
- out.y = bounds.availableSize.y;
- if (!TaskView.clipLeft(dp)) {
- out.x += bounds.insets.left;
- }
- if (!TaskView.clipRight(dp)) {
- out.x += bounds.insets.right;
- }
- if (!TaskView.clipTop(dp)) {
- out.y += bounds.insets.top;
- }
- if (!TaskView.clipBottom(dp)) {
- out.y += bounds.insets.bottom;
- }
- } else {
- out.x = dp.widthPx;
- out.y = dp.heightPx;
- if (TaskView.clipLeft(dp)) {
- out.x -= dp.getInsets().left;
- }
- if (TaskView.clipRight(dp)) {
- out.x -= dp.getInsets().right;
- }
- if (TaskView.clipTop(dp)) {
- out.y -= dp.getInsets().top;
- }
- if (TaskView.clipBottom(dp)) {
- out.y -= Math.max(dp.getInsets().bottom, dp.taskbarSize);
- }
+ public static void getTaskDimension(DeviceProfile dp, PointF out) {
+ out.x = dp.widthPx;
+ out.y = dp.heightPx;
+ if (TaskView.clipLeft(dp)) {
+ out.x -= dp.getInsets().left;
+ }
+ if (TaskView.clipRight(dp)) {
+ out.x -= dp.getInsets().right;
+ }
+ if (TaskView.clipTop(dp)) {
+ out.y -= dp.getInsets().top;
+ }
+ if (TaskView.clipBottom(dp)) {
+ out.y -= Math.max(dp.getInsets().bottom, dp.taskbarSize);
}
}
@@ -341,7 +321,7 @@
(taskRect.height() + dp.overviewTaskThumbnailTopMarginPx - dp.overviewRowSpacing)
/ 2f;
- PointF taskDimension = getTaskDimension(context, dp);
+ PointF taskDimension = getTaskDimension(dp);
float scale = (rowHeight - dp.overviewTaskThumbnailTopMarginPx) / taskDimension.y;
int outWidth = Math.round(scale * taskDimension.x);
int outHeight = Math.round(scale * taskDimension.y);
diff --git a/quickstep/src/com/android/quickstep/FallbackSwipeHandler.java b/quickstep/src/com/android/quickstep/FallbackSwipeHandler.java
index ee5bb44..99f7bdd 100644
--- a/quickstep/src/com/android/quickstep/FallbackSwipeHandler.java
+++ b/quickstep/src/com/android/quickstep/FallbackSwipeHandler.java
@@ -23,16 +23,15 @@
import static com.android.launcher3.GestureNavContract.EXTRA_ICON_SURFACE;
import static com.android.launcher3.GestureNavContract.EXTRA_ON_FINISH_CALLBACK;
import static com.android.launcher3.GestureNavContract.EXTRA_REMOTE_CALLBACK;
-import static com.android.launcher3.Utilities.createHomeIntent;
import static com.android.launcher3.anim.AnimatorListeners.forEndCallback;
import static com.android.launcher3.anim.Interpolators.ACCEL;
+import static com.android.quickstep.OverviewComponentObserver.startHomeIntentSafely;
import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.ACTIVITY_TYPE_HOME;
import android.animation.ObjectAnimator;
import android.annotation.TargetApi;
import android.app.ActivityManager.RunningTaskInfo;
import android.app.ActivityOptions;
-import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.graphics.Matrix;
@@ -161,11 +160,7 @@
if (gestureContractAnimationFactory != null && runningTaskTarget != null) {
gestureContractAnimationFactory.addGestureContract(intent, runningTaskTarget.taskInfo);
}
- try {
- mContext.startActivity(intent, options.toBundle());
- } catch (NullPointerException | ActivityNotFoundException | SecurityException e) {
- mContext.startActivity(createHomeIntent());
- }
+ startHomeIntentSafely(mContext, intent, options.toBundle());
}
@Override
diff --git a/quickstep/src/com/android/quickstep/LauncherSwipeHandlerV2.java b/quickstep/src/com/android/quickstep/LauncherSwipeHandlerV2.java
index 50d1244..196a664 100644
--- a/quickstep/src/com/android/quickstep/LauncherSwipeHandlerV2.java
+++ b/quickstep/src/com/android/quickstep/LauncherSwipeHandlerV2.java
@@ -91,7 +91,7 @@
mActivity.setHintUserWillBeActive();
}
- if (!canUseWorkspaceView || appCanEnterPip || mIsSwipeForStagedSplit) {
+ if (!canUseWorkspaceView || appCanEnterPip || mIsSwipeForSplit) {
return new LauncherHomeAnimationFactory();
}
if (workspaceView instanceof LauncherAppWidgetHostView) {
diff --git a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
index dffdc5a..1e7e89e 100644
--- a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
+++ b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
@@ -235,6 +235,10 @@
}
};
+ RecentsView<?, ?> visibleRecentsView = activityInterface.getVisibleRecentsView();
+ if (visibleRecentsView != null) {
+ visibleRecentsView.moveFocusedTaskToFront();
+ }
if (mTaskAnimationManager.isRecentsAnimationRunning()) {
cmd.mActiveCallbacks = mTaskAnimationManager.continueRecentsAnimation(gestureState);
cmd.mActiveCallbacks.addListener(interactionHandler);
diff --git a/quickstep/src/com/android/quickstep/OverviewComponentObserver.java b/quickstep/src/com/android/quickstep/OverviewComponentObserver.java
index 0efe666..9e3173c 100644
--- a/quickstep/src/com/android/quickstep/OverviewComponentObserver.java
+++ b/quickstep/src/com/android/quickstep/OverviewComponentObserver.java
@@ -20,11 +20,11 @@
import static android.content.Intent.ACTION_PACKAGE_CHANGED;
import static android.content.Intent.ACTION_PACKAGE_REMOVED;
-import static com.android.launcher3.Utilities.createHomeIntent;
import static com.android.launcher3.config.FeatureFlags.SEPARATE_RECENTS_ACTIVITY;
import static com.android.launcher3.util.PackageManagerHelper.getPackageFilter;
import static com.android.systemui.shared.system.PackageManagerWrapper.ACTION_PREFERRED_ACTIVITY_CHANGED;
+import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
@@ -33,8 +33,12 @@
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
+import android.os.Bundle;
import android.util.SparseIntArray;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
import com.android.launcher3.tracing.OverviewComponentObserverProto;
import com.android.launcher3.tracing.TouchInteractionServiceProto;
import com.android.launcher3.util.SimpleBroadcastReceiver;
@@ -276,4 +280,34 @@
overviewComponentObserver.setOverviewActivityResumed(mActivityInterface.isResumed());
serviceProto.setOverviewComponentObvserver(overviewComponentObserver);
}
+
+ /**
+ * Starts the intent for the current home activity.
+ */
+ public static void startHomeIntentSafely(@NonNull Context context, @Nullable Bundle options) {
+ RecentsAnimationDeviceState deviceState = new RecentsAnimationDeviceState(context);
+ OverviewComponentObserver observer = new OverviewComponentObserver(context, deviceState);
+ Intent intent = observer.getHomeIntent();
+ observer.onDestroy();
+ deviceState.destroy();
+ startHomeIntentSafely(context, intent, options);
+ }
+
+ /**
+ * Starts the intent for the current home activity.
+ */
+ public static void startHomeIntentSafely(
+ @NonNull Context context, @NonNull Intent homeIntent, @Nullable Bundle options) {
+ try {
+ context.startActivity(homeIntent, options);
+ } catch (NullPointerException | ActivityNotFoundException | SecurityException e) {
+ context.startActivity(createHomeIntent(), options);
+ }
+ }
+
+ private static Intent createHomeIntent() {
+ return new Intent(Intent.ACTION_MAIN)
+ .addCategory(Intent.CATEGORY_HOME)
+ .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ }
}
diff --git a/quickstep/src/com/android/quickstep/RecentTasksList.java b/quickstep/src/com/android/quickstep/RecentTasksList.java
index 097850f..cd93dbe 100644
--- a/quickstep/src/com/android/quickstep/RecentTasksList.java
+++ b/quickstep/src/com/android/quickstep/RecentTasksList.java
@@ -34,7 +34,7 @@
import com.android.systemui.shared.system.KeyguardManagerCompat;
import com.android.wm.shell.recents.IRecentTasksListener;
import com.android.wm.shell.util.GroupedRecentTaskInfo;
-import com.android.wm.shell.util.StagedSplitBounds;
+import com.android.wm.shell.util.SplitBounds;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -195,19 +195,19 @@
tmpLockedUsers.get(task2Key.userId) /* isLocked */);
task2.setLastSnapshotData(taskInfo2);
}
- final SplitConfigurationOptions.StagedSplitBounds launcherSplitBounds =
- convertSplitBounds(rawTask.mStagedSplitBounds);
+ final SplitConfigurationOptions.SplitBounds launcherSplitBounds =
+ convertSplitBounds(rawTask.mSplitBounds);
allTasks.add(new GroupTask(task1, task2, launcherSplitBounds));
}
return allTasks;
}
- private SplitConfigurationOptions.StagedSplitBounds convertSplitBounds(
- StagedSplitBounds shellSplitBounds) {
+ private SplitConfigurationOptions.SplitBounds convertSplitBounds(
+ SplitBounds shellSplitBounds) {
return shellSplitBounds == null ?
null :
- new SplitConfigurationOptions.StagedSplitBounds(
+ new SplitConfigurationOptions.SplitBounds(
shellSplitBounds.leftTopBounds, shellSplitBounds.rightBottomBounds,
shellSplitBounds.leftTopTaskId, shellSplitBounds.rightBottomTaskId);
}
diff --git a/quickstep/src/com/android/quickstep/RecentsActivity.java b/quickstep/src/com/android/quickstep/RecentsActivity.java
index 4f0b976..67ce606 100644
--- a/quickstep/src/com/android/quickstep/RecentsActivity.java
+++ b/quickstep/src/com/android/quickstep/RecentsActivity.java
@@ -21,11 +21,11 @@
import static com.android.launcher3.QuickstepTransitionManager.RECENTS_LAUNCH_DURATION;
import static com.android.launcher3.QuickstepTransitionManager.STATUS_BAR_TRANSITION_DURATION;
import static com.android.launcher3.QuickstepTransitionManager.STATUS_BAR_TRANSITION_PRE_DELAY;
-import static com.android.launcher3.Utilities.createHomeIntent;
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
import static com.android.launcher3.graphics.SysUiScrim.SYSUI_PROGRESS;
import static com.android.launcher3.testing.TestProtocol.BAD_STATE;
import static com.android.launcher3.testing.TestProtocol.OVERVIEW_STATE_ORDINAL;
+import static com.android.quickstep.OverviewComponentObserver.startHomeIntentSafely;
import static com.android.quickstep.TaskUtils.taskIsATargetWithMode;
import static com.android.quickstep.TaskViewUtils.createRecentsWindowAnimator;
import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_CLOSING;
@@ -428,7 +428,7 @@
RemoteAnimationAdapterCompat adapterCompat =
new RemoteAnimationAdapterCompat(runner, HOME_APPEAR_DURATION, 0,
getIApplicationThread());
- startActivity(createHomeIntent(),
+ startHomeIntentSafely(this,
ActivityOptionsCompat.makeRemoteAnimation(adapterCompat).toBundle());
}
diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationController.java b/quickstep/src/com/android/quickstep/RecentsAnimationController.java
index 2007ee1..b297973 100644
--- a/quickstep/src/com/android/quickstep/RecentsAnimationController.java
+++ b/quickstep/src/com/android/quickstep/RecentsAnimationController.java
@@ -104,8 +104,6 @@
}
if (mSplitScreenMinimized != splitScreenMinimized) {
mSplitScreenMinimized = splitScreenMinimized;
- UI_HELPER_EXECUTOR.execute(() -> SystemUiProxy.INSTANCE.get(context)
- .setSplitScreenMinimized(splitScreenMinimized));
}
}
diff --git a/quickstep/src/com/android/quickstep/RecentsModel.java b/quickstep/src/com/android/quickstep/RecentsModel.java
index d11d50b..1634c08 100644
--- a/quickstep/src/com/android/quickstep/RecentsModel.java
+++ b/quickstep/src/com/android/quickstep/RecentsModel.java
@@ -165,7 +165,7 @@
}
@Override
- public void onTaskSnapshotChanged(int taskId, ThumbnailData snapshot) {
+ public boolean onTaskSnapshotChanged(int taskId, ThumbnailData snapshot) {
mThumbnailCache.updateTaskSnapShot(taskId, snapshot);
for (int i = mThumbnailChangeListeners.size() - 1; i >= 0; i--) {
@@ -174,6 +174,7 @@
task.thumbnail = snapshot;
}
}
+ return true;
}
@Override
diff --git a/quickstep/src/com/android/quickstep/RemoteTargetGluer.java b/quickstep/src/com/android/quickstep/RemoteTargetGluer.java
index c3ea256..7183c49 100644
--- a/quickstep/src/com/android/quickstep/RemoteTargetGluer.java
+++ b/quickstep/src/com/android/quickstep/RemoteTargetGluer.java
@@ -20,7 +20,7 @@
import androidx.annotation.Nullable;
-import com.android.launcher3.util.SplitConfigurationOptions.StagedSplitBounds;
+import com.android.launcher3.util.SplitConfigurationOptions.SplitBounds;
import com.android.quickstep.util.AnimatorControllerWithResistance;
import com.android.quickstep.util.TaskViewSimulator;
import com.android.quickstep.util.TransformParams;
@@ -34,7 +34,7 @@
*/
public class RemoteTargetGluer {
private RemoteTargetHandle[] mRemoteTargetHandles;
- private StagedSplitBounds mStagedSplitBounds;
+ private SplitBounds mSplitBounds;
/**
* Use this constructor if remote targets are split-screen independent
@@ -118,18 +118,18 @@
// remoteTargetHandle[0] denotes topLeft task, so we pass in the bottomRight to exclude,
// vice versa
- mStagedSplitBounds = new StagedSplitBounds(
+ mSplitBounds = new SplitBounds(
topLeftTarget.startScreenSpaceBounds,
bottomRightTarget.startScreenSpaceBounds, splitIds[0], splitIds[1]);
mRemoteTargetHandles[0].mTransformParams.setTargetSet(
createRemoteAnimationTargetsForTarget(targets, bottomRightTarget));
mRemoteTargetHandles[0].mTaskViewSimulator.setPreview(topLeftTarget,
- mStagedSplitBounds);
+ mSplitBounds);
mRemoteTargetHandles[1].mTransformParams.setTargetSet(
createRemoteAnimationTargetsForTarget(targets, topLeftTarget));
mRemoteTargetHandles[1].mTaskViewSimulator.setPreview(bottomRightTarget,
- mStagedSplitBounds);
+ mSplitBounds);
}
return mRemoteTargetHandles;
}
@@ -173,8 +173,8 @@
return mRemoteTargetHandles;
}
- public StagedSplitBounds getStagedSplitBounds() {
- return mStagedSplitBounds;
+ public SplitBounds getSplitBounds() {
+ return mSplitBounds;
}
/**
diff --git a/quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java b/quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java
index 088e1cf..baeb514 100644
--- a/quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java
+++ b/quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java
@@ -17,7 +17,6 @@
import static com.android.launcher3.anim.Interpolators.ACCEL_1_5;
import static com.android.launcher3.anim.Interpolators.LINEAR;
-import static com.android.launcher3.config.FeatureFlags.ENABLE_SPLIT_SELECT;
import android.animation.Animator;
import android.content.Context;
@@ -72,16 +71,14 @@
// How much further we can drag past recents, as a factor of mTransitionDragLength.
protected float mDragLengthFactor = 1;
- protected boolean mIsSwipeForStagedSplit;
+ protected boolean mIsSwipeForSplit;
public SwipeUpAnimationLogic(Context context, RecentsAnimationDeviceState deviceState,
GestureState gestureState) {
mContext = context;
mDeviceState = deviceState;
mGestureState = gestureState;
-
- mIsSwipeForStagedSplit = ENABLE_SPLIT_SELECT.get() &&
- TopTaskTracker.INSTANCE.get(context).getRunningSplitTaskIds().length > 1;
+ mIsSwipeForSplit = TopTaskTracker.INSTANCE.get(context).getRunningSplitTaskIds().length > 1;
mTargetGluer = new RemoteTargetGluer(mContext, mGestureState.getActivityInterface());
mRemoteTargetHandles = mTargetGluer.getRemoteTargetHandles();
@@ -266,6 +263,13 @@
RectF cropRectF = new RectF(taskViewSimulator.getCurrentCropRect());
// Move the startRect to Launcher space as floatingIconView runs in Launcher
Matrix windowToHomePositionMap = new Matrix();
+
+ // If the start rect ends up overshooting too much to the left/right offscreen, bring it
+ // back to fullscreen. This can happen when the recentsScroll value isn't aligned with
+ // the pageScroll value for a given taskView, see b/228829958#comment12
+ mRemoteTargetHandles[0].getTaskViewSimulator().getOrientationState().getOrientationHandler()
+ .fixBoundsForHomeAnimStartRect(startRect, mDp);
+
homeToWindowPositionMap.invert(windowToHomePositionMap);
windowToHomePositionMap.mapRect(startRect);
diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.java b/quickstep/src/com/android/quickstep/SystemUiProxy.java
index 39d8b54..9a2619b 100644
--- a/quickstep/src/com/android/quickstep/SystemUiProxy.java
+++ b/quickstep/src/com/android/quickstep/SystemUiProxy.java
@@ -270,18 +270,6 @@
}
}
- @Override
- public Rect getNonMinimizedSplitScreenSecondaryBounds() {
- if (mSystemUiProxy != null) {
- try {
- return mSystemUiProxy.getNonMinimizedSplitScreenSecondaryBounds();
- } catch (RemoteException e) {
- Log.w(TAG, "Failed call getNonMinimizedSplitScreenSecondaryBounds", e);
- }
- }
- return null;
- }
-
public float getLastNavButtonAlpha() {
return mLastNavButtonAlpha;
}
@@ -385,28 +373,6 @@
}
@Override
- public void handleImageAsScreenshot(Bitmap bitmap, Rect rect, Insets insets, int i) {
- if (mSystemUiProxy != null) {
- try {
- mSystemUiProxy.handleImageAsScreenshot(bitmap, rect, insets, i);
- } catch (RemoteException e) {
- Log.w(TAG, "Failed call handleImageAsScreenshot", e);
- }
- }
- }
-
- @Override
- public void setSplitScreenMinimized(boolean minimized) {
- if (mSystemUiProxy != null) {
- try {
- mSystemUiProxy.setSplitScreenMinimized(minimized);
- } catch (RemoteException e) {
- Log.w(TAG, "Failed call setSplitScreenMinimized", e);
- }
- }
- }
-
- @Override
public void notifySwipeUpGestureStarted() {
if (mSystemUiProxy != null) {
try {
diff --git a/quickstep/src/com/android/quickstep/TaskAnimationManager.java b/quickstep/src/com/android/quickstep/TaskAnimationManager.java
index 54f457d..fd7e367 100644
--- a/quickstep/src/com/android/quickstep/TaskAnimationManager.java
+++ b/quickstep/src/com/android/quickstep/TaskAnimationManager.java
@@ -195,7 +195,10 @@
} else if (nonAppTargets != null && nonAppTargets.length > 0) {
TaskViewUtils.createSplitAuxiliarySurfacesAnimator(
RemoteAnimationTargetCompat.wrap(nonAppTargets) /* nonApps */,
- true /*shown*/, dividerAnimator -> dividerAnimator.start());
+ true /*shown*/, dividerAnimator -> {
+ dividerAnimator.start();
+ dividerAnimator.end();
+ });
}
if (mController != null) {
if (mLastAppearedTaskTarget == null
diff --git a/quickstep/src/com/android/quickstep/TaskOverlayFactory.java b/quickstep/src/com/android/quickstep/TaskOverlayFactory.java
index 3ef1332..e10cab6 100644
--- a/quickstep/src/com/android/quickstep/TaskOverlayFactory.java
+++ b/quickstep/src/com/android/quickstep/TaskOverlayFactory.java
@@ -23,7 +23,6 @@
import static com.android.quickstep.views.OverviewActionsView.DISABLED_ROTATED;
import android.annotation.SuppressLint;
-import android.app.ActivityManager;
import android.content.Context;
import android.graphics.Insets;
import android.graphics.Matrix;
@@ -37,17 +36,12 @@
import com.android.launcher3.BaseActivity;
import com.android.launcher3.BaseDraggingActivity;
-import com.android.launcher3.DeviceProfile;
import com.android.launcher3.R;
-import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.popup.SystemShortcut;
-import com.android.launcher3.touch.PagedOrientationHandler;
import com.android.launcher3.util.ResourceBasedOverride;
-import com.android.launcher3.util.SplitConfigurationOptions.SplitPositionOption;
import com.android.launcher3.views.ActivityContext;
-import com.android.quickstep.TaskShortcutFactory.SplitSelectSystemShortcut;
import com.android.quickstep.util.RecentsOrientedState;
import com.android.quickstep.views.OverviewActionsView;
import com.android.quickstep.views.RecentsView;
@@ -66,7 +60,7 @@
public class TaskOverlayFactory implements ResourceBasedOverride {
public static List<SystemShortcut> getEnabledShortcuts(TaskView taskView,
- DeviceProfile deviceProfile, TaskIdAttributeContainer taskContainer) {
+ TaskIdAttributeContainer taskContainer) {
final ArrayList<SystemShortcut> shortcuts = new ArrayList<>();
final BaseDraggingActivity activity = BaseActivity.fromContext(taskView.getContext());
boolean hasMultipleTasks = taskView.getTaskIds()[1] != -1;
@@ -75,17 +69,11 @@
continue;
}
- SystemShortcut shortcut = menuOption.getShortcut(activity, taskContainer);
- if (shortcut == null) {
+ List<SystemShortcut> menuShortcuts = menuOption.getShortcuts(activity, taskContainer);
+ if (menuShortcuts == null) {
continue;
}
-
- if (menuOption == TaskShortcutFactory.SPLIT_SCREEN &&
- FeatureFlags.ENABLE_SPLIT_SELECT.get()) {
- addSplitOptions(shortcuts, activity, taskView, deviceProfile);
- } else {
- shortcuts.add(shortcut);
- }
+ shortcuts.addAll(menuShortcuts);
}
RecentsOrientedState orientedState = taskView.getRecentsView().getPagedViewOrientedState();
boolean canLauncherRotate = orientedState.isRecentsActivityRotationAllowed();
@@ -94,61 +82,24 @@
// Add overview actions to the menu when in in-place rotate landscape mode.
if (!canLauncherRotate && isInLandscape) {
// Add screenshot action to task menu.
- SystemShortcut screenshotShortcut = TaskShortcutFactory.SCREENSHOT
- .getShortcut(activity, taskContainer);
- if (screenshotShortcut != null) {
- shortcuts.add(screenshotShortcut);
+ List<SystemShortcut> screenshotShortcuts = TaskShortcutFactory.SCREENSHOT
+ .getShortcuts(activity, taskContainer);
+ if (screenshotShortcuts != null) {
+ shortcuts.addAll(screenshotShortcuts);
}
// Add modal action only if display orientation is the same as the device orientation.
if (orientedState.getDisplayRotation() == ROTATION_0) {
- SystemShortcut modalShortcut = TaskShortcutFactory.MODAL
- .getShortcut(activity, taskContainer);
- if (modalShortcut != null) {
- shortcuts.add(modalShortcut);
+ List<SystemShortcut> modalShortcuts = TaskShortcutFactory.MODAL
+ .getShortcuts(activity, taskContainer);
+ if (modalShortcuts != null) {
+ shortcuts.addAll(modalShortcuts);
}
}
}
return shortcuts;
}
-
- /**
- * Does NOT add split options in the following scenarios:
- * * The taskView to add split options is already showing split screen tasks
- * * There aren't at least 2 tasks in overview to show split options for
- * * Device is in "Lock task mode"
- * * The taskView to show split options for is the focused task AND we haven't started
- * scrolling in overview (if we haven't scrolled, there's a split overview action button so
- * we don't need this menu option)
- */
- private static void addSplitOptions(List<SystemShortcut> outShortcuts,
- BaseDraggingActivity activity, TaskView taskView, DeviceProfile deviceProfile) {
- RecentsView recentsView = taskView.getRecentsView();
- PagedOrientationHandler orientationHandler = recentsView.getPagedOrientationHandler();
- int[] taskViewTaskIds = taskView.getTaskIds();
- boolean taskViewHasMultipleTasks = taskViewTaskIds[0] != -1 &&
- taskViewTaskIds[1] != -1;
- boolean notEnoughTasksToSplit = recentsView.getTaskViewCount() < 2;
- boolean isFocusedTask = deviceProfile.isTablet && taskView.isFocusedTask();
- boolean isTaskInExpectedScrollPosition =
- recentsView.isTaskInExpectedScrollPosition(recentsView.indexOfChild(taskView));
- ActivityManager activityManager =
- (ActivityManager) taskView.getContext().getSystemService(Context.ACTIVITY_SERVICE);
- boolean isLockTaskMode = activityManager.isInLockTaskMode();
-
- if (taskViewHasMultipleTasks || notEnoughTasksToSplit || isLockTaskMode ||
- (isFocusedTask && isTaskInExpectedScrollPosition)) {
- return;
- }
-
- List<SplitPositionOption> positions =
- orientationHandler.getSplitPositionOptions(deviceProfile);
- for (SplitPositionOption option : positions) {
- outShortcuts.add(new SplitSelectSystemShortcut(activity, taskView, option));
- }
- }
-
public TaskOverlay createOverlay(TaskThumbnailView thumbnailView) {
return new TaskOverlay(thumbnailView);
}
@@ -170,7 +121,7 @@
/** Note that these will be shown in order from top to bottom, if available for the task. */
private static final TaskShortcutFactory[] MENU_OPTIONS = new TaskShortcutFactory[]{
TaskShortcutFactory.APP_INFO,
- TaskShortcutFactory.SPLIT_SCREEN,
+ TaskShortcutFactory.SPLIT_SELECT,
TaskShortcutFactory.PIN,
TaskShortcutFactory.INSTALL,
TaskShortcutFactory.FREE_FORM,
diff --git a/quickstep/src/com/android/quickstep/TaskShortcutFactory.java b/quickstep/src/com/android/quickstep/TaskShortcutFactory.java
index e807e26..749c07b 100644
--- a/quickstep/src/com/android/quickstep/TaskShortcutFactory.java
+++ b/quickstep/src/com/android/quickstep/TaskShortcutFactory.java
@@ -16,11 +16,8 @@
package com.android.quickstep;
-import static android.view.Display.DEFAULT_DISPLAY;
-
import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_SELECTIONS;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_SYSTEM_SHORTCUT_FREE_FORM_TAP;
-import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_SYSTEM_SHORTCUT_SPLIT_SCREEN_TAP;
import android.app.Activity;
import android.app.ActivityOptions;
@@ -32,6 +29,8 @@
import android.view.View;
import android.window.SplashScreen;
+import androidx.annotation.Nullable;
+
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.R;
@@ -39,6 +38,7 @@
import com.android.launcher3.model.WellbeingModel;
import com.android.launcher3.popup.SystemShortcut;
import com.android.launcher3.popup.SystemShortcut.AppInfo;
+import com.android.launcher3.touch.PagedOrientationHandler;
import com.android.launcher3.util.InstantAppResolver;
import com.android.launcher3.util.SplitConfigurationOptions.SplitPositionOption;
import com.android.quickstep.views.RecentsView;
@@ -55,21 +55,35 @@
import java.util.Collections;
import java.util.List;
+import java.util.function.Function;
+import java.util.stream.Collectors;
/**
* Represents a system shortcut that can be shown for a recent task.
*/
public interface TaskShortcutFactory {
- SystemShortcut getShortcut(BaseDraggingActivity activity,
- TaskIdAttributeContainer taskContainer);
+ @Nullable
+ default List<SystemShortcut> getShortcuts(BaseDraggingActivity activity,
+ TaskIdAttributeContainer taskContainer) {
+ return null;
+ }
default boolean showForSplitscreen() {
return false;
}
+ /** @return a singleton list if the provided shortcut is non-null, null otherwise */
+ @Nullable
+ default List<SystemShortcut> createSingletonShortcutList(@Nullable SystemShortcut shortcut) {
+ if (shortcut != null) {
+ return Collections.singletonList(shortcut);
+ }
+ return null;
+ }
+
TaskShortcutFactory APP_INFO = new TaskShortcutFactory() {
@Override
- public SystemShortcut getShortcut(BaseDraggingActivity activity,
+ public List<SystemShortcut> getShortcuts(BaseDraggingActivity activity,
TaskIdAttributeContainer taskContainer) {
TaskView taskView = taskContainer.getTaskView();
AppInfo.SplitAccessibilityInfo accessibilityInfo =
@@ -77,7 +91,8 @@
TaskUtils.getTitle(taskView.getContext(), taskContainer.getTask()),
taskContainer.getA11yNodeId()
);
- return new AppInfo(activity, taskContainer.getItemInfo(), taskView, accessibilityInfo);
+ return Collections.singletonList(new AppInfo(activity, taskContainer.getItemInfo(),
+ taskView, accessibilityInfo));
}
@Override
@@ -103,7 +118,7 @@
protected abstract boolean onActivityStarted(BaseDraggingActivity activity);
@Override
- public SystemShortcut getShortcut(BaseDraggingActivity activity,
+ public List<SystemShortcut> getShortcuts(BaseDraggingActivity activity,
TaskIdAttributeContainer taskContainer) {
final Task task = taskContainer.getTask();
if (!task.isDockable) {
@@ -112,8 +127,8 @@
if (!isAvailable(activity, task.key.displayId)) {
return null;
}
- return new MultiWindowSystemShortcut(mIconRes, mTextRes, activity, taskContainer, this,
- mLauncherEvent);
+ return Collections.singletonList(new MultiWindowSystemShortcut(mIconRes,
+ mTextRes, activity, taskContainer, this, mLauncherEvent));
}
}
@@ -242,34 +257,40 @@
}
}
- /** @Deprecated */
- TaskShortcutFactory SPLIT_SCREEN = new MultiWindowFactory(R.drawable.ic_split_screen,
- R.string.recent_task_option_split_screen, LAUNCHER_SYSTEM_SHORTCUT_SPLIT_SCREEN_TAP) {
-
+ /**
+ * Does NOT add split options in the following scenarios:
+ * * The taskView to add split options is already showing split screen tasks
+ * * There aren't at least 2 tasks in overview to show split options for
+ * * The taskView to show split options for is the focused task AND we haven't started
+ * scrolling in overview (if we haven't scrolled, there's a split overview action button so
+ * we don't need this menu option)
+ */
+ TaskShortcutFactory SPLIT_SELECT = new TaskShortcutFactory() {
@Override
- protected boolean isAvailable(BaseDraggingActivity activity, int displayId) {
- // Don't show menu-item if already in multi-window and the task is from
- // the secondary display.
- // TODO(b/118266305): Temporarily disable splitscreen for secondary display while new
- // implementation is enabled
- return !activity.getDeviceProfile().isMultiWindowMode
- && (displayId == -1 || displayId == DEFAULT_DISPLAY);
- }
+ public List<SystemShortcut> getShortcuts(BaseDraggingActivity activity,
+ TaskIdAttributeContainer taskContainer) {
+ DeviceProfile deviceProfile = activity.getDeviceProfile();
+ TaskView taskView = taskContainer.getTaskView();
+ RecentsView recentsView = taskView.getRecentsView();
+ PagedOrientationHandler orientationHandler = recentsView.getPagedOrientationHandler();
+ int[] taskViewTaskIds = taskView.getTaskIds();
+ boolean taskViewHasMultipleTasks = taskViewTaskIds[0] != -1 &&
+ taskViewTaskIds[1] != -1;
+ boolean notEnoughTasksToSplit = recentsView.getTaskViewCount() < 2;
+ boolean isFocusedTask = deviceProfile.isTablet && taskView.isFocusedTask();
+ boolean isTaskInExpectedScrollPosition =
+ recentsView.isTaskInExpectedScrollPosition(recentsView.indexOfChild(taskView));
- @Override
- protected ActivityOptions makeLaunchOptions(Activity activity) {
- final int navBarPosition = WindowManagerWrapper.getInstance().getNavBarPosition(
- activity.getDisplayId());
- if (navBarPosition == WindowManagerWrapper.NAV_BAR_POS_INVALID) {
+ if (taskViewHasMultipleTasks || notEnoughTasksToSplit
+ || (isFocusedTask && isTaskInExpectedScrollPosition)) {
return null;
}
- boolean dockTopOrLeft = navBarPosition != WindowManagerWrapper.NAV_BAR_POS_LEFT;
- return ActivityOptionsCompat.makeSplitScreenOptions(dockTopOrLeft);
- }
- @Override
- protected boolean onActivityStarted(BaseDraggingActivity activity) {
- return true;
+ return orientationHandler.getSplitPositionOptions(deviceProfile)
+ .stream()
+ .map((Function<SplitPositionOption, SystemShortcut>) option ->
+ new SplitSelectSystemShortcut(activity, taskView, option))
+ .collect(Collectors.toList());
}
};
@@ -297,18 +318,22 @@
}
};
- TaskShortcutFactory PIN = (activity, taskContainer) -> {
- if (!SystemUiProxy.INSTANCE.get(activity).isActive()) {
- return null;
+ TaskShortcutFactory PIN = new TaskShortcutFactory() {
+ @Override
+ public List<SystemShortcut> getShortcuts(BaseDraggingActivity activity,
+ TaskIdAttributeContainer taskContainer) {
+ if (!SystemUiProxy.INSTANCE.get(activity).isActive()) {
+ return null;
+ }
+ if (!ActivityManagerWrapper.getInstance().isScreenPinningEnabled()) {
+ return null;
+ }
+ if (ActivityManagerWrapper.getInstance().isLockToAppActive()) {
+ // We shouldn't be able to pin while an app is locked.
+ return null;
+ }
+ return Collections.singletonList(new PinSystemShortcut(activity, taskContainer));
}
- if (!ActivityManagerWrapper.getInstance().isScreenPinningEnabled()) {
- return null;
- }
- if (ActivityManagerWrapper.getInstance().isLockToAppActive()) {
- // We shouldn't be able to pin while an app is locked.
- return null;
- }
- return new PinSystemShortcut(activity, taskContainer);
};
class PinSystemShortcut extends SystemShortcut<BaseDraggingActivity> {
@@ -335,26 +360,52 @@
}
}
- TaskShortcutFactory INSTALL = (activity, taskContainer) ->
- InstantAppResolver.newInstance(activity).isInstantApp(activity,
- taskContainer.getTask().getTopComponent().getPackageName())
- ? new SystemShortcut.Install(activity, taskContainer.getItemInfo(),
- taskContainer.getTaskView()) : null;
+ TaskShortcutFactory INSTALL = new TaskShortcutFactory() {
+ @Override
+ public List<SystemShortcut> getShortcuts(BaseDraggingActivity activity,
+ TaskIdAttributeContainer taskContainer) {
+ return InstantAppResolver.newInstance(activity).isInstantApp(activity,
+ taskContainer.getTask().getTopComponent().getPackageName()) ?
+ Collections.singletonList(new SystemShortcut.Install(activity,
+ taskContainer.getItemInfo(), taskContainer.getTaskView())) :
+ null;
+ }
+ };
- TaskShortcutFactory WELLBEING = (activity, taskContainer) ->
- WellbeingModel.SHORTCUT_FACTORY.getShortcut(activity, taskContainer.getItemInfo(),
- taskContainer.getTaskView());
+ TaskShortcutFactory WELLBEING = new TaskShortcutFactory() {
+ @Override
+ public List<SystemShortcut> getShortcuts(BaseDraggingActivity activity,
+ TaskIdAttributeContainer taskContainer) {
+ SystemShortcut<BaseDraggingActivity> wellbeingShortcut =
+ WellbeingModel.SHORTCUT_FACTORY.getShortcut(activity,
+ taskContainer.getItemInfo(), taskContainer.getTaskView());
+ return createSingletonShortcutList(wellbeingShortcut);
+ }
+ };
- TaskShortcutFactory SCREENSHOT = (activity, taskContainer) ->
- taskContainer.getThumbnailView().getTaskOverlay()
+ TaskShortcutFactory SCREENSHOT = new TaskShortcutFactory() {
+ @Override
+ public List<SystemShortcut> getShortcuts(BaseDraggingActivity activity,
+ TaskIdAttributeContainer taskContainer) {
+ SystemShortcut screenshotShortcut = taskContainer.getThumbnailView().getTaskOverlay()
.getScreenshotShortcut(activity, taskContainer.getItemInfo(),
taskContainer.getTaskView());
-
- TaskShortcutFactory MODAL = (activity, taskContainer) -> {
- if (ENABLE_OVERVIEW_SELECTIONS.get()) {
- return taskContainer.getThumbnailView().getTaskOverlay().getModalStateSystemShortcut(
- taskContainer.getItemInfo(), taskContainer.getTaskView());
+ return createSingletonShortcutList(screenshotShortcut);
}
- return null;
+ };
+
+ TaskShortcutFactory MODAL = new TaskShortcutFactory() {
+ @Override
+ public List<SystemShortcut> getShortcuts(BaseDraggingActivity activity,
+ TaskIdAttributeContainer taskContainer) {
+ SystemShortcut modalStateSystemShortcut =
+ taskContainer.getThumbnailView().getTaskOverlay()
+ .getModalStateSystemShortcut(
+ taskContainer.getItemInfo(), taskContainer.getTaskView());
+ if (ENABLE_OVERVIEW_SELECTIONS.get()) {
+ return createSingletonShortcutList(modalStateSystemShortcut);
+ }
+ return null;
+ }
};
}
diff --git a/quickstep/src/com/android/quickstep/TaskViewUtils.java b/quickstep/src/com/android/quickstep/TaskViewUtils.java
index 6179b81..db402af 100644
--- a/quickstep/src/com/android/quickstep/TaskViewUtils.java
+++ b/quickstep/src/com/android/quickstep/TaskViewUtils.java
@@ -514,9 +514,6 @@
for (SurfaceControl leash: openingTargets) {
t.setAlpha(leash, progress);
}
- for (SurfaceControl leash: closingTargets) {
- t.setAlpha(leash, 1 - progress);
- }
t.apply();
});
animator.addListener(new AnimatorListenerAdapter() {
diff --git a/quickstep/src/com/android/quickstep/TopTaskTracker.java b/quickstep/src/com/android/quickstep/TopTaskTracker.java
index 39c5f2a..42fa86d 100644
--- a/quickstep/src/com/android/quickstep/TopTaskTracker.java
+++ b/quickstep/src/com/android/quickstep/TopTaskTracker.java
@@ -15,12 +15,13 @@
*/
package com.android.quickstep;
+import static android.app.ActivityTaskManager.INVALID_TASK_ID;
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_ASSISTANT;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.content.Intent.ACTION_CHOOSER;
import static android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS;
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT;
-import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.ACTIVITY_TYPE_ASSISTANT;
import android.app.ActivityManager.RunningTaskInfo;
import android.content.Context;
@@ -32,7 +33,7 @@
import com.android.launcher3.util.SplitConfigurationOptions;
import com.android.launcher3.util.SplitConfigurationOptions.StagePosition;
import com.android.launcher3.util.SplitConfigurationOptions.StageType;
-import com.android.launcher3.util.SplitConfigurationOptions.StagedSplitTaskPosition;
+import com.android.launcher3.util.SplitConfigurationOptions.SplitStageInfo;
import com.android.launcher3.util.TraceHelper;
import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.shared.recents.model.Task.TaskKey;
@@ -62,8 +63,10 @@
// Ordered list with first item being the most recent task.
private final LinkedList<RunningTaskInfo> mOrderedTaskList = new LinkedList<>();
- private final StagedSplitTaskPosition mMainStagePosition = new StagedSplitTaskPosition();
- private final StagedSplitTaskPosition mSideStagePosition = new StagedSplitTaskPosition();
+
+ private final SplitStageInfo mMainStagePosition = new SplitStageInfo();
+ private final SplitStageInfo mSideStagePosition = new SplitStageInfo();
+ private int mPinnedTaskId = INVALID_TASK_ID;
private TopTaskTracker(Context context) {
mMainStagePosition.stageType = SplitConfigurationOptions.STAGE_TYPE_MAIN;
@@ -132,7 +135,17 @@
}
}
- private void resetTaskId(StagedSplitTaskPosition taskPosition) {
+ @Override
+ public void onActivityPinned(String packageName, int userId, int taskId, int stackId) {
+ mPinnedTaskId = taskId;
+ }
+
+ @Override
+ public void onActivityUnpinned() {
+ mPinnedTaskId = INVALID_TASK_ID;
+ }
+
+ private void resetTaskId(SplitStageInfo taskPosition) {
taskPosition.taskId = -1;
}
@@ -141,7 +154,8 @@
* Will return empty array if device is not in staged split
*/
public int[] getRunningSplitTaskIds() {
- if (mMainStagePosition.taskId == -1 || mSideStagePosition.taskId == -1) {
+ if (mMainStagePosition.taskId == INVALID_TASK_ID
+ || mSideStagePosition.taskId == INVALID_TASK_ID) {
return new int[]{};
}
int[] out = new int[2];
@@ -175,7 +189,11 @@
false /* filterOnlyVisibleRecents */));
Collections.addAll(mOrderedTaskList, tasks);
}
- return new CachedTaskInfo(new ArrayList<>(mOrderedTaskList));
+
+ // Strip the pinned task
+ ArrayList<RunningTaskInfo> tasks = new ArrayList<>(mOrderedTaskList);
+ tasks.removeIf(t -> t.taskId == mPinnedTaskId);
+ return new CachedTaskInfo(tasks);
}
/**
@@ -194,7 +212,7 @@
}
public int getTaskId() {
- return mTopTask == null ? -1 : mTopTask.taskId;
+ return mTopTask == null ? INVALID_TASK_ID : mTopTask.taskId;
}
/**
diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java
index d7ee3cb..417473f 100644
--- a/quickstep/src/com/android/quickstep/TouchInteractionService.java
+++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java
@@ -129,7 +129,7 @@
private static final String TAG = "TouchInteractionService";
private static final boolean BUBBLES_HOME_GESTURE_ENABLED =
- SystemProperties.getBoolean("persist.wm.debug.bubbles_home_gesture", false);
+ SystemProperties.getBoolean("persist.wm.debug.bubbles_home_gesture", true);
private static final String KEY_BACK_NOTIFICATION_COUNT = "backNotificationCount";
private static final String NOTIFY_ACTION_BACK = "com.android.quickstep.action.BACK_GESTURE";
@@ -268,6 +268,16 @@
MAIN_EXECUTOR.execute(ProxyScreenStatusProvider.INSTANCE::onScreenTurnedOn);
}
+ /**
+ * Preloads the Overview activity.
+ *
+ * This method should only be used when the All Set page of the SUW is reached to safely
+ * preload the Launcher for the SUW first reveal.
+ */
+ public void preloadOverviewForSUWAllSet() {
+ preloadOverview(false, true);
+ }
+
@Override
public void onRotationProposal(int rotation, boolean isValid) {
executeForTaskbarManager(() -> mTaskbarManager.onRotationProposal(rotation, isValid));
@@ -883,6 +893,10 @@
}
private void preloadOverview(boolean fromInit) {
+ preloadOverview(fromInit, false);
+ }
+
+ private void preloadOverview(boolean fromInit, boolean forSUWAllSet) {
if (!mDeviceState.isUserUnlocked()) {
return;
}
@@ -892,7 +906,8 @@
return;
}
- if (RestoreDbTask.isPending(this) || !mDeviceState.isUserSetupComplete()) {
+ if ((RestoreDbTask.isPending(this) && !forSUWAllSet)
+ || !mDeviceState.isUserSetupComplete()) {
// Preloading while a restore is pending may cause launcher to start the restore
// too early.
return;
diff --git a/quickstep/src/com/android/quickstep/inputconsumers/DeviceLockedInputConsumer.java b/quickstep/src/com/android/quickstep/inputconsumers/DeviceLockedInputConsumer.java
index 3d737ca..c1750b5 100644
--- a/quickstep/src/com/android/quickstep/inputconsumers/DeviceLockedInputConsumer.java
+++ b/quickstep/src/com/android/quickstep/inputconsumers/DeviceLockedInputConsumer.java
@@ -19,12 +19,13 @@
import static android.view.MotionEvent.ACTION_POINTER_DOWN;
import static android.view.MotionEvent.ACTION_UP;
-import static com.android.launcher3.Utilities.createHomeIntent;
import static com.android.launcher3.Utilities.squaredHypot;
import static com.android.launcher3.Utilities.squaredTouchSlop;
import static com.android.launcher3.util.VelocityUtils.PX_PER_MS;
import static com.android.quickstep.AbsSwipeUpHandler.MIN_PROGRESS_FOR_OVERVIEW;
import static com.android.quickstep.MultiStateCallback.DEBUG_STATES;
+import static com.android.quickstep.OverviewComponentObserver.startHomeIntentSafely;
+import static com.android.quickstep.TaskAnimationManager.ENABLE_SHELL_TRANSITIONS;
import static com.android.quickstep.util.ActiveGestureLog.INTENT_EXTRA_LOG_TRACE_ID;
import android.animation.Animator;
@@ -101,6 +102,8 @@
private boolean mThresholdCrossed = false;
private boolean mHomeLaunched = false;
+ private boolean mCancelWhenRecentsStart = false;
+ private boolean mDismissTask = false;
private RecentsAnimationController mRecentsAnimationController;
@@ -204,9 +207,20 @@
animator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
- if (dismissTask) {
- // For now, just start the home intent so user is prompted to unlock the device.
- mContext.startActivity(createHomeIntent());
+ if (ENABLE_SHELL_TRANSITIONS) {
+ if (mTaskAnimationManager.getCurrentCallbacks() != null) {
+ if (mRecentsAnimationController != null) {
+ finishRecentsAnimationForShell(dismissTask);
+ } else {
+ // the transition of recents animation hasn't started, wait for it
+ mCancelWhenRecentsStart = true;
+ mDismissTask = dismissTask;
+ }
+ }
+ } else if (dismissTask) {
+ // For now, just start the home intent so user is prompted to
+ // unlock the device.
+ startHomeIntentSafely(mContext, mGestureState.getHomeIntent(), null);
mHomeLaunched = true;
}
mStateCallback.setState(STATE_HANDLER_INVALIDATED);
@@ -238,12 +252,24 @@
mTransformParams.setTargetSet(targets);
applyTransform();
mStateCallback.setState(STATE_TARGET_RECEIVED);
+ if (mCancelWhenRecentsStart) {
+ finishRecentsAnimationForShell(mDismissTask);
+ }
}
@Override
public void onRecentsAnimationCanceled(HashMap<Integer, ThumbnailData> thumbnailDatas) {
mRecentsAnimationController = null;
mTransformParams.setTargetSet(null);
+ mCancelWhenRecentsStart = false;
+ }
+
+ private void finishRecentsAnimationForShell(boolean dismissTask) {
+ mCancelWhenRecentsStart = false;
+ mTaskAnimationManager.finishRunningRecentsAnimation(dismissTask /* toHome */);
+ if (dismissTask) {
+ mHomeLaunched = true;
+ }
}
private void endRemoteAnimation() {
diff --git a/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java b/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java
index 10b4ff9..641385d 100644
--- a/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java
+++ b/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java
@@ -443,12 +443,18 @@
mMainThreadHandler.removeCallbacks(mCancelRecentsAnimationRunnable);
mMainThreadHandler.postDelayed(mCancelRecentsAnimationRunnable, 100);
}
- mVelocityTracker.recycle();
- mVelocityTracker = null;
- mMotionPauseDetector.clear();
+ cleanupAfterGesture();
TraceHelper.INSTANCE.endSection(traceToken);
}
+ private void cleanupAfterGesture() {
+ if (mVelocityTracker != null) {
+ mVelocityTracker.recycle();
+ mVelocityTracker = null;
+ }
+ mMotionPauseDetector.clear();
+ }
+
@Override
public void notifyOrientationSetup() {
mRotationTouchHelper.onStartGesture();
@@ -471,6 +477,7 @@
Preconditions.assertUIThread();
removeListener();
mInteractionHandler = null;
+ cleanupAfterGesture();
mOnCompleteCallback.accept(this);
}
diff --git a/quickstep/src/com/android/quickstep/inputconsumers/OverviewWithoutFocusInputConsumer.java b/quickstep/src/com/android/quickstep/inputconsumers/OverviewWithoutFocusInputConsumer.java
index 864e08d..a730183 100644
--- a/quickstep/src/com/android/quickstep/inputconsumers/OverviewWithoutFocusInputConsumer.java
+++ b/quickstep/src/com/android/quickstep/inputconsumers/OverviewWithoutFocusInputConsumer.java
@@ -15,12 +15,11 @@
*/
package com.android.quickstep.inputconsumers;
-import static com.android.launcher3.Utilities.createHomeIntent;
import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_BACKGROUND;
import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_HOME;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_HOME_GESTURE;
+import static com.android.quickstep.OverviewComponentObserver.startHomeIntentSafely;
-import android.content.ActivityNotFoundException;
import android.content.Context;
import android.graphics.PointF;
import android.view.MotionEvent;
@@ -79,11 +78,7 @@
@Override
public void onSwipeUp(boolean wasFling, PointF finalVelocity) {
- try {
- mContext.startActivity(mGestureState.getHomeIntent());
- } catch (NullPointerException | ActivityNotFoundException | SecurityException e) {
- mContext.startActivity(createHomeIntent());
- }
+ startHomeIntentSafely(mContext, mGestureState.getHomeIntent(), null);
ActiveGestureLog.INSTANCE.addLog("startQuickstep");
BaseActivity activity = BaseDraggingActivity.fromContext(mContext);
int state = (mGestureState != null && mGestureState.getEndTarget() != null)
diff --git a/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java b/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java
index a379aad..66ed056 100644
--- a/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java
+++ b/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java
@@ -19,6 +19,7 @@
import static com.android.launcher3.Utilities.mapRange;
import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
import static com.android.launcher3.anim.Interpolators.LINEAR;
+import static com.android.quickstep.OverviewComponentObserver.startHomeIntentSafely;
import android.animation.Animator;
import android.app.Activity;
@@ -148,45 +149,50 @@
}
private void startBackgroundAnimation() {
- if (Utilities.ATLEAST_S && mVibrator != null && mVibrator.areAllPrimitivesSupported(
- VibrationEffect.Composition.PRIMITIVE_THUD)) {
- if (mBackgroundAnimatorListener == null) {
- mBackgroundAnimatorListener =
- new Animator.AnimatorListener() {
- @Override
- public void onAnimationStart(Animator animation) {
- runOnUiHelperThread(() -> mVibrator.vibrate(getVibrationEffect()));
- }
-
- @Override
- public void onAnimationRepeat(Animator animation) {
- runOnUiHelperThread(() -> mVibrator.vibrate(getVibrationEffect()));
- }
-
- @Override
- public void onAnimationEnd(Animator animation) {
- runOnUiHelperThread(mVibrator::cancel);
- }
-
- @Override
- public void onAnimationCancel(Animator animation) {
- runOnUiHelperThread(mVibrator::cancel);
- }
- };
- }
- mAnimatedBackground.addAnimatorListener(mBackgroundAnimatorListener);
+ if (!Utilities.ATLEAST_S || mVibrator == null) {
+ return;
}
- mAnimatedBackground.playAnimation();
- }
+ boolean supportsThud = mVibrator.areAllPrimitivesSupported(
+ VibrationEffect.Composition.PRIMITIVE_THUD);
- /**
- * Sets up the vibration effect for the next round of animation. The parameters vary between
- * different illustrations.
- */
- private VibrationEffect getVibrationEffect() {
- return VibrationEffect.startComposition()
- .addPrimitive(VibrationEffect.Composition.PRIMITIVE_THUD, 1.0f, 50)
- .compose();
+ if (!supportsThud && !mVibrator.areAllPrimitivesSupported(
+ VibrationEffect.Composition.PRIMITIVE_TICK)) {
+ return;
+ }
+ if (mBackgroundAnimatorListener == null) {
+ VibrationEffect vibrationEffect = VibrationEffect.startComposition()
+ .addPrimitive(supportsThud
+ ? VibrationEffect.Composition.PRIMITIVE_THUD
+ : VibrationEffect.Composition.PRIMITIVE_TICK,
+ /* scale= */ 1.0f,
+ /* delay= */ 50)
+ .compose();
+
+ mBackgroundAnimatorListener =
+ new Animator.AnimatorListener() {
+ @Override
+ public void onAnimationStart(Animator animation) {
+ runOnUiHelperThread(() -> mVibrator.vibrate(vibrationEffect));
+ }
+
+ @Override
+ public void onAnimationRepeat(Animator animation) {
+ runOnUiHelperThread(() -> mVibrator.vibrate(vibrationEffect));
+ }
+
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ runOnUiHelperThread(mVibrator::cancel);
+ }
+
+ @Override
+ public void onAnimationCancel(Animator animation) {
+ runOnUiHelperThread(mVibrator::cancel);
+ }
+ };
+ }
+ mAnimatedBackground.addAnimatorListener(mBackgroundAnimatorListener);
+ mAnimatedBackground.playAnimation();
}
@Override
@@ -202,6 +208,7 @@
mBinder = binder;
mBinder.getTaskbarManager().setSetupUIVisible(isResumed());
mBinder.setSwipeUpProxy(isResumed() ? this::createSwipeUpProxy : null);
+ mBinder.preloadOverviewForSUWAllSet();
}
@Override
@@ -281,7 +288,7 @@
@Override
public boolean performAccessibilityAction(View host, int action, Bundle args) {
if (action == AccessibilityAction.ACTION_CLICK.getId()) {
- startActivity(Utilities.createHomeIntent());
+ startHomeIntentSafely(AllSetActivity.this, null);
finish();
return true;
}
diff --git a/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java b/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java
index 85ef6cb..45c8036 100644
--- a/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java
+++ b/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java
@@ -462,6 +462,7 @@
private LatencyType mType = LatencyType.UNKNOWN;
private int mPackageId = 0;
private long mLatencyInMillis;
+ private int mQueryLength = -1;
StatsCompatLatencyLogger(Context context, ActivityContext activityContext) {
mContext = context;
@@ -493,6 +494,12 @@
}
@Override
+ public StatsLatencyLogger withQueryLength(int queryLength) {
+ this.mQueryLength = queryLength;
+ return this;
+ }
+
+ @Override
public void log(EventEnum event) {
if (IS_VERBOSE) {
String name = (event instanceof Enum) ? ((Enum) event).name() :
@@ -508,7 +515,8 @@
mInstanceId.getId(), // instance_id
mPackageId, // package_id
mLatencyInMillis, // latency_in_millis
- mType.getId() //type
+ mType.getId(), //type
+ mQueryLength // query_length
);
}
}
@@ -574,14 +582,18 @@
}
private static int getGridX(LauncherAtom.ItemInfo info, boolean parent) {
- if (info.getContainerInfo().getContainerCase() == FOLDER) {
+ LauncherAtom.ContainerInfo containerInfo = info.getContainerInfo();
+ if (containerInfo.getContainerCase() == FOLDER) {
if (parent) {
- return info.getContainerInfo().getFolder().getWorkspace().getGridX();
+ return containerInfo.getFolder().getWorkspace().getGridX();
} else {
- return info.getContainerInfo().getFolder().getGridX();
+ return containerInfo.getFolder().getGridX();
}
+ } else if (containerInfo.getContainerCase() == EXTENDED_CONTAINERS) {
+ return containerInfo.getExtendedContainers()
+ .getDeviceSearchResultContainer().getGridX();
} else {
- return info.getContainerInfo().getWorkspace().getGridX();
+ return containerInfo.getWorkspace().getGridX();
}
}
diff --git a/quickstep/src/com/android/quickstep/util/GroupTask.java b/quickstep/src/com/android/quickstep/util/GroupTask.java
index e2563e3..f30d00c 100644
--- a/quickstep/src/com/android/quickstep/util/GroupTask.java
+++ b/quickstep/src/com/android/quickstep/util/GroupTask.java
@@ -19,7 +19,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
-import com.android.launcher3.util.SplitConfigurationOptions.StagedSplitBounds;
+import com.android.launcher3.util.SplitConfigurationOptions.SplitBounds;
import com.android.systemui.shared.recents.model.Task;
/**
@@ -29,13 +29,14 @@
public class GroupTask {
public @NonNull Task task1;
public @Nullable Task task2;
- public @Nullable StagedSplitBounds mStagedSplitBounds;
+ public @Nullable
+ SplitBounds mSplitBounds;
public GroupTask(@NonNull Task t1, @Nullable Task t2,
- @Nullable StagedSplitBounds stagedSplitBounds) {
+ @Nullable SplitBounds splitBounds) {
task1 = t1;
task2 = t2;
- mStagedSplitBounds = stagedSplitBounds;
+ mSplitBounds = splitBounds;
}
public GroupTask(@NonNull GroupTask group) {
@@ -43,7 +44,7 @@
task2 = group.task2 != null
? new Task(group.task2)
: null;
- mStagedSplitBounds = group.mStagedSplitBounds;
+ mSplitBounds = group.mSplitBounds;
}
public boolean containsTask(int taskId) {
diff --git a/quickstep/src/com/android/quickstep/util/RecentsOrientedState.java b/quickstep/src/com/android/quickstep/util/RecentsOrientedState.java
index 6038a22..14190b3 100644
--- a/quickstep/src/com/android/quickstep/util/RecentsOrientedState.java
+++ b/quickstep/src/com/android/quickstep/util/RecentsOrientedState.java
@@ -416,7 +416,7 @@
fullHeight -= insets.bottom;
}
- getTaskDimension(mContext, dp, outPivot);
+ getTaskDimension(dp, outPivot);
float scale = Math.min(outPivot.x / taskView.width(), outPivot.y / taskView.height());
// We also scale the preview as part of fullScreenParams, so account for that as well.
if (fullWidth > 0) {
@@ -425,12 +425,6 @@
if (scale == 1) {
outPivot.set(fullWidth / 2, fullHeight / 2);
- } else if (dp.isMultiWindowMode) {
- float denominator = 1 / (scale - 1);
- // Ensure that the task aligns to right bottom for the root view
- float y = (scale * taskView.bottom - fullHeight) * denominator;
- float x = (scale * taskView.right - fullWidth) * denominator;
- outPivot.set(x, y);
} else {
float factor = scale / (scale - 1);
outPivot.set(taskView.left * factor, taskView.top * factor);
diff --git a/quickstep/src/com/android/quickstep/util/StaggeredWorkspaceAnim.java b/quickstep/src/com/android/quickstep/util/StaggeredWorkspaceAnim.java
index b1e2eac..de527a7 100644
--- a/quickstep/src/com/android/quickstep/util/StaggeredWorkspaceAnim.java
+++ b/quickstep/src/com/android/quickstep/util/StaggeredWorkspaceAnim.java
@@ -18,6 +18,7 @@
import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_Y;
import static com.android.launcher3.LauncherState.BACKGROUND_APP;
import static com.android.launcher3.LauncherState.NORMAL;
+import static com.android.launcher3.anim.AnimatorListeners.forEndCallback;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.anim.PropertySetter.NO_ANIM_PROPERTY_SETTER;
import static com.android.launcher3.states.StateAnimationConfig.SKIP_DEPTH_CONTROLLER;
@@ -40,6 +41,7 @@
import com.android.launcher3.Hotseat;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherState;
+import com.android.launcher3.QuickstepTransitionManager;
import com.android.launcher3.R;
import com.android.launcher3.ShortcutAndWidgetContainer;
import com.android.launcher3.Workspace;
@@ -59,10 +61,10 @@
public class StaggeredWorkspaceAnim {
private static final int APP_CLOSE_ROW_START_DELAY_MS = 10;
- // How long it takes to fade in each staggered row.
- private static final int ALPHA_DURATION_MS = 250;
// Should be used for animations running alongside this StaggeredWorkspaceAnim.
public static final int DURATION_MS = 250;
+ public static final int DURATION_TASKBAR_MS =
+ QuickstepTransitionManager.TASKBAR_TO_HOME_DURATION;
private static final float MAX_VELOCITY_PX_PER_S = 22f;
@@ -90,16 +92,20 @@
mSpringTransY = transFactor * launcher.getResources()
.getDimensionPixelSize(R.dimen.swipe_up_max_workspace_trans_y);
+ DeviceProfile grid = launcher.getDeviceProfile();
+ long duration = grid.isTaskbarPresent ? DURATION_TASKBAR_MS : DURATION_MS;
if (staggerWorkspace) {
- DeviceProfile grid = launcher.getDeviceProfile();
Workspace<?> workspace = launcher.getWorkspace();
Hotseat hotseat = launcher.getHotseat();
- // Hotseat and QSB takes up two additional rows.
- int totalRows = grid.inv.numRows + (grid.isVerticalBarLayout() ? 0 : 2);
+ boolean staggerHotseat = !grid.isVerticalBarLayout() && !grid.isTaskbarPresent;
+ boolean staggerQsb =
+ !grid.isVerticalBarLayout() && !(grid.isTaskbarPresent && grid.isQsbInline);
+ int totalRows = grid.inv.numRows + (staggerHotseat ? 1 : 0) + (staggerQsb ? 1 : 0);
// Add animation for all the visible workspace pages
- workspace.forEachVisiblePage(page -> addAnimationForPage((CellLayout) page, totalRows));
+ workspace.forEachVisiblePage(
+ page -> addAnimationForPage((CellLayout) page, totalRows, duration));
boolean workspaceClipChildren = workspace.getClipChildren();
boolean workspaceClipToPadding = workspace.getClipToPadding();
@@ -118,23 +124,34 @@
View child = hotseatIcons.getChildAt(i);
CellLayout.LayoutParams lp =
((CellLayout.LayoutParams) child.getLayoutParams());
- addStaggeredAnimationForView(child, lp.cellY + 1, totalRows);
+ addStaggeredAnimationForView(child, lp.cellY + 1, totalRows, duration);
}
} else {
final int hotseatRow, qsbRow;
if (grid.isTaskbarPresent) {
- qsbRow = grid.inv.numRows + 1;
- hotseatRow = grid.inv.numRows + 2;
+ if (grid.isQsbInline) {
+ qsbRow = grid.inv.numRows + 1;
+ hotseatRow = grid.inv.numRows + 1;
+ } else {
+ qsbRow = grid.inv.numRows + 1;
+ hotseatRow = grid.inv.numRows + 2;
+ }
} else {
hotseatRow = grid.inv.numRows + 1;
qsbRow = grid.inv.numRows + 2;
}
- for (int i = hotseatIcons.getChildCount() - 1; i >= 0; i--) {
- View child = hotseatIcons.getChildAt(i);
- addStaggeredAnimationForView(child, hotseatRow, totalRows);
- }
- addStaggeredAnimationForView(hotseat.getQsb(), qsbRow, totalRows);
+ // Do not stagger hotseat as a whole when taskbar is present, and stagger QSB only
+ // if it's not inline.
+ if (staggerHotseat) {
+ for (int i = hotseatIcons.getChildCount() - 1; i >= 0; i--) {
+ View child = hotseatIcons.getChildAt(i);
+ addStaggeredAnimationForView(child, hotseatRow, totalRows, duration);
+ }
+ }
+ if (staggerQsb) {
+ addStaggeredAnimationForView(hotseat.getQsb(), qsbRow, totalRows, duration);
+ }
}
mAnimators.addListener(new AnimatorListenerAdapter() {
@@ -148,20 +165,23 @@
});
}
+ launcher.pauseExpensiveViewUpdates();
+ mAnimators.addListener(forEndCallback(launcher::resumeExpensiveViewUpdates));
+
if (animateOverviewScrim) {
- PendingAnimation pendingAnimation = new PendingAnimation(DURATION_MS);
+ PendingAnimation pendingAnimation = new PendingAnimation(duration);
launcher.getWorkspace().getStateTransitionAnimation()
.setScrim(pendingAnimation, NORMAL, new StateAnimationConfig());
mAnimators.play(pendingAnimation.buildAnim());
}
- addDepthAnimationForState(launcher, NORMAL, DURATION_MS);
+ addDepthAnimationForState(launcher, NORMAL, duration);
mAnimators.play(launcher.getRootView().getSysUiScrim().createSysuiMultiplierAnim(0f, 1f)
- .setDuration(DURATION_MS));
+ .setDuration(duration));
}
- private void addAnimationForPage(CellLayout page, int totalRows) {
+ private void addAnimationForPage(CellLayout page, int totalRows, long duration) {
ShortcutAndWidgetContainer itemsContainer = page.getShortcutsAndWidgets();
boolean pageClipChildren = page.getClipChildren();
@@ -174,7 +194,7 @@
for (int i = itemsContainer.getChildCount() - 1; i >= 0; i--) {
View child = itemsContainer.getChildAt(i);
CellLayout.LayoutParams lp = ((CellLayout.LayoutParams) child.getLayoutParams());
- addStaggeredAnimationForView(child, lp.cellY + lp.cellVSpan, totalRows);
+ addStaggeredAnimationForView(child, lp.cellY + lp.cellVSpan, totalRows, duration);
}
mAnimators.addListener(new AnimatorListenerAdapter() {
@@ -227,8 +247,9 @@
* @param v A view on the workspace.
* @param row The bottom-most row that contains the view.
* @param totalRows Total number of rows.
+ * @param duration duration of the animation
*/
- private void addStaggeredAnimationForView(View v, int row, int totalRows) {
+ private void addStaggeredAnimationForView(View v, int row, int totalRows, long duration) {
if (mIgnoredView != null && mIgnoredView == v) return;
// Invert the rows, because we stagger starting from the bottom of the screen.
int invertedRow = totalRows - row;
@@ -262,7 +283,7 @@
v.setAlpha(0);
ObjectAnimator alpha = ObjectAnimator.ofFloat(v, View.ALPHA, 0f, 1f);
alpha.setInterpolator(LINEAR);
- alpha.setDuration(ALPHA_DURATION_MS);
+ alpha.setDuration(duration);
alpha.setStartDelay(startDelay);
alpha.addListener(new AnimatorListenerAdapter() {
@Override
diff --git a/quickstep/src/com/android/quickstep/util/SurfaceTransactionApplier.java b/quickstep/src/com/android/quickstep/util/SurfaceTransactionApplier.java
index 4757d4b..1200208 100644
--- a/quickstep/src/com/android/quickstep/util/SurfaceTransactionApplier.java
+++ b/quickstep/src/com/android/quickstep/util/SurfaceTransactionApplier.java
@@ -75,6 +75,13 @@
if (view == null) {
return;
}
+ Transaction t = new Transaction();
+ for (int i = params.length - 1; i >= 0; i--) {
+ SurfaceParams surfaceParams = params[i];
+ if (surfaceParams.surface.isValid()) {
+ surfaceParams.applyTo(t);
+ }
+ }
mLastSequenceNumber++;
final int toApplySeqNo = mLastSequenceNumber;
@@ -85,13 +92,6 @@
.sendToTarget();
return;
}
- Transaction t = new Transaction();
- for (int i = params.length - 1; i >= 0; i--) {
- SurfaceParams surfaceParams = params[i];
- if (surfaceParams.surface.isValid()) {
- surfaceParams.applyTo(t);
- }
- }
mTargetViewRootImpl.mergeWithNextTransaction(t, frame);
Message.obtain(mApplyHandler, MSG_UPDATE_SEQUENCE_NUMBER, toApplySeqNo, 0)
.sendToTarget();
diff --git a/quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java b/quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java
index b222f51..833d705 100644
--- a/quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java
+++ b/quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java
@@ -279,7 +279,10 @@
// get the final leash operations but do not apply to the leash.
final SurfaceControl.Transaction tx =
PipSurfaceTransactionHelper.newSurfaceControlTransaction();
- return onAnimationUpdate(tx, new RectF(mDestinationBounds), END_PROGRESS);
+ final PictureInPictureSurfaceTransaction pipTx =
+ onAnimationUpdate(tx, new RectF(mDestinationBounds), END_PROGRESS);
+ pipTx.setShouldDisableCanAffectSystemUiFlags(true);
+ return pipTx;
}
private RotatedPosition getRotatedPosition(float progress) {
diff --git a/quickstep/src/com/android/quickstep/util/SystemWindowManagerProxy.java b/quickstep/src/com/android/quickstep/util/SystemWindowManagerProxy.java
index 19a48db..5dc4613 100644
--- a/quickstep/src/com/android/quickstep/util/SystemWindowManagerProxy.java
+++ b/quickstep/src/com/android/quickstep/util/SystemWindowManagerProxy.java
@@ -15,11 +15,20 @@
*/
package com.android.quickstep.util;
-import android.content.Context;
-import android.view.Display;
+import static android.view.Display.DEFAULT_DISPLAY;
+import android.content.Context;
+import android.util.ArrayMap;
+import android.view.Surface;
+import android.view.WindowManager;
+import android.view.WindowMetrics;
+
+import com.android.launcher3.util.WindowBounds;
+import com.android.launcher3.util.window.CachedDisplayInfo;
import com.android.launcher3.util.window.WindowManagerProxy;
+import java.util.Set;
+
/**
* Extension of {@link WindowManagerProxy} with some assumption for the default system Launcher
*/
@@ -30,17 +39,23 @@
}
@Override
- protected String getDisplayId(Display display) {
- return display.getUniqueId();
+ public int getRotation(Context displayInfoContext) {
+ return displayInfoContext.getResources().getConfiguration().windowConfiguration
+ .getRotation();
}
@Override
- public boolean isInternalDisplay(Display display) {
- return display.getType() == Display.TYPE_INTERNAL;
- }
-
- @Override
- public int getRotation(Context context) {
- return context.getResources().getConfiguration().windowConfiguration.getRotation();
+ public ArrayMap<CachedDisplayInfo, WindowBounds[]> estimateInternalDisplayBounds(
+ Context displayInfoContext) {
+ ArrayMap<CachedDisplayInfo, WindowBounds[]> result = new ArrayMap<>();
+ WindowManager windowManager = displayInfoContext.getSystemService(WindowManager.class);
+ Set<WindowMetrics> possibleMaximumWindowMetrics =
+ windowManager.getPossibleMaximumWindowMetrics(DEFAULT_DISPLAY);
+ for (WindowMetrics windowMetrics : possibleMaximumWindowMetrics) {
+ CachedDisplayInfo info = getDisplayInfo(windowMetrics, Surface.ROTATION_0);
+ WindowBounds[] bounds = estimateWindowBounds(displayInfoContext, info);
+ result.put(info, bounds);
+ }
+ return result;
}
}
diff --git a/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java b/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java
index 5212755..1acdec1 100644
--- a/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java
+++ b/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java
@@ -40,7 +40,7 @@
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Utilities;
import com.android.launcher3.anim.PendingAnimation;
-import com.android.launcher3.util.SplitConfigurationOptions.StagedSplitBounds;
+import com.android.launcher3.util.SplitConfigurationOptions.SplitBounds;
import com.android.launcher3.util.TraceHelper;
import com.android.quickstep.AnimatedFloat;
import com.android.quickstep.BaseActivityInterface;
@@ -100,7 +100,7 @@
// Cached calculations
private boolean mLayoutValid = false;
private int mOrientationStateId;
- private StagedSplitBounds mStagedSplitBounds;
+ private SplitBounds mSplitBounds;
private boolean mDrawsBelowRecents;
private boolean mIsGridTask;
private int mTaskRectTranslationX;
@@ -152,13 +152,13 @@
}
Rect fullTaskSize;
- if (mStagedSplitBounds != null) {
+ if (mSplitBounds != null) {
// The task rect changes according to the staged split task sizes, but recents
// fullscreen scale and pivot remains the same since the task fits into the existing
// sized task space bounds
fullTaskSize = new Rect(mTaskRect);
mOrientationState.getOrientationHandler()
- .setSplitTaskSwipeRect(mDp, mTaskRect, mStagedSplitBounds, mStagePosition);
+ .setSplitTaskSwipeRect(mDp, mTaskRect, mSplitBounds, mStagePosition);
mTaskRect.offset(mTaskRectTranslationX, mTaskRectTranslationY);
} else {
fullTaskSize = mTaskRect;
@@ -180,10 +180,10 @@
*
* @param splitInfo set to {@code null} when not in staged split mode
*/
- public void setPreview(RemoteAnimationTargetCompat runningTarget, StagedSplitBounds splitInfo) {
+ public void setPreview(RemoteAnimationTargetCompat runningTarget, SplitBounds splitInfo) {
setPreview(runningTarget);
- mStagedSplitBounds = splitInfo;
- if (mStagedSplitBounds == null) {
+ mSplitBounds = splitInfo;
+ if (mSplitBounds == null) {
mStagePosition = STAGE_POSITION_UNDEFINED;
return;
}
@@ -390,10 +390,8 @@
.withWindowCrop(mTmpCropRect)
.withCornerRadius(getCurrentCornerRadius());
- if (ENABLE_QUICKSTEP_LIVE_TILE.get() && params.getRecentsSurface() != null) {
- // When relativeLayer = 0, it reverts the surfaces back to the original order.
- builder.withRelativeLayerTo(params.getRecentsSurface(),
- mDrawsBelowRecents ? Integer.MIN_VALUE : 0);
+ if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
+ builder.withLayer(mDrawsBelowRecents ? Integer.MIN_VALUE : 0);
}
}
diff --git a/quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java b/quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java
index 79b15c7..76552a3 100644
--- a/quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java
+++ b/quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java
@@ -53,7 +53,7 @@
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.touch.PagedOrientationHandler;
-import com.android.launcher3.util.SplitConfigurationOptions.StagedSplitBounds;
+import com.android.launcher3.util.SplitConfigurationOptions.SplitBounds;
import com.android.systemui.shared.recents.model.Task;
import java.lang.annotation.Retention;
@@ -103,7 +103,7 @@
*/
private float mModalOffset = 0f;
@Nullable
- private StagedSplitBounds mStagedSplitBounds;
+ private SplitBounds mSplitBounds;
private int mSplitBannerConfig = SPLIT_BANNER_FULLSCREEN;
private float mSplitOffsetTranslationY;
private float mSplitOffsetTranslationX;
@@ -164,9 +164,9 @@
});
}
- public void setSplitConfiguration(StagedSplitBounds stagedSplitBounds) {
- mStagedSplitBounds = stagedSplitBounds;
- if (mStagedSplitBounds == null
+ public void setSplitConfiguration(SplitBounds splitBounds) {
+ mSplitBounds = splitBounds;
+ if (mSplitBounds == null
|| !mActivity.getDeviceProfile().isTablet
|| mTaskView.isFocusedTask()) {
mSplitBannerConfig = SPLIT_BANNER_FULLSCREEN;
@@ -180,11 +180,11 @@
}
// For landscape grid, for 30% width we only show icon, otherwise show icon and time
- if (mTask.key.id == mStagedSplitBounds.leftTopTaskId) {
- mSplitBannerConfig = mStagedSplitBounds.leftTaskPercent < THRESHOLD_LEFT_ICON_ONLY ?
+ if (mTask.key.id == mSplitBounds.leftTopTaskId) {
+ mSplitBannerConfig = mSplitBounds.leftTaskPercent < THRESHOLD_LEFT_ICON_ONLY ?
SPLIT_GRID_BANNER_SMALL : SPLIT_GRID_BANNER_LARGE;
} else {
- mSplitBannerConfig = mStagedSplitBounds.leftTaskPercent > THRESHOLD_RIGHT_ICON_ONLY ?
+ mSplitBannerConfig = mSplitBounds.leftTaskPercent > THRESHOLD_RIGHT_ICON_ONLY ?
SPLIT_GRID_BANNER_SMALL : SPLIT_GRID_BANNER_LARGE;
}
}
@@ -321,7 +321,7 @@
PagedOrientationHandler orientationHandler = mTaskView.getPagedOrientationHandler();
Pair<Float, Float> translations = orientationHandler
.getDwbLayoutTranslations(mTaskView.getMeasuredWidth(),
- mTaskView.getMeasuredHeight(), mStagedSplitBounds, deviceProfile,
+ mTaskView.getMeasuredHeight(), mSplitBounds, deviceProfile,
mTaskView.getThumbnails(), mTask.key.id, mBanner);
mSplitOffsetTranslationX = translations.first;
mSplitOffsetTranslationY = translations.second;
diff --git a/quickstep/src/com/android/quickstep/views/FloatingTaskView.java b/quickstep/src/com/android/quickstep/views/FloatingTaskView.java
index c980d1e..835c9f7 100644
--- a/quickstep/src/com/android/quickstep/views/FloatingTaskView.java
+++ b/quickstep/src/com/android/quickstep/views/FloatingTaskView.java
@@ -1,5 +1,6 @@
package com.android.quickstep.views;
+import static com.android.launcher3.AbstractFloatingView.TYPE_TASK_MENU;
import static com.android.launcher3.anim.Interpolators.ACCEL;
import static com.android.launcher3.anim.Interpolators.DEACCEL_3;
import static com.android.launcher3.anim.Interpolators.LINEAR;
@@ -19,6 +20,7 @@
import androidx.annotation.Nullable;
+import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.BaseActivity;
import com.android.launcher3.InsettableFrameLayout;
import com.android.launcher3.LauncherAnimUtils;
@@ -110,13 +112,19 @@
*/
public static FloatingTaskView getFloatingTaskView(StatefulActivity launcher,
View originalView, @Nullable Bitmap thumbnail, Drawable icon, RectF positionOut) {
- final BaseDragLayer dragLayer = launcher.getDragLayer();
- ViewGroup parent = (ViewGroup) dragLayer.getParent();
+ final ViewGroup dragLayer = launcher.getDragLayer();
final FloatingTaskView floatingView = (FloatingTaskView) launcher.getLayoutInflater()
- .inflate(R.layout.floating_split_select_view, parent, false);
+ .inflate(R.layout.floating_split_select_view, dragLayer, false);
floatingView.init(launcher, originalView, thumbnail, icon, positionOut);
- parent.addView(floatingView);
+ // Add this animating view underneath the existing open task menu view (if there is one)
+ View openTaskView = AbstractFloatingView.getOpenView(launcher, TYPE_TASK_MENU);
+ int openTaskViewIndex = dragLayer.indexOfChild(openTaskView);
+ if (openTaskViewIndex == -1) {
+ // Add to top if not
+ openTaskViewIndex = dragLayer.getChildCount();
+ }
+ dragLayer.addView(floatingView, openTaskViewIndex - 1);
return floatingView;
}
@@ -125,7 +133,7 @@
Utilities.getBoundsForViewInDragLayer(mActivity.getDragLayer(), originalView, viewBounds,
false /* ignoreTransform */, null /* recycle */,
mStartingPosition);
- final InsettableFrameLayout.LayoutParams lp = new InsettableFrameLayout.LayoutParams(
+ final BaseDragLayer.LayoutParams lp = new BaseDragLayer.LayoutParams(
Math.round(mStartingPosition.width()),
Math.round(mStartingPosition.height()));
initPosition(mStartingPosition, lp);
@@ -246,7 +254,7 @@
* offscreen).
*/
void centerIconView(IconView iconView, float onScreenRectCenterX, float onScreenRectCenterY) {
- mOrientationHandler.updateStagedSplitIconParams(iconView, onScreenRectCenterX,
+ mOrientationHandler.updateSplitIconParams(iconView, onScreenRectCenterX,
onScreenRectCenterY, mFullscreenParams.mScaleX, mFullscreenParams.mScaleY,
iconView.getDrawableWidth(), iconView.getDrawableHeight(),
mActivity.getDeviceProfile(), mStagePosition);
diff --git a/quickstep/src/com/android/quickstep/views/GroupedTaskView.java b/quickstep/src/com/android/quickstep/views/GroupedTaskView.java
index 244a794..cb88068 100644
--- a/quickstep/src/com/android/quickstep/views/GroupedTaskView.java
+++ b/quickstep/src/com/android/quickstep/views/GroupedTaskView.java
@@ -17,7 +17,7 @@
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.util.RunnableList;
-import com.android.launcher3.util.SplitConfigurationOptions.StagedSplitBounds;
+import com.android.launcher3.util.SplitConfigurationOptions.SplitBounds;
import com.android.launcher3.util.TransformingTouchDelegate;
import com.android.quickstep.RecentsModel;
import com.android.quickstep.TaskIconCache;
@@ -53,7 +53,7 @@
private CancellableTask mIconLoadRequest2;
private final float[] mIcon2CenterCoords = new float[2];
private TransformingTouchDelegate mIcon2TouchDelegate;
- @Nullable private StagedSplitBounds mSplitBoundsConfig;
+ @Nullable private SplitBounds mSplitBoundsConfig;
private final DigitalWellBeingToast mDigitalWellBeingToast2;
public GroupedTaskView(Context context) {
@@ -78,7 +78,7 @@
}
public void bind(Task primary, Task secondary, RecentsOrientedState orientedState,
- @Nullable StagedSplitBounds splitBoundsConfig) {
+ @Nullable SplitBounds splitBoundsConfig) {
super.bind(primary, orientedState);
mSecondaryTask = secondary;
mTaskIdContainer[1] = secondary.key.id;
@@ -126,8 +126,8 @@
}
}
- public void updateSplitBoundsConfig(StagedSplitBounds stagedSplitBounds) {
- mSplitBoundsConfig = stagedSplitBounds;
+ public void updateSplitBoundsConfig(SplitBounds splitBounds) {
+ mSplitBoundsConfig = splitBounds;
invalidate();
}
diff --git a/quickstep/src/com/android/quickstep/views/OverviewActionsView.java b/quickstep/src/com/android/quickstep/views/OverviewActionsView.java
index 1c4e497..3133453 100644
--- a/quickstep/src/com/android/quickstep/views/OverviewActionsView.java
+++ b/quickstep/src/com/android/quickstep/views/OverviewActionsView.java
@@ -22,10 +22,8 @@
import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
-import android.view.ViewGroup;
import android.widget.Button;
import android.widget.FrameLayout;
-import android.widget.LinearLayout;
import androidx.annotation.IntDef;
import androidx.annotation.Nullable;
@@ -233,10 +231,6 @@
return 0;
}
- if (mDp.isVerticalBarLayout()) {
- return mDp.getInsets().bottom;
- }
-
if (!mDp.isGestureMode && mDp.isTaskbarPresent) {
return mDp.getOverviewActionsClaimedSpaceBelow();
}
@@ -254,12 +248,6 @@
mTaskSize.set(taskSize);
updateVerticalMargin(DisplayController.getNavigationMode(getContext()));
- LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
- dp.isVerticalBarLayout() ? 0 : dp.overviewActionsButtonSpacing,
- ViewGroup.LayoutParams.MATCH_PARENT);
- params.weight = dp.isVerticalBarLayout() ? 1 : 0;
- findViewById(R.id.action_split_space).setLayoutParams(params);
-
requestLayout();
mSplitButton.setCompoundDrawablesWithIntrinsicBounds(
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 2360396..12ddc38 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -34,6 +34,7 @@
import static com.android.launcher3.anim.Interpolators.ACCEL;
import static com.android.launcher3.anim.Interpolators.ACCEL_0_75;
import static com.android.launcher3.anim.Interpolators.ACCEL_DEACCEL;
+import static com.android.launcher3.anim.Interpolators.DEACCEL_2;
import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
import static com.android.launcher3.anim.Interpolators.FINAL_FRAME;
import static com.android.launcher3.anim.Interpolators.LINEAR;
@@ -140,8 +141,8 @@
import com.android.launcher3.util.MultiValueAlpha;
import com.android.launcher3.util.ResourceBasedOverride.Overrides;
import com.android.launcher3.util.RunnableList;
+import com.android.launcher3.util.SplitConfigurationOptions.SplitBounds;
import com.android.launcher3.util.SplitConfigurationOptions.StagePosition;
-import com.android.launcher3.util.SplitConfigurationOptions.StagedSplitBounds;
import com.android.launcher3.util.Themes;
import com.android.launcher3.util.TranslateEdgeEffect;
import com.android.launcher3.util.ViewPool;
@@ -624,12 +625,14 @@
@Nullable
private View mSecondSplitHiddenView;
@Nullable
- private StagedSplitBounds mSplitBoundsConfig;
+ private SplitBounds mSplitBoundsConfig;
private final Toast mSplitToast = Toast.makeText(getContext(),
R.string.toast_split_select_app, Toast.LENGTH_SHORT);
private final Toast mSplitUnsupportedToast = Toast.makeText(getContext(),
R.string.toast_split_app_unsupported, Toast.LENGTH_SHORT);
+ private SplitInstructionsView mSplitInstructionsView;
+
@Nullable
private QuickstepSystemShortcut.SplitSelectSource mSplitSelectSource;
@@ -1445,11 +1448,11 @@
if (hasMultipleTasks) {
boolean firstTaskIsLeftTopTask =
- groupTask.mStagedSplitBounds.leftTopTaskId == groupTask.task1.key.id;
+ groupTask.mSplitBounds.leftTopTaskId == groupTask.task1.key.id;
Task leftTopTask = firstTaskIsLeftTopTask ? groupTask.task1 : groupTask.task2;
Task rightBottomTask = firstTaskIsLeftTopTask ? groupTask.task2 : groupTask.task1;
((GroupedTaskView) taskView).bind(leftTopTask, rightBottomTask, mOrientationState,
- groupTask.mStagedSplitBounds);
+ groupTask.mSplitBounds);
} else {
taskView.bind(groupTask.task1, mOrientationState);
}
@@ -2764,11 +2767,15 @@
mFirstFloatingTaskView.addAnimation(anim, startingTaskRect, mTempRect,
false /* fadeWithThumbnail */, true /* isStagedTask */);
}
+
+ mSplitInstructionsView = SplitInstructionsView.getSplitInstructionsView(mActivity);
+ mSplitInstructionsView.setAlpha(0);
+ anim.addFloat(mSplitInstructionsView, SplitInstructionsView.ALPHA_FLOAT, 0, 1, ACCEL);
+
InteractionJankMonitorWrapper.begin(this,
InteractionJankMonitorWrapper.CUJ_SPLIT_SCREEN_ENTER, "First tile selected");
anim.addEndListener(success -> {
if (success) {
- mSplitToast.show();
InteractionJankMonitorWrapper.end(
InteractionJankMonitorWrapper.CUJ_SPLIT_SCREEN_ENTER);
} else {
@@ -4091,6 +4098,10 @@
mSecondSplitHiddenView.setVisibility(INVISIBLE);
InteractionJankMonitorWrapper.begin(this,
InteractionJankMonitorWrapper.CUJ_SPLIT_SCREEN_ENTER, "Second tile selected");
+
+ // Fade out all other views underneath placeholders
+ ObjectAnimator tvFade = ObjectAnimator.ofFloat(this, RecentsView.CONTENT_ALPHA,1, 0);
+ pendingAnimation.add(tvFade, DEACCEL_2, SpringProperty.DEFAULT);
pendingAnimation.buildAnim().start();
return true;
}
@@ -4099,12 +4110,16 @@
@SuppressLint("WrongCall")
protected void resetFromSplitSelectionState() {
if (mSplitSelectSource != null || mSplitHiddenTaskViewIndex != -1) {
+ if (mSplitInstructionsView != null) {
+ mActivity.getDragLayer().removeView(mSplitInstructionsView);
+ mSplitInstructionsView = null;
+ }
if (mFirstFloatingTaskView != null) {
- mActivity.getRootView().removeView(mFirstFloatingTaskView);
+ mActivity.getDragLayer().removeView(mFirstFloatingTaskView);
mFirstFloatingTaskView = null;
}
if (mSecondFloatingTaskView != null) {
- mActivity.getRootView().removeView(mSecondFloatingTaskView);
+ mActivity.getDragLayer().removeView(mSecondFloatingTaskView);
mSecondFloatingTaskView = null;
mSecondSplitHiddenView.setVisibility(VISIBLE);
mSecondSplitHiddenView = null;
@@ -4164,6 +4179,10 @@
taskViewsFloat.first.set(this, getSplitSelectTranslation());
taskViewsFloat.second.set(this, 0f);
+ if (mSplitInstructionsView != null) {
+ mSplitInstructionsView.ensureProperRotation();
+ }
+
applySplitPrimaryScrollOffset();
}
@@ -4473,7 +4492,7 @@
RemoteTargetGluer gluer = new RemoteTargetGluer(getContext(), getSizeStrategy());
mRemoteTargetHandles = gluer.assignTargetsForSplitScreen(
getContext(), recentsAnimationTargets);
- mSplitBoundsConfig = gluer.getStagedSplitBounds();
+ mSplitBoundsConfig = gluer.getSplitBounds();
// Add release check to the targets from the RemoteTargetGluer and not the targets
// passed in because in the event we're in split screen, we use the passed in targets
// to create new RemoteAnimationTargets in assignTargetsForSplitScreen(), and the
@@ -4523,12 +4542,6 @@
@Nullable Runnable onFinishComplete) {
// TODO(b/197232424#comment#10) Move this back into onRecentsAnimationComplete(). Maybe?
cleanupRemoteTargets();
- if (!toRecents && ENABLE_QUICKSTEP_LIVE_TILE.get()) {
- // Reset the minimized state since we force-toggled the minimized state when entering
- // overview, but never actually finished the recents animation. This is a catch all for
- // cases where we haven't already reset it.
- SystemUiProxy.INSTANCE.get(getContext()).setSplitScreenMinimized(false);
- }
if (mRecentsAnimationController == null) {
if (onFinishComplete != null) {
@@ -4549,6 +4562,7 @@
new PictureInPictureSurfaceTransaction.Builder()
.setAlpha(0f)
.build();
+ tx.setShouldDisableCanAffectSystemUiFlags(false);
int[] taskIds = TopTaskTracker.INSTANCE.get(getContext()).getRunningSplitTaskIds();
for (int taskId : taskIds) {
mRecentsAnimationController.setFinishTaskTransaction(taskId,
diff --git a/quickstep/src/com/android/quickstep/views/SplitInstructionsView.java b/quickstep/src/com/android/quickstep/views/SplitInstructionsView.java
new file mode 100644
index 0000000..7d94505
--- /dev/null
+++ b/quickstep/src/com/android/quickstep/views/SplitInstructionsView.java
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.quickstep.views;
+
+import static com.android.launcher3.util.DisplayController.NavigationMode.THREE_BUTTONS;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.util.FloatProperty;
+import android.view.ViewGroup;
+import android.widget.FrameLayout;
+
+import androidx.annotation.Nullable;
+
+import com.android.launcher3.DeviceProfile;
+import com.android.launcher3.R;
+import com.android.launcher3.statemanager.StatefulActivity;
+import com.android.launcher3.util.DisplayController;
+
+/**
+ * A rounded rectangular component containing a single TextView.
+ * Appears when a split is in progress, and tells the user to select a second app to initiate
+ * splitscreen.
+ *
+ * Appears and disappears concurrently with a FloatingTaskView.
+ */
+public class SplitInstructionsView extends FrameLayout {
+ private final StatefulActivity mLauncher;
+
+ public static final FloatProperty<SplitInstructionsView> ALPHA_FLOAT =
+ new FloatProperty<SplitInstructionsView>("SplitInstructionsAlpha") {
+ @Override
+ public void setValue(SplitInstructionsView splitInstructionsView, float v) {
+ splitInstructionsView.setVisibility(v != 0 ? VISIBLE : GONE);
+ splitInstructionsView.setAlpha(v);
+ }
+
+ @Override
+ public Float get(SplitInstructionsView splitInstructionsView) {
+ return splitInstructionsView.getAlpha();
+ }
+ };
+
+ public SplitInstructionsView(Context context) {
+ this(context, null);
+ }
+
+ public SplitInstructionsView(Context context, @Nullable AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public SplitInstructionsView(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ mLauncher = (StatefulActivity) context;
+ }
+
+ static SplitInstructionsView getSplitInstructionsView(StatefulActivity launcher) {
+ ViewGroup dragLayer = launcher.getDragLayer();
+ final SplitInstructionsView splitInstructionsView =
+ (SplitInstructionsView) launcher.getLayoutInflater().inflate(
+ R.layout.split_instructions_view,
+ dragLayer,
+ false
+ );
+
+ dragLayer.addView(splitInstructionsView);
+ return splitInstructionsView;
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ ensureProperRotation();
+ }
+
+ void ensureProperRotation() {
+ ((RecentsView) mLauncher.getOverviewPanel()).getPagedOrientationHandler()
+ .setSplitInstructionsParams(
+ this,
+ mLauncher.getDeviceProfile(),
+ getMeasuredHeight(),
+ getMeasuredWidth(),
+ getThreeButtonNavShift()
+ );
+ }
+
+ // In some cases, when user is using 3-button nav, there isn't enough room for both the
+ // 3-button nav and a centered SplitInstructionsView. This function will return an int that will
+ // be used to shift the SplitInstructionsView over a bit so that everything looks well-spaced.
+ // In many cases, this will return 0, since we don't need to shift it away from the center.
+ int getThreeButtonNavShift() {
+ DeviceProfile dp = mLauncher.getDeviceProfile();
+ if ((DisplayController.getNavigationMode(getContext()) == THREE_BUTTONS)
+ && ((dp.isTwoPanels) || (dp.isTablet && !dp.isLandscape))) {
+ int navButtonWidth = getResources().getDimensionPixelSize(
+ R.dimen.taskbar_nav_buttons_size);
+ int extraMargin = getResources().getDimensionPixelSize(
+ R.dimen.taskbar_contextual_button_margin);
+ // Explanation: The 3-button nav for non-phones sits on one side of the screen, taking
+ // up 3 buttons + a side margin worth of space. Our splitInstructionsView starts in the
+ // center of the screen and we want to center it in the remaining space, therefore we
+ // want to shift it over by half the 3-button layout's width.
+ // If the user is using an RtL layout, we shift it the opposite way.
+ return -((3 * navButtonWidth + extraMargin) / 2) * (isLayoutRtl() ? -1 : 1);
+ } else {
+ return 0;
+ }
+ }
+}
diff --git a/quickstep/src/com/android/quickstep/views/TaskMenuView.java b/quickstep/src/com/android/quickstep/views/TaskMenuView.java
index 3803f1b..c1711d1 100644
--- a/quickstep/src/com/android/quickstep/views/TaskMenuView.java
+++ b/quickstep/src/com/android/quickstep/views/TaskMenuView.java
@@ -16,7 +16,6 @@
package com.android.quickstep.views;
-import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_BOTTOM_OR_RIGHT;
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_UNDEFINED;
import static com.android.quickstep.views.TaskThumbnailView.DIM_ALPHA;
@@ -232,8 +231,7 @@
private void addMenuOptions(TaskIdAttributeContainer taskContainer) {
mTaskName.setText(TaskUtils.getTitle(getContext(), taskContainer.getTask()));
mTaskName.setOnClickListener(v -> close(true));
- TaskOverlayFactory.getEnabledShortcuts(mTaskView, mActivity.getDeviceProfile(),
- taskContainer)
+ TaskOverlayFactory.getEnabledShortcuts(mTaskView, taskContainer)
.forEach(this::addMenuOption);
}
@@ -245,17 +243,9 @@
LayoutParams lp = (LayoutParams) menuOptionView.getLayoutParams();
mTaskView.getPagedOrientationHandler().setLayoutParamsForTaskMenuOptionItem(lp,
menuOptionView, mActivity.getDeviceProfile());
- menuOptionView.setOnClickListener(view -> {
- if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
- RecentsView recentsView = mTaskView.getRecentsView();
- recentsView.switchToScreenshot(null,
- () -> recentsView.finishRecentsAnimation(true /* toRecents */,
- false /* shouldPip */,
- () -> menuOption.onClick(view)));
- } else {
- menuOption.onClick(view);
- }
- });
+ // Set an onClick listener on each menu option. The onClick method is responsible for
+ // ending LiveTile mode on the thumbnail if needed.
+ menuOptionView.setOnClickListener(menuOption::onClick);
mOptionLayout.addView(menuOptionView);
}
diff --git a/quickstep/src/com/android/quickstep/views/TaskMenuViewWithArrow.kt b/quickstep/src/com/android/quickstep/views/TaskMenuViewWithArrow.kt
index 06a5793..b586ac3 100644
--- a/quickstep/src/com/android/quickstep/views/TaskMenuViewWithArrow.kt
+++ b/quickstep/src/com/android/quickstep/views/TaskMenuViewWithArrow.kt
@@ -164,7 +164,7 @@
private fun addMenuOptions() {
// Add the options
TaskOverlayFactory
- .getEnabledShortcuts(taskView, mActivityContext.deviceProfile, taskContainer)
+ .getEnabledShortcuts(taskView, taskContainer)
.forEach { this.addMenuOption(it) }
// Add the spaces between items
diff --git a/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java b/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java
index d8120ff..69cad69 100644
--- a/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java
+++ b/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java
@@ -451,9 +451,8 @@
// Landscape vs portrait change.
// Note: Disable rotation in grid layout.
- boolean windowingModeSupportsRotation = !dp.isMultiWindowMode
- && thumbnailData.windowingMode == WINDOWING_MODE_FULLSCREEN
- && !dp.isTablet;
+ boolean windowingModeSupportsRotation =
+ thumbnailData.windowingMode == WINDOWING_MODE_FULLSCREEN && !dp.isTablet;
isOrientationDifferent = isOrientationChange(deltaRotate)
&& windowingModeSupportsRotation;
if (canvasWidth == 0 || canvasHeight == 0 || scale == 0) {
@@ -562,13 +561,8 @@
Rect splitScreenInsets = dp.getInsets();
if (!isRotated) {
// No Rotation
- if (dp.isMultiWindowMode) {
- mClippedInsets.offsetTo(splitScreenInsets.left * scale,
- splitScreenInsets.top * scale);
- } else {
- mClippedInsets.offsetTo(thumbnailClipHint.left * scale,
- thumbnailClipHint.top * scale);
- }
+ mClippedInsets.offsetTo(thumbnailClipHint.left * scale,
+ thumbnailClipHint.top * scale);
mMatrix.setTranslate(
-thumbnailClipHint.left * scale,
-thumbnailClipHint.top * scale);
@@ -587,16 +581,10 @@
}
mClippedInsets.left *= thumbnailScale;
mClippedInsets.top *= thumbnailScale;
-
- if (dp.isMultiWindowMode) {
- mClippedInsets.right = splitScreenInsets.right * scale * thumbnailScale;
- mClippedInsets.bottom = splitScreenInsets.bottom * scale * thumbnailScale;
- } else {
- mClippedInsets.right = Math.max(0,
- widthWithInsets - mClippedInsets.left - canvasWidth);
- mClippedInsets.bottom = Math.max(0,
- heightWithInsets - mClippedInsets.top - canvasHeight);
- }
+ mClippedInsets.right = Math.max(0,
+ widthWithInsets - mClippedInsets.left - canvasWidth);
+ mClippedInsets.bottom = Math.max(0,
+ heightWithInsets - mClippedInsets.top - canvasHeight);
mMatrix.postScale(thumbnailScale, thumbnailScale);
mIsOrientationChanged = isOrientationDifferent;
diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java
index d58bb7c..377467f 100644
--- a/quickstep/src/com/android/quickstep/views/TaskView.java
+++ b/quickstep/src/com/android/quickstep/views/TaskView.java
@@ -19,7 +19,6 @@
import static android.view.Display.DEFAULT_DISPLAY;
import static android.widget.Toast.LENGTH_SHORT;
-import static com.android.launcher3.AbstractFloatingView.TYPE_TASK_MENU;
import static com.android.launcher3.Utilities.comp;
import static com.android.launcher3.Utilities.getDescendantCoordRelativeToAncestor;
import static com.android.launcher3.anim.Interpolators.ACCEL_DEACCEL;
@@ -67,7 +66,6 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
-import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.R;
@@ -726,10 +724,6 @@
return;
}
- // Reset the minimized state since we force-toggled the minimized state when entering
- // overview, but never actually finished the recents animation
- SystemUiProxy.INSTANCE.get(getContext()).setSplitScreenMinimized(false);
-
mIsClickableAsLiveTile = false;
RemoteAnimationTargets targets;
if (remoteTargetHandles.length == 1) {
@@ -1343,7 +1337,7 @@
continue;
}
for (SystemShortcut s : TaskOverlayFactory.getEnabledShortcuts(this,
- mActivity.getDeviceProfile(), taskContainer)) {
+ taskContainer)) {
info.addAction(s.createAccessibilityAction(context));
}
}
@@ -1381,7 +1375,7 @@
continue;
}
for (SystemShortcut s : TaskOverlayFactory.getEnabledShortcuts(this,
- mActivity.getDeviceProfile(), taskContainer)) {
+ taskContainer)) {
if (s.hasHandlerForAction(action)) {
s.onClick(this);
return true;
@@ -1537,7 +1531,6 @@
}
public void initiateSplitSelect(SplitPositionOption splitPositionOption) {
- AbstractFloatingView.closeOpenViews(mActivity, false, TYPE_TASK_MENU);
getRecentsView().initiateSplitSelect(this, splitPositionOption.stagePosition);
}
@@ -1591,10 +1584,9 @@
}
mCurrentDrawnInsets.set(currentInsetsLeft, insets.top * fullscreenProgress,
currentInsetsRight, insetsBottom * fullscreenProgress);
- float fullscreenCornerRadius = dp.isMultiWindowMode ? 0 : mWindowCornerRadius;
mCurrentDrawnCornerRadius =
- Utilities.mapRange(fullscreenProgress, mCornerRadius, fullscreenCornerRadius)
+ Utilities.mapRange(fullscreenProgress, mCornerRadius, mWindowCornerRadius)
/ parentScale / taskViewScale;
// We scaled the thumbnail to fit the content (excluding insets) within task view width.
diff --git a/quickstep/tests/src/com/android/quickstep/OrientationTouchTransformerTest.java b/quickstep/tests/src/com/android/quickstep/OrientationTouchTransformerTest.java
index 9e5d958..1c15e1e 100644
--- a/quickstep/tests/src/com/android/quickstep/OrientationTouchTransformerTest.java
+++ b/quickstep/tests/src/com/android/quickstep/OrientationTouchTransformerTest.java
@@ -35,7 +35,6 @@
import android.util.ArrayMap;
import android.util.DisplayMetrics;
import android.util.Size;
-import android.view.Display;
import android.view.MotionEvent;
import android.view.Surface;
@@ -290,15 +289,17 @@
private DisplayController.Info createDisplayInfo(Size screenSize, int rotation) {
Point displaySize = new Point(screenSize.getWidth(), screenSize.getHeight());
RotationUtils.rotateSize(displaySize, rotation);
- CachedDisplayInfo cdi = new CachedDisplayInfo(displaySize, rotation);
- WindowBounds wm = new WindowBounds(
+ CachedDisplayInfo cachedDisplayInfo = new CachedDisplayInfo(displaySize, rotation);
+ WindowBounds windowBounds = new WindowBounds(
new Rect(0, 0, displaySize.x, displaySize.y),
new Rect());
WindowManagerProxy wmProxy = mock(WindowManagerProxy.class);
- doReturn(cdi).when(wmProxy).getDisplayInfo(any(), any());
- doReturn(wm).when(wmProxy).getRealBounds(any(), any(), any());
+ doReturn(cachedDisplayInfo).when(wmProxy).getDisplayInfo(any());
+ doReturn(windowBounds).when(wmProxy).getRealBounds(any(), any());
+ ArrayMap<CachedDisplayInfo, WindowBounds[]> internalDisplayBounds = new ArrayMap<>();
+ doReturn(internalDisplayBounds).when(wmProxy).estimateInternalDisplayBounds(any());
return new DisplayController.Info(
- getApplicationContext(), mock(Display.class), wmProxy, new ArrayMap<>());
+ getApplicationContext(), wmProxy, new ArrayMap<>());
}
private float generateTouchRegionHeight(Size screenSize, int rotation) {
diff --git a/quickstep/tests/src/com/android/quickstep/TaplTestsTaskbar.java b/quickstep/tests/src/com/android/quickstep/TaplTestsTaskbar.java
index ba93975..1df9c02 100644
--- a/quickstep/tests/src/com/android/quickstep/TaplTestsTaskbar.java
+++ b/quickstep/tests/src/com/android/quickstep/TaplTestsTaskbar.java
@@ -26,6 +26,7 @@
import com.android.launcher3.tapl.Taskbar;
import com.android.launcher3.ui.TaplTestsLauncher3;
+import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord;
import org.junit.After;
import org.junit.Assume;
@@ -85,6 +86,7 @@
}
@Test
+ @ScreenRecord // b/231615831
@PortraitLandscape
public void testLaunchAppInSplitscreen() throws Exception {
getTaskbar().getAppIcon(TEST_APP_NAME).dragToSplitscreen(
@@ -92,6 +94,7 @@
}
@Test
+ @ScreenRecord // b/231615831
@PortraitLandscape
public void testLaunchShortcutInSplitscreen() throws Exception {
getTaskbar().getAppIcon(TEST_APP_NAME)
@@ -120,6 +123,7 @@
}
@Test
+ @ScreenRecord // b/231615831
@PortraitLandscape
public void testLaunchAppInSplitscreen_FromTaskbarAllApps() throws Exception {
getTaskbar().openAllApps()
@@ -128,6 +132,7 @@
}
@Test
+ @ScreenRecord // b/231615831
@PortraitLandscape
public void testLaunchShortcutInSplitscreen_FromTaskbarAllApps() throws Exception {
getTaskbar().openAllApps()
diff --git a/quickstep/tests/src/com/android/quickstep/util/TaskViewSimulatorTest.java b/quickstep/tests/src/com/android/quickstep/util/TaskViewSimulatorTest.java
index 7d414f4..d43aafa 100644
--- a/quickstep/tests/src/com/android/quickstep/util/TaskViewSimulatorTest.java
+++ b/quickstep/tests/src/com/android/quickstep/util/TaskViewSimulatorTest.java
@@ -23,8 +23,6 @@
import android.graphics.Rect;
import android.graphics.RectF;
import android.util.ArrayMap;
-import android.util.Pair;
-import android.view.Display;
import android.view.Surface;
import android.view.SurfaceControl;
@@ -148,7 +146,7 @@
int rotation = mDisplaySize.x > mDisplaySize.y
? Surface.ROTATION_90 : Surface.ROTATION_0;
CachedDisplayInfo cdi =
- new CachedDisplayInfo("test-display", mDisplaySize, rotation , new Rect());
+ new CachedDisplayInfo(mDisplaySize, rotation, new Rect());
WindowBounds wm = new WindowBounds(
new Rect(0, 0, mDisplaySize.x, mDisplaySize.y),
mDisplayInsets);
@@ -164,15 +162,15 @@
}
WindowManagerProxy wmProxy = mock(WindowManagerProxy.class);
- doReturn(cdi).when(wmProxy).getDisplayInfo(any(), any());
- doReturn(wm).when(wmProxy).getRealBounds(any(), any(), any());
+ doReturn(cdi).when(wmProxy).getDisplayInfo(any());
+ doReturn(wm).when(wmProxy).getRealBounds(any(), any());
- ArrayMap<String, Pair<CachedDisplayInfo, WindowBounds[]>> perDisplayBoundsCache =
+ ArrayMap<CachedDisplayInfo, WindowBounds[]> perDisplayBoundsCache =
new ArrayMap<>();
- perDisplayBoundsCache.put(cdi.id, Pair.create(cdi.normalize(), allBounds));
+ perDisplayBoundsCache.put(cdi.normalize(), allBounds);
DisplayController.Info mockInfo = new Info(
- helper.sandboxContext, mock(Display.class), wmProxy, perDisplayBoundsCache);
+ helper.sandboxContext, wmProxy, perDisplayBoundsCache);
DisplayController controller =
DisplayController.INSTANCE.get(helper.sandboxContext);
diff --git a/res/layout/all_apps.xml b/res/layout/all_apps.xml
index 2ac7e63..d0d82d4 100644
--- a/res/layout/all_apps.xml
+++ b/res/layout/all_apps.xml
@@ -30,6 +30,10 @@
android:visibility="gone" />
<include
+ layout="@layout/search_results_rv_layout"
+ android:visibility="gone" />
+
+ <include
layout="@layout/all_apps_rv_layout"
android:visibility="gone" />
diff --git a/res/layout/all_apps_fast_scroller.xml b/res/layout/all_apps_fast_scroller.xml
index f6a6156..0f1d933 100644
--- a/res/layout/all_apps_fast_scroller.xml
+++ b/res/layout/all_apps_fast_scroller.xml
@@ -22,6 +22,7 @@
style="@style/FastScrollerPopup"
android:layout_alignParentEnd="true"
android:layout_alignTop="@+id/all_apps_header"
+ android:layout_marginTop="@dimen/all_apps_header_bottom_padding"
android:layout_marginEnd="@dimen/fastscroll_popup_margin" />
<com.android.launcher3.views.RecyclerViewFastScroller
@@ -31,6 +32,7 @@
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignTop="@+id/all_apps_header"
+ android:layout_marginTop="@dimen/all_apps_header_bottom_padding"
android:layout_marginEnd="@dimen/fastscroll_end_margin"
launcher:canThumbDetach="true" />
diff --git a/res/layout/search_results_rv_layout.xml b/res/layout/search_results_rv_layout.xml
new file mode 100644
index 0000000..567cb5f
--- /dev/null
+++ b/res/layout/search_results_rv_layout.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2022 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<com.android.launcher3.allapps.SearchRecyclerView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/search_results_list_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:clipToPadding="false"
+ android:descendantFocusability="afterDescendants"
+ android:focusable="true" />
diff --git a/res/layout/secondary_launcher.xml b/res/layout/secondary_launcher.xml
index 0fe05ee..635db14 100644
--- a/res/layout/secondary_launcher.xml
+++ b/res/layout/secondary_launcher.xml
@@ -60,6 +60,10 @@
android:visibility="gone" />
<include
+ layout="@layout/search_results_rv_layout"
+ android:visibility="gone" />
+
+ <include
layout="@layout/all_apps_rv_layout"
android:visibility="gone" />
diff --git a/res/layout/work_apps_edu.xml b/res/layout/work_apps_edu.xml
index f3b3053..eeb7f4f 100644
--- a/res/layout/work_apps_edu.xml
+++ b/res/layout/work_apps_edu.xml
@@ -16,8 +16,8 @@
<com.android.launcher3.allapps.WorkEduCard xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/work_edu_card_margin"
- android:layout_marginBottom="@dimen/work_edu_card_bottom_margin"
+ android:paddingTop="@dimen/work_edu_card_margin"
+ android:paddingBottom="@dimen/work_edu_card_bottom_margin"
android:gravity="center">
<RelativeLayout
android:layout_width="match_parent"
@@ -56,6 +56,7 @@
android:layout_height="@dimen/x_icon_size"
android:layout_gravity="center"
android:padding="@dimen/x_icon_padding"
+ android:contentDescription="@string/accessibility_close"
android:src="@drawable/ic_remove_no_shadow" />
</FrameLayout>
</RelativeLayout>
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index c46ac22..55139b3 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Skakel programkennisgewings vir <xliff:g id="NAME">%1$s</xliff:g> aan om kennisgewingkolle te sien"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Verander instellings"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Wys kennisgewingkolle"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Ontwikkelaaropsies"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Voeg programikone by tuisskerm"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Vir nuwe programme"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Onbekend"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Onderbreek werkprogramme"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Skakel werkprogramme aan"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filter"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Deursoek jou foon"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Deursoek jou tablet"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Misluk: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index 5f918e4..6b6147b 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"የማሳወቂያ ነጥቦችን ለማሳየት የመተግብሪያ ማሳወቂያዎችን ለ<xliff:g id="NAME">%1$s</xliff:g> ያብሩ"</string>
<string name="title_change_settings" msgid="1376365968844349552">"ቅንብሮችን ቀይር"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"የማሳወቂያ ነጥቦችን አሳይ"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"የገንቢ አማራጮች"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"የመተግበሪያ አዶዎችን ወደ መነሻ ገጹ ያክሉ"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"ለአዲስ መተግበሪያዎች"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"የማይታወቅ"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"የሥራ መተግበሪያዎችን ባሉበት አቁም"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"የሥራ መተግበሪያዎችን ያብሩ"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"አጣራ"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"ስልክዎን ይፈልጉ"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"ጡባዊዎን ይፈልጉ"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"አልተሳካም፦ <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index 6f67089..0e48179 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"لعرض نقاط الإشعارات، يجب تفعيل إشعارات التطبيق في <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"تغيير الإعدادات"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"عرض نقاط الإشعارات"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"خيارات المطوّرين"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"إضافة رموز التطبيقات إلى الشاشة الرئيسية"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"للتطبيقات الجديدة"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"غير معروفة"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"إيقاف تطبيقات العمل مؤقتًا"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"تفعيل تطبيقات العمل"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"فلتر"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"البحث في هاتفك"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"البحث في جهازك اللوحي"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"تعذَّر <xliff:g id="WHAT">%1$s</xliff:g>."</string>
</resources>
diff --git a/res/values-as/strings.xml b/res/values-as/strings.xml
index e2f9ef4..5fc8ca6 100644
--- a/res/values-as/strings.xml
+++ b/res/values-as/strings.xml
@@ -171,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"কৰ্মস্থানৰ এপ্ পজ কৰক"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"কৰ্মস্থানৰ এপ্সমূহ অন কৰক"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"ফিল্টাৰ"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"আপোনাৰ ফ’নৰ বস্তু সন্ধান কৰক"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"আপোনাৰ টেবলেটৰ বস্তু সন্ধান কৰক"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"বিফল: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-az/strings.xml b/res/values-az/strings.xml
index 9468bc3..ad72424 100644
--- a/res/values-az/strings.xml
+++ b/res/values-az/strings.xml
@@ -171,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"İş tətbiqlərini durdurun"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"İş tətbiqlərini aktiv edin"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtr"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Telefonunuzu axtarın"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Planşetinizi axtarın"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Alınmadı: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-b+sr+Latn/strings.xml b/res/values-b+sr+Latn/strings.xml
index 47ba178..d7e85d9 100644
--- a/res/values-b+sr+Latn/strings.xml
+++ b/res/values-b+sr+Latn/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Da biste prikazali tačke za obaveštenja, uključite obaveštenja za aplikaciju <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Promenite podešavanja"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Prikazuj tačke za obaveštenja"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Opcije za programera"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Dodaj ikone aplikacija na početni ekran"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Za nove aplikacije"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Nepoznato"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Pauziraj poslovne aplikacije"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Uključi poslovne aplikacije"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filter"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Pretražite telefon"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Pretražite tablet"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Nije uspelo: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-be/strings.xml b/res/values-be/strings.xml
index ba2a474..a845f9a 100644
--- a/res/values-be/strings.xml
+++ b/res/values-be/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Каб паказваліся значкі апавяшчэнняў, уключыце апавяшчэнні праграм для <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Змяніць налады"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Паказваць значкі апавяшчэнняў"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Параметры распрацоўшчыка"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Дадаваць значкі праграм на галоўны экран"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Для новых праграм"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Невядома"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Прыпыніць працоўныя праграмы"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Уключыць працоўныя праграмы"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Фільтр"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Пошук на тэлефоне"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Пошук на планшэце"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Не ўдалося: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index 142aea3..0c7fcd3 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"За да се показват точки за известия, включете известията за приложението <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Промяна на настройките"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Показване на точките за известия"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Опции за програмисти"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Добавяне на икони на приложения на началния екран"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"За нови приложения"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Няма информация"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Поставяне на пауза на служебните приложения"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Включване на служебните приложения"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Филтър"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Търсене в телефона ви"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Търсене в таблета ви"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Неуспешно: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-bn/strings.xml b/res/values-bn/strings.xml
index 31f80d1..5c8c342 100644
--- a/res/values-bn/strings.xml
+++ b/res/values-bn/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"বিজ্ঞপ্তির ডটগুলি দেখানোর জন্য, <xliff:g id="NAME">%1$s</xliff:g> এর অ্যাপ বিজ্ঞপ্তি চালু করুন"</string>
<string name="title_change_settings" msgid="1376365968844349552">"সেটিংস পরিবর্তন করুন"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"বিজ্ঞপ্তির ডট দেখুন"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"ডেভেলপার বিকল্প"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"হোম স্ক্রিনে অ্যাপের আইকন যোগ করুন"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"নতুন অ্যাপের জন্য"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"অজানা"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"অফিসের অ্যাপ পজ করুন"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"অফিস অ্যাপ চালু করুন"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"ফিল্টার"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"ফোনে সার্চ করে দেখুন"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"আপনার ট্যাবলেটে সার্চ করুন"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"কাজটি করা যায়নি: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-bs/strings.xml b/res/values-bs/strings.xml
index df29779..173518f 100644
--- a/res/values-bs/strings.xml
+++ b/res/values-bs/strings.xml
@@ -114,7 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Za prikaz tačaka za obavještenja, uključite obavještenja za aplikacije za aplikaciju <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Promijeni postavke"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Prikaži tačke za obavještenja"</string>
- <string name="developer_options_title" msgid="700788437593726194">"Opcije za razvojne programere"</string>
+ <string name="developer_options_title" msgid="700788437593726194">"Opcije za programere"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Dodaj ikone aplikacija na početni ekran"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Za nove aplikacije"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Nepoznato"</string>
@@ -171,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Pauziraj poslovne aplikacije"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Uključi poslovne aplikacije"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtrirajte"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Pretražite telefon"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Pretražite tablet"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Nije uspjelo: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 8473997..e6a4af2 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Per veure els punts de notificació, activa les notificacions de l\'aplicació <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Canvia la configuració"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Mostra els punts de notificació"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Opcions per a desenvolupadors"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Afegeix icones d\'aplicacions a la pantalla d\'inici"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Per a les aplicacions noves"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Desconegut"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Posa en pausa les aplicacions de treball"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Activa les aplicacions de treball"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtra"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Cerca al telèfon"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Cerca a la tauleta"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Error: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index f31fc81..8b3ef2d 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Chcete-li zobrazovat puntíky s oznámením, zapněte oznámení z aplikace <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Změnit nastavení"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Zobrazovat puntíky s oznámením"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Pro vývojáře"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Přidávat na plochu ikony aplikací"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"U nových aplikací"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Neznámé"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Pozastavit pracovní aplikace"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Zapnout pracovní aplikace"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtr"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Prohledávání telefonu"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Vyhledávat na tabletu"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Selhalo: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index 0d39cfb..8160465 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Hvis du vil se notifikationsprikker, skal du aktivere appnotifikationer for <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Skift indstillinger"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Vis notifikationsprikker"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Indstillinger for udviklere"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Føj appikoner til startskærmen"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"For nye apps"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Ukendt"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Sæt arbejdsapps på pause"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Aktivér arbejdsapps"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filter"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Søg på din telefon"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Søg på din tablet"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Mislykket: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index b2048b4..912e7fa 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Um dir Benachrichtigungspunkte anzeigen zu lassen, aktiviere die Benachrichtigungen für die App \"<xliff:g id="NAME">%1$s</xliff:g>\""</string>
<string name="title_change_settings" msgid="1376365968844349552">"Einstellungen ändern"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"App-Benachrichtigungspunkte anzeigen"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Entwickleroptionen"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"App-Symbole zum Startbildschirm hinzufügen"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Bei neuen Apps"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Unbekannt"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Geschäftliche Apps pausieren"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Geschäftliche Apps aktivieren"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filter"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Auf dem Smartphone suchen"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Auf dem Tablet suchen"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Fehler: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index a2bc2a9..0f613de 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Για να εμφανιστούν οι Κουκκίδες ειδοποίησης, ενεργοποιήστε τις κουκκίδες εφαρμογής για την εφαρμογή <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Αλλαγή ρυθμίσεων"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Εμφάνιση κουκκίδων ειδοποιήσεων"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Επιλογές για προγραμματιστές"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Προσθήκη εικονιδίων εφαρμογών στην αρχική οθόνη"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Για νέες εφαρμογές"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Άγνωστο"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Παύση εφαρμογών εργασιών"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Ενεργοποίηση εφαρμογών εργασίας"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Φίλτρο"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Αναζήτηση στο τηλέφωνό σας"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Αναζήτηση στο tablet σας"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Αποτυχία: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-en-rAU/strings.xml b/res/values-en-rAU/strings.xml
index 815acaa..a78c7f8 100644
--- a/res/values-en-rAU/strings.xml
+++ b/res/values-en-rAU/strings.xml
@@ -171,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Pause work apps"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Turn on work apps"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filter"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Search your phone"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Search your tablet"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Failed: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-en-rCA/strings.xml b/res/values-en-rCA/strings.xml
index 815acaa..a78c7f8 100644
--- a/res/values-en-rCA/strings.xml
+++ b/res/values-en-rCA/strings.xml
@@ -171,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Pause work apps"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Turn on work apps"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filter"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Search your phone"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Search your tablet"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Failed: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index 815acaa..a78c7f8 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -171,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Pause work apps"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Turn on work apps"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filter"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Search your phone"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Search your tablet"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Failed: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml
index 815acaa..a78c7f8 100644
--- a/res/values-en-rIN/strings.xml
+++ b/res/values-en-rIN/strings.xml
@@ -171,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Pause work apps"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Turn on work apps"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filter"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Search your phone"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Search your tablet"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Failed: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-en-rXC/strings.xml b/res/values-en-rXC/strings.xml
index 1b00f9a..d6951ad 100644
--- a/res/values-en-rXC/strings.xml
+++ b/res/values-en-rXC/strings.xml
@@ -171,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Pause work apps"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Turn on work apps"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filter"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Search your phone"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Search your tablet"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Failed: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 5819d6c..3897974 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Para mostrar los puntos de notificación, activa las notificaciones de la app para <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Cambiar la configuración"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Mostrar puntos de notificación"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Opciones para desarrolladores"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Agrega íconos de las apps a la pantalla principal"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Para nuevas apps"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Desconocido"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Detener apps de trabajo"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Activar las apps de trabajo"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtro"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Busca tu teléfono"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Busca tu tablet"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Error: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 8cd84c1..823e5a7 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Para mostrar puntos de notificación, activa las notificaciones de <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Cambiar ajustes"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Mostrar puntos de notificación"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Opciones para desarrolladores"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Añadir iconos de aplicaciones a la pantalla de inicio"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Añade el icono de una aplicación nueva instalada a la pantalla de inicio"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Desconocido"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Pausar aplicaciones de trabajo"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Activar aplicaciones de trabajo"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtro"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Busca en tu teléfono"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Busca en tu tablet"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Se ha producido un error: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-et/strings.xml b/res/values-et/strings.xml
index 325a537..bd2190a 100644
--- a/res/values-et/strings.xml
+++ b/res/values-et/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Märguandetäppide kuvamiseks lülitage sisse rakenduse <xliff:g id="NAME">%1$s</xliff:g> märguanded"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Seadete muutmine"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Kuva märguandetäpid"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Arendaja valikud"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Lisa rakenduste ikoonid avakuvale"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Uute rakenduste puhul"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Teadmata"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Peata töörakendused"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Lülita töörakendused sisse"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filter"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Otsimine telefonist"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Otsimine tahvelarvutist"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Nurjus: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-eu/strings.xml b/res/values-eu/strings.xml
index 556dd72..c1eaea8 100644
--- a/res/values-eu/strings.xml
+++ b/res/values-eu/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Jakinarazpen-biribiltxoak ikusteko, aktibatu <xliff:g id="NAME">%1$s</xliff:g> aplikazioaren jakinarazpenak"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Aldatu ezarpenak"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Erakutsi jakinarazpen-biribiltxoak"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Garatzaileentzako aukerak"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Gehitu aplikazioen ikonoak hasierako pantailan"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Aplikazio berrien kasuan"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Ezezaguna"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Pausatu laneko aplikazioak"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Aktibatu laneko aplikazioak"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Iragazi"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Bilatu telefonoan"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Bilatu tabletan"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Huts egin du: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index 392af2d..d23eac2 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -161,15 +161,17 @@
<string name="all_apps_personal_tab" msgid="4190252696685155002">"شخصی"</string>
<string name="all_apps_work_tab" msgid="4884822796154055118">"کاری"</string>
<string name="work_profile_toggle_label" msgid="3081029915775481146">"نمایه کاری"</string>
- <string name="work_profile_edu_work_apps" msgid="7895468576497746520">"برنامههای کاری دارای نشان هستند و سرپرست سیستم میتواند آنها را ببیند"</string>
+ <string name="work_profile_edu_work_apps" msgid="7895468576497746520">"برنامههای کاری نشاندار هستند و سرپرست فناوری اطلاعات میتواند آنها را ببیند"</string>
<string name="work_profile_edu_accept" msgid="6069788082535149071">"متوجهام"</string>
<string name="work_apps_paused_title" msgid="3040901117349444598">"برنامههای کاری موقتاً متوقف شدهاند."</string>
<string name="work_apps_paused_body" msgid="261634750995824906">"برنامههای کاری نمیتوانند برای شما اعلان ارسال کنند، از باتری استفاده کنند، یا به مکانتان دسترسی داشته باشند"</string>
<string name="work_apps_paused_content_description" msgid="5149623040804051095">"برنامههای کاری خاموش است. برنامههای کاری نمیتوانند برای شما اعلان ارسال کنند، از باتری استفاده کنند، یا به مکانتان دسترسی داشته باشند"</string>
- <string name="work_apps_paused_edu_banner" msgid="8872412121608402058">"برنامههای کاری دارای نشان هستند و سرپرست سیستم میتواند آنها را ببیند."</string>
+ <string name="work_apps_paused_edu_banner" msgid="8872412121608402058">"برنامههای کاری نشاندار هستند و سرپرست فناوری اطلاعات میتواند آنها را ببیند."</string>
<string name="work_apps_paused_edu_accept" msgid="6377476824357318532">"متوجهام"</string>
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"توقف موقت برنامههای کاری"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"روشن کردن برنامههای کاری"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"فیلتر"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"جستجوی تلفن"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"جستجوی رایانه لوحی"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"ناموفق بود: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index d480999..ccc22f0 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"<xliff:g id="NAME">%1$s</xliff:g> tarvitsee ilmoitusten käyttöoikeuden, jotta pistemerkkejä voidaan näyttää."</string>
<string name="title_change_settings" msgid="1376365968844349552">"Muuta asetuksia"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Näytä ilmoituksista kertovat pistemerkit"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Kehittäjäasetukset"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Lisää sovelluskuvakkeet aloitusnäytölle"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Uusille sovelluksille"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Tuntematon"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Keskeytä työsovellusten käyttö"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Laita työsovellukset päälle"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Suodatin"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Hae puhelimesta"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Hae tabletilta"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Epäonnistui: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml
index 03ff1c4..11bcae1 100644
--- a/res/values-fr-rCA/strings.xml
+++ b/res/values-fr-rCA/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Pour afficher les points de notification, activez les notifications d\'application pour <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Modifier les paramètres"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Afficher les points de notification"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Options pour les développeurs"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Ajouter les icônes des applications à l\'écran d\'accueil"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Pour les nouvelles applications"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Inconnu"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Mettre en pause les applications professionnelles"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Activer les applications professionnelles"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtrer"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Rechercher sur votre téléphone"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Rechercher sur votre tablette"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Échec : <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 59a0e73..9b30b1e 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Pour afficher les pastilles de notification, activez les notifications de l\'application <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Modifier les paramètres"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Afficher les pastilles de notification"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Options pour les développeurs"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Ajouter les icônes des applications à l\'écran d\'accueil"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Pour les nouvelles applications"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Inconnu"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Mettre en pause les applis professionnelles"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Activer les applications professionnelles"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtre"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Rechercher sur votre téléphone"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Rechercher sur votre tablette"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Échec : <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-gl/strings.xml b/res/values-gl/strings.xml
index 23bda26..013011a 100644
--- a/res/values-gl/strings.xml
+++ b/res/values-gl/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Para que se mostren os puntos de notificacións, activa as notificacións da aplicación <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Cambiar configuración"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Mostra puntos de notificacións"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Opcións de programador"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Engadir iconas de aplicacións á pantalla de inicio"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Para novas aplicacións"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Descoñecido"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Pór en pausa aplicacións do traballo"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Activar aplicacións do traballo"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtra"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Buscar no teléfono"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Facer buscas na tableta"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Erro: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-gu/strings.xml b/res/values-gu/strings.xml
index e527736..2d504e3 100644
--- a/res/values-gu/strings.xml
+++ b/res/values-gu/strings.xml
@@ -102,7 +102,7 @@
<string name="folder_name_format_exact" msgid="8626242716117004803">"ફોલ્ડર: <xliff:g id="NAME">%1$s</xliff:g>, <xliff:g id="SIZE">%2$d</xliff:g> આઇટમ"</string>
<string name="folder_name_format_overflow" msgid="4270108890534995199">"ફોલ્ડર: <xliff:g id="NAME">%1$s</xliff:g>, <xliff:g id="SIZE">%2$d</xliff:g> કે વધુ આઇટમ"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"વૉલપેપર"</string>
- <string name="styles_wallpaper_button_text" msgid="8216961355289236794">"વૉલપેપર અને શૈલી"</string>
+ <string name="styles_wallpaper_button_text" msgid="8216961355289236794">"વૉલપેપર અને સ્ટાઇલ"</string>
<string name="settings_button_text" msgid="8873672322605444408">"હોમ સેટિંગ"</string>
<string name="msg_disabled_by_admin" msgid="6898038085516271325">"તમારા વ્યવસ્થાપક દ્વારા અક્ષમ કરેલ"</string>
<string name="allow_rotation_title" msgid="7222049633713050106">"હોમ સ્ક્રીનને ફેરવવાની મંજૂરી આપો"</string>
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"નોટિફિકેશન માટેનું ચિહ્ન બતાવવા હેતુ, <xliff:g id="NAME">%1$s</xliff:g> માટેની ઍપ્લિકેશન નોટિફિકેશન ચાલુ કરો"</string>
<string name="title_change_settings" msgid="1376365968844349552">"સેટિંગ બદલો"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"નોટિફિકેશન માટેના ચિહ્ન બતાવો"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"ડેવલપરના વિકલ્પો"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"ઍપના આઇકન હોમ સ્ક્રીનમાં ઉમેરો"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"નવી ઍપ માટે"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"અજાણ્યો"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"ઑફિસની ઍપ થોભાવો"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"ઑફિસ માટેની ઍપ ચાલુ કરો"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"ફિલ્ટર કરો"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"તમારો ફોન શોધો"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"તમારું ટૅબ્લેટ શોધો"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"નિષ્ફળ: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index 9869b9e..de6ad1c 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"सूचना बिंदु दिखाने के लिए, <xliff:g id="NAME">%1$s</xliff:g> के ऐप्लिकेशन सूचना चालू करें"</string>
<string name="title_change_settings" msgid="1376365968844349552">"सेटिंग बदलें"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"नई सूचनाएं बताने वाला गोल निशान दिखाएं"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"डेवलपर के लिए सेटिंग और टूल"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"होम स्क्रीन पर ऐप्लिकेशन के आइकॉन जोड़ें"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"नए ऐप्लिकेशन के लिए"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"अज्ञात"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"ऑफ़िस के काम से जुड़े ऐप्लिकेशन रोकें"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"ऑफ़िस के काम से जुड़े ऐप्लिकेशन चालू करें"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"फ़िल्टर"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"अपने फ़ोन में खोजें"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"अपने टैबलेट में खोजें"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"पूरा नहीं हुआ: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index 396da1c..0e58e53 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -171,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Pauziraj poslovne aplikacije"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Uključite poslovne aplikacije"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtrirajte"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Pretraživanje telefona"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Pretraživanje tableta"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Nije uspjelo: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index e12b227..30095d7 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Az értesítési pöttyök megjelenítéséhez kapcsolja be a(z) <xliff:g id="NAME">%1$s</xliff:g> alkalmazás értesítéseit"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Beállítások módosítása"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Értesítési pöttyök megjelenítése"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Fejlesztői beállítások"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Alkalmazásikonok hozzáadása a kezdőképernyőhöz"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Új alkalmazásoknál"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Ismeretlen"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Munkahelyi alkalmazások szüneteltetése"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Munkahelyi alkalmazások bekapcsolása"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Szűrő"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Keresés a telefonon"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Keresés a táblagépen"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Sikertelen: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-hy/strings.xml b/res/values-hy/strings.xml
index 97c2fa9..3b9761f 100644
--- a/res/values-hy/strings.xml
+++ b/res/values-hy/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Ծանուցումների կետիկները ցուցադրելու համար միացրեք ծանուցումները <xliff:g id="NAME">%1$s</xliff:g>-ի համար"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Փոխել կարգավորումները"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Ցուցադրել ծանուցումների կետիկները"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Մշակողի ընտրանքներ"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Ավելացնել պատկերակները հիմնական էկրանին"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Նոր հավելվածների համար"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Անհայտ է"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Դադարեցնել աշխատանքային հավելվածները"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Միացնել աշխատանքային հավելվածները"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Զտեք"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Որոնում հեռախոսում"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Որոնում պլանշետում"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Չհաջողվեց կատարել գործողությունը (<xliff:g id="WHAT">%1$s</xliff:g>)"</string>
</resources>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index 9c93fb3..02f4860 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Guna menampilkan Titik Notifikasi, aktifkan notifikasi aplikasi untuk <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Ubah setelan"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Tampilkan titik notifikasi"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Opsi Developer"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Tambahkan ikon aplikasi ke layar utama"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Untuk aplikasi baru"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Tidak dikenal"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Jeda aplikasi kerja"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Aktifkan aplikasi kerja"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filter"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Telusuri di ponsel"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Telusuri di tablet"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Gagal: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-is/strings.xml b/res/values-is/strings.xml
index dd0d559..17cf2e4 100644
--- a/res/values-is/strings.xml
+++ b/res/values-is/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Til að sýna tilkynningarpunkta skaltu kveikja á forritstilkynningum fyrir <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Breyta stillingum"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Sýna tilkynningapunkta"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Forritunarkostir"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Bæta forritatáknum við heimaskjáinn"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Fyrir ný forrit"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Óþekkt"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Setja vinnuforrit í bið"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Kveikja á vinnuforritum"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Sía"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Leita í símanum"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Leita í spjaldtölvunni"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Mistókst: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index b552045..edff814 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Per mostrare gli indicatori di notifica, attiva le notifiche per l\'app <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Modifica impostazioni"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Mostra indicatori di notifica"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Opzioni sviluppatore"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Aggiungi icone delle app alla schermata Home"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Per le nuove app"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Sconosciuto"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Metti in pausa le app di lavoro"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Attiva app di lavoro"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtra"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Ricerche sul telefono"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Ricerche sul tablet"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Operazione non riuscita: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index 6608118..7de8f08 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"כדי להציג את סימני ההתראות,יש להפעיל התראות מהאפליקציה <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"שינוי ההגדרות"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"הצגת סימני ההתראות"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"אפשרויות למפתחים"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"הוספת סמלי אפליקציות למסך הבית"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"לאפליקציות חדשות"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"לא ידוע"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"השהיית האפליקציות לעבודה"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"הפעלה של אפליקציות לעבודה"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"סינון"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"חיפוש בטלפון"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"חיפוש בטאבלט"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"הפעולה נכשלה: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index 01663f5..d7cbb07 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"通知ドットを表示するには、「<xliff:g id="NAME">%1$s</xliff:g>」のアプリ通知を ON にしてください"</string>
<string name="title_change_settings" msgid="1376365968844349552">"設定を変更"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"通知ドットの表示"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"開発者向けオプション"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"ホーム画面にアプリのアイコンを追加"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"新しいアプリをダウンロードしたときに自動で追加します"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"不明"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"仕事用アプリを一時停止"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"仕事用アプリを ON にする"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"フィルタ"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"スマートフォンの検索"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"タブレットを探す"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"失敗: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-ka/strings.xml b/res/values-ka/strings.xml
index ecac22d..ba5be87 100644
--- a/res/values-ka/strings.xml
+++ b/res/values-ka/strings.xml
@@ -171,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"სამსახურის აპების დაპაუზება"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"სამსახურის აპების ჩართვა"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"ფილტრი"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"მოიძიეთ თქვენს ტელეფონში"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"ძიება თქვენს ტაბლეტში"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"ვერ მოხერხდა: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-kk/strings.xml b/res/values-kk/strings.xml
index 4a5fb6b..83b5a66 100644
--- a/res/values-kk/strings.xml
+++ b/res/values-kk/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Хабарландыру белгілерін көрсету үшін <xliff:g id="NAME">%1$s</xliff:g> қолданбасының қолданба хабарландыруларын қосыңыз"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Параметрлерді өзгерту"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Хабарландыру белгілерін көрсету"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Әзірлеуші опциялары"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Қолданба белгішелерін негізгі экранға қосу"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Жаңа қолданбаларға арналған"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Белгісіз"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Жұмыс қолданбаларын тоқтата тұру"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Жұмыс қолданбаларын қосу"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Сүзгі"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Телефоннан іздеу"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Планшеттен іздеу"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Қате шықты: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-km/strings.xml b/res/values-km/strings.xml
index 8e3dfc1..73ec4df 100644
--- a/res/values-km/strings.xml
+++ b/res/values-km/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"ដើម្បីបង្ហាញស្លាកជូនដំណឹង សូមបើកការជូនដំណឹងកម្មវិធីសម្រាប់ <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"ប្ដូរការកំណត់"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"បង្ហាញស្លាកជូនដំណឹង"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"ជម្រើសសម្រាប់អ្នកអភិវឌ្ឍន៍"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"បញ្ចូលរូបកម្មវិធីទៅក្នុងអេក្រង់ដើម"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"សម្រាប់កម្មវិធីថ្មី"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"មិនស្គាល់"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"ផ្អាកកម្មវិធីការងារ"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"បើកកម្មវិធីការងារ"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"តម្រង"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"ស្វែងរកក្នុងទូរសព្ទរបស់អ្នក"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"ស្វែងរកក្នុងថេប្លេតរបស់អ្នក"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"បានបរាជ័យ៖ <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-kn/strings.xml b/res/values-kn/strings.xml
index 4f8d5d6..1e6f39e 100644
--- a/res/values-kn/strings.xml
+++ b/res/values-kn/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"ಅಧಿಸೂಚನೆ ಚುಕ್ಕೆಗಳನ್ನು ತೋರಿಸಲು, <xliff:g id="NAME">%1$s</xliff:g> ಗೆ ಅಪ್ಲಿಕೇಶನ್ ಅಧಿಸೂಚನೆಗಳನ್ನು ಆನ್ ಮಾಡಿ"</string>
<string name="title_change_settings" msgid="1376365968844349552">"ಸೆಟ್ಟಿಂಗ್ಗಳನ್ನು ಬದಲಾಯಿಸಿ"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"ಅಧಿಸೂಚನೆ ಡಾಟ್ಗಳನ್ನು ತೋರಿಸಿ"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"ಡೆವಲಪರ್ ಆಯ್ಕೆಗಳು"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"ಹೋಮ್ ಸ್ಕ್ರೀನ್ಗೆ ಆ್ಯಪ್ ಐಕಾನ್ಗಳನ್ನು ಸೇರಿಸಿ"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"ಹೊಸ ಅಪ್ಲಿಕೇಶನ್ಗಳಿಗೆ"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"ಅಪರಿಚಿತ"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"ಕೆಲಸಕ್ಕೆ ಸಂಬಂಧಿಸಿದ ಆ್ಯಪ್ಗಳನ್ನು ವಿರಾಮಗೊಳಿಸಿ"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"ಕೆಲಸಕ್ಕೆ ಸಂಬಂಧಿಸಿದ ಆ್ಯಪ್ಗಳನ್ನು ಆನ್ ಮಾಡಿ"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"ಫಿಲ್ಟರ್"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"ನಿಮ್ಮ ಫೋನ್ ಅನ್ನು ಹುಡುಕಿ"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"ನಿಮ್ಮ ಟ್ಯಾಬ್ಲೆಟ್ ಅನ್ನು ಹುಡುಕಿ"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"ವಿಫಲವಾಗಿದೆ: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 903c0f9..d5ec664 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"알림 표시점을 표시하려면 <xliff:g id="NAME">%1$s</xliff:g>의 앱 알림을 사용 설정하세요."</string>
<string name="title_change_settings" msgid="1376365968844349552">"설정 변경"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"알림 표시 점 보기"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"개발자 옵션"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"홈 화면에 앱 아이콘 추가"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"새로 설치한 앱에 적용"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"알 수 없음"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"직장 앱 일시중지"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"직장 앱 사용 설정"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"필터"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"휴대전화 속 항목 검색"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"태블릿 속 항목 검색"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"실패: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-ky/strings.xml b/res/values-ky/strings.xml
index 0982675..ea4a7d2 100644
--- a/res/values-ky/strings.xml
+++ b/res/values-ky/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Эскертме белгилерин көрсөтүү максатында, <xliff:g id="NAME">%1$s</xliff:g> үчүн колдонмонун билдирмелерин күйгүзүү керек"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Параметрлерди өзгөртүү"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Билдирмелер белгилерин көрсөтүү"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Иштеп чыгуучунун параметрлери"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Колдонмонун сүрөтчөсүн башкы экранга кошуу"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Жаңы колдонмолор үчүн"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Белгисиз"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Жумуш колдонмолорун тындыруу"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Жумуш колдонмолорун күйгүзүү"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Чыпкалоо"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Телефондо издөө"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Планшетте издөө"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Аткарылган жок: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-lo/strings.xml b/res/values-lo/strings.xml
index 6ddeb7a..7291cf2 100644
--- a/res/values-lo/strings.xml
+++ b/res/values-lo/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"ເພື່ອສະແດງຈຸດການແຈ້ງເຕືອນ, ໃຫ້ເປີດການແຈ້ງເຕືອນສຳລັບ <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"ບັນທຶກການຕັ້ງຄ່າ"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"ສະແດງຈຸດການແຈ້ງເຕືອນ"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"ຕົວເລືອກນັກພັດທະນາ"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"ເພີ່ມໄອຄອນແອັບໄປໃສ່ໂຮມສະກຣີນ"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"ສຳລັບແອັບໃໝ່"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"ບໍ່ຮູ້ຈັກ"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"ຢຸດແອັບບ່ອນເຮັດວຽກຊົ່ວຄາວ"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"ເປີດໃຊ້ແອັບບ່ອນເຮັດວຽກ"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"ກັ່ນຕອງ"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"ຊອກຫາໂທລະສັບຂອງທ່ານ"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"ຊອກຫາແທັບເລັດຂອງທ່ານ"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"ບໍ່ສຳເລັດ: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index 9099b66..ddff9d4 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Kad būtų rodomi pranešimų taškai, įjunkite programos „<xliff:g id="NAME">%1$s</xliff:g>“ pranešimus."</string>
<string name="title_change_settings" msgid="1376365968844349552">"Keisti nustatymus"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Rodyti pranešimų taškus"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Kūrėjo parinktys"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Pridėti programų piktogramas pagrindiniame ekrane"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Skirta naujoms programoms"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Nežinoma"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Pristabdyti darbo programas"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Įjungti darbo programas"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtruoti"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Paieška telefone"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Paieška planšetiniame kompiuteryje"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Nepavyko: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index 456b76e..a5b7c66 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Lai tiktu rādīti paziņojumu punkti, ieslēdziet paziņojumus lietotnei <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="title_change_settings" msgid="1376365968844349552">"Mainīt iestatījumus"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Rādīt paziņojumu punktus"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Izstrādātāju opcijas"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Pievienot lietotņu ikonas sākuma ekrānam"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Jaunām lietotnēm"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Nezināma"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Pārtraukt darba lietotņu darbību"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Ieslēgt darba lietotnes"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtrs"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Meklēšana tālrunī"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Meklēšana planšetdatorā"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Neizdevās: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-mk/strings.xml b/res/values-mk/strings.xml
index 7f71281..32c3fc0 100644
--- a/res/values-mk/strings.xml
+++ b/res/values-mk/strings.xml
@@ -171,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Паузирај ги работните апликации"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Вклучете ги работните апликации"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Филтер"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Пребарувајте на телефонот"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Пребарувајте на таблетот"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Не успеа: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-ml/strings.xml b/res/values-ml/strings.xml
index 4b0fbe6..d25f9dd 100644
--- a/res/values-ml/strings.xml
+++ b/res/values-ml/strings.xml
@@ -171,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"ഔദ്യോഗിക ആപ്പുകൾ താൽക്കാലികമായി നിർത്തുക"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"ഔദ്യോഗിക ആപ്പുകൾ ഓണാക്കുക"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"ഫിൽട്ടർ ചെയ്യുക"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"നിങ്ങളുടെ ഫോണിലുള്ളവ തിരയുക"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"നിങ്ങളുടെ ടാബ്ലെറ്റിലുള്ളവ തിരയുക"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"പരാജയപ്പെട്ടു: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-mn/strings.xml b/res/values-mn/strings.xml
index c720052..0723c25 100644
--- a/res/values-mn/strings.xml
+++ b/res/values-mn/strings.xml
@@ -171,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Ажлын аппуудыг түр зогсоох"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Ажлын аппуудыг асаах"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Шүүлтүүр"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Утаснаасаа хайх"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Таблетнаасаа хайх"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Амжилтгүй болсон: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-mr/strings.xml b/res/values-mr/strings.xml
index c76c466..06c1da7 100644
--- a/res/values-mr/strings.xml
+++ b/res/values-mr/strings.xml
@@ -171,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Work apps थांबवा"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"कार्य ॲप्स सुरू करा"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"फिल्टर"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"तुमच्या फोनमध्ये शोधा"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"तुमच्या टॅबलेटमध्ये शोधा"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"हे करता आले नाही: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-ms/strings.xml b/res/values-ms/strings.xml
index 08ce5cf..d123d14 100644
--- a/res/values-ms/strings.xml
+++ b/res/values-ms/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Untuk menunjukkan Titik Pemberitahuan, hidupkan pemberitahuan apl untuk <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Tukar tetapan"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Tunjukkan titik pemberitahuan"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Pilihan Pembangun"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Tambahkan ikon apl pada skrin utama"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Untuk apl baharu"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Tidak diketahui"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Jeda apl kerja"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Hidupkan apl kerja"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Tapis"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Cari telefon anda"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Cari tablet anda"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Gagal: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-my/strings.xml b/res/values-my/strings.xml
index 7f75157..aef6169 100644
--- a/res/values-my/strings.xml
+++ b/res/values-my/strings.xml
@@ -171,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"အလုပ်သုံးအက်ပ်များကို ခဏရပ်ရန်"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"အလုပ်သုံးအက်ပ်များ ဖွင့်ရန်"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"စစ်ထုတ်ရန်"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"သင့်ဖုန်းတွင် ရှာခြင်း"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"သင့်တက်ဘလက်ကို ရှာခြင်း"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"မအောင်မြင်ပါ− <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 8c220f5..eba195c 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Slå på appvarsler for <xliff:g id="NAME">%1$s</xliff:g> for å vise varselsprikker"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Endre innstillingene"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Vis varselsprikker"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Utvikleralternativer"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Legg til appikoner på startskjermen"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"For nye apper"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Ukjent"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Sett jobbapper på pause"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Slå på jobbapper"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filter"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Søk på telefonen"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Søk på nettbrettet"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Mislyktes: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-ne/strings.xml b/res/values-ne/strings.xml
index a34d867..49d92ac 100644
--- a/res/values-ne/strings.xml
+++ b/res/values-ne/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"सूचनाको प्रतीक जनाउने थोप्लाहरू देखाउन <xliff:g id="NAME">%1$s</xliff:g> को एपसम्बन्धी सूचनाहरूलाई अन गर्नुहोस्"</string>
<string name="title_change_settings" msgid="1376365968844349552">"सेटिङहरू बदल्नुहोस्"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"सूचनाको प्रतीक जनाउने थोप्लाहरू देखाउनुहोस्"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"विकासकर्ताका लागि उपलब्ध विकल्पहरू"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"एपका आइकनहरू होम स्क्रिनमा राखियोस्"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"नयाँ एपका लागि"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"अज्ञात"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"कामसम्बन्धी एपहरू अस्थायी रूपमा रोक्का गर्नुहोस्"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"कामसम्बन्धी एपहरू अन गर्नुहोस्"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"फिल्टर"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"आफ्नो फोन खोज्नुहोस्"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"आफ्नो ट्याब्लेट खोज्नुहोस्"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"कार्य पूरा गर्न सकिएन: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 4b68f17..e19b361 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -171,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Werk-apps pauzeren"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Werk-apps aanzetten"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filteren"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Zoeken op je telefoon"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Zoeken op je tablet"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Mislukt: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-or/strings.xml b/res/values-or/strings.xml
index e9bd81b..2506200 100644
--- a/res/values-or/strings.xml
+++ b/res/values-or/strings.xml
@@ -102,7 +102,7 @@
<string name="folder_name_format_exact" msgid="8626242716117004803">"ଫୋଲ୍ଡର୍: <xliff:g id="NAME">%1$s</xliff:g>, <xliff:g id="SIZE">%2$d</xliff:g> ଆଇଟମଗୁଡ଼ିକ"</string>
<string name="folder_name_format_overflow" msgid="4270108890534995199">"ଫୋଲ୍ଡର୍: <xliff:g id="NAME">%1$s</xliff:g>, <xliff:g id="SIZE">%2$d</xliff:g> କିମ୍ବା ଅଧିକ ଆଇଟମ୍"</string>
<string name="wallpaper_button_text" msgid="8404103075899945851">"ୱାଲପେପର୍"</string>
- <string name="styles_wallpaper_button_text" msgid="8216961355289236794">"ୱାଲପେପର୍ ଏବଂ ଷ୍ଟାଇଲ୍"</string>
+ <string name="styles_wallpaper_button_text" msgid="8216961355289236794">"ୱାଲପେପର ଏବଂ ଷ୍ଟାଇଲ"</string>
<string name="settings_button_text" msgid="8873672322605444408">"ହୋମ ସେଟିଂସ"</string>
<string name="msg_disabled_by_admin" msgid="6898038085516271325">"ଆପଣଙ୍କ ଆଡମିନଙ୍କ ଦ୍ୱାରା ଅକ୍ଷମ କରାଯାଇଛି"</string>
<string name="allow_rotation_title" msgid="7222049633713050106">"ମୂଳସ୍କ୍ରିନ ରୋଟେସନକୁ ଅନୁମତି ଦିଅନ୍ତୁ"</string>
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"ବିଜ୍ଞପ୍ତି ବିନ୍ଦୁ ଦେଖାଇବାକୁ, <xliff:g id="NAME">%1$s</xliff:g> ପାଇଁ ଆପ୍ ବିଜ୍ଞପ୍ତି ଅନ୍ କରନ୍ତୁ"</string>
<string name="title_change_settings" msgid="1376365968844349552">"ସେଟିଂସ ପରିବର୍ତ୍ତନ କରନ୍ତୁ"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"ବିଜ୍ଞପ୍ତି ଡଟ୍ଗୁଡ଼ିକୁ ଦେଖାନ୍ତୁ"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"ଡେଭେଲପର ବିକଳ୍ପଗୁଡ଼ିକ"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"ମୂଳସ୍କ୍ରିନରେ ଆପ ଆଇକନଗୁଡ଼ିକୁ ଯୋଗ କରନ୍ତୁ"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"ନୂଆ ଆପ୍ ପାଇଁ"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"ଅଜଣା"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"ୱାର୍କ ଆପଗୁଡ଼ିକୁ ବିରତ କରନ୍ତୁ"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"ୱାର୍କ ଆପଗୁଡ଼ିକୁ ଚାଲୁ କରନ୍ତୁ"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"ଫିଲ୍ଟର୍"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"ଆପଣଙ୍କ ଫୋନରେ ସନ୍ଧାନ କରନ୍ତୁ"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"ଆପଣଙ୍କ ଟାବଲେଟରେ ସନ୍ଧାନ କରନ୍ତୁ"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"ବିଫଳ ହୋଇଛି: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-pa/strings.xml b/res/values-pa/strings.xml
index 9614844..3df6886 100644
--- a/res/values-pa/strings.xml
+++ b/res/values-pa/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"ਸੂਚਨਾ ਬਿੰਦੂਆਂ ਦਿਖਾਉਣ ਲਈ, <xliff:g id="NAME">%1$s</xliff:g> ਲਈ ਐਪ ਸੂਚਨਾਵਾਂ ਚਾਲੂ ਕਰੋ"</string>
<string name="title_change_settings" msgid="1376365968844349552">"ਸੈਟਿੰਗਾਂ ਬਦਲੋ"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"ਸੂਚਨਾ ਬਿੰਦੂ ਦਿਖਾਓ"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"ਵਿਕਾਸਕਾਰ ਚੋਣਾਂ"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"ਹੋਮ ਸਕ੍ਰੀਨ \'ਤੇ ਐਪ ਪ੍ਰਤੀਕਾਂ ਨੂੰ ਸ਼ਾਮਲ ਕਰੋ"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"ਨਵੀਆਂ ਐਪਾਂ ਲਈ"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"ਅਗਿਆਤ"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"ਕੰਮ ਸੰਬੰਧੀ ਐਪ ਰੋਕੋ"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"ਕੰਮ ਸੰਬੰਧੀ ਐਪਾਂ ਚਾਲੂ ਕਰੋ"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"ਫਿਲਟਰ"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"ਆਪਣਾ ਫ਼ੋਨ ਖੋਜੋ"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"ਆਪਣਾ ਟੈਬਲੈੱਟ ਖੋਜੋ"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"ਇਹ ਕਾਰਵਾਈ ਅਸਫਲ ਹੋਈ: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 705ea23..869e91b 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Aby pokazać plakietki z powiadomieniami, włącz powiadomienia aplikacji <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Zmień ustawienia"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Pokaż plakietki z powiadomieniami"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Opcje programisty"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Dodawaj ikony aplikacji do ekranu głównego"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"W przypadku nowych aplikacji"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Brak informacji"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Wstrzymaj aplikacje służbowe"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Włącz aplikacje służbowe"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtruj"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Przeszukuj telefon"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Przeszukuj tablet"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Niepowodzenie: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index 0cfdfc1..1512754 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Para mostrar os Pontos de notificação, ative as notificações de aplicações para o <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Alterar definições"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Mostrar pontos de notificação"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Opções de programador"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Adicionar ícones de apps ao ecrã principal"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Para novas apps"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Desconhecido"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Colocar apps de trabalho em pausa"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Ativar apps de trabalho"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtrar"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Pesquise no telemóvel"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Pesquise no tablet"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Falhou: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 6117549..2dcb98f 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Para mostrar pontos de notificação, ative as notificações de app para <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Alterar configurações"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Mostrar pontos de notificação"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Opções do desenvolvedor"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Adicionar ícones de apps à tela inicial"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Para novos apps"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Desconhecido"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Pausar apps de trabalho"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Ativar apps de trabalho"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtrar"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Pesquisar no smartphone"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Pesquisar no tablet"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Falha: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index 5345920..ee9f492 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -171,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Întrerupeți aplicațiile pentru lucru"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Activați aplicațiile pentru lucru"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtru"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Căutați pe telefon"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Căutați pe tabletă"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Eșuare: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 9598b5e..9733ac6 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Чтобы показывать значки уведомлений, включите уведомления в приложении \"<xliff:g id="NAME">%1$s</xliff:g>\""</string>
<string name="title_change_settings" msgid="1376365968844349552">"Изменить настройки"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Показывать значки уведомлений"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Для разработчиков"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Добавлять значки приложений на главный экран"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Добавлять значки установленных приложений на главный экран"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Неизвестно"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Приостановить рабочие приложения"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Включить рабочие приложения"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Фильтр"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Поиск на телефоне"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Поиск на планшете"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Не удалось выполнить действие (<xliff:g id="WHAT">%1$s</xliff:g>)."</string>
</resources>
diff --git a/res/values-si/strings.xml b/res/values-si/strings.xml
index 0bc3af5..e160e81 100644
--- a/res/values-si/strings.xml
+++ b/res/values-si/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"දැනුම්දීම් තිත් පෙන්වීමට, <xliff:g id="NAME">%1$s</xliff:g> සඳහා යෙදුම් දැනුම්දීම් සබල කරන්න"</string>
<string name="title_change_settings" msgid="1376365968844349552">"සැකසීම් වෙනස් කරන්න"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"දැනුම්දීම් තිත් පෙන්වන්න"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"සංවර්ධක විකල්ප"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"මුල් තිරයට යෙදුම් නිරූපක එක් කරන්න"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"නව යෙදුම් සඳහා"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"නොදනී"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"කාර්යාල යෙදුම් විරාම කරන්න"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"කාර්යාල යෙදුම් ක්රියාත්මක කරන්න"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"පෙරහන"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"ඔබගේ දුරකථනය සොයන්න"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"ඔබගේ ටැබ්ලටය සොයන්න"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"අසාර්ථකයි: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index b97ec75..8582baf 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Ak chcete, aby sa zobrazovali bodky upozornení, zapnite upozornenia aplikácie <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Zmeniť nastavenia"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Zobrazovať bodky upozornení"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Pre vývojárov"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Pridať ikony aplikácií na plochu"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Pri inštalácii novej aplikácie"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Neznáme"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Pozastaviť pracovné aplikácie"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Zapnúť pracovné aplikácie"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtrujte"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Vyhľadávanie v telefóne"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Vyhľadávanie v tablete"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Zlyhalo: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index 7e99757..0762cf7 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Za prikaz obvestilnih pik vklopite obvestila aplikacije <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Spremeni nastavitve"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Pokaži obvestilne pike"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Možnosti za razvijalce"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Dodaj ikone aplikacij na začetni zaslon"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Za nove aplikacije"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Neznano"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Začasno zaustavi delovne aplikacije"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Vklopi delovne aplikacije"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtriranje"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Iskanje po telefonu"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Iskanje po tabličnem računalniku"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Ni uspelo: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-sq/strings.xml b/res/values-sq/strings.xml
index 92fdec0..821bd50 100644
--- a/res/values-sq/strings.xml
+++ b/res/values-sq/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Për të shfaqur \"Pikat e njoftimeve\", aktivizo njoftimet e aplikacionit për <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Ndrysho cilësimet"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Shfaq pikat e njoftimeve"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Opsionet e zhvilluesit"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Shto ikona aplikacionesh në ekranin bazë"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Për aplikacionet e reja"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"I panjohur"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Vendos në pauzë aplikacionet e punës"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Aktivizo aplikacionet e punës"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtro"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Kërko në telefonin tënd"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Kërko në tabletin tënd"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Dështoi: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index d8660dc..85cc281 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Да бисте приказали тачке за обавештења, укључите обавештења за апликацију <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Промените подешавања"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Приказуј тачке за обавештења"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Опције за програмера"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Додај иконе апликација на почетни екран"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"За нове апликације"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Непознато"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Паузирај пословне апликације"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Укључи пословне апликације"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Филтер"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Претражите телефон"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Претражите таблет"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Није успело: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index 7848206..7525eec 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Aktivera appaviseringar för <xliff:g id="NAME">%1$s</xliff:g> om du vill att aviseringsprickar ska visas"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Ändra inställningar"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Visa aviseringsprickar"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Utvecklaralternativ"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Lägg till appikoner på startskärmen"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"För nya appar"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Okänt"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Pausa jobbappar"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Aktivera jobbappar"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filter"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Sök på telefonen"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Sök på surfplattan"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Misslyckades: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index d6338aa..3ae5dcf 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Ili kuonyesha Vitone vya Arifa, washa kipengele cha arifa za programu katika <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Badilisha mipangilio"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Onyesha vitone vya arifa"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Chaguo za Wasanidi Programu"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Weka aikoni za programu kwenye skrini ya kwanza"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Kwa ajili ya programu mpya"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Yasiyojulikana"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Simamisha programu za kazini"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Washa programu za kazini"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Kichujio"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Tafuta kwenye simu yako"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Tafuta kwenye kompyuta kibao yako"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Hitilafu: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-ta/strings.xml b/res/values-ta/strings.xml
index 8e81b87..fa2b789 100644
--- a/res/values-ta/strings.xml
+++ b/res/values-ta/strings.xml
@@ -75,7 +75,7 @@
<string name="uninstall_drop_target_label" msgid="4722034217958379417">"நிறுவல் நீக்கு"</string>
<string name="app_info_drop_target_label" msgid="692894985365717661">"ஆப்ஸ் தகவல்"</string>
<string name="install_drop_target_label" msgid="2539096853673231757">"நிறுவு"</string>
- <string name="dismiss_prediction_label" msgid="3357562989568808658">"ஆப்ஸைப் பரிந்துரைக்க வேண்டாம்"</string>
+ <string name="dismiss_prediction_label" msgid="3357562989568808658">"ஆப்ஸ் பரிந்துரைக்காதே"</string>
<string name="pin_prediction" msgid="4196423321649756498">"கணிக்கப்பட்ட ஆப்ஸைப் பின் செய்தல்"</string>
<string name="permlab_install_shortcut" msgid="5632423390354674437">"குறுக்குவழிகளை நிறுவுதல்"</string>
<string name="permdesc_install_shortcut" msgid="923466509822011139">"பயனரின் அனுமதி இல்லாமல் குறுக்குவழிகளைச் சேர்க்கப் ஆப்ஸை அனுமதிக்கிறது."</string>
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"அறிவிப்புப் புள்ளிகளைக் காட்ட, <xliff:g id="NAME">%1$s</xliff:g> இன் ஆப்ஸ் அறிவிப்புகளை இயக்கவும்"</string>
<string name="title_change_settings" msgid="1376365968844349552">"அமைப்புகளை மாற்று"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"அறிவிப்புப் புள்ளிகளைக் காட்டு"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"டெவெலப்பர் விருப்பங்கள்"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"முகப்புத் திரையில் ஆப்ஸ் ஐகான்களைச் சேர்"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"புதிய ஆப்ஸை நிறுவும்போது"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"தெரியாதது"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"பணி ஆப்ஸை இடைநிறுத்து"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"பணி ஆப்ஸை இயக்கு"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"வடிப்பான்"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"உங்கள் மொபைலில் தேடுதல்"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"உங்கள் டேப்லெட்டில் தேடுதல்"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"தோல்வி: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-te/strings.xml b/res/values-te/strings.xml
index b093da4..663e44f 100644
--- a/res/values-te/strings.xml
+++ b/res/values-te/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"నోటిఫికేషన్ డాట్లను చూపించడానికి <xliff:g id="NAME">%1$s</xliff:g>కు యాప్ నోటిఫికేషన్లను ఆన్ చేయండి"</string>
<string name="title_change_settings" msgid="1376365968844349552">"సెట్టింగ్లను మార్చు"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"నోటిఫికేషన్ డాట్లను చూపు"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"డెవలపర్ ఆప్షన్లు"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"యాప్ చిహ్నాలను మొదటి స్క్రీన్కు జోడించండి"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"కొత్త యాప్ల కోసం"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"తెలియదు"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"వర్క్ యాప్లను పాజ్ చేయి"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"వర్క్ యాప్లను ఆన్ చేయి"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"ఫిల్టర్ చేయి"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"మీ ఫోన్లో సెర్చ్ చేయండి"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"మీ టాబ్లెట్లో సెర్చ్ చేయండి"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"విఫలమైంది: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index 3235684..07e5796 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"เปิดการแจ้งเตือนแอปของ <xliff:g id="NAME">%1$s</xliff:g> เพื่อแสดงเครื่องหมายจุดแสดงการแจ้งเตือน"</string>
<string name="title_change_settings" msgid="1376365968844349552">"เปลี่ยนการตั้งค่า"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"แสดงเครื่องหมายจุดแสดงการแจ้งเตือน"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"ตัวเลือกสำหรับนักพัฒนาแอป"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"เพิ่มไอคอนแอปในหน้าจอหลัก"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"สำหรับแอปใหม่"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"ไม่รู้จัก"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"หยุดแอปงานชั่วคราว"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"เปิดแอปงาน"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"ตัวกรอง"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"ค้นหาในโทรศัพท์"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"ค้นหาในแท็บเล็ต"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"ไม่สำเร็จ: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index ea2da0c..f7158b4 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Upang ipakita ang Mga Notification Dot, i-on ang mga notification ng app para sa <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Baguhin ang mga setting"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Ipakita ang mga notification dot"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Mga Opsyon ng Developer"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Magdagdag ng mga icon ng app sa home screen"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Para sa mga bagong app"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Hindi kilala"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"I-pause ang mga app para sa trabaho"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"I-on ang mga app para sa trabaho"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filter"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Maghanap sa iyong telepono"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Maghanap sa iyong tablet"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Hindi nagawa: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 84fb7ba..b12b9b1 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Bildirim Noktaları\'nı göstermek için <xliff:g id="NAME">%1$s</xliff:g> uygulamasının bildirimlerini açın"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Ayarları değiştir"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Bildirim noktalarını göster"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Geliştirici Seçenekleri"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Uygulama simgelerini ana ekrana ekle"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Yeni uygulamalar için"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Bilinmiyor"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"İş uygulamalarını duraklat"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"İş uygulamalarını aç"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtre"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"telefonunuzda arama yapmak"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Tabletinizde arama yapma"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Başarısız: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index d7b7eca..2b43a4d 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Щоб показувати значки сповіщень, увімкніть сповіщення в додатку <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Змінити налаштування"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Показувати значки сповіщень"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Параметри розробника"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Розміщати значки додатків на головний екран"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Для нових додатків"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Невідомо"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Призупинити робочі додатки"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Увімкнути робочі додатки"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Фільтр"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Пошук на телефоні"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Пошук на планшеті"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Не вдалося <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-ur/strings.xml b/res/values-ur/strings.xml
index 83ba2e5..70a853f 100644
--- a/res/values-ur/strings.xml
+++ b/res/values-ur/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"اطلاعاتی ڈاٹس دکھانے کی خاطر <xliff:g id="NAME">%1$s</xliff:g> کیلئے ایپ کی اطلاعات آن کریں"</string>
<string name="title_change_settings" msgid="1376365968844349552">"ترتیبات تبدیل کریں"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"اطلاعاتی ڈاٹس دکھائیں"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"ڈویلپر کے اختیارات"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"ہوم اسکرین میں ایپ آئیکنز شامل کریں"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"نئی ایپس کیلئے"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"نامعلوم"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"ورک ایپس موقوف کریں"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"ورک ایپس آن کریں"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"فلٹر"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"اپنے فون پر تلاش کریں"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"اپنے ٹیبلیٹ پر تلاش کریں"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"ناکام ہو گيا: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-uz/strings.xml b/res/values-uz/strings.xml
index 8415681..57a446b 100644
--- a/res/values-uz/strings.xml
+++ b/res/values-uz/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Bildirishnoma belgilarini ko‘rsatish uchun <xliff:g id="NAME">%1$s</xliff:g> ilovasida bildirishnomalarni yoqing"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Sozlamalarni o‘zgartirish"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Bildirishnoma belgilarini chiqarish"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Dasturchi sozlamalari"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Ilova ikonkalarini bosh ekranga chiqarish"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Yangi o‘rnatilgan ilovalar ikonkasini bosh ekranga chiqarish"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Noma’lum"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Ishga oid ilovalarni pauza qilish"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Ishga oid ilovalarni yoqish"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Saralash"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Telefondan qidirish"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Planshetingizni qidiring"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Xato: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-v31/colors.xml b/res/values-v31/colors.xml
index 7bbdbd1..7a75ddb 100644
--- a/res/values-v31/colors.xml
+++ b/res/values-v31/colors.xml
@@ -56,4 +56,9 @@
<color name="workspace_accent_color_light">@android:color/system_accent1_100</color>
<color name="workspace_accent_color_dark">@android:color/system_accent2_600</color>
+
+ <color name="preload_icon_accent_color_light">@android:color/system_accent1_600</color>
+ <color name="preload_icon_background_color_light">@android:color/system_accent2_200</color>
+ <color name="preload_icon_accent_color_dark">@android:color/system_accent1_300</color>
+ <color name="preload_icon_background_color_dark">@android:color/system_neutral2_700</color>
</resources>
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index 7451b39..2c81ae7 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"Để hiển thị Dấu chấm thông báo, hãy bật thông báo ứng dụng cho <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="title_change_settings" msgid="1376365968844349552">"Thay đổi cài đặt"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"Hiện dấu chấm thông báo"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"Tùy chọn cho nhà phát triển"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"Thêm biểu tượng ứng dụng vào màn hình chính"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Cho ứng dụng mới"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"Không xác định"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Tạm dừng các ứng dụng công việc"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Bật ứng dụng công việc"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Bộ lọc"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Tìm trên điện thoại"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Tìm kiếm trong máy tính bảng của bạn"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Không thực hiện được thao tác: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 446a567..7c104e2 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"要显示通知圆点,请开启<xliff:g id="NAME">%1$s</xliff:g>的应用通知功能"</string>
<string name="title_change_settings" msgid="1376365968844349552">"更改设置"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"显示通知圆点"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"开发者选项"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"将应用图标添加到主屏幕"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"适用于新应用"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"未知"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"暂停工作应用"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"开启工作应用"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"过滤器"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"手机内搜索"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"平板电脑内搜索"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"失败:<xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-zh-rHK/strings.xml b/res/values-zh-rHK/strings.xml
index 73c41cc..ed288d6 100644
--- a/res/values-zh-rHK/strings.xml
+++ b/res/values-zh-rHK/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"如要顯示「通知圓點」,請開啟「<xliff:g id="NAME">%1$s</xliff:g>」的應用程式通知功能"</string>
<string name="title_change_settings" msgid="1376365968844349552">"變更設定"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"顯示通知圓點"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"開發人員選項"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"將應用程式圖示新增至主畫面"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"新安裝的應用程式"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"不明"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"暫停工作應用程式"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"開啟工作應用程式"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"篩選器"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"搜尋手機內容"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"搜尋平板電腦內容"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"操作失敗:<xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 99ea397..3690c3a 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -114,8 +114,7 @@
<string name="msg_missing_notification_access" msgid="281113995110910548">"如要顯示通知圓點,請開啟「<xliff:g id="NAME">%1$s</xliff:g>」的應用程式通知功能"</string>
<string name="title_change_settings" msgid="1376365968844349552">"變更設定"</string>
<string name="notification_dots_service_title" msgid="4284221181793592871">"顯示通知圓點"</string>
- <!-- no translation found for developer_options_title (700788437593726194) -->
- <skip />
+ <string name="developer_options_title" msgid="700788437593726194">"開發人員選項"</string>
<string name="auto_add_shortcuts_label" msgid="4926805029653694105">"將應用程式圖示加到主畫面"</string>
<string name="auto_add_shortcuts_description" msgid="7117251166066978730">"適用於新安裝的應用程式"</string>
<string name="package_state_unknown" msgid="7592128424511031410">"不明"</string>
@@ -172,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"暫停工作應用程式"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"開啟工作應用程式"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"篩選器"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"搜尋手機內容"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"搜尋平板電腦內容"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"失敗:<xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index 0f4c8b4..26e7dcf 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -171,5 +171,7 @@
<string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Misa ama-app omsebenzi"</string>
<string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Vula ama-app omsebenzi"</string>
<string name="developer_options_filter_hint" msgid="5896817443635989056">"Hlunga"</string>
+ <string name="search_pref_screen_title" msgid="3258959643336315962">"Sesha ifoni yakho"</string>
+ <string name="search_pref_screen_title_tablet" msgid="5220319680451343959">"Sesha ithebulethi yakho"</string>
<string name="remote_action_failed" msgid="1383965239183576790">"Yehlulekile: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
</resources>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 13f20c2..9f25905 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -53,6 +53,8 @@
<attr name="workProfileOverlayTextColor" format="color" />
<attr name="workspaceAccentColor" format="color" />
<attr name="dropTargetHoverTextColor" format="color" />
+ <attr name="preloadIconAccentColor" format="color" />
+ <attr name="preloadIconBackgroundColor" format="color" />
<attr name="allAppsButtonBgColor" format="color" />
<attr name="allAppsButtonColor1" format="color" />
@@ -252,9 +254,10 @@
if not specified -->
<attr name="borderSpaceTwoPanelLandscapeVertical" format="float" />
- <!-- These min cell values are only used if GridDisplayOption#isScalable is true -->
- <!-- defaults to minCellHeight, if not specified -->
+ <!-- defaults to minCellHeight if not specified when GridDisplayOption#isScalable is true.
+ Must be defined when GridDisplayOption#isScalable is false. -->
<attr name="allAppsCellHeight" format="float" />
+ <!-- These min cell values are only used if GridDisplayOption#isScalable is true -->
<!-- defaults to minCellWidth, if not specified -->
<attr name="allAppsCellWidth" format="float" />
<!-- defaults to allAppsCellHeight, if not specified -->
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 2bc9239..309a1c5 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -85,4 +85,9 @@
<color name="all_apps_button_color_2">#00677E</color>
<color name="all_apps_button_color_3">#5F757E</color>
<color name="all_apps_button_color_4">#005A6E</color>
+
+ <color name="preload_icon_accent_color_light">#00668B</color>
+ <color name="preload_icon_background_color_light">#B5CAD7</color>
+ <color name="preload_icon_accent_color_dark">#4BB6E8</color>
+ <color name="preload_icon_background_color_dark">#40484D</color>
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 2612a7d..39f0a2b 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -242,7 +242,6 @@
<dimen name="drop_target_button_drawable_vertical_padding">8dp</dimen>
<dimen name="drop_target_button_gap">28dp</dimen>
<dimen name="drop_target_button_workspace_edge_gap">0dp</dimen>
- <dimen name="drop_target_button_screen_edge_gap">28dp</dimen>
<!-- the distance an icon must be dragged before button drop targets accept it -->
<dimen name="drag_distanceThreshold">30dp</dimen>
@@ -392,8 +391,17 @@
<dimen name="split_placeholder_inset">16dp</dimen>
<dimen name="split_placeholder_icon_size">44dp</dimen>
<dimen name="task_menu_width_grid">216dp</dimen>
-
-
+ <dimen name="split_instructions_radius">22dp</dimen>
+ <dimen name="split_instructions_elevation">1dp</dimen>
+ <dimen name="split_instructions_horizontal_padding">24dp</dimen>
+ <dimen name="split_instructions_vertical_padding">12dp</dimen>
+ <dimen name="split_instructions_bottom_margin_tablet_landscape">32dp</dimen>
+ <dimen name="split_instructions_bottom_margin_tablet_portrait">44dp</dimen>
+ <dimen name="split_instructions_bottom_margin_twopanels_landscape">33dp</dimen>
+ <dimen name="split_instructions_bottom_margin_twopanels_portrait">51dp</dimen>
+ <dimen name="split_instructions_bottom_margin_phone_landscape">24dp</dimen>
+ <dimen name="split_instructions_bottom_margin_phone_portrait">60dp</dimen>
+
<!-- Workspace grid visualization parameters -->
<dimen name="grid_visualization_rounding_radius">28dp</dimen>
<dimen name="grid_visualization_horizontal_cell_spacing">6dp</dimen>
diff --git a/res/values/id.xml b/res/values/id.xml
index 7ad1412..af21b27 100644
--- a/res/values/id.xml
+++ b/res/values/id.xml
@@ -37,4 +37,5 @@
<item type="id" name="quick_settings_button" />
<item type="id" name="notifications_button" />
+ <item type="id" name="cache_entry_tag_id" />
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 2109510..65bba7b 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -65,6 +65,8 @@
<item name="workspaceAccentColor">@color/workspace_accent_color_light</item>
<item name="dropTargetHoverTextColor">@color/workspace_text_color_dark</item>
<item name="overviewScrimColor">@color/overview_scrim</item>
+ <item name="preloadIconAccentColor">@color/preload_icon_accent_color_light</item>
+ <item name="preloadIconBackgroundColor">@color/preload_icon_background_color_light</item>
<item name="android:windowTranslucentStatus">false</item>
<item name="android:windowTranslucentNavigation">false</item>
@@ -123,6 +125,8 @@
<item name="workProfileOverlayTextColor">@android:color/white</item>
<item name="eduHalfSheetBGColor">#DD000000</item>
<item name="overviewScrimColor">@color/overview_scrim_dark</item>
+ <item name="preloadIconAccentColor">@color/preload_icon_accent_color_dark</item>
+ <item name="preloadIconBackgroundColor">@color/preload_icon_background_color_dark</item>
</style>
<style name="LauncherTheme.Dark.DarkMainColor" parent="@style/LauncherTheme.Dark">
diff --git a/src/com/android/launcher3/AbstractFloatingView.java b/src/com/android/launcher3/AbstractFloatingView.java
index 90869c2..21dbc5f 100644
--- a/src/com/android/launcher3/AbstractFloatingView.java
+++ b/src/com/android/launcher3/AbstractFloatingView.java
@@ -93,6 +93,7 @@
public static final int TYPE_WIDGETS_EDUCATION_DIALOG = 1 << 15;
public static final int TYPE_TASKBAR_EDUCATION_DIALOG = 1 << 16;
public static final int TYPE_TASKBAR_ALL_APPS = 1 << 17;
+ public static final int TYPE_ADD_TO_HOME_CONFIRMATION = 1 << 18;
public static final int TYPE_ALL = TYPE_FOLDER | TYPE_ACTION_POPUP
| TYPE_WIDGETS_BOTTOM_SHEET | TYPE_WIDGET_RESIZE_FRAME | TYPE_WIDGETS_FULL_SHEET
@@ -100,7 +101,7 @@
| TYPE_OPTIONS_POPUP | TYPE_SNACKBAR | TYPE_LISTENER | TYPE_ALL_APPS_EDU
| TYPE_ICON_SURFACE | TYPE_DRAG_DROP_POPUP | TYPE_PIN_WIDGET_FROM_EXTERNAL_POPUP
| TYPE_WIDGETS_EDUCATION_DIALOG | TYPE_TASKBAR_EDUCATION_DIALOG | TYPE_TASKBAR_ALL_APPS
- | TYPE_OPTIONS_POPUP_DIALOG;
+ | TYPE_OPTIONS_POPUP_DIALOG | TYPE_ADD_TO_HOME_CONFIRMATION;
// Type of popups which should be kept open during launcher rebind
public static final int TYPE_REBIND_SAFE = TYPE_WIDGETS_FULL_SHEET
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java
index 878ac3b..5fb8925 100644
--- a/src/com/android/launcher3/BubbleTextView.java
+++ b/src/com/android/launcher3/BubbleTextView.java
@@ -376,7 +376,7 @@
FastBitmapDrawable iconDrawable = info.newIcon(getContext(), flags);
mDotParams.appColor = iconDrawable.getIconColor();
mDotParams.dotColor = getContext().getResources()
- .getColor(android.R.color.system_accent3_100, getContext().getTheme());
+ .getColor(android.R.color.system_accent3_200, getContext().getTheme());
setIcon(iconDrawable);
applyLabel(info);
}
diff --git a/src/com/android/launcher3/ButtonDropTarget.java b/src/com/android/launcher3/ButtonDropTarget.java
index 8da4f05..3b24df2 100644
--- a/src/com/android/launcher3/ButtonDropTarget.java
+++ b/src/com/android/launcher3/ButtonDropTarget.java
@@ -179,7 +179,12 @@
@Override
public void onDragStart(DropTarget.DragObject dragObject, DragOptions options) {
- mActive = !options.isKeyboardDrag && supportsDrop(dragObject.dragInfo);
+ if (options.isKeyboardDrag) {
+ mActive = false;
+ } else {
+ setupItemInfo(dragObject.dragInfo);
+ mActive = supportsDrop(dragObject.dragInfo);
+ }
setVisibility(mActive ? View.VISIBLE : View.GONE);
mAccessibleDrag = options.isAccessibleDrag;
@@ -191,6 +196,11 @@
return supportsDrop(dragObject.dragInfo);
}
+ /**
+ * Setups button for the specified ItemInfo.
+ */
+ protected abstract void setupItemInfo(ItemInfo info);
+
protected abstract boolean supportsDrop(ItemInfo info);
public abstract boolean supportsAccessibilityDrop(ItemInfo info, View view);
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index 76e945d..300e7bf 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -149,8 +149,6 @@
private boolean mVisualizeDropLocation = true;
private RectF mVisualizeGridRect = new RectF();
private Paint mVisualizeGridPaint = new Paint();
- private int mGridVisualizationPaddingX;
- private int mGridVisualizationPaddingY;
private int mGridVisualizationRoundingRadius;
private float mGridAlpha = 0f;
private int mGridColor = 0;
@@ -262,10 +260,6 @@
mBackground.setAlpha(0);
mGridColor = Themes.getAttrColor(getContext(), R.attr.workspaceAccentColor);
- mGridVisualizationPaddingX = res.getDimensionPixelSize(
- R.dimen.grid_visualization_horizontal_cell_spacing);
- mGridVisualizationPaddingY = res.getDimensionPixelSize(
- R.dimen.grid_visualization_vertical_cell_spacing);
mGridVisualizationRoundingRadius =
res.getDimensionPixelSize(R.dimen.grid_visualization_rounding_radius);
mReorderPreviewAnimationMagnitude = (REORDER_PREVIEW_MAGNITUDE * deviceProfile.iconSizePx);
@@ -595,8 +589,8 @@
protected void visualizeGrid(Canvas canvas) {
DeviceProfile dp = mActivity.getDeviceProfile();
- int paddingX = Math.min((mCellWidth - dp.iconSizePx) / 2, mGridVisualizationPaddingX);
- int paddingY = Math.min((mCellHeight - dp.iconSizePx) / 2, mGridVisualizationPaddingY);
+ int paddingX = Math.min((mCellWidth - dp.iconSizePx) / 2, dp.gridVisualizationPaddingX);
+ int paddingY = Math.min((mCellHeight - dp.iconSizePx) / 2, dp.gridVisualizationPaddingY);
mVisualizeGridRect.set(paddingX, paddingY,
mCellWidth - paddingX,
mCellHeight - paddingY);
diff --git a/src/com/android/launcher3/DeleteDropTarget.java b/src/com/android/launcher3/DeleteDropTarget.java
index 371bb80..95d3ad9 100644
--- a/src/com/android/launcher3/DeleteDropTarget.java
+++ b/src/com/android/launcher3/DeleteDropTarget.java
@@ -85,6 +85,9 @@
}
@Override
+ protected void setupItemInfo(ItemInfo info) {}
+
+ @Override
protected boolean supportsDrop(ItemInfo info) {
return true;
}
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 5152217..8c1f505 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -100,6 +100,8 @@
// Workspace
public final int desiredWorkspaceHorizontalMarginOriginalPx;
public int desiredWorkspaceHorizontalMarginPx;
+ public int gridVisualizationPaddingX;
+ public int gridVisualizationPaddingY;
public Point cellLayoutBorderSpaceOriginalPx;
public Point cellLayoutBorderSpacePx;
public Rect cellLayoutPaddingPx = new Rect();
@@ -216,7 +218,6 @@
public int dropTargetVerticalPaddingPx;
public int dropTargetGapPx;
public int dropTargetButtonWorkspaceEdgeGapPx;
- public int dropTargetButtonScreenEdgeGapPx;
// Insets
private final Rect mInsets = new Rect();
@@ -303,6 +304,10 @@
desiredWorkspaceHorizontalMarginPx = getHorizontalMarginPx(inv, res);
desiredWorkspaceHorizontalMarginOriginalPx = desiredWorkspaceHorizontalMarginPx;
+ gridVisualizationPaddingX = res.getDimensionPixelSize(
+ R.dimen.grid_visualization_horizontal_cell_spacing);
+ gridVisualizationPaddingY = res.getDimensionPixelSize(
+ R.dimen.grid_visualization_vertical_cell_spacing);
bottomSheetTopPadding = mInsets.top // statusbar height
+ res.getDimensionPixelSize(R.dimen.bottom_sheet_extra_top_padding)
@@ -346,8 +351,6 @@
dropTargetGapPx = res.getDimensionPixelSize(R.dimen.drop_target_button_gap);
dropTargetButtonWorkspaceEdgeGapPx = res.getDimensionPixelSize(
R.dimen.drop_target_button_workspace_edge_gap);
- dropTargetButtonScreenEdgeGapPx = res.getDimensionPixelSize(
- R.dimen.drop_target_button_screen_edge_gap);
workspaceSpringLoadedBottomSpace =
res.getDimensionPixelSize(R.dimen.dynamic_grid_min_spring_loaded_space);
@@ -411,10 +414,7 @@
overviewTaskIconDrawableSizeGridPx =
res.getDimensionPixelSize(R.dimen.task_thumbnail_icon_drawable_size_grid);
overviewTaskThumbnailTopMarginPx = overviewTaskIconSizePx + overviewTaskMarginPx * 2;
- // In vertical bar, use the smaller task margin for the top regardless of mode.
- overviewActionsTopMarginPx = isVerticalBarLayout()
- ? overviewTaskMarginPx
- : res.getDimensionPixelSize(R.dimen.overview_actions_top_margin);
+ overviewActionsTopMarginPx = res.getDimensionPixelSize(R.dimen.overview_actions_top_margin);
overviewPageSpacing = res.getDimensionPixelSize(R.dimen.overview_page_spacing);
overviewActionsButtonSpacing = res.getDimensionPixelSize(
R.dimen.overview_actions_button_spacing);
@@ -789,7 +789,7 @@
/**
* Updates the iconSize for allApps* variants.
*/
- public void updateAllAppsIconSize(float scale, Resources res) {
+ private void updateAllAppsIconSize(float scale, Resources res) {
allAppsBorderSpacePx = new Point(
pxFromDp(inv.allAppsBorderSpaces[mTypeIndex].x, mMetrics, scale),
pxFromDp(inv.allAppsBorderSpaces[mTypeIndex].y, mMetrics, scale));
@@ -799,13 +799,13 @@
+ allAppsBorderSpacePx.y;
// but width is just the cell,
// the border is added in #updateAllAppsContainerWidth
- allAppsCellWidthPx = pxFromDp(inv.allAppsCellSize[mTypeIndex].x, mMetrics, scale);
if (isScalableGrid) {
allAppsIconSizePx =
- pxFromDp(inv.allAppsIconSize[mTypeIndex], mMetrics);
+ pxFromDp(inv.allAppsIconSize[mTypeIndex], mMetrics, scale);
allAppsIconTextSizePx =
- pxFromSp(inv.allAppsIconTextSize[mTypeIndex], mMetrics);
+ pxFromSp(inv.allAppsIconTextSize[mTypeIndex], mMetrics, scale);
allAppsIconDrawablePaddingPx = iconDrawablePaddingOriginalPx;
+ allAppsCellWidthPx = pxFromDp(inv.allAppsCellSize[mTypeIndex].x, mMetrics, scale);
} else {
float invIconSizeDp = inv.allAppsIconSize[mTypeIndex];
float invIconTextSizeSp = inv.allAppsIconTextSize[mTypeIndex];
@@ -813,6 +813,7 @@
allAppsIconTextSizePx = (int) (pxFromSp(invIconTextSizeSp, mMetrics) * scale);
allAppsIconDrawablePaddingPx =
res.getDimensionPixelSize(R.dimen.all_apps_icon_drawable_padding);
+ allAppsCellWidthPx = allAppsIconSizePx + (2 * allAppsIconDrawablePaddingPx);
}
updateAllAppsContainerWidth(res);
@@ -1069,24 +1070,23 @@
mInsets.right + hotseatBarSidePaddingStartPx, paddingBottom);
}
} else if (isTaskbarPresent) {
- boolean isRtl = Utilities.isRtl(context.getResources());
- int hotseatHeight = workspacePadding.bottom;
- int taskbarOffset = getTaskbarOffsetY();
+ // Center the QSB vertically with hotseat
+ int hotseatBottomPadding = getHotseatBottomPadding();
+ int hotseatTopPadding =
+ workspacePadding.bottom - hotseatBottomPadding - hotseatCellHeightPx;
+
// Push icons to the side
int additionalQsbSpace = isQsbInline ? qsbWidth + hotseatBorderSpace : 0;
-
- // Center the QSB vertically with hotseat
- int hotseatTopPadding = hotseatHeight - taskbarOffset - hotseatCellHeightPx;
-
- int endOffset = ApiWrapper.getHotseatEndOffset(context);
int requiredWidth = iconSizePx * numShownHotseatIcons
+ hotseatBorderSpace * (numShownHotseatIcons - 1)
+ additionalQsbSpace;
-
+ int endOffset = ApiWrapper.getHotseatEndOffset(context);
int hotseatWidth = Math.min(requiredWidth, availableWidthPx - endOffset);
int sideSpacing = (availableWidthPx - hotseatWidth) / 2;
- mHotseatPadding.set(sideSpacing, hotseatTopPadding, sideSpacing, taskbarOffset);
+ mHotseatPadding.set(sideSpacing, hotseatTopPadding, sideSpacing, hotseatBottomPadding);
+
+ boolean isRtl = Utilities.isRtl(context.getResources());
if (isRtl) {
mHotseatPadding.right += additionalQsbSpace;
} else {
@@ -1146,15 +1146,22 @@
}
}
+ private int getHotseatBottomPadding() {
+ if (isQsbInline) {
+ return getQsbOffsetY() + ((hotseatQsbHeight - hotseatCellHeightPx) / 2);
+ } else {
+ return (getQsbOffsetY() - taskbarSize) / 2;
+ }
+ }
+
/**
* Returns the number of pixels the taskbar is translated from the bottom of the screen.
*/
public int getTaskbarOffsetY() {
- if (isQsbInline) {
- return getQsbOffsetY() - (Math.abs(hotseatQsbHeight - hotseatCellHeightPx) / 2);
- } else {
- return (getQsbOffsetY() - taskbarSize) / 2;
- }
+ int taskbarIconBottomSpace = (taskbarSize - iconSizePx) / 2;
+ int launcherIconBottomSpace =
+ Math.min((hotseatCellHeightPx - iconSizePx) / 2, gridVisualizationPaddingY);
+ return getHotseatBottomPadding() + launcherIconBottomSpace - taskbarIconBottomSpace;
}
/**
@@ -1410,10 +1417,6 @@
writer.println(prefix + pxToDpStr("dropTargetBarSizePx", dropTargetBarSizePx));
writer.println(
prefix + pxToDpStr("dropTargetBarBottomMarginPx", dropTargetBarBottomMarginPx));
- writer.println(prefix + pxToDpStr("dropTargetButtonWorkspaceEdgeGapPx",
- dropTargetButtonWorkspaceEdgeGapPx));
- writer.println(prefix + pxToDpStr("dropTargetButtonScreenEdgeGapPx",
- dropTargetButtonScreenEdgeGapPx));
writer.println(
prefix + pxToDpStr("workspaceSpringLoadShrunkTop", workspaceSpringLoadShrunkTop));
diff --git a/src/com/android/launcher3/DropTargetBar.java b/src/com/android/launcher3/DropTargetBar.java
index 6a8ba1b..c1304d4 100644
--- a/src/com/android/launcher3/DropTargetBar.java
+++ b/src/com/android/launcher3/DropTargetBar.java
@@ -162,6 +162,10 @@
ButtonDropTarget firstButton = mTempTargets[0];
firstButton.setTextVisible(true);
firstButton.setIconVisible(true);
+ firstButton.setTextMultiLine(false);
+ // Reset second button padding in case it was previously changed to multi-line text.
+ firstButton.setPadding(horizontalPadding, verticalPadding, horizontalPadding,
+ verticalPadding);
ButtonDropTarget secondButton = mTempTargets[1];
secondButton.setTextVisible(true);
@@ -171,56 +175,48 @@
secondButton.setPadding(horizontalPadding, verticalPadding, horizontalPadding,
verticalPadding);
+ float scale = dp.getWorkspaceSpringLoadScale();
+ int scaledPanelWidth = (int) (dp.getCellLayoutWidth() * scale);
+
+ int availableWidth;
if (dp.isTwoPanels) {
// Both buttons for two panel fit to the width of one Cell Layout (less
// half of the center gap between the buttons).
- float scale = dp.getWorkspaceSpringLoadScale();
- int scaledPanelWidth = (int) (dp.getCellLayoutWidth() * scale);
int halfButtonGap = dp.dropTargetGapPx / 2;
- scaledPanelWidth -= halfButtonGap / 2;
-
- int widthSpec = MeasureSpec.makeMeasureSpec(scaledPanelWidth, MeasureSpec.AT_MOST);
- firstButton.measure(widthSpec, heightSpec);
- secondButton.measure(widthSpec, heightSpec);
+ availableWidth = scaledPanelWidth - halfButtonGap / 2;
} else {
- int availableWidth;
- int buttonGap = dp.dropTargetGapPx;
- if (mIsVertical) {
- // Both buttons plus the button gap do not display past the edge of the
- // scaled workspace, less a pre-defined gap from the edge of the workspace.
- float scale = dp.getWorkspaceSpringLoadScale();
- int panelWidth = (int) (dp.getCellLayoutWidth() * scale);
- availableWidth = Math.min(
- panelWidth - (2 * dp.dropTargetButtonWorkspaceEdgeGapPx), width);
- } else {
- // Both buttons plus the button gap display up to a pre-defined margin of
- // the unscaled workspace edge.
- availableWidth = Math.min(
- dp.availableWidthPx - (2 * dp.dropTargetButtonScreenEdgeGapPx),
- width);
- }
- int widthSpec = MeasureSpec.makeMeasureSpec(availableWidth - buttonGap,
- MeasureSpec.AT_MOST);
+ // Both buttons plus the button gap do not display past the edge of the scaled
+ // workspace, less a pre-defined gap from the edge of the workspace.
+ availableWidth = scaledPanelWidth - dp.dropTargetGapPx
+ - 2 * dp.dropTargetButtonWorkspaceEdgeGapPx;
+ }
- // First button's width is at most the drop target bar's total width less the button
- // gap.
- firstButton.measure(widthSpec, heightSpec);
-
- int usedWidth = firstButton.getMeasuredWidth() + buttonGap;
- int remainingWidth = availableWidth - usedWidth;
- widthSpec = MeasureSpec.makeMeasureSpec(remainingWidth, MeasureSpec.AT_MOST);
- secondButton.measure(widthSpec, heightSpec);
-
- // Remove both icons and put the second button's text on two lines if text is
- // truncated on phones. We assume first button's text is never truncated, so it
- // remains single-line.
- if (secondButton.isTextTruncated(remainingWidth) && !mIsVertical) {
+ int widthSpec = MeasureSpec.makeMeasureSpec(availableWidth, MeasureSpec.AT_MOST);
+ firstButton.measure(widthSpec, heightSpec);
+ if (!mIsVertical) {
+ // Remove both icons and put the button's text on two lines if text is truncated.
+ if (firstButton.isTextTruncated(availableWidth)) {
firstButton.setIconVisible(false);
secondButton.setIconVisible(false);
+ firstButton.setTextMultiLine(true);
+ firstButton.setPadding(horizontalPadding, verticalPadding / 2,
+ horizontalPadding, verticalPadding / 2);
+ }
+ }
+
+ if (!dp.isTwoPanels) {
+ availableWidth -= firstButton.getMeasuredWidth() + dp.dropTargetGapPx;
+ widthSpec = MeasureSpec.makeMeasureSpec(availableWidth, MeasureSpec.AT_MOST);
+ }
+ secondButton.measure(widthSpec, heightSpec);
+ if (!mIsVertical) {
+ // Remove both icons and put the button's text on two lines if text is truncated.
+ if (secondButton.isTextTruncated(availableWidth)) {
+ secondButton.setIconVisible(false);
+ firstButton.setIconVisible(false);
secondButton.setTextMultiLine(true);
- secondButton.setPadding(secondButton.getPaddingLeft(),
- secondButton.getPaddingTop() / 2, secondButton.getPaddingRight(),
- secondButton.getPaddingBottom() / 2);
+ secondButton.setPadding(horizontalPadding, verticalPadding / 2,
+ horizontalPadding, verticalPadding / 2);
}
}
}
@@ -235,16 +231,18 @@
}
DeviceProfile dp = mLauncher.getDeviceProfile();
- int barCenter = (right - left) / 2;
- if (mIsVertical) {
- // Center vertical bar over scaled workspace, accounting for hotseat offset.
- float scale = dp.getWorkspaceSpringLoadScale();
- Workspace<?> ws = mLauncher.getWorkspace();
+ // Center vertical bar over scaled workspace, accounting for hotseat offset.
+ float scale = dp.getWorkspaceSpringLoadScale();
+ Workspace<?> ws = mLauncher.getWorkspace();
+ int barCenter;
+ if (dp.isTwoPanels) {
+ barCenter = (right - left) / 2;
+ } else {
int workspaceCenter = (ws.getLeft() + ws.getRight()) / 2;
int cellLayoutCenter = ((dp.getInsets().left + dp.workspacePadding.left) + (dp.widthPx
- dp.getInsets().right - dp.workspacePadding.right)) / 2;
int cellLayoutCenterOffset = (int) ((cellLayoutCenter - workspaceCenter) * scale);
- barCenter = workspaceCenter + cellLayoutCenterOffset;
+ barCenter = workspaceCenter + cellLayoutCenterOffset - left;
}
if (visibleCount == 1) {
@@ -254,44 +252,29 @@
} else if (visibleCount == 2) {
int buttonGap = dp.dropTargetGapPx;
+ ButtonDropTarget leftButton = mTempTargets[0];
+ ButtonDropTarget rightButton = mTempTargets[1];
if (dp.isTwoPanels) {
- ButtonDropTarget leftButton = mTempTargets[0];
leftButton.layout(barCenter - leftButton.getMeasuredWidth() - (buttonGap / 2), 0,
barCenter - (buttonGap / 2), leftButton.getMeasuredHeight());
-
- ButtonDropTarget rightButton = mTempTargets[1];
rightButton.layout(barCenter + (buttonGap / 2), 0,
barCenter + (buttonGap / 2) + rightButton.getMeasuredWidth(),
rightButton.getMeasuredHeight());
} else {
- int start;
- int end;
- if (mIsVertical) {
- // Scaled CellLayout width is assumed to not exceed the bounds of left/right.
- float scale = dp.getWorkspaceSpringLoadScale();
- int panelWidth = (int) (dp.getCellLayoutWidth() * scale);
- start = barCenter - (panelWidth / 2) + dp.dropTargetButtonWorkspaceEdgeGapPx;
- end = barCenter + (panelWidth / 2) - dp.dropTargetButtonWorkspaceEdgeGapPx;
- } else {
- start = Math.max(dp.dropTargetButtonScreenEdgeGapPx, left);
- end = Math.min(dp.availableWidthPx - dp.dropTargetButtonScreenEdgeGapPx, right);
- }
-
- ButtonDropTarget leftButton = mTempTargets[0];
- ButtonDropTarget rightButton = mTempTargets[1];
+ int scaledPanelWidth = (int) (dp.getCellLayoutWidth() * scale);
int leftButtonWidth = leftButton.getMeasuredWidth();
int rightButtonWidth = rightButton.getMeasuredWidth();
- int buttonPlusGapWidth = leftButtonWidth + buttonGap + rightButtonWidth;
+ int extraSpace = scaledPanelWidth - leftButtonWidth - rightButtonWidth - buttonGap;
- int extraSpace = end - start - buttonPlusGapWidth;
- start = (start - left) + (extraSpace / 2);
+ int leftButtonStart = barCenter - (scaledPanelWidth / 2) + extraSpace / 2;
+ int leftButtonEnd = leftButtonStart + leftButtonWidth;
+ int rightButtonStart = leftButtonEnd + buttonGap;
+ int rightButtonEnd = rightButtonStart + rightButtonWidth;
- leftButton.layout(start, 0, start + leftButtonWidth,
+ leftButton.layout(leftButtonStart, 0, leftButtonEnd,
leftButton.getMeasuredHeight());
-
- int rightButtonStart = start + leftButtonWidth + buttonGap;
- rightButton.layout(rightButtonStart, 0, rightButtonStart + rightButtonWidth,
+ rightButton.layout(rightButtonStart, 0, rightButtonEnd,
rightButton.getMeasuredHeight());
}
}
@@ -362,7 +345,7 @@
}
public ButtonDropTarget[] getDropTargets() {
- return mDropTargets;
+ return getVisibility() == View.VISIBLE ? mDropTargets : new ButtonDropTarget[0];
}
@Override
diff --git a/src/com/android/launcher3/ExtendedEditText.java b/src/com/android/launcher3/ExtendedEditText.java
index 3b5b454..4629ca7 100644
--- a/src/com/android/launcher3/ExtendedEditText.java
+++ b/src/com/android/launcher3/ExtendedEditText.java
@@ -104,6 +104,7 @@
public void hideKeyboard() {
hideKeyboardAsync(ActivityContext.lookupContext(getContext()), getWindowToken());
+ clearFocus();
}
private boolean showSoftInput() {
diff --git a/src/com/android/launcher3/BaseRecyclerView.java b/src/com/android/launcher3/FastScrollRecyclerView.java
similarity index 94%
rename from src/com/android/launcher3/BaseRecyclerView.java
rename to src/com/android/launcher3/FastScrollRecyclerView.java
index b6d3fc5..f117069 100644
--- a/src/com/android/launcher3/BaseRecyclerView.java
+++ b/src/com/android/launcher3/FastScrollRecyclerView.java
@@ -23,6 +23,7 @@
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityNodeInfo;
+import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import com.android.launcher3.compat.AccessibilityManagerCompat;
@@ -36,19 +37,19 @@
* <li> Enable fast scroller.
* </ul>
*/
-public abstract class BaseRecyclerView extends RecyclerView {
+public abstract class FastScrollRecyclerView extends RecyclerView {
protected RecyclerViewFastScroller mScrollbar;
- public BaseRecyclerView(Context context) {
+ public FastScrollRecyclerView(Context context) {
this(context, null);
}
- public BaseRecyclerView(Context context, AttributeSet attrs) {
+ public FastScrollRecyclerView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
- public BaseRecyclerView(Context context, AttributeSet attrs, int defStyleAttr) {
+ public FastScrollRecyclerView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@@ -65,6 +66,7 @@
onUpdateScrollbar(0);
}
+ @Nullable
public RecyclerViewFastScroller getScrollbar() {
return mScrollbar;
}
@@ -198,4 +200,4 @@
}
scrollToPosition(0);
}
-}
\ No newline at end of file
+}
diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java
index 76106fc..8c4c662 100644
--- a/src/com/android/launcher3/Hotseat.java
+++ b/src/com/android/launcher3/Hotseat.java
@@ -206,6 +206,13 @@
getShortcutsAndWidgets().setAlpha(alpha);
}
+ /**
+ * Sets the alpha value of just our QSB.
+ */
+ public void setQsbAlpha(float alpha) {
+ mQsb.setAlpha(alpha);
+ }
+
public float getIconsAlpha() {
return getShortcutsAndWidgets().getAlpha();
}
diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java
index db43b44..73ca4a3 100644
--- a/src/com/android/launcher3/InvariantDeviceProfile.java
+++ b/src/com/android/launcher3/InvariantDeviceProfile.java
@@ -234,7 +234,8 @@
/*allowDisabledGrid=*/false),
defaultDeviceType);
- Info myInfo = new Info(context, display);
+ Context displayContext = context.createDisplayContext(display);
+ Info myInfo = new Info(displayContext);
@DeviceType int deviceType = getDeviceType(myInfo);
DisplayOption myDisplayOption = invDistWeightedInterpolate(
myInfo,
@@ -642,7 +643,7 @@
+ "\nconfig: " + config
+ "\ndisplayMetrics: " + res.getDisplayMetrics()
+ "\nrotation: " + rotation
- + "\n" + stringWriter.toString(),
+ + "\n" + stringWriter,
new Exception());
}
return getBestMatch(screenWidth, screenHeight, rotation);
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 31c1eff..ebed31b 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -124,6 +124,7 @@
import com.android.launcher3.accessibility.BaseAccessibilityDelegate.LauncherAction;
import com.android.launcher3.accessibility.LauncherAccessibilityDelegate;
import com.android.launcher3.allapps.ActivityAllAppsContainerView;
+import com.android.launcher3.allapps.AllAppsRecyclerView;
import com.android.launcher3.allapps.AllAppsStore;
import com.android.launcher3.allapps.AllAppsTransitionController;
import com.android.launcher3.allapps.BaseAllAppsContainerView;
@@ -196,6 +197,7 @@
import com.android.launcher3.util.UiThreadHelper;
import com.android.launcher3.util.ViewOnDrawExecutor;
import com.android.launcher3.views.ActivityContext;
+import com.android.launcher3.views.FloatingIconView;
import com.android.launcher3.views.FloatingSurfaceView;
import com.android.launcher3.views.OptionsPopupView;
import com.android.launcher3.views.ScrimView;
@@ -536,6 +538,7 @@
if (Utilities.ATLEAST_R) {
getWindow().setSoftInputMode(LayoutParams.SOFT_INPUT_ADJUST_NOTHING);
}
+ setTitle(R.string.home_screen);
}
protected LauncherOverlayManager getDefaultOverlay() {
@@ -2756,8 +2759,8 @@
* @param supportsAllAppsState If true and we are in All Apps state, looks for view in All Apps.
* Else we only looks on the workspace.
*/
- public View getFirstMatchForAppClose(int preferredItemId, String packageName, UserHandle user,
- boolean supportsAllAppsState) {
+ public @Nullable View getFirstMatchForAppClose(int preferredItemId, String packageName,
+ UserHandle user, boolean supportsAllAppsState) {
final Predicate<ItemInfo> preferredItem = info ->
info != null && info.id == preferredItemId;
final Predicate<ItemInfo> packageAndUserAndApp = info ->
@@ -2769,8 +2772,21 @@
packageName);
if (supportsAllAppsState && isInState(LauncherState.ALL_APPS)) {
- return getFirstMatch(Collections.singletonList(mAppsView.getActiveRecyclerView()),
+ AllAppsRecyclerView activeRecyclerView = mAppsView.getActiveRecyclerView();
+ View v = getFirstMatch(Collections.singletonList(activeRecyclerView),
preferredItem, packageAndUserAndApp);
+
+ if (v != null && activeRecyclerView.getCurrentScrollY() > 0) {
+ RectF locationBounds = new RectF();
+ FloatingIconView.getLocationBoundsForView(this, v, false, locationBounds,
+ new Rect());
+ if (locationBounds.top < mAppsView.getHeaderBottom()) {
+ // Icon is covered by scrim, return null to play fallback animation.
+ return null;
+ }
+ }
+
+ return v;
} else {
List<ViewGroup> containers = new ArrayList<>(mWorkspace.getPanelCount() + 1);
containers.add(mWorkspace.getHotseat().getShortcutsAndWidgets());
@@ -2788,6 +2804,7 @@
* @param containers List of ViewGroups to scan, in order of preference.
* @param operators List of operators, in order starting from best matching operator.
*/
+ @Nullable
private static View getFirstMatch(Iterable<ViewGroup> containers,
final Predicate<ItemInfo>... operators) {
for (Predicate<ItemInfo> operator : operators) {
@@ -2805,6 +2822,7 @@
* Returns the first view matching the operator in the given ViewGroups, or null if none.
* Forward iteration matters.
*/
+ @Nullable
private static View mapOverViewGroup(ViewGroup container, Predicate<ItemInfo> op) {
final int itemCount = container.getChildCount();
for (int itemIdx = 0; itemIdx < itemCount; itemIdx++) {
@@ -3228,11 +3246,24 @@
public void pauseExpensiveViewUpdates() {
// Pause page indicator animations as they lead to layer trashing.
getWorkspace().getPageIndicator().pauseAnimations();
+
+ getWorkspace().mapOverItems((info, view) -> {
+ if (view instanceof LauncherAppWidgetHostView) {
+ ((LauncherAppWidgetHostView) view).beginDeferringUpdates();
+ }
+ return false; // Return false to continue iterating through all the items.
+ });
}
/** Resumes view updates at the end of the app launch animation. */
public void resumeExpensiveViewUpdates() {
getWorkspace().getPageIndicator().skipAnimationsToEnd();
- }
+ getWorkspace().mapOverItems((info, view) -> {
+ if (view instanceof LauncherAppWidgetHostView) {
+ ((LauncherAppWidgetHostView) view).endDeferringUpdates();
+ }
+ return false; // Return false to continue iterating through all the items.
+ });
+ }
}
diff --git a/src/com/android/launcher3/LauncherAnimUtils.java b/src/com/android/launcher3/LauncherAnimUtils.java
index 808bf96..0c7c311 100644
--- a/src/com/android/launcher3/LauncherAnimUtils.java
+++ b/src/com/android/launcher3/LauncherAnimUtils.java
@@ -26,6 +26,7 @@
import android.util.IntProperty;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
+import android.widget.TextView;
import com.android.launcher3.util.MultiScalePropertyFactory;
@@ -115,6 +116,32 @@
}
};
+ public static final IntProperty<TextView> TEXT_COLOR =
+ new IntProperty<TextView>("textColor") {
+ @Override
+ public Integer get(TextView view) {
+ return view.getTextColors().getDefaultColor();
+ }
+
+ @Override
+ public void setValue(TextView view, int color) {
+ view.setTextColor(color);
+ }
+ };
+
+ public static final IntProperty<TextView> HINT_TEXT_COLOR =
+ new IntProperty<TextView>("hintTextColor") {
+ @Override
+ public Integer get(TextView view) {
+ return view.getHintTextColors().getDefaultColor();
+ }
+
+ @Override
+ public void setValue(TextView view, int color) {
+ view.setHintTextColor(color);
+ }
+ };
+
public static final FloatProperty<View> VIEW_TRANSLATE_X =
View.TRANSLATION_X instanceof FloatProperty ? (FloatProperty) View.TRANSLATION_X
: new FloatProperty<View>("translateX") {
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index 4d33eae..cba0b7d 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -727,15 +727,16 @@
pageScrollChanged = true;
}
- if (childCount == 0) {
- return;
- }
-
if (DEBUG) Log.d(TAG, "PagedView.onLayout()");
pageScrollChanged |= getPageScrolls(pageScrolls, true, SIMPLE_SCROLL_LOGIC);
mPageScrolls = pageScrolls;
+ if (childCount == 0) {
+ onPageScrollsInitialized();
+ return;
+ }
+
final LayoutTransition transition = getLayoutTransition();
// If the transition is running defer updating max scroll, as some empty pages could
// still be present, and a max scroll change could cause sudden jumps in scroll.
@@ -1186,7 +1187,9 @@
}
public int getScrollForPage(int index) {
- if (!pageScrollsInitialized() || index >= mPageScrolls.length || index < 0) {
+ // TODO(b/233112195): Use !pageScrollsInitialized() instead of mPageScrolls == null, once we
+ // root cause where we should be using runOnPageScrollsInitialized().
+ if (mPageScrolls == null || index >= mPageScrolls.length || index < 0) {
return 0;
} else {
return mPageScrolls[index];
diff --git a/src/com/android/launcher3/SecondaryDropTarget.java b/src/com/android/launcher3/SecondaryDropTarget.java
index 5b037e4..f8bc1f4 100644
--- a/src/com/android/launcher3/SecondaryDropTarget.java
+++ b/src/com/android/launcher3/SecondaryDropTarget.java
@@ -6,6 +6,7 @@
import static com.android.launcher3.Launcher.REQUEST_RECONFIGURE_APPWIDGET;
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_DESKTOP;
import static com.android.launcher3.accessibility.LauncherAccessibilityDelegate.DISMISS_PREDICTION;
+import static com.android.launcher3.accessibility.LauncherAccessibilityDelegate.INVALID;
import static com.android.launcher3.accessibility.LauncherAccessibilityDelegate.RECONFIGURE;
import static com.android.launcher3.accessibility.LauncherAccessibilityDelegate.UNINSTALL;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_DISMISS_PREDICTION_UNDO;
@@ -69,6 +70,7 @@
private boolean mHadPendingAlarm;
protected int mCurrentAccessibilityAction = -1;
+
public SecondaryDropTarget(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
@@ -134,24 +136,33 @@
}
@Override
+ protected void setupItemInfo(ItemInfo info) {
+ int buttonType = getButtonType(info, getViewUnderDrag(info));
+ if (buttonType != INVALID) {
+ setupUi(buttonType);
+ }
+ }
+
+ @Override
protected boolean supportsDrop(ItemInfo info) {
- return supportsAccessibilityDrop(info, getViewUnderDrag(info));
+ return getButtonType(info, getViewUnderDrag(info)) != INVALID;
}
@Override
public boolean supportsAccessibilityDrop(ItemInfo info, View view) {
+ return getButtonType(info, view) != INVALID;
+ }
+
+ private int getButtonType(ItemInfo info, View view) {
if (view instanceof AppWidgetHostView) {
if (getReconfigurableWidgetId(view) != INVALID_APPWIDGET_ID) {
- setupUi(RECONFIGURE);
- return true;
+ return RECONFIGURE;
}
- return false;
+ return INVALID;
} else if (FeatureFlags.ENABLE_PREDICTION_DISMISS.get() && info.isPredictedItem()) {
- setupUi(DISMISS_PREDICTION);
- return true;
+ return DISMISS_PREDICTION;
}
- setupUi(UNINSTALL);
Boolean uninstallDisabled = mUninstallDisabledCache.get(info.user);
if (uninstallDisabled == null) {
UserManager userManager =
@@ -165,16 +176,20 @@
mCacheExpireAlarm.setAlarm(CACHE_EXPIRE_TIMEOUT);
mCacheExpireAlarm.setOnAlarmListener(this);
if (uninstallDisabled) {
- return false;
+ return INVALID;
}
if (info instanceof ItemInfoWithIcon) {
ItemInfoWithIcon iconInfo = (ItemInfoWithIcon) info;
- if ((iconInfo.runtimeStatusFlags & FLAG_SYSTEM_MASK) != 0) {
- return (iconInfo.runtimeStatusFlags & FLAG_SYSTEM_NO) != 0;
+ if ((iconInfo.runtimeStatusFlags & FLAG_SYSTEM_MASK) != 0
+ && (iconInfo.runtimeStatusFlags & FLAG_SYSTEM_NO) == 0) {
+ return INVALID;
}
}
- return getUninstallTarget(info) != null;
+ if (getUninstallTarget(info) == null) {
+ return INVALID;
+ }
+ return UNINSTALL;
}
/**
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java
index 7b96838..dc8c739 100644
--- a/src/com/android/launcher3/Utilities.java
+++ b/src/com/android/launcher3/Utilities.java
@@ -587,15 +587,6 @@
}
/**
- * Returns an intent for starting the default home activity
- */
- public static Intent createHomeIntent() {
- return new Intent(Intent.ACTION_MAIN)
- .addCategory(Intent.CATEGORY_HOME)
- .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- }
-
- /**
* Wraps a message with a TTS span, so that a different message is spoken than
* what is getting displayed.
* @param msg original message
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 93f3d9f..4903d77 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -3265,7 +3265,11 @@
}
}
- private View mapOverCellLayout(CellLayout layout, ItemOperator op) {
+ /**
+ * Perform {param operator} over all the items in a given {param layout}.
+ * @return The first item that satisfies the operator or null.
+ */
+ public View mapOverCellLayout(CellLayout layout, ItemOperator operator) {
// TODO(b/128460496) Potential race condition where layout is not yet loaded
if (layout == null) {
return null;
@@ -3275,7 +3279,7 @@
final int itemCount = container.getChildCount();
for (int itemIdx = 0; itemIdx < itemCount; itemIdx++) {
View item = container.getChildAt(itemIdx);
- if (op.evaluate((ItemInfo) item.getTag(), item)) {
+ if (operator.evaluate((ItemInfo) item.getTag(), item)) {
return item;
}
}
diff --git a/src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java b/src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java
index 44d57d7..79214e8 100644
--- a/src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java
+++ b/src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java
@@ -60,6 +60,7 @@
public static final int DISMISS_PREDICTION = R.id.action_dismiss_prediction;
public static final int PIN_PREDICTION = R.id.action_pin_prediction;
public static final int RECONFIGURE = R.id.action_reconfigure;
+ public static final int INVALID = -1;
protected static final int ADD_TO_WORKSPACE = R.id.action_add_to_workspace;
protected static final int MOVE = R.id.action_move;
protected static final int MOVE_TO_WORKSPACE = R.id.action_move_to_workspace;
diff --git a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java
index 47f2dd5..53a6fd7 100644
--- a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java
+++ b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java
@@ -82,7 +82,7 @@
OnClickListener marketSearchClickListener = (v) -> mActivityContext.startActivitySafely(v,
marketSearchIntent, null);
for (int i = 0; i < mAH.size(); i++) {
- mAH.get(i).adapter.setLastSearchQuery(query, marketSearchClickListener);
+ mAH.get(i).mAdapter.setLastSearchQuery(query, marketSearchClickListener);
}
mIsSearching = true;
rebindAdapters();
@@ -101,7 +101,7 @@
* Sets results list for search
*/
public void setSearchResults(ArrayList<AdapterItem> results) {
- if (getApps().setSearchResults(results)) {
+ if (getSearchResultList().setSearchResults(results)) {
for (int i = 0; i < mAH.size(); i++) {
if (mAH.get(i).mRecyclerView != null) {
mAH.get(i).mRecyclerView.onSearchResultsChanged();
@@ -148,7 +148,7 @@
@Override
public String getDescription() {
- if (!mUsingTabs && mIsSearching) {
+ if (!mUsingTabs && isSearching()) {
return getContext().getString(R.string.all_apps_search_results);
} else {
return super.getDescription();
@@ -156,8 +156,13 @@
}
@Override
- protected boolean showTabs() {
- return super.showTabs() && !mIsSearching;
+ protected boolean shouldShowTabs() {
+ return super.shouldShowTabs() && !isSearching();
+ }
+
+ @Override
+ public boolean isSearching() {
+ return mIsSearching;
}
@Override
@@ -179,15 +184,19 @@
}
@Override
- protected View replaceRVContainer(boolean showTabs) {
- View rvContainer = super.replaceRVContainer(showTabs);
+ protected View replaceAppsRVContainer(boolean showTabs) {
+ View rvContainer = super.replaceAppsRVContainer(showTabs);
removeCustomRules(rvContainer);
+ removeCustomRules(getSearchRecyclerView());
if (FeatureFlags.ENABLE_FLOATING_SEARCH_BAR.get()) {
alignParentTop(rvContainer, showTabs);
+ alignParentTop(getSearchRecyclerView(), /* tabs= */ false);
layoutAboveSearchContainer(rvContainer);
+ layoutAboveSearchContainer(getSearchRecyclerView());
} else {
layoutBelowSearchContainer(rvContainer, showTabs);
+ layoutBelowSearchContainer(getSearchRecyclerView(), /* tabs= */ false);
}
return rvContainer;
@@ -214,7 +223,7 @@
float prog = Utilities.boundToRange((float) scrolledOffset / mHeaderThreshold, 0f, 1f);
boolean bgVisible = mSearchUiManager.getBackgroundVisibility();
- if (scrolledOffset == 0 && !mIsSearching) {
+ if (scrolledOffset == 0 && !isSearching()) {
bgVisible = true;
} else if (scrolledOffset > mHeaderThreshold) {
bgVisible = false;
@@ -230,7 +239,7 @@
}
@Override
- protected int getHeaderBottom() {
+ public int getHeaderBottom() {
if (FeatureFlags.ENABLE_FLOATING_SEARCH_BAR.get()) {
return super.getHeaderBottom();
}
@@ -248,7 +257,7 @@
int topMargin = getContext().getResources().getDimensionPixelSize(
R.dimen.all_apps_header_top_margin);
if (includeTabsMargin) {
- topMargin = topMargin + getContext().getResources().getDimensionPixelSize(
+ topMargin += getContext().getResources().getDimensionPixelSize(
R.dimen.all_apps_header_pill_height);
}
layoutParams.topMargin = topMargin;
@@ -289,9 +298,9 @@
}
@Override
- protected BaseAllAppsAdapter getAdapter(AlphabeticalAppsList<T> mAppsList,
+ protected BaseAllAppsAdapter<T> createAdapter(AlphabeticalAppsList<T> appsList,
BaseAdapterProvider[] adapterProviders) {
- return new AllAppsGridAdapter<>(mActivityContext, getLayoutInflater(), mAppsList,
+ return new AllAppsGridAdapter<>(mActivityContext, getLayoutInflater(), appsList,
adapterProviders);
}
}
diff --git a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
index 88e7fc0..af17cf7 100644
--- a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
@@ -35,8 +35,8 @@
import androidx.recyclerview.widget.RecyclerView;
-import com.android.launcher3.BaseRecyclerView;
import com.android.launcher3.DeviceProfile;
+import com.android.launcher3.FastScrollRecyclerView;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
@@ -50,13 +50,13 @@
/**
* A RecyclerView with custom fast scroll support for the all apps view.
*/
-public class AllAppsRecyclerView extends BaseRecyclerView {
- private static final String TAG = "AllAppsContainerView";
+public class AllAppsRecyclerView extends FastScrollRecyclerView {
+ protected static final String TAG = "AllAppsRecyclerView";
private static final boolean DEBUG = false;
private static final boolean DEBUG_LATENCY = Utilities.isPropertyEnabled(SEARCH_LOGGING);
- private AlphabeticalAppsList<?> mApps;
- private final int mNumAppsPerRow;
+ protected AlphabeticalAppsList<?> mApps;
+ protected final int mNumAppsPerRow;
// The specific view heights that we use to calculate scroll
private final SparseIntArray mViewHeights = new SparseIntArray();
@@ -91,8 +91,8 @@
};
// The empty-search result background
- private AllAppsBackgroundDrawable mEmptySearchBackground;
- private int mEmptySearchBackgroundTopOffset;
+ protected AllAppsBackgroundDrawable mEmptySearchBackground;
+ protected int mEmptySearchBackgroundTopOffset;
public AllAppsRecyclerView(Context context) {
this(context, null);
@@ -127,7 +127,7 @@
return mApps;
}
- private void updatePoolSize() {
+ protected void updatePoolSize() {
DeviceProfile grid = ActivityContext.lookupContext(getContext()).getDeviceProfile();
RecyclerView.RecycledViewPool pool = getRecycledViewPool();
int approxRows = (int) Math.ceil(grid.availableHeightPx / grid.allAppsIconSizePx);
@@ -152,8 +152,8 @@
Log.d(TAG, "onDraw at = " + System.currentTimeMillis());
}
if (DEBUG_LATENCY) {
- Log.d(SEARCH_LOGGING,
- "-- Recycle view onDraw, time stamp = " + System.currentTimeMillis());
+ Log.d(SEARCH_LOGGING, getClass().getSimpleName() + " onDraw; time stamp = "
+ + System.currentTimeMillis());
}
super.onDraw(c);
}
@@ -342,13 +342,6 @@
}
@Override
- public boolean supportsFastScrolling() {
- // Only allow fast scrolling when the user is not searching, since the results are not
- // grouped in a meaningful order
- return !mApps.hasFilter();
- }
-
- @Override
public int getCurrentScrollY() {
// Return early if there are no items or we haven't been measured
List<AllAppsGridAdapter.AdapterItem> items = mApps.getAdapterItems();
@@ -358,7 +351,7 @@
// Calculate the y and offset for the item
View child = getChildAt(0);
- int position = getChildPosition(child);
+ int position = getChildAdapterPosition(child);
if (position == NO_POSITION) {
return -1;
}
@@ -448,14 +441,4 @@
public boolean hasOverlappingRendering() {
return false;
}
-
- /**
- * Returns distance between left and right app icons
- */
- public int getTabWidth() {
- DeviceProfile grid = ActivityContext.lookupContext(getContext()).getDeviceProfile();
- int totalWidth = getMeasuredWidth() - getPaddingLeft() - getPaddingRight();
- int iconPadding = totalWidth / grid.numShownAllAppsColumns - grid.allAppsIconSizePx;
- return totalWidth - iconPadding - grid.allAppsIconDrawablePaddingPx;
- }
}
diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
index 3600bd2..a4a2085 100644
--- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java
+++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
@@ -84,7 +84,7 @@
@Override
public Float get(AllAppsTransitionController controller) {
if (controller.mIsTablet) {
- return controller.mAppsView.getRecyclerViewContainer().getTranslationY();
+ return controller.mAppsView.getActiveRecyclerView().getTranslationY();
} else {
return controller.getAppsViewPullbackTranslationY().get(
controller.mAppsView);
@@ -94,8 +94,7 @@
@Override
public void setValue(AllAppsTransitionController controller, float translation) {
if (controller.mIsTablet) {
- controller.mAppsView.getRecyclerViewContainer().setTranslationY(
- translation);
+ controller.mAppsView.getActiveRecyclerView().setTranslationY(translation);
} else {
controller.getAppsViewPullbackTranslationY().set(controller.mAppsView,
translation);
@@ -109,7 +108,7 @@
@Override
public Float get(AllAppsTransitionController controller) {
if (controller.mIsTablet) {
- return controller.mAppsView.getRecyclerViewContainer().getAlpha();
+ return controller.mAppsView.getActiveRecyclerView().getAlpha();
} else {
return controller.getAppsViewPullbackAlpha().getValue();
}
@@ -118,7 +117,7 @@
@Override
public void setValue(AllAppsTransitionController controller, float alpha) {
if (controller.mIsTablet) {
- controller.mAppsView.getRecyclerViewContainer().setAlpha(alpha);
+ controller.mAppsView.getActiveRecyclerView().setAlpha(alpha);
} else {
controller.getAppsViewPullbackAlpha().setValue(alpha);
}
diff --git a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java
index 4ccfd39..45a567d 100644
--- a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java
+++ b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java
@@ -21,6 +21,7 @@
import android.content.Context;
+import androidx.annotation.Nullable;
import androidx.recyclerview.widget.DiffUtil;
import com.android.launcher3.allapps.BaseAllAppsAdapter.AdapterItem;
@@ -72,6 +73,7 @@
// The set of apps from the system
private final List<AppInfo> mApps = new ArrayList<>();
+ @Nullable
private final AllAppsStore mAllAppsStore;
// The number of results in current adapter
@@ -89,14 +91,16 @@
private int mNumAppRowsInAdapter;
private Predicate<ItemInfo> mItemFilter;
- public AlphabeticalAppsList(Context context, AllAppsStore appsStore,
+ public AlphabeticalAppsList(Context context, @Nullable AllAppsStore appsStore,
WorkAdapterProvider adapterProvider) {
mAllAppsStore = appsStore;
mActivityContext = ActivityContext.lookupContext(context);
mAppNameComparator = new AppInfoComparator(context);
mWorkAdapterProvider = adapterProvider;
mNumAppsPerRowAllApps = mActivityContext.getDeviceProfile().inv.numAllAppsColumns;
- mAllAppsStore.addUpdateListener(this);
+ if (mAllAppsStore != null) {
+ mAllAppsStore.addUpdateListener(this);
+ }
}
public void updateItemFilter(Predicate<ItemInfo> itemFilter) {
@@ -162,9 +166,9 @@
}
/**
- * Returns whether there are is a filter set.
+ * Returns whether there are search results which will hide the A-Z list.
*/
- public boolean hasFilter() {
+ public boolean hasSearchResults() {
return !mSearchResults.isEmpty();
}
@@ -172,7 +176,7 @@
* Returns whether there are no filtered results.
*/
public boolean hasNoFilteredResults() {
- return hasFilter() && mAccessibilityResultsCount == 0;
+ return hasSearchResults() && mAccessibilityResultsCount == 0;
}
/**
@@ -195,11 +199,14 @@
*/
@Override
public void onAppsUpdated() {
+ if (mAllAppsStore == null) {
+ return;
+ }
// Sort the list of apps
mApps.clear();
Stream<AppInfo> appSteam = Stream.of(mAllAppsStore.getApps());
- if (!hasFilter() && mItemFilter != null) {
+ if (!hasSearchResults() && mItemFilter != null) {
appSteam = appSteam.filter(mItemFilter);
}
appSteam = appSteam.sorted(mAppNameComparator);
@@ -240,7 +247,18 @@
// Recreate the filtered and sectioned apps (for convenience for the grid layout) from the
// ordered set of sections
- if (!hasFilter()) {
+ if (hasSearchResults()) {
+ mAdapterItems.addAll(mSearchResults);
+ if (!FeatureFlags.ENABLE_DEVICE_SEARCH.get()) {
+ // Append the search market item
+ if (hasNoFilteredResults()) {
+ mAdapterItems.add(new AdapterItem(VIEW_TYPE_EMPTY_SEARCH));
+ } else {
+ mAdapterItems.add(new AdapterItem(VIEW_TYPE_ALL_APPS_DIVIDER));
+ }
+ mAdapterItems.add(new AdapterItem(VIEW_TYPE_SEARCH_MARKET));
+ }
+ } else {
int position = 0;
if (mWorkAdapterProvider != null) {
position += mWorkAdapterProvider.addWorkItems(mAdapterItems);
@@ -260,17 +278,6 @@
}
position++;
}
- } else {
- mAdapterItems.addAll(mSearchResults);
- if (!FeatureFlags.ENABLE_DEVICE_SEARCH.get()) {
- // Append the search market item
- if (hasNoFilteredResults()) {
- mAdapterItems.add(new AdapterItem(VIEW_TYPE_EMPTY_SEARCH));
- } else {
- mAdapterItems.add(new AdapterItem(VIEW_TYPE_ALL_APPS_DIVIDER));
- }
- mAdapterItems.add(new AdapterItem(VIEW_TYPE_SEARCH_MARKET));
- }
}
mAccessibilityResultsCount = (int) mAdapterItems.stream()
.filter(AdapterItem::isCountedForAccessibility).count();
diff --git a/src/com/android/launcher3/allapps/BaseAllAppsAdapter.java b/src/com/android/launcher3/allapps/BaseAllAppsAdapter.java
index c7c4607..fcba246 100644
--- a/src/com/android/launcher3/allapps/BaseAllAppsAdapter.java
+++ b/src/com/android/launcher3/allapps/BaseAllAppsAdapter.java
@@ -119,7 +119,7 @@
* Returns true if the items represent the same object
*/
public boolean isSameAs(AdapterItem other) {
- return (other.viewType != viewType) && (other.getClass() == getClass());
+ return (other.viewType == viewType) && (other.getClass() == getClass());
}
/**
diff --git a/src/com/android/launcher3/allapps/BaseAllAppsContainerView.java b/src/com/android/launcher3/allapps/BaseAllAppsContainerView.java
index fc52797..499e749 100644
--- a/src/com/android/launcher3/allapps/BaseAllAppsContainerView.java
+++ b/src/com/android/launcher3/allapps/BaseAllAppsContainerView.java
@@ -63,6 +63,7 @@
import com.android.launcher3.util.ItemInfoMatcher;
import com.android.launcher3.util.Themes;
import com.android.launcher3.views.ActivityContext;
+import com.android.launcher3.views.BaseDragLayer;
import com.android.launcher3.views.RecyclerViewFastScroller;
import com.android.launcher3.views.ScrimView;
import com.android.launcher3.views.SpringRelativeLayout;
@@ -83,7 +84,7 @@
OnDeviceProfileChangeListener, OnActivePageChangedListener,
ScrimView.ScrimDrawingController {
- private static final String BUNDLE_KEY_CURRENT_PAGE = "launcher.allapps.current_page";
+ protected static final String BUNDLE_KEY_CURRENT_PAGE = "launcher.allapps.current_page";
public static final float PULL_MULTIPLIER = .02f;
public static final float FLING_VELOCITY_MULTIPLIER = 1200f;
@@ -112,6 +113,7 @@
private int mNavBarScrimHeight = 0;
private AllAppsPagedView mViewPager;
+ private SearchRecyclerView mSearchRecyclerView;
protected FloatingHeaderView mHeader;
private View mBottomSheetBackground;
@@ -126,6 +128,7 @@
private final int mScrimColor;
private final int mHeaderProtectionColor;
protected final float mHeaderThreshold;
+ private int mHeaderBottomAdjustment;
private ScrimView mScrimView;
private int mHeaderColor;
private int mTabsProtectionAlpha;
@@ -138,15 +141,18 @@
mScrimColor = Themes.getAttrColor(context, R.attr.allAppsScrimColor);
mHeaderThreshold = getResources().getDimensionPixelSize(
R.dimen.dynamic_grid_cell_border_spacing);
+ mHeaderBottomAdjustment = getResources().getDimensionPixelSize(
+ R.dimen.all_apps_header_bottom_adjustment);
mHeaderProtectionColor = Themes.getAttrColor(context, R.attr.allappsHeaderProtectionColor);
mWorkManager = new WorkProfileManager(
mActivityContext.getSystemService(UserManager.class),
this,
Utilities.getPrefs(mActivityContext), mActivityContext.getDeviceProfile());
- mAH = Arrays.asList(null, null);
- mAH.set(AdapterHolder.MAIN, new AdapterHolder(false /* isWork */));
- mAH.set(AdapterHolder.WORK, new AdapterHolder(true /* isWork */));
+ mAH = Arrays.asList(null, null, null);
+ mAH.set(AdapterHolder.MAIN, new AdapterHolder(AdapterHolder.MAIN));
+ mAH.set(AdapterHolder.WORK, new AdapterHolder(AdapterHolder.WORK));
+ mAH.set(AdapterHolder.SEARCH, new AdapterHolder(AdapterHolder.SEARCH));
mNavBarScrimPaint = new Paint();
mNavBarScrimPaint.setColor(Themes.getAttrColor(context, R.attr.allAppsNavBarScrimColor));
@@ -178,7 +184,7 @@
Bundle state = (Bundle) sparseArray.get(R.id.work_tab_state_id, null);
if (state != null) {
int currentPage = state.getInt(BUNDLE_KEY_CURRENT_PAGE, 0);
- if (currentPage != 0 && mViewPager != null) {
+ if (currentPage == AdapterHolder.WORK && mViewPager != null) {
mViewPager.setCurrentPage(currentPage);
rebindAdapters();
} else {
@@ -201,7 +207,7 @@
*/
public void setOnIconLongClickListener(OnLongClickListener listener) {
for (AdapterHolder holder : mAH) {
- holder.adapter.setOnIconLongClickListener(listener);
+ holder.mAdapter.setOnIconLongClickListener(listener);
}
}
@@ -216,7 +222,7 @@
@Override
public void onDeviceProfileChanged(DeviceProfile dp) {
for (AdapterHolder holder : mAH) {
- holder.adapter.setAppsPerRow(dp.numShownAllAppsColumns);
+ holder.mAdapter.setAppsPerRow(dp.numShownAllAppsColumns);
if (holder.mRecyclerView != null) {
// Remove all views and clear the pool, while keeping the data same. After this
// call, all the viewHolders will be recreated.
@@ -233,7 +239,7 @@
private void onAppsUpdated() {
mHasWorkApps = Stream.of(mAllAppsStore.getApps()).anyMatch(mWorkManager.getMatcher());
- if (!mAH.get(AdapterHolder.MAIN).mAppsList.hasFilter()) {
+ if (!isSearching()) {
rebindAdapters();
if (mHasWorkApps) {
mWorkManager.reset();
@@ -245,30 +251,32 @@
* Returns whether the view itself will handle the touch event or not.
*/
public boolean shouldContainerScroll(MotionEvent ev) {
+ BaseDragLayer dragLayer = mActivityContext.getDragLayer();
// Scroll if not within the container view (e.g. over large-screen scrim).
- if (!mActivityContext.getDragLayer().isEventOverView(this, ev)) {
+ if (!dragLayer.isEventOverView(getVisibleContainerView(), ev)) {
return true;
}
- if (mActivityContext.getDragLayer().isEventOverView(mBottomSheetHandleArea, ev)) {
+ if (dragLayer.isEventOverView(mBottomSheetHandleArea, ev)) {
return true;
}
AllAppsRecyclerView rv = getActiveRecyclerView();
if (rv == null) {
return true;
}
- if (rv.getScrollbar().getThumbOffsetY() >= 0
- && mActivityContext.getDragLayer().isEventOverView(rv.getScrollbar(), ev)) {
+ if (rv.getScrollbar() != null
+ && rv.getScrollbar().getThumbOffsetY() >= 0
+ && dragLayer.isEventOverView(rv.getScrollbar(), ev)) {
return false;
}
- return rv.shouldContainerScroll(ev, mActivityContext.getDragLayer());
+ return rv.shouldContainerScroll(ev, dragLayer);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
AllAppsRecyclerView rv = getActiveRecyclerView();
- if (rv != null && rv.getScrollbar().isHitInParent(ev.getX(), ev.getY(),
- mFastScrollerOffset)) {
+ if (rv != null && rv.getScrollbar() != null
+ && rv.getScrollbar().isHitInParent(ev.getX(), ev.getY(), mFastScrollerOffset)) {
mTouchHandler = rv.getScrollbar();
} else {
mTouchHandler = null;
@@ -284,8 +292,8 @@
public boolean onTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
AllAppsRecyclerView rv = getActiveRecyclerView();
- if (rv != null && rv.getScrollbar().isHitInParent(ev.getX(), ev.getY(),
- mFastScrollerOffset)) {
+ if (rv != null && rv.getScrollbar() != null
+ && rv.getScrollbar().isHitInParent(ev.getX(), ev.getY(), mFastScrollerOffset)) {
mTouchHandler = rv.getScrollbar();
} else {
mTouchHandler = null;
@@ -296,6 +304,10 @@
mTouchHandler.handleTouchEvent(ev, mFastScrollerOffset);
return true;
}
+ if (isSearching()) {
+ // if in search state, consume touch event.
+ return true;
+ }
return false;
}
@@ -316,8 +328,16 @@
return getContext().getString(R.string.all_apps_button_label);
}
- /** The current recycler view visible in the container. */
+ /** The current active recycler view (A-Z list from one of the profiles, or search results). */
public AllAppsRecyclerView getActiveRecyclerView() {
+ if (isSearching()) {
+ return getSearchRecyclerView();
+ }
+ return getActiveAppsRecyclerView();
+ }
+
+ /** The current apps recycler view in the container. */
+ private AllAppsRecyclerView getActiveAppsRecyclerView() {
if (!mUsingTabs || isPersonalTab()) {
return mAH.get(AdapterHolder.MAIN).mRecyclerView;
} else {
@@ -325,6 +345,19 @@
}
}
+ /**
+ * The container for A-Z apps (the ViewPager for main+work tabs, or main RV). This is currently
+ * hidden while searching.
+ **/
+ private View getAppsRecyclerViewContainer() {
+ return mViewPager != null ? mViewPager : findViewById(R.id.apps_list_view);
+ }
+
+ /** The RV for search results, which is hidden while A-Z apps are visible. */
+ public SearchRecyclerView getSearchRecyclerView() {
+ return mSearchRecyclerView;
+ }
+
protected boolean isPersonalTab() {
return mViewPager == null || mViewPager.getNextPage() == 0;
}
@@ -372,6 +405,9 @@
});
mHeader = findViewById(R.id.all_apps_header);
+ mSearchRecyclerView = findViewById(R.id.search_results_list_view);
+ mAH.get(AdapterHolder.SEARCH).setup(mSearchRecyclerView,
+ /* Filter out A-Z apps */ itemInfo -> false);
rebindAdapters(true /* force */);
mBottomSheetBackground = findViewById(R.id.bottom_sheet_background);
@@ -388,7 +424,7 @@
mInsets.set(insets);
DeviceProfile grid = mActivityContext.getDeviceProfile();
- applyAdapterPaddings(grid);
+ applyAdapterSideAndBottomPaddings(grid);
MarginLayoutParams mlp = (MarginLayoutParams) getLayoutParams();
mlp.leftMargin = insets.left;
@@ -415,7 +451,7 @@
@Override
public WindowInsets dispatchApplyWindowInsets(WindowInsets insets) {
mNavBarScrimHeight = getNavBarScrimHeight(insets);
- applyAdapterPaddings(mActivityContext.getDeviceProfile());
+ applyAdapterSideAndBottomPaddings(mActivityContext.getDeviceProfile());
return super.dispatchApplyWindowInsets(insets);
}
@@ -434,15 +470,23 @@
}
protected void rebindAdapters(boolean force) {
- boolean showTabs = showTabs();
+ updateSearchResultsVisibility();
+
+ boolean showTabs = shouldShowTabs();
if (showTabs == mUsingTabs && !force) {
return;
}
- // replaceRVcontainer() needs to use both mUsingTabs value to remove the old view AND
+ if (isSearching()) {
+ mUsingTabs = showTabs;
+ mWorkManager.detachWorkModeSwitch();
+ return;
+ }
+
+ // replaceAppsRVcontainer() needs to use both mUsingTabs value to remove the old view AND
// showTabs value to create new view. Hence the mUsingTabs new value assignment MUST happen
// after this call.
- replaceRVContainer(showTabs);
+ replaceAppsRVContainer(showTabs);
mUsingTabs = showTabs;
mAllAppsStore.unregisterIconContainer(mAH.get(AdapterHolder.MAIN).mRecyclerView);
@@ -483,13 +527,27 @@
mAllAppsStore.registerIconContainer(mAH.get(AdapterHolder.WORK).mRecyclerView);
}
- private void applyAdapterPaddings(DeviceProfile grid) {
- int bottomPadding = Math.max(mInsets.bottom, mNavBarScrimHeight);
- for (int i = 0; i < mAH.size(); i++) {
- mAH.get(i).mPadding.bottom = bottomPadding;
- mAH.get(i).mPadding.left = mAH.get(i).mPadding.right = grid.allAppsLeftRightPadding;
- mAH.get(i).applyPadding();
+ private void updateSearchResultsVisibility() {
+ if (isSearching()) {
+ getSearchRecyclerView().setVisibility(VISIBLE);
+ getAppsRecyclerViewContainer().setVisibility(GONE);
+ } else {
+ getSearchRecyclerView().setVisibility(GONE);
+ getAppsRecyclerViewContainer().setVisibility(VISIBLE);
}
+ if (mHeader.isSetUp()) {
+ mHeader.setActiveRV(getCurrentPage());
+ }
+ }
+
+ private void applyAdapterSideAndBottomPaddings(DeviceProfile grid) {
+ int bottomPadding = Math.max(mInsets.bottom, mNavBarScrimHeight);
+ mAH.forEach(adapterHolder -> {
+ adapterHolder.mPadding.bottom = bottomPadding;
+ adapterHolder.mPadding.left =
+ adapterHolder.mPadding.right = grid.allAppsLeftRightPadding;
+ adapterHolder.applyPadding();
+ });
}
private void setDeviceManagementResources() {
@@ -502,18 +560,23 @@
}
}
- protected boolean showTabs() {
+ protected boolean shouldShowTabs() {
return mHasWorkApps;
}
- protected View replaceRVContainer(boolean showTabs) {
- for (AdapterHolder adapterHolder : mAH) {
+ protected boolean isSearching() {
+ return false;
+ }
+
+ protected View replaceAppsRVContainer(boolean showTabs) {
+ for (int i = AdapterHolder.MAIN; i <= AdapterHolder.WORK; i++) {
+ AdapterHolder adapterHolder = mAH.get(i);
if (adapterHolder.mRecyclerView != null) {
adapterHolder.mRecyclerView.setLayoutManager(null);
adapterHolder.mRecyclerView.setAdapter(null);
}
}
- View oldView = getRecyclerViewContainer();
+ View oldView = getAppsRecyclerViewContainer();
int index = indexOfChild(oldView);
removeView(oldView);
int layout = showTabs ? R.layout.all_apps_tabs : R.layout.all_apps_rv_layout;
@@ -534,13 +597,8 @@
return newView;
}
- public View getRecyclerViewContainer() {
- return mViewPager != null ? mViewPager : findViewById(R.id.apps_list_view);
- }
-
@Override
public void onActivePageChanged(int currentActivePage) {
- mHeader.setMainActive(currentActivePage == AdapterHolder.MAIN);
if (mAH.get(currentActivePage).mRecyclerView != null) {
mAH.get(currentActivePage).mRecyclerView.bindFastScrollbar();
}
@@ -569,8 +627,8 @@
return isDescendantViewVisible(R.id.tab_work);
}
- public AlphabeticalAppsList<T> getApps() {
- return mAH.get(AdapterHolder.MAIN).mAppsList;
+ public AlphabeticalAppsList<T> getSearchResultList() {
+ return mAH.get(AdapterHolder.SEARCH).mAppsList;
}
public FloatingHeaderView getFloatingHeaderView() {
@@ -579,35 +637,40 @@
@VisibleForTesting
public View getContentView() {
- return mViewPager == null ? getActiveRecyclerView() : mViewPager;
+ return isSearching() ? getSearchRecyclerView() : getAppsRecyclerViewContainer();
}
/** The current page visible in all apps. */
public int getCurrentPage() {
- return mViewPager != null ? mViewPager.getCurrentPage() : AdapterHolder.MAIN;
+ return isSearching()
+ ? AdapterHolder.SEARCH
+ : mViewPager == null ? AdapterHolder.MAIN : mViewPager.getNextPage();
}
- /** The scroll bar for the active recycler view. */
+ /** The scroll bar for the active apps recycler view. */
public RecyclerViewFastScroller getScrollBar() {
- AllAppsRecyclerView rv = getActiveRecyclerView();
+ AllAppsRecyclerView rv = getActiveAppsRecyclerView();
return rv == null ? null : rv.getScrollbar();
}
void setupHeader() {
mHeader.setVisibility(View.VISIBLE);
+ boolean tabsHidden = !mUsingTabs;
mHeader.setup(
mAH.get(AdapterHolder.MAIN).mRecyclerView,
mAH.get(AdapterHolder.WORK).mRecyclerView,
- mAH.get(AdapterHolder.WORK).mRecyclerView == null);
+ (SearchRecyclerView) mAH.get(AdapterHolder.SEARCH).mRecyclerView,
+ getCurrentPage(),
+ tabsHidden);
int padding = mHeader.getMaxTranslation();
- for (int i = 0; i < mAH.size(); i++) {
- mAH.get(i).mPadding.top = padding;
- mAH.get(i).applyPadding();
- if (mAH.get(i).mRecyclerView != null) {
- mAH.get(i).mRecyclerView.scrollToTop();
+ mAH.forEach(adapterHolder -> {
+ adapterHolder.mPadding.top = padding;
+ adapterHolder.applyPadding();
+ if (adapterHolder.mRecyclerView != null) {
+ adapterHolder.mRecyclerView.scrollToTop();
}
- }
+ });
}
public boolean isHeaderVisible() {
@@ -623,7 +686,7 @@
animator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animator) {
- float distance = (float) ((1 - progress) * getHeight()); // px
+ float distance = (1 - progress) * getHeight(); // px
float settleVelocity = Math.min(0, distance
/ (AllAppsTransitionController.INTERP_COEFF * animator.getDuration())
+ velocity);
@@ -666,6 +729,9 @@
mHeaderPaint.setAlpha((int) (getAlpha() * Color.alpha(mHeaderColor)));
if (mHeaderPaint.getColor() != mScrimColor && mHeaderPaint.getColor() != 0) {
int bottom = getHeaderBottom();
+ if (!mUsingTabs) {
+ bottom += getFloatingHeaderView().getPaddingBottom() - mHeaderBottomAdjustment;
+ }
canvas.drawRect(0, 0, canvas.getWidth(), bottom, mHeaderPaint);
int tabsHeight = getFloatingHeaderView().getPeripheralProtectionHeight();
if (mTabsProtectionAlpha > 0 && tabsHeight != 0) {
@@ -702,38 +768,47 @@
return ColorUtils.blendARGB(mScrimColor, mHeaderProtectionColor, blendRatio);
}
- protected abstract BaseAllAppsAdapter getAdapter(AlphabeticalAppsList<T> mAppsList,
+ protected abstract BaseAllAppsAdapter<T> createAdapter(AlphabeticalAppsList<T> mAppsList,
BaseAdapterProvider[] adapterProviders);
- protected int getHeaderBottom() {
+ public int getHeaderBottom() {
return (int) getTranslationY();
}
+ /**
+ * Returns a view that denotes the visible part of all apps container view.
+ */
+ public View getVisibleContainerView() {
+ return mActivityContext.getDeviceProfile().isTablet ? mBottomSheetBackground : this;
+ }
+
/** Holds a {@link BaseAllAppsAdapter} and related fields. */
public class AdapterHolder {
public static final int MAIN = 0;
public static final int WORK = 1;
+ public static final int SEARCH = 2;
- private final boolean mIsWork;
- public final BaseAllAppsAdapter<T> adapter;
+ private final int mType;
+ public final BaseAllAppsAdapter<T> mAdapter;
final RecyclerView.LayoutManager mLayoutManager;
final AlphabeticalAppsList<T> mAppsList;
final Rect mPadding = new Rect();
AllAppsRecyclerView mRecyclerView;
- AdapterHolder(boolean isWork) {
- mIsWork = isWork;
- mAppsList = new AlphabeticalAppsList<>(mActivityContext, mAllAppsStore,
- isWork ? mWorkManager.getAdapterProvider() : null);
+ AdapterHolder(int type) {
+ mType = type;
+ mAppsList = new AlphabeticalAppsList<>(mActivityContext,
+ isSearch() ? null : mAllAppsStore,
+ isWork() ? mWorkManager.getAdapterProvider() : null);
BaseAdapterProvider[] adapterProviders =
- isWork ? new BaseAdapterProvider[]{mMainAdapterProvider,
+ isWork() ? new BaseAdapterProvider[]{mMainAdapterProvider,
mWorkManager.getAdapterProvider()}
: new BaseAdapterProvider[]{mMainAdapterProvider};
- adapter = getAdapter(mAppsList, adapterProviders);
- mAppsList.setAdapter(adapter);
- mLayoutManager = adapter.getLayoutManager();
+ mAdapter = createAdapter(mAppsList, adapterProviders);
+ mAppsList.setAdapter(mAdapter);
+ mLayoutManager = mAdapter.getLayoutManager();
}
void setup(@NonNull View rv, @Nullable Predicate<ItemInfo> matcher) {
@@ -742,33 +817,34 @@
mRecyclerView.setEdgeEffectFactory(createEdgeEffectFactory());
mRecyclerView.setApps(mAppsList);
mRecyclerView.setLayoutManager(mLayoutManager);
- mRecyclerView.setAdapter(adapter);
+ mRecyclerView.setAdapter(mAdapter);
mRecyclerView.setHasFixedSize(true);
// No animations will occur when changes occur to the items in this RecyclerView.
mRecyclerView.setItemAnimator(null);
mRecyclerView.addOnScrollListener(mScrollListener);
FocusedItemDecorator focusedItemDecorator = new FocusedItemDecorator(mRecyclerView);
mRecyclerView.addItemDecoration(focusedItemDecorator);
- adapter.setIconFocusListener(focusedItemDecorator.getFocusListener());
+ mAdapter.setIconFocusListener(focusedItemDecorator.getFocusListener());
applyPadding();
}
void applyPadding() {
if (mRecyclerView != null) {
int bottomOffset = 0;
- if (mIsWork && mWorkManager.getWorkModeSwitch() != null) {
+ if (isWork() && mWorkManager.getWorkModeSwitch() != null) {
bottomOffset = mInsets.bottom + mWorkManager.getWorkModeSwitch().getHeight();
}
mRecyclerView.setPadding(mPadding.left, mPadding.top, mPadding.right,
mPadding.bottom + bottomOffset);
}
}
- }
- /**
- * Returns a view that denotes the visible part of all apps container view.
- */
- public View getVisibleContainerView() {
- return mActivityContext.getDeviceProfile().isTablet ? mBottomSheetBackground : this;
+ private boolean isWork() {
+ return mType == WORK;
+ }
+
+ private boolean isSearch() {
+ return mType == SEARCH;
+ }
}
}
diff --git a/src/com/android/launcher3/allapps/FloatingHeaderView.java b/src/com/android/launcher3/allapps/FloatingHeaderView.java
index 72f14a8..6ecbad2 100644
--- a/src/com/android/launcher3/allapps/FloatingHeaderView.java
+++ b/src/com/android/launcher3/allapps/FloatingHeaderView.java
@@ -33,6 +33,7 @@
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Insettable;
import com.android.launcher3.R;
+import com.android.launcher3.allapps.BaseAllAppsContainerView.AdapterHolder;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.uioverrides.plugins.PluginManagerWrapper;
import com.android.launcher3.views.ActivityContext;
@@ -54,11 +55,10 @@
private final RecyclerView.OnScrollListener mOnScrollListener =
new RecyclerView.OnScrollListener() {
@Override
- public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
- }
+ public void onScrollStateChanged(@NonNull RecyclerView rv, int newState) {}
@Override
- public void onScrolled(RecyclerView rv, int dx, int dy) {
+ public void onScrolled(@NonNull RecyclerView rv, int dx, int dy) {
if (rv != mCurrentRV) {
return;
}
@@ -81,7 +81,6 @@
protected final Map<AllAppsRow, PluginHeaderRow> mPluginRows = new ArrayMap<>();
- private final int mHeaderTopPadding;
// These two values are necessary to ensure that the header protection is drawn correctly.
private final int mHeaderTopAdjustment;
private final int mHeaderBottomAdjustment;
@@ -90,8 +89,8 @@
protected ViewGroup mTabLayout;
private AllAppsRecyclerView mMainRV;
private AllAppsRecyclerView mWorkRV;
+ private SearchRecyclerView mSearchRV;
private AllAppsRecyclerView mCurrentRV;
- private ViewGroup mParent;
public boolean mHeaderCollapsed;
protected int mSnappedScrolledY;
private int mTranslationY;
@@ -100,7 +99,6 @@
protected boolean mTabsHidden;
protected int mMaxTranslation;
- private boolean mMainRVActive = true;
private boolean mCollapsed = false;
@@ -119,8 +117,6 @@
public FloatingHeaderView(@NonNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
- mHeaderTopPadding = context.getResources()
- .getDimensionPixelSize(R.dimen.all_apps_header_top_padding);
mHeaderTopAdjustment = context.getResources()
.getDimensionPixelSize(R.dimen.all_apps_header_top_adjustment);
mHeaderBottomAdjustment = context.getResources()
@@ -164,12 +160,20 @@
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- if (mMainRV != null) {
- mTabLayout.getLayoutParams().width = mMainRV.getTabWidth();
- }
+ mTabLayout.getLayoutParams().width = getTabWidth();
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
+ /**
+ * Returns distance between left and right app icons
+ */
+ public int getTabWidth() {
+ DeviceProfile grid = ActivityContext.lookupContext(getContext()).getDeviceProfile();
+ int totalWidth = getMeasuredWidth() - getPaddingLeft() - getPaddingRight();
+ int iconPadding = totalWidth / grid.numShownAllAppsColumns - grid.allAppsIconSizePx;
+ return totalWidth - iconPadding - grid.allAppsIconDrawablePaddingPx;
+ }
+
private void recreateAllRowsArray() {
int pluginCount = mPluginRows.size();
if (pluginCount == 0) {
@@ -202,7 +206,7 @@
int oldMaxHeight = mMaxTranslation;
updateExpectedHeight();
- if (mMaxTranslation != oldMaxHeight) {
+ if (mMaxTranslation != oldMaxHeight || mCollapsed) {
BaseAllAppsContainerView<?> parent = (BaseAllAppsContainerView<?>) getParent();
if (parent != null) {
parent.setupHeader();
@@ -232,7 +236,8 @@
return super.getFocusedChild();
}
- void setup(AllAppsRecyclerView mainRV, AllAppsRecyclerView workRV, boolean tabsHidden) {
+ void setup(AllAppsRecyclerView mainRV, AllAppsRecyclerView workRV, SearchRecyclerView searchRV,
+ int activeRV, boolean tabsHidden) {
for (FloatingHeaderRow row : mAllRows) {
row.setup(this, mAllRows, tabsHidden);
}
@@ -240,18 +245,27 @@
mTabsHidden = tabsHidden;
mTabLayout.setVisibility(tabsHidden ? View.GONE : View.VISIBLE);
- mMainRV = setupRV(mMainRV, mainRV);
- mWorkRV = setupRV(mWorkRV, workRV);
- mParent = (ViewGroup) mMainRV.getParent();
- setMainActive(mMainRVActive || mWorkRV == null);
+ mMainRV = mainRV;
+ mWorkRV = workRV;
+ mSearchRV = searchRV;
+ setActiveRV(activeRV);
reset(false);
}
- private AllAppsRecyclerView setupRV(AllAppsRecyclerView old, AllAppsRecyclerView updated) {
- if (old != updated && updated != null) {
- updated.addOnScrollListener(mOnScrollListener);
+ /** Whether this header has been set up previously. */
+ boolean isSetUp() {
+ return mMainRV != null;
+ }
+
+ /** Set the active AllApps RV which will adjust the alpha of the header when scrolled. */
+ void setActiveRV(int rvType) {
+ if (mCurrentRV != null) {
+ mCurrentRV.removeOnScrollListener(mOnScrollListener);
}
- return updated;
+ mCurrentRV =
+ rvType == AdapterHolder.MAIN ? mMainRV
+ : rvType == AdapterHolder.WORK ? mWorkRV : mSearchRV;
+ mCurrentRV.addOnScrollListener(mOnScrollListener);
}
private void updateExpectedHeight() {
@@ -267,11 +281,6 @@
}
}
- public void setMainActive(boolean active) {
- mCurrentRV = active ? mMainRV : mWorkRV;
- mMainRVActive = active;
- }
-
public int getMaxTranslation() {
if (mMaxTranslation == 0 && mTabsHidden) {
return getResources().getDimensionPixelSize(R.dimen.all_apps_search_bar_bottom_padding);
@@ -314,7 +323,7 @@
int uncappedTranslationY = mTranslationY;
mTranslationY = Math.max(mTranslationY, -mMaxTranslation);
- if (mCollapsed || uncappedTranslationY < mTranslationY - mHeaderTopPadding) {
+ if (mCollapsed || uncappedTranslationY < mTranslationY - getPaddingTop()) {
// we hide it completely if already capped (for opening search anim)
for (FloatingHeaderRow row : mAllRows) {
row.setVerticalScroll(0, true /* isScrolledOut */);
@@ -327,15 +336,23 @@
mTabLayout.setTranslationY(mTranslationY);
- int clipTop = mHeaderTopPadding - mHeaderTopAdjustment;
+ int clipTop = getPaddingTop() - mHeaderTopAdjustment;
+ if (mTabsHidden) {
+ clipTop += getPaddingBottom() - mHeaderBottomAdjustment;
+ }
mRVClip.top = mTabsHidden ? clipTop : 0;
mHeaderClip.top = clipTop;
// clipping on a draw might cause additional redraw
setClipBounds(mHeaderClip);
- mMainRV.setClipBounds(mRVClip);
+ if (mMainRV != null) {
+ mMainRV.setClipBounds(mRVClip);
+ }
if (mWorkRV != null) {
mWorkRV.setClipBounds(mRVClip);
}
+ if (mSearchRV != null) {
+ mSearchRV.setClipBounds(mRVClip);
+ }
}
/**
@@ -402,8 +419,8 @@
}
private void calcOffset(Point p) {
- p.x = getLeft() - mCurrentRV.getLeft() - mParent.getLeft();
- p.y = getTop() - mCurrentRV.getTop() - mParent.getTop();
+ p.x = getLeft() - mCurrentRV.getLeft() - ((ViewGroup) mCurrentRV.getParent()).getLeft();
+ p.y = getTop() - mCurrentRV.getTop() - ((ViewGroup) mCurrentRV.getParent()).getTop();
}
public boolean hasVisibleContent() {
diff --git a/src/com/android/launcher3/allapps/SearchRecyclerView.java b/src/com/android/launcher3/allapps/SearchRecyclerView.java
new file mode 100644
index 0000000..482bd29
--- /dev/null
+++ b/src/com/android/launcher3/allapps/SearchRecyclerView.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.launcher3.allapps;
+
+import android.content.Context;
+import android.util.AttributeSet;
+
+import com.android.launcher3.views.RecyclerViewFastScroller;
+
+/** A RecyclerView for AllApps Search results. */
+public class SearchRecyclerView extends AllAppsRecyclerView {
+ private static final String TAG = "SearchRecyclerView";
+
+ public SearchRecyclerView(Context context) {
+ this(context, null);
+ }
+
+ public SearchRecyclerView(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public SearchRecyclerView(Context context, AttributeSet attrs, int defStyleAttr) {
+ this(context, attrs, defStyleAttr, 0);
+ }
+
+ public SearchRecyclerView(Context context, AttributeSet attrs, int defStyleAttr,
+ int defStyleRes) {
+ super(context, attrs, defStyleAttr, defStyleRes);
+ }
+
+ @Override
+ protected void updatePoolSize() {
+ RecycledViewPool pool = getRecycledViewPool();
+ pool.setMaxRecycledViews(AllAppsGridAdapter.VIEW_TYPE_ICON, mNumAppsPerRow);
+ // TODO(b/206905515): Add maxes for other View types.
+ }
+
+ @Override
+ public boolean supportsFastScrolling() {
+ return false;
+ }
+
+ @Override
+ public RecyclerViewFastScroller getScrollbar() {
+ return null;
+ }
+}
diff --git a/src/com/android/launcher3/allapps/SearchUiManager.java b/src/com/android/launcher3/allapps/SearchUiManager.java
index 6299657..6138bc4 100644
--- a/src/com/android/launcher3/allapps/SearchUiManager.java
+++ b/src/com/android/launcher3/allapps/SearchUiManager.java
@@ -68,4 +68,9 @@
/** Refresh the currently displayed list of results. */
default void refreshResults() {}
+
+ /** Returns whether search is in zero state. */
+ default boolean inZeroState() {
+ return false;
+ }
}
diff --git a/src/com/android/launcher3/allapps/WorkEduCard.java b/src/com/android/launcher3/allapps/WorkEduCard.java
index c336496..836cd5a 100644
--- a/src/com/android/launcher3/allapps/WorkEduCard.java
+++ b/src/com/android/launcher3/allapps/WorkEduCard.java
@@ -71,7 +71,7 @@
super.onFinishInflate();
findViewById(R.id.action_btn).setOnClickListener(this);
MarginLayoutParams lp = ((MarginLayoutParams) findViewById(R.id.wrapper).getLayoutParams());
- lp.width = mActivityContext.getAppsView().getActiveRecyclerView().getTabWidth();
+ lp.width = mActivityContext.getAppsView().getFloatingHeaderView().getTabWidth();
}
@Override
diff --git a/src/com/android/launcher3/allapps/WorkProfileManager.java b/src/com/android/launcher3/allapps/WorkProfileManager.java
index dc9f18c..8443923 100644
--- a/src/com/android/launcher3/allapps/WorkProfileManager.java
+++ b/src/com/android/launcher3/allapps/WorkProfileManager.java
@@ -158,10 +158,10 @@
workFabMarginBottom += mAllApps.mActivityContext.getDeviceProfile().getInsets().bottom;
}
lp.bottomMargin = workFabMarginBottom;
- int totalScreenWidth = mDeviceProfile.widthPx;
+ int allAppsContainerWidth = mAllApps.getVisibleContainerView().getWidth();
int personalWorkTabWidth =
- mAllApps.mActivityContext.getAppsView().getActiveRecyclerView().getTabWidth();
- lp.rightMargin = lp.leftMargin = (totalScreenWidth - personalWorkTabWidth) / 2;
+ mAllApps.mActivityContext.getAppsView().getFloatingHeaderView().getTabWidth();
+ lp.rightMargin = lp.leftMargin = (allAppsContainerWidth - personalWorkTabWidth) / 2;
if (mWorkModeSwitch.getParent() != mAllApps) {
mAllApps.addView(mWorkModeSwitch);
}
diff --git a/src/com/android/launcher3/anim/AnimatedPropertySetter.java b/src/com/android/launcher3/anim/AnimatedPropertySetter.java
new file mode 100644
index 0000000..82e645a
--- /dev/null
+++ b/src/com/android/launcher3/anim/AnimatedPropertySetter.java
@@ -0,0 +1,164 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.launcher3.anim;
+
+import static com.android.launcher3.LauncherAnimUtils.VIEW_BACKGROUND_COLOR;
+
+import android.animation.Animator;
+import android.animation.Animator.AnimatorListener;
+import android.animation.AnimatorSet;
+import android.animation.ObjectAnimator;
+import android.animation.TimeInterpolator;
+import android.animation.ValueAnimator;
+import android.graphics.drawable.ColorDrawable;
+import android.util.FloatProperty;
+import android.util.IntProperty;
+import android.view.View;
+
+import androidx.annotation.NonNull;
+
+import java.util.function.Consumer;
+
+/**
+ * Extension of {@link PropertySetter} which applies the property through an animation
+ */
+public class AnimatedPropertySetter extends PropertySetter {
+
+ protected final AnimatorSet mAnim = new AnimatorSet();
+ protected ValueAnimator mProgressAnimator;
+
+ @Override
+ public Animator setViewAlpha(View view, float alpha, TimeInterpolator interpolator) {
+ if (view == null) {
+ return NO_OP;
+ }
+
+ // Short-circuit if the view already has this alpha value, but make sure the visibility is
+ // set correctly for the requested alpha.
+ if (Float.compare(view.getAlpha(), alpha) == 0) {
+ AlphaUpdateListener.updateVisibility(view);
+ return NO_OP;
+ }
+
+ ObjectAnimator anim = ObjectAnimator.ofFloat(view, View.ALPHA, alpha);
+ anim.addListener(new AlphaUpdateListener(view));
+ anim.setInterpolator(interpolator);
+ add(anim);
+ return anim;
+ }
+
+ @Override
+ public Animator setViewBackgroundColor(View view, int color, TimeInterpolator interpolator) {
+ if (view == null || (view.getBackground() instanceof ColorDrawable
+ && ((ColorDrawable) view.getBackground()).getColor() == color)) {
+ return NO_OP;
+ }
+ ObjectAnimator anim = ObjectAnimator.ofArgb(view, VIEW_BACKGROUND_COLOR, color);
+ anim.setInterpolator(interpolator);
+ add(anim);
+ return anim;
+ }
+
+ @Override
+ public <T> Animator setFloat(T target, FloatProperty<T> property, float value,
+ TimeInterpolator interpolator) {
+ if (property.get(target) == value) {
+ return NO_OP;
+ }
+ Animator anim = ObjectAnimator.ofFloat(target, property, value);
+ anim.setInterpolator(interpolator);
+ add(anim);
+ return anim;
+ }
+
+ @Override
+ public <T> Animator setInt(T target, IntProperty<T> property, int value,
+ TimeInterpolator interpolator) {
+ if (property.get(target) == value) {
+ return NO_OP;
+ }
+ Animator anim = ObjectAnimator.ofInt(target, property, value);
+ anim.setInterpolator(interpolator);
+ add(anim);
+ return anim;
+ }
+
+ @NonNull
+ @Override
+ public <T> Animator setColor(T target, IntProperty<T> property, int value,
+ TimeInterpolator interpolator) {
+ if (property.get(target) == value) {
+ return NO_OP;
+ }
+ Animator anim = ObjectAnimator.ofArgb(target, property, value);
+ anim.setInterpolator(interpolator);
+ add(anim);
+ return anim;
+ }
+
+ /**
+ * Adds a callback to be run on every frame of the animation
+ */
+ public void addOnFrameCallback(Runnable runnable) {
+ addOnFrameListener(anim -> runnable.run());
+ }
+
+ /**
+ * Adds a listener to be run on every frame of the animation
+ */
+ public void addOnFrameListener(ValueAnimator.AnimatorUpdateListener listener) {
+ if (mProgressAnimator == null) {
+ mProgressAnimator = ValueAnimator.ofFloat(0, 1);
+ }
+
+ mProgressAnimator.addUpdateListener(listener);
+ }
+
+ @Override
+ public void addEndListener(Consumer<Boolean> listener) {
+ if (mProgressAnimator == null) {
+ mProgressAnimator = ValueAnimator.ofFloat(0, 1);
+ }
+ mProgressAnimator.addListener(AnimatorListeners.forEndCallback(listener));
+ }
+
+ /**
+ * @see AnimatorSet#addListener(AnimatorListener)
+ */
+ public void addListener(Animator.AnimatorListener listener) {
+ mAnim.addListener(listener);
+ }
+
+ @Override
+ public void add(Animator a) {
+ mAnim.play(a);
+ }
+
+ /**
+ * Creates and returns the underlying AnimatorSet
+ */
+ @NonNull
+ public AnimatorSet buildAnim() {
+ // Add progress animation to the end, so that frame callback is called after all the other
+ // animation update.
+ if (mProgressAnimator != null) {
+ add(mProgressAnimator);
+ mProgressAnimator = null;
+ }
+ return mAnim;
+ }
+}
diff --git a/src/com/android/launcher3/anim/PendingAnimation.java b/src/com/android/launcher3/anim/PendingAnimation.java
index 1300ce7..7316420 100644
--- a/src/com/android/launcher3/anim/PendingAnimation.java
+++ b/src/com/android/launcher3/anim/PendingAnimation.java
@@ -15,24 +15,18 @@
*/
package com.android.launcher3.anim;
-import static com.android.launcher3.LauncherAnimUtils.VIEW_BACKGROUND_COLOR;
import static com.android.launcher3.anim.AnimatorPlaybackController.addAnimationHoldersRecur;
import android.animation.Animator;
-import android.animation.Animator.AnimatorListener;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.TimeInterpolator;
import android.animation.ValueAnimator;
-import android.graphics.drawable.ColorDrawable;
import android.util.FloatProperty;
-import android.util.IntProperty;
-import android.view.View;
import com.android.launcher3.anim.AnimatorPlaybackController.Holder;
import java.util.ArrayList;
-import java.util.function.Consumer;
/**
* Utility class to keep track of a running animation.
@@ -43,17 +37,13 @@
*
* TODO: Find a better name
*/
-public class PendingAnimation implements PropertySetter {
+public class PendingAnimation extends AnimatedPropertySetter {
private final ArrayList<Holder> mAnimHolders = new ArrayList<>();
- private final AnimatorSet mAnim;
private final long mDuration;
- private ValueAnimator mProgressAnimator;
-
public PendingAnimation(long duration) {
mDuration = duration;
- mAnim = new AnimatorSet();
}
public long getDuration() {
@@ -68,6 +58,7 @@
add(anim, springProperty);
}
+ @Override
public void add(Animator anim) {
add(anim, SpringProperty.DEFAULT);
}
@@ -84,39 +75,6 @@
mAnim.setInterpolator(interpolator);
}
- @Override
- public void setViewAlpha(View view, float alpha, TimeInterpolator interpolator) {
- if (view == null || view.getAlpha() == alpha) {
- return;
- }
- ObjectAnimator anim = ObjectAnimator.ofFloat(view, View.ALPHA, alpha);
- anim.addListener(new AlphaUpdateListener(view));
- anim.setInterpolator(interpolator);
- add(anim);
- }
-
- @Override
- public void setViewBackgroundColor(View view, int color, TimeInterpolator interpolator) {
- if (view == null || (view.getBackground() instanceof ColorDrawable
- && ((ColorDrawable) view.getBackground()).getColor() == color)) {
- return;
- }
- ObjectAnimator anim = ObjectAnimator.ofArgb(view, VIEW_BACKGROUND_COLOR, color);
- anim.setInterpolator(interpolator);
- add(anim);
- }
-
- @Override
- public <T> void setFloat(T target, FloatProperty<T> property, float value,
- TimeInterpolator interpolator) {
- if (property.get(target) == value) {
- return;
- }
- Animator anim = ObjectAnimator.ofFloat(target, property, value);
- anim.setDuration(mDuration).setInterpolator(interpolator);
- add(anim);
- }
-
public <T> void addFloat(T target, FloatProperty<T> property, float from, float to,
TimeInterpolator interpolator) {
Animator anim = ObjectAnimator.ofFloat(target, property, from, to);
@@ -124,57 +82,16 @@
add(anim);
}
- @Override
- public <T> void setInt(T target, IntProperty<T> property, int value,
- TimeInterpolator interpolator) {
- if (property.get(target) == value) {
- return;
- }
- Animator anim = ObjectAnimator.ofInt(target, property, value);
- anim.setInterpolator(interpolator);
- add(anim);
- }
-
- /**
- * Adds a callback to be run on every frame of the animation
- */
- public void addOnFrameCallback(Runnable runnable) {
- addOnFrameListener(anim -> runnable.run());
- }
-
- /**
- * Adds a listener to be run on every frame of the animation
- */
- public void addOnFrameListener(ValueAnimator.AnimatorUpdateListener listener) {
- if (mProgressAnimator == null) {
- mProgressAnimator = ValueAnimator.ofFloat(0, 1);
- }
-
- mProgressAnimator.addUpdateListener(listener);
- }
-
- /**
- * @see AnimatorSet#addListener(AnimatorListener)
- */
- public void addListener(Animator.AnimatorListener listener) {
- mAnim.addListener(listener);
- }
-
/**
* Creates and returns the underlying AnimatorSet
*/
+ @Override
public AnimatorSet buildAnim() {
- // Add progress animation to the end, so that frame callback is called after all the other
- // animation update.
- if (mProgressAnimator != null) {
- add(mProgressAnimator);
- mProgressAnimator = null;
- }
if (mAnimHolders.isEmpty()) {
// Add a placeholder animation to that the duration is respected
add(ValueAnimator.ofFloat(0, 1).setDuration(mDuration));
}
- return mAnim;
+ return super.buildAnim();
}
/**
@@ -183,14 +100,4 @@
public AnimatorPlaybackController createPlaybackController() {
return new AnimatorPlaybackController(buildAnim(), mDuration, mAnimHolders);
}
-
- /**
- * Add a listener of receiving the success/failure callback in the end.
- */
- public void addEndListener(Consumer<Boolean> listener) {
- if (mProgressAnimator == null) {
- mProgressAnimator = ValueAnimator.ofFloat(0, 1);
- }
- mProgressAnimator.addListener(AnimatorListeners.forEndCallback(listener));
- }
}
diff --git a/src/com/android/launcher3/anim/PropertySetter.java b/src/com/android/launcher3/anim/PropertySetter.java
index 8d77b4b..b0ed2d2 100644
--- a/src/com/android/launcher3/anim/PropertySetter.java
+++ b/src/com/android/launcher3/anim/PropertySetter.java
@@ -17,57 +17,104 @@
package com.android.launcher3.anim;
import android.animation.Animator;
+import android.animation.AnimatorSet;
import android.animation.TimeInterpolator;
import android.util.FloatProperty;
import android.util.IntProperty;
import android.view.View;
+import androidx.annotation.NonNull;
+
+import java.util.function.Consumer;
+
/**
* Utility class for setting a property with or without animation
*/
-public interface PropertySetter {
+public abstract class PropertySetter {
- PropertySetter NO_ANIM_PROPERTY_SETTER = new PropertySetter() { };
+ public static final PropertySetter NO_ANIM_PROPERTY_SETTER = new PropertySetter() {
+
+ @Override
+ public void add(Animator animatorSet) {
+ animatorSet.setDuration(0);
+ animatorSet.start();
+ }
+ };
+
+ protected static final AnimatorSet NO_OP = new AnimatorSet();
/**
* Sets the view alpha using the provided interpolator.
* Unlike {@link #setFloat}, this also updates the visibility of the view as alpha changes
* between zero and non-zero.
*/
- default void setViewAlpha(View view, float alpha, TimeInterpolator interpolator) {
+ @NonNull
+ public Animator setViewAlpha(View view, float alpha, TimeInterpolator interpolator) {
if (view != null) {
view.setAlpha(alpha);
AlphaUpdateListener.updateVisibility(view);
}
+ return NO_OP;
}
/**
* Sets the background color of the provided view using the provided interpolator.
*/
- default void setViewBackgroundColor(View view, int color, TimeInterpolator interpolator) {
+ @NonNull
+ public Animator setViewBackgroundColor(View view, int color, TimeInterpolator interpolator) {
if (view != null) {
view.setBackgroundColor(color);
}
+ return NO_OP;
}
/**
* Updates the float property of the target using the provided interpolator
*/
- default <T> void setFloat(T target, FloatProperty<T> property, float value,
+ @NonNull
+ public <T> Animator setFloat(T target, FloatProperty<T> property, float value,
TimeInterpolator interpolator) {
property.setValue(target, value);
+ return NO_OP;
}
/**
* Updates the int property of the target using the provided interpolator
*/
- default <T> void setInt(T target, IntProperty<T> property, int value,
+ @NonNull
+ public <T> Animator setInt(T target, IntProperty<T> property, int value,
TimeInterpolator interpolator) {
property.setValue(target, value);
+ return NO_OP;
}
- default void add(Animator animatorSet) {
- animatorSet.setDuration(0);
- animatorSet.start();
+ /**
+ * Updates a color property of the target using the provided interpolator
+ */
+ @NonNull
+ public <T> Animator setColor(T target, IntProperty<T> property, int value,
+ TimeInterpolator interpolator) {
+ property.setValue(target, value);
+ return NO_OP;
+ }
+
+ /**
+ * Runs the animation as part of setting the property
+ */
+ public abstract void add(Animator animatorSet);
+
+ /**
+ * Add a listener of receiving the success/failure callback in the end.
+ */
+ public void addEndListener(Consumer<Boolean> listener) {
+ listener.accept(true);
+ }
+
+ /**
+ * Creates and returns the AnimatorSet that can be run to apply the properties
+ */
+ @NonNull
+ public AnimatorSet buildAnim() {
+ return NO_OP;
}
}
diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java
index 9775b87..38b5c65 100644
--- a/src/com/android/launcher3/config/FeatureFlags.java
+++ b/src/com/android/launcher3/config/FeatureFlags.java
@@ -96,6 +96,9 @@
public static final BooleanFlag ENABLE_QUICK_SEARCH = new DeviceFlag("ENABLE_QUICK_SEARCH",
true, "Use quick search behavior.");
+ public static final BooleanFlag ENABLE_HIDE_HEADER = new DeviceFlag("ENABLE_HIDE_HEADER",
+ true, "Hide header on keyboard before typing in all apps");
+
public static final BooleanFlag COLLECT_SEARCH_HISTORY = new DeviceFlag(
"COLLECT_SEARCH_HISTORY", false, "Allow launcher to collect search history for log");
@@ -209,9 +212,6 @@
"ENABLE_SCRIM_FOR_APP_LAUNCH", false,
"Enables scrim during app launch animation.");
- public static final BooleanFlag ENABLE_SPLIT_SELECT = getDebugFlag(
- "ENABLE_SPLIT_SELECT", true, "Uses new split screen selection overview UI");
-
public static final BooleanFlag ENABLE_ENFORCED_ROUNDED_CORNERS = new DeviceFlag(
"ENABLE_ENFORCED_ROUNDED_CORNERS", true, "Enforce rounded corners on all App Widgets");
@@ -265,8 +265,8 @@
public static final BooleanFlag ENABLE_ONE_SEARCH_MOTION = new DeviceFlag(
"ENABLE_ONE_SEARCH_MOTION", true, "Enables animations in OneSearch.");
- public static final BooleanFlag ENABLE_SHOW_KEYBOARD_IN_ALL_APPS = getDebugFlag(
- "ENABLE_SHOW_KEYBOARD_IN_ALL_APPS", false,
+ public static final BooleanFlag ENABLE_SHOW_KEYBOARD_OPTION_IN_ALL_APPS = new DeviceFlag(
+ "ENABLE_SHOW_KEYBOARD_OPTION_IN_ALL_APPS", true,
"Enable option to show keyboard when going to all-apps");
public static final BooleanFlag USE_LOCAL_ICON_OVERRIDES = getDebugFlag(
diff --git a/src/com/android/launcher3/folder/PreviewItemManager.java b/src/com/android/launcher3/folder/PreviewItemManager.java
index 6355b62..2e5f2e5 100644
--- a/src/com/android/launcher3/folder/PreviewItemManager.java
+++ b/src/com/android/launcher3/folder/PreviewItemManager.java
@@ -79,6 +79,8 @@
private int mPrevTopPadding = -1;
private Drawable mReferenceDrawable = null;
+ private int mNumOfPrevItems = 0;
+
// These hold the first page preview items
private ArrayList<PreviewItemDrawingParams> mFirstPageParams = new ArrayList<>();
// These hold the current page preview items. It is empty if the current page is the first page.
@@ -254,7 +256,6 @@
void buildParamsForPage(int page, ArrayList<PreviewItemDrawingParams> params, boolean animate) {
List<WorkspaceItemInfo> items = mIcon.getPreviewItemsOnPage(page);
- int prevNumItems = params.size();
// We adjust the size of the list to match the number of items in the preview.
while (items.size() < params.size()) {
@@ -278,8 +279,9 @@
mReferenceDrawable = p.drawable;
}
} else {
- FolderPreviewItemAnim anim = new FolderPreviewItemAnim(this, p, i, prevNumItems, i,
- numItemsInFirstPagePreview, DROP_IN_ANIMATION_DURATION, null);
+ FolderPreviewItemAnim anim = new FolderPreviewItemAnim(this, p, i,
+ mNumOfPrevItems, i, numItemsInFirstPagePreview, DROP_IN_ANIMATION_DURATION,
+ null);
if (p.anim != null) {
if (p.anim.hasEqualFinalState(anim)) {
@@ -318,7 +320,9 @@
}
void updatePreviewItems(boolean animate) {
+ int numOfPrevItemsAux = mFirstPageParams.size();
buildParamsForPage(0, mFirstPageParams, animate);
+ mNumOfPrevItems = numOfPrevItemsAux;
}
void updatePreviewItems(Predicate<WorkspaceItemInfo> itemCheck) {
diff --git a/src/com/android/launcher3/graphics/PreloadIconDrawable.java b/src/com/android/launcher3/graphics/PreloadIconDrawable.java
index d2e4c51..0eb86b1 100644
--- a/src/com/android/launcher3/graphics/PreloadIconDrawable.java
+++ b/src/com/android/launcher3/graphics/PreloadIconDrawable.java
@@ -28,11 +28,9 @@
import android.graphics.Path;
import android.graphics.PathMeasure;
import android.graphics.Rect;
-import android.util.Pair;
import android.util.Property;
-import android.util.SparseArray;
-import android.view.ContextThemeWrapper;
+import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.anim.Interpolators;
import com.android.launcher3.icons.FastBitmapDrawable;
@@ -40,8 +38,6 @@
import com.android.launcher3.model.data.ItemInfoWithIcon;
import com.android.launcher3.util.Themes;
-import java.lang.ref.WeakReference;
-
/**
* Extension of {@link FastBitmapDrawable} which shows a progress bar around the icon.
*/
@@ -61,9 +57,9 @@
};
private static final int DEFAULT_PATH_SIZE = 100;
- private static final float PROGRESS_WIDTH = 7;
- private static final float PROGRESS_GAP = 2;
private static final int MAX_PAINT_ALPHA = 255;
+ private static final int TRACK_ALPHA = (int) (0.27f * MAX_PAINT_ALPHA);
+ private static final int DISABLED_ICON_ALPHA = (int) (0.6f * MAX_PAINT_ALPHA);
private static final long DURATION_SCALE = 500;
@@ -71,13 +67,8 @@
// Duration = COMPLETE_ANIM_FRACTION * DURATION_SCALE
private static final float COMPLETE_ANIM_FRACTION = 0.3f;
- private static final int COLOR_TRACK = 0x77EEEEEE;
- private static final int COLOR_SHADOW = 0x55000000;
-
- private static final float SMALL_SCALE = 0.6f;
-
- private static final SparseArray<WeakReference<Pair<Path, Bitmap>>> sShadowCache =
- new SparseArray<>();
+ private static final float SMALL_SCALE = 0.7f;
+ private static final float PROGRESS_STROKE_SCALE = 0.075f;
private static final int PRELOAD_ACCENT_COLOR_INDEX = 0;
private static final int PRELOAD_BACKGROUND_COLOR_INDEX = 1;
@@ -94,7 +85,6 @@
private final Path mScaledProgressPath;
private final Paint mProgressPaint;
- private Bitmap mShadowBitmap;
private final int mIndicatorColor;
private final int mSystemAccentColor;
private final int mSystemBackgroundColor;
@@ -134,7 +124,6 @@
mScaledProgressPath = new Path();
mProgressPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG);
- mProgressPaint.setStyle(Paint.Style.STROKE);
mProgressPaint.setStrokeCap(Paint.Cap.ROUND);
mIndicatorColor = indicatorColor;
@@ -149,47 +138,22 @@
@Override
protected void onBoundsChange(Rect bounds) {
super.onBoundsChange(bounds);
+
+ float progressWidth = PROGRESS_STROKE_SCALE * bounds.width();
mTmpMatrix.setScale(
- (bounds.width() - 2 * PROGRESS_WIDTH - 2 * PROGRESS_GAP) / DEFAULT_PATH_SIZE,
- (bounds.height() - 2 * PROGRESS_WIDTH - 2 * PROGRESS_GAP) / DEFAULT_PATH_SIZE);
- mTmpMatrix.postTranslate(
- bounds.left + PROGRESS_WIDTH + PROGRESS_GAP,
- bounds.top + PROGRESS_WIDTH + PROGRESS_GAP);
+ (bounds.width() - 2 * progressWidth) / DEFAULT_PATH_SIZE,
+ (bounds.height() - 2 * progressWidth) / DEFAULT_PATH_SIZE);
+ mTmpMatrix.postTranslate(bounds.left + progressWidth, bounds.top + progressWidth);
mShapePath.transform(mTmpMatrix, mScaledTrackPath);
- float scale = bounds.width() / DEFAULT_PATH_SIZE;
- mProgressPaint.setStrokeWidth(PROGRESS_WIDTH * scale);
+ mProgressPaint.setStrokeWidth(progressWidth);
- mShadowBitmap = getShadowBitmap(bounds.width(), bounds.height(),
- (PROGRESS_GAP ) * scale);
mPathMeasure.setPath(mScaledTrackPath, true);
mTrackLength = mPathMeasure.getLength();
setInternalProgress(mInternalStateProgress);
}
- private Bitmap getShadowBitmap(int width, int height, float shadowRadius) {
- int key = ((width << 16) | height) * (mIsDarkMode ? -1 : 1);
- WeakReference<Pair<Path, Bitmap>> shadowRef = sShadowCache.get(key);
- Pair<Path, Bitmap> cache = shadowRef != null ? shadowRef.get() : null;
- Bitmap shadow = cache != null && cache.first.equals(mShapePath) ? cache.second : null;
- if (shadow != null) {
- return shadow;
- }
- shadow = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
- Canvas c = new Canvas(shadow);
- mProgressPaint.setShadowLayer(shadowRadius, 0, 0, mIsStartable
- ? COLOR_SHADOW : mSystemAccentColor);
- mProgressPaint.setColor(mIsStartable ? COLOR_TRACK : mSystemBackgroundColor);
- mProgressPaint.setAlpha(MAX_PAINT_ALPHA);
- c.drawPath(mScaledTrackPath, mProgressPaint);
- mProgressPaint.clearShadowLayer();
- c.setBitmap(null);
-
- sShadowCache.put(key, new WeakReference<>(Pair.create(mShapePath, shadow)));
- return shadow;
- }
-
@Override
public void drawInternal(Canvas canvas, Rect bounds) {
if (mRanFinishAnimation) {
@@ -197,12 +161,17 @@
return;
}
- // Draw track.
+ // Draw background.
+ mProgressPaint.setStyle(Paint.Style.FILL_AND_STROKE);
+ mProgressPaint.setColor(mSystemBackgroundColor);
+ canvas.drawPath(mScaledTrackPath, mProgressPaint);
+
+ // Draw track and progress.
+ mProgressPaint.setStyle(Paint.Style.STROKE);
mProgressPaint.setColor(mIsStartable ? mIndicatorColor : mSystemAccentColor);
+ mProgressPaint.setAlpha(TRACK_ALPHA);
+ canvas.drawPath(mScaledTrackPath, mProgressPaint);
mProgressPaint.setAlpha(mTrackAlpha);
- if (mShadowBitmap != null) {
- canvas.drawBitmap(mShadowBitmap, bounds.left, bounds.top, mProgressPaint);
- }
canvas.drawPath(mScaledProgressPath, mProgressPaint);
int saveCount = canvas.save();
@@ -211,6 +180,11 @@
canvas.restoreToCount(saveCount);
}
+ @Override
+ protected void updateFilter() {
+ setAlpha(mIsDisabled ? DISABLED_ICON_ALPHA : MAX_PAINT_ALPHA);
+ }
+
/**
* Updates the install progress based on the level
*/
@@ -326,13 +300,12 @@
}
private static int[] getPreloadColors(Context context) {
- Context dayNightThemeContext = new ContextThemeWrapper(
- context, android.R.style.Theme_DeviceDefault_DayNight);
int[] preloadColors = new int[2];
- preloadColors[PRELOAD_ACCENT_COLOR_INDEX] = Themes.getColorAccent(dayNightThemeContext);
- preloadColors[PRELOAD_BACKGROUND_COLOR_INDEX] = Themes.getColorBackgroundFloating(
- dayNightThemeContext);
+ preloadColors[PRELOAD_ACCENT_COLOR_INDEX] = Themes.getAttrColor(context,
+ R.attr.preloadIconAccentColor);
+ preloadColors[PRELOAD_BACKGROUND_COLOR_INDEX] = Themes.getAttrColor(context,
+ R.attr.preloadIconBackgroundColor);
return preloadColors;
}
diff --git a/src/com/android/launcher3/logging/StatsLogManager.java b/src/com/android/launcher3/logging/StatsLogManager.java
index f4f270c..c4ec4e3 100644
--- a/src/com/android/launcher3/logging/StatsLogManager.java
+++ b/src/com/android/launcher3/logging/StatsLogManager.java
@@ -589,6 +589,9 @@
@UiEvent(doc = "User tapped taskbar All Apps button.")
LAUNCHER_TASKBAR_ALLAPPS_BUTTON_TAP(1057),
+
+ @UiEvent(doc = "User tapped on Share app system shortcut.")
+ LAUNCHER_SYSTEM_SHORTCUT_APP_SHARE_TAP(1075),
;
// ADD MORE
@@ -732,7 +735,9 @@
UNKNOWN(0),
COLD(1),
HOT(2),
- TIMEOUT(3);
+ TIMEOUT(3),
+ FAIL(4),
+ COLD_USERWAITING(5);
private final int mId;
@@ -769,6 +774,13 @@
}
/**
+ * Sets query length of the event.
+ */
+ default StatsLatencyLogger withQueryLength(int queryLength) {
+ return this;
+ }
+
+ /**
* Sets packageId of log message.
*/
default StatsLatencyLogger withPackageId(int packageId) {
diff --git a/src/com/android/launcher3/model/FirstScreenBroadcast.java b/src/com/android/launcher3/model/FirstScreenBroadcast.java
index 5fac7cf..9e91b9d 100644
--- a/src/com/android/launcher3/model/FirstScreenBroadcast.java
+++ b/src/com/android/launcher3/model/FirstScreenBroadcast.java
@@ -20,6 +20,7 @@
import static android.os.Process.myUserHandle;
import static com.android.launcher3.pm.InstallSessionHelper.getUserHandle;
+import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.mapping;
@@ -31,13 +32,18 @@
import android.os.UserHandle;
import android.util.Log;
+import androidx.annotation.AnyThread;
+import androidx.annotation.WorkerThread;
+
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.model.data.FolderInfo;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.LauncherAppWidgetInfo;
+import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.util.PackageUserKey;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -78,6 +84,7 @@
* Sends a broadcast to all package installers that have items with active sessions on the users
* first screen.
*/
+ @WorkerThread
public void sendBroadcasts(Context context, List<ItemInfo> firstScreenItems) {
UserHandle myUser = myUserHandle();
mSessionInfoForPackage
@@ -95,6 +102,7 @@
* @param packages List of packages with active sessions for this package installer.
* @param firstScreenItems List of items on the first screen.
*/
+ @WorkerThread
private void sendBroadcastToInstaller(Context context, String installerPackageName,
Set<String> packages, List<ItemInfo> firstScreenItems) {
Set<String> folderItems = new HashSet<>();
@@ -106,7 +114,7 @@
if (info instanceof FolderInfo) {
FolderInfo folderInfo = (FolderInfo) info;
String folderItemInfoPackage;
- for (ItemInfo folderItemInfo : folderInfo.contents) {
+ for (ItemInfo folderItemInfo : cloneOnMainThread(folderInfo.contents)) {
folderItemInfoPackage = getPackageName(folderItemInfo);
if (folderItemInfoPackage != null
&& packages.contains(folderItemInfoPackage)) {
@@ -170,4 +178,17 @@
Log.d(TAG, packageInstaller + ":" + label + ":" + pkg);
}
}
+
+ /**
+ * Clone the provided list on UI thread. This is used for {@link FolderInfo#contents} which
+ * is always modified on UI thread.
+ */
+ @AnyThread
+ private static List<WorkspaceItemInfo> cloneOnMainThread(ArrayList<WorkspaceItemInfo> list) {
+ try {
+ return MAIN_EXECUTOR.submit(() -> new ArrayList(list)).get();
+ } catch (Exception e) {
+ return Collections.emptyList();
+ }
+ }
}
diff --git a/src/com/android/launcher3/secondarydisplay/SecondaryDisplayLauncher.java b/src/com/android/launcher3/secondarydisplay/SecondaryDisplayLauncher.java
index 73aa296..a2ab7f9 100644
--- a/src/com/android/launcher3/secondarydisplay/SecondaryDisplayLauncher.java
+++ b/src/com/android/launcher3/secondarydisplay/SecondaryDisplayLauncher.java
@@ -53,7 +53,6 @@
private LauncherModel mModel;
private BaseDragLayer mDragLayer;
- // TODO(b/216191717): Verify all apps works on secondary display.
private ActivityAllAppsContainerView<SecondaryDisplayLauncher> mAppsView;
private View mAppsButton;
diff --git a/src/com/android/launcher3/touch/AllAppsSwipeController.java b/src/com/android/launcher3/touch/AllAppsSwipeController.java
index 787d9ea..db43baa 100644
--- a/src/com/android/launcher3/touch/AllAppsSwipeController.java
+++ b/src/com/android/launcher3/touch/AllAppsSwipeController.java
@@ -65,13 +65,13 @@
public static final Interpolator BLUR =
Interpolators.clampToProgress(
Interpolators.mapToProgress(
- EMPHASIZED_DECELERATE, 0f, ALL_APPS_FULL_DEPTH_PROGRESS),
+ LINEAR, 0f, ALL_APPS_FULL_DEPTH_PROGRESS),
WORKSPACE_MOTION_START, ALL_APPS_STATE_TRANSITION);
public static final Interpolator WORKSPACE_FADE =
Interpolators.clampToProgress(FINAL_FRAME, 0f, ALL_APPS_STATE_TRANSITION);
public static final Interpolator WORKSPACE_SCALE =
Interpolators.clampToProgress(
- EMPHASIZED_DECELERATE, WORKSPACE_MOTION_START, ALL_APPS_STATE_TRANSITION);
+ EMPHASIZED_ACCELERATE, WORKSPACE_MOTION_START, ALL_APPS_STATE_TRANSITION);
public static final Interpolator HOTSEAT_FADE = WORKSPACE_FADE;
public static final Interpolator HOTSEAT_SCALE = HOTSEAT_FADE;
public static final Interpolator HOTSEAT_TRANSLATE =
@@ -157,6 +157,9 @@
config.setInterpolator(ANIM_SCRIM_FADE, ALLAPPS_STAGGERED_FADE_LATE_RESPONDER);
config.setInterpolator(ANIM_ALL_APPS_FADE, isTablet
? FINAL_FRAME : ALLAPPS_STAGGERED_FADE_EARLY_RESPONDER);
+ if (!isTablet) {
+ config.setInterpolator(ANIM_WORKSPACE_FADE, INSTANT);
+ }
}
/**
diff --git a/src/com/android/launcher3/touch/LandscapePagedViewHandler.java b/src/com/android/launcher3/touch/LandscapePagedViewHandler.java
index 121088a..612be8e 100644
--- a/src/com/android/launcher3/touch/LandscapePagedViewHandler.java
+++ b/src/com/android/launcher3/touch/LandscapePagedViewHandler.java
@@ -19,6 +19,7 @@
import static android.view.Gravity.BOTTOM;
import static android.view.Gravity.CENTER_VERTICAL;
import static android.view.Gravity.END;
+import static android.view.Gravity.LEFT;
import static android.view.Gravity.START;
import static android.view.Gravity.TOP;
import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
@@ -52,7 +53,7 @@
import com.android.launcher3.util.SplitConfigurationOptions;
import com.android.launcher3.util.SplitConfigurationOptions.SplitPositionOption;
import com.android.launcher3.util.SplitConfigurationOptions.StagePosition;
-import com.android.launcher3.util.SplitConfigurationOptions.StagedSplitBounds;
+import com.android.launcher3.util.SplitConfigurationOptions.SplitBounds;
import com.android.launcher3.views.BaseDragLayer;
import java.util.Collections;
@@ -103,6 +104,17 @@
}
@Override
+ public void fixBoundsForHomeAnimStartRect(RectF outStartRect, DeviceProfile deviceProfile) {
+ // We don't need to check the "top" value here because the startRect is in the orientation
+ // of the app, not of the fixed portrait launcher.
+ if (outStartRect.left > deviceProfile.heightPx) {
+ outStartRect.offsetTo(0, outStartRect.top);
+ } else if (outStartRect.left < -deviceProfile.heightPx) {
+ outStartRect.offsetTo(0, outStartRect.top);
+ }
+ }
+
+ @Override
public <T> void setPrimary(T target, Int2DAction<T> action, int param) {
action.call(target, 0, param);
}
@@ -300,7 +312,7 @@
@Override
public Pair<Float, Float> getDwbLayoutTranslations(int taskViewWidth,
- int taskViewHeight, StagedSplitBounds splitBounds, DeviceProfile deviceProfile,
+ int taskViewHeight, SplitBounds splitBounds, DeviceProfile deviceProfile,
View[] thumbnailViews, int desiredTaskId, View banner) {
boolean isRtl = banner.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL;
float translationX = 0;
@@ -413,7 +425,7 @@
}
@Override
- public void updateStagedSplitIconParams(View out, float onScreenRectCenterX,
+ public void updateSplitIconParams(View out, float onScreenRectCenterX,
float onScreenRectCenterY, float fullscreenScaleX, float fullscreenScaleY,
int drawableWidth, int drawableHeight, DeviceProfile dp,
@StagePosition int stagePosition) {
@@ -425,6 +437,28 @@
}
@Override
+ public void setSplitInstructionsParams(View out, DeviceProfile dp, int splitInstructionsHeight,
+ int splitInstructionsWidth, int threeButtonNavShift) {
+ out.setPivotX(0);
+ out.setPivotY(0);
+ out.setRotation(getDegreesRotated());
+ int distanceToEdge = out.getResources().getDimensionPixelSize(
+ R.dimen.split_instructions_bottom_margin_phone_landscape);
+ // Adjust for any insets on the left edge
+ int insetCorrectionX = dp.getInsets().left;
+ // Center the view in case of unbalanced insets on top or bottom of screen
+ int insetCorrectionY = (dp.getInsets().bottom - dp.getInsets().top) / 2;
+ out.setTranslationX(splitInstructionsHeight + distanceToEdge - insetCorrectionX);
+ out.setTranslationY(((splitInstructionsHeight - splitInstructionsWidth) / 2f)
+ + insetCorrectionY);
+ FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) out.getLayoutParams();
+ // Setting gravity to LEFT instead of the lint-recommended START because we always want this
+ // view to be screen-left when phone is in landscape, regardless of the RtL setting.
+ lp.gravity = LEFT | CENTER_VERTICAL;
+ out.setLayoutParams(lp);
+ }
+
+ @Override
public void getFinalSplitPlaceholderBounds(int splitDividerSize, DeviceProfile dp,
@StagePosition int stagePosition, Rect out1, Rect out2) {
// In fake land/seascape, the window bounds are always top and bottom half
@@ -436,7 +470,7 @@
@Override
public void setSplitTaskSwipeRect(DeviceProfile dp, Rect outRect,
- StagedSplitBounds splitInfo, int desiredStagePosition) {
+ SplitBounds splitInfo, int desiredStagePosition) {
float topLeftTaskPercent = splitInfo.appsStackedVertically
? splitInfo.topTaskPercent
: splitInfo.leftTaskPercent;
@@ -453,7 +487,7 @@
@Override
public void measureGroupedTaskViewThumbnailBounds(View primarySnapshot, View secondarySnapshot,
- int parentWidth, int parentHeight, StagedSplitBounds splitBoundsConfig,
+ int parentWidth, int parentHeight, SplitBounds splitBoundsConfig,
DeviceProfile dp, boolean isRtl) {
int spaceAboveSnapshot = dp.overviewTaskThumbnailTopMarginPx;
int totalThumbnailHeight = parentHeight - spaceAboveSnapshot;
@@ -495,7 +529,7 @@
public void setSplitIconParams(View primaryIconView, View secondaryIconView,
int taskIconHeight, int primarySnapshotWidth, int primarySnapshotHeight,
int groupedTaskViewHeight, int groupedTaskViewWidth, boolean isRtl,
- DeviceProfile deviceProfile, StagedSplitBounds splitConfig) {
+ DeviceProfile deviceProfile, SplitBounds splitConfig) {
FrameLayout.LayoutParams primaryIconParams =
(FrameLayout.LayoutParams) primaryIconView.getLayoutParams();
FrameLayout.LayoutParams secondaryIconParams =
diff --git a/src/com/android/launcher3/touch/PagedOrientationHandler.java b/src/com/android/launcher3/touch/PagedOrientationHandler.java
index 4fcf378..6bc021b 100644
--- a/src/com/android/launcher3/touch/PagedOrientationHandler.java
+++ b/src/com/android/launcher3/touch/PagedOrientationHandler.java
@@ -36,7 +36,7 @@
import com.android.launcher3.util.SplitConfigurationOptions;
import com.android.launcher3.util.SplitConfigurationOptions.SplitPositionOption;
import com.android.launcher3.util.SplitConfigurationOptions.StagePosition;
-import com.android.launcher3.util.SplitConfigurationOptions.StagedSplitBounds;
+import com.android.launcher3.util.SplitConfigurationOptions.SplitBounds;
import java.util.List;
@@ -129,12 +129,22 @@
* @param dp The device profile, used to report rotation and hardware insets.
* @param stagePosition 0 if the staging area is pinned to top/left, 1 for bottom/right.
*/
- void updateStagedSplitIconParams(View out, float onScreenRectCenterX,
+ void updateSplitIconParams(View out, float onScreenRectCenterX,
float onScreenRectCenterY, float fullscreenScaleX, float fullscreenScaleY,
int drawableWidth, int drawableHeight, DeviceProfile dp,
@StagePosition int stagePosition);
/**
+ * Sets positioning and rotation for a SplitInstructionsView.
+ * @param out The SplitInstructionsView that needs to be positioned.
+ * @param dp The device profile, used to report rotation and device type.
+ * @param splitInstructionsHeight The SplitInstructionView's height.
+ * @param splitInstructionsWidth The SplitInstructionView's width.
+ */
+ void setSplitInstructionsParams(View out, DeviceProfile dp, int splitInstructionsHeight,
+ int splitInstructionsWidth, int threeButtonNavShift);
+
+ /**
* @param splitDividerSize height of split screen drag handle in portrait, width in landscape
* @param stagePosition the split position option (top/left, bottom/right) of the first
* task selected for entering split
@@ -153,12 +163,12 @@
* @param desiredStagePosition Which stage position (topLeft/rightBottom) we want to resize
* outRect for
*/
- void setSplitTaskSwipeRect(DeviceProfile dp, Rect outRect, StagedSplitBounds splitInfo,
+ void setSplitTaskSwipeRect(DeviceProfile dp, Rect outRect, SplitBounds splitInfo,
@SplitConfigurationOptions.StagePosition int desiredStagePosition);
void measureGroupedTaskViewThumbnailBounds(View primarySnapshot, View secondarySnapshot,
int parentWidth, int parentHeight,
- StagedSplitBounds splitBoundsConfig, DeviceProfile dp, boolean isRtl);
+ SplitBounds splitBoundsConfig, DeviceProfile dp, boolean isRtl);
// Overview TaskMenuView methods
void setTaskIconParams(FrameLayout.LayoutParams iconParams,
@@ -166,7 +176,7 @@
void setSplitIconParams(View primaryIconView, View secondaryIconView,
int taskIconHeight, int primarySnapshotWidth, int primarySnapshotHeight,
int groupedTaskViewHeight, int groupedTaskViewWidth, boolean isRtl,
- DeviceProfile deviceProfile, StagedSplitBounds splitConfig);
+ DeviceProfile deviceProfile, SplitBounds splitConfig);
/*
* The following two methods try to center the TaskMenuView in landscape by finding the center
@@ -207,7 +217,7 @@
* @return A Pair of Floats representing the proper x and y translations.
*/
Pair<Float, Float> getDwbLayoutTranslations(int taskViewWidth,
- int taskViewHeight, StagedSplitBounds splitBounds, DeviceProfile deviceProfile,
+ int taskViewHeight, SplitBounds splitBounds, DeviceProfile deviceProfile,
View[] thumbnailViews, int desiredTaskId, View banner);
// The following are only used by TaskViewTouchHandler.
@@ -226,6 +236,12 @@
*/
void adjustFloatingIconStartVelocity(PointF velocity);
+ /**
+ * Ensures that outStartRect left bound is within the DeviceProfile's visual boundaries
+ * @param outStartRect The start rect that will directly be modified
+ */
+ void fixBoundsForHomeAnimStartRect(RectF outStartRect, DeviceProfile deviceProfile);
+
class ChildBounds {
public final int primaryDimension;
diff --git a/src/com/android/launcher3/touch/PortraitPagedViewHandler.java b/src/com/android/launcher3/touch/PortraitPagedViewHandler.java
index 80a8c19..181dca5 100644
--- a/src/com/android/launcher3/touch/PortraitPagedViewHandler.java
+++ b/src/com/android/launcher3/touch/PortraitPagedViewHandler.java
@@ -27,6 +27,7 @@
import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_X;
import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_Y;
import static com.android.launcher3.touch.SingleAxisSwipeDetector.VERTICAL;
+import static com.android.launcher3.util.DisplayController.NavigationMode.THREE_BUTTONS;
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_BOTTOM_OR_RIGHT;
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT;
@@ -47,11 +48,13 @@
import android.widget.LinearLayout;
import com.android.launcher3.DeviceProfile;
+import com.android.launcher3.R;
import com.android.launcher3.Utilities;
+import com.android.launcher3.util.DisplayController;
import com.android.launcher3.util.SplitConfigurationOptions;
import com.android.launcher3.util.SplitConfigurationOptions.SplitPositionOption;
import com.android.launcher3.util.SplitConfigurationOptions.StagePosition;
-import com.android.launcher3.util.SplitConfigurationOptions.StagedSplitBounds;
+import com.android.launcher3.util.SplitConfigurationOptions.SplitBounds;
import com.android.launcher3.views.BaseDragLayer;
import java.util.List;
@@ -102,6 +105,15 @@
}
@Override
+ public void fixBoundsForHomeAnimStartRect(RectF outStartRect, DeviceProfile deviceProfile) {
+ if (outStartRect.left > deviceProfile.widthPx) {
+ outStartRect.offsetTo(0, outStartRect.top);
+ } else if (outStartRect.left < -deviceProfile.widthPx) {
+ outStartRect.offsetTo(0, outStartRect.top);
+ }
+ }
+
+ @Override
public <T> void setPrimary(T target, Int2DAction<T> action, int param) {
action.call(target, param, 0);
}
@@ -305,7 +317,7 @@
@Override
public Pair<Float, Float> getDwbLayoutTranslations(int taskViewWidth,
- int taskViewHeight, StagedSplitBounds splitBounds, DeviceProfile deviceProfile,
+ int taskViewHeight, SplitBounds splitBounds, DeviceProfile deviceProfile,
View[] thumbnailViews, int desiredTaskId, View banner) {
float translationX = 0;
float translationY = 0;
@@ -458,7 +470,7 @@
}
@Override
- public void updateStagedSplitIconParams(View out, float onScreenRectCenterX,
+ public void updateSplitIconParams(View out, float onScreenRectCenterX,
float onScreenRectCenterY, float fullscreenScaleX, float fullscreenScaleY,
int drawableWidth, int drawableHeight, DeviceProfile dp,
@StagePosition int stagePosition) {
@@ -485,6 +497,58 @@
}
@Override
+ public void setSplitInstructionsParams(View out, DeviceProfile dp, int splitInstructionsHeight,
+ int splitInstructionsWidth, int threeButtonNavShift) {
+ out.setPivotX(0);
+ out.setPivotY(0);
+ out.setRotation(getDegreesRotated());
+ int distanceToEdge;
+ if ((DisplayController.getNavigationMode(out.getContext()) == THREE_BUTTONS)
+ && (dp.isTwoPanels || dp.isTablet)) {
+ // If 3-button nav is active, align the splitInstructionsView with it.
+ distanceToEdge = dp.getTaskbarOffsetY()
+ + ((dp.taskbarSize - splitInstructionsHeight) / 2);
+ } else {
+ // If 3-button nav is not active, set bottom margin according to spec.
+ if (dp.isPhone) {
+ if (dp.isLandscape) {
+ distanceToEdge = out.getResources().getDimensionPixelSize(
+ R.dimen.split_instructions_bottom_margin_phone_landscape);
+ } else {
+ distanceToEdge = out.getResources().getDimensionPixelSize(
+ R.dimen.split_instructions_bottom_margin_phone_portrait);
+ }
+ } else if (dp.isTwoPanels) {
+ if (dp.isLandscape) {
+ distanceToEdge = out.getResources().getDimensionPixelSize(
+ R.dimen.split_instructions_bottom_margin_twopanels_landscape);
+ } else {
+ distanceToEdge = out.getResources().getDimensionPixelSize(
+ R.dimen.split_instructions_bottom_margin_twopanels_portrait);
+ }
+ } else {
+ if (dp.isLandscape) {
+ distanceToEdge = out.getResources().getDimensionPixelSize(
+ R.dimen.split_instructions_bottom_margin_tablet_landscape);
+ } else {
+ distanceToEdge = out.getResources().getDimensionPixelSize(
+ R.dimen.split_instructions_bottom_margin_tablet_portrait);
+ }
+ }
+ }
+
+ // Center the view in case of unbalanced insets on left or right of screen
+ int insetCorrectionX = (dp.getInsets().right - dp.getInsets().left) / 2;
+ // Adjust for any insets on the bottom edge
+ int insetCorrectionY = dp.getInsets().bottom;
+ out.setTranslationX(insetCorrectionX + threeButtonNavShift);
+ out.setTranslationY(-distanceToEdge + insetCorrectionY);
+ FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) out.getLayoutParams();
+ lp.gravity = CENTER_HORIZONTAL | BOTTOM;
+ out.setLayoutParams(lp);
+ }
+
+ @Override
public void getFinalSplitPlaceholderBounds(int splitDividerSize, DeviceProfile dp,
@StagePosition int stagePosition, Rect out1, Rect out2) {
int screenHeight = dp.heightPx;
@@ -516,7 +580,7 @@
@Override
public void setSplitTaskSwipeRect(DeviceProfile dp, Rect outRect,
- StagedSplitBounds splitInfo, int desiredStagePosition) {
+ SplitBounds splitInfo, int desiredStagePosition) {
boolean isLandscape = dp.isLandscape;
float topLeftTaskPercent = splitInfo.appsStackedVertically
? splitInfo.topTaskPercent
@@ -542,7 +606,7 @@
@Override
public void measureGroupedTaskViewThumbnailBounds(View primarySnapshot, View secondarySnapshot,
- int parentWidth, int parentHeight, StagedSplitBounds splitBoundsConfig,
+ int parentWidth, int parentHeight, SplitBounds splitBoundsConfig,
DeviceProfile dp, boolean isRtl) {
int spaceAboveSnapshot = dp.overviewTaskThumbnailTopMarginPx;
int totalThumbnailHeight = parentHeight - spaceAboveSnapshot;
@@ -602,7 +666,7 @@
public void setSplitIconParams(View primaryIconView, View secondaryIconView,
int taskIconHeight, int primarySnapshotWidth, int primarySnapshotHeight,
int groupedTaskViewHeight, int groupedTaskViewWidth, boolean isRtl,
- DeviceProfile deviceProfile, StagedSplitBounds splitConfig) {
+ DeviceProfile deviceProfile, SplitBounds splitConfig) {
FrameLayout.LayoutParams primaryIconParams =
(FrameLayout.LayoutParams) primaryIconView.getLayoutParams();
FrameLayout.LayoutParams secondaryIconParams =
diff --git a/src/com/android/launcher3/touch/SeascapePagedViewHandler.java b/src/com/android/launcher3/touch/SeascapePagedViewHandler.java
index 74b6a5b..dff2c5d 100644
--- a/src/com/android/launcher3/touch/SeascapePagedViewHandler.java
+++ b/src/com/android/launcher3/touch/SeascapePagedViewHandler.java
@@ -19,6 +19,7 @@
import static android.view.Gravity.BOTTOM;
import static android.view.Gravity.CENTER_VERTICAL;
import static android.view.Gravity.END;
+import static android.view.Gravity.RIGHT;
import static android.view.Gravity.START;
import static com.android.launcher3.touch.SingleAxisSwipeDetector.HORIZONTAL;
@@ -38,7 +39,7 @@
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.util.SplitConfigurationOptions.SplitPositionOption;
-import com.android.launcher3.util.SplitConfigurationOptions.StagedSplitBounds;
+import com.android.launcher3.util.SplitConfigurationOptions.SplitBounds;
import com.android.launcher3.views.BaseDragLayer;
import java.util.Collections;
@@ -109,7 +110,7 @@
@Override
public Pair<Float, Float> getDwbLayoutTranslations(int taskViewWidth,
- int taskViewHeight, StagedSplitBounds splitBounds, DeviceProfile deviceProfile,
+ int taskViewHeight, SplitBounds splitBounds, DeviceProfile deviceProfile,
View[] thumbnailViews, int desiredTaskId, View banner) {
boolean isRtl = banner.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL;
float translationX = 0;
@@ -167,6 +168,29 @@
}
@Override
+ public void setSplitInstructionsParams(View out, DeviceProfile dp, int splitInstructionsHeight,
+ int splitInstructionsWidth, int threeButtonNavShift) {
+ out.setPivotX(0);
+ out.setPivotY(0);
+ out.setRotation(getDegreesRotated());
+ int distanceToEdge = out.getResources().getDimensionPixelSize(
+ R.dimen.split_instructions_bottom_margin_phone_landscape);
+ // Adjust for any insets on the right edge
+ int insetCorrectionX = dp.getInsets().right;
+ // Center the view in case of unbalanced insets on top or bottom of screen
+ int insetCorrectionY = (dp.getInsets().bottom - dp.getInsets().top) / 2;
+ out.setTranslationX(splitInstructionsWidth - splitInstructionsHeight - distanceToEdge
+ + insetCorrectionX);
+ out.setTranslationY(((splitInstructionsHeight + splitInstructionsWidth) / 2f)
+ + insetCorrectionY);
+ FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) out.getLayoutParams();
+ // Setting gravity to RIGHT instead of the lint-recommended END because we always want this
+ // view to be screen-right when phone is in seascape, regardless of the RtL setting.
+ lp.gravity = RIGHT | CENTER_VERTICAL;
+ out.setLayoutParams(lp);
+ }
+
+ @Override
public void setTaskIconParams(FrameLayout.LayoutParams iconParams,
int taskIconMargin, int taskIconHeight, int thumbnailTopMargin, boolean isRtl) {
iconParams.gravity = (isRtl ? END : START) | CENTER_VERTICAL;
@@ -179,7 +203,7 @@
public void setSplitIconParams(View primaryIconView, View secondaryIconView,
int taskIconHeight, int primarySnapshotWidth, int primarySnapshotHeight,
int groupedTaskViewHeight, int groupedTaskViewWidth, boolean isRtl,
- DeviceProfile deviceProfile, StagedSplitBounds splitConfig) {
+ DeviceProfile deviceProfile, SplitBounds splitConfig) {
super.setSplitIconParams(primaryIconView, secondaryIconView, taskIconHeight,
primarySnapshotWidth, primarySnapshotHeight, groupedTaskViewHeight,
groupedTaskViewWidth, isRtl, deviceProfile, splitConfig);
diff --git a/src/com/android/launcher3/util/DisplayController.java b/src/com/android/launcher3/util/DisplayController.java
index 7c73be5..1a77674 100644
--- a/src/com/android/launcher3/util/DisplayController.java
+++ b/src/com/android/launcher3/util/DisplayController.java
@@ -41,7 +41,6 @@
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.Log;
-import android.util.Pair;
import android.view.Display;
import androidx.annotation.AnyThread;
@@ -55,6 +54,7 @@
import java.io.PrintWriter;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.Objects;
import java.util.Set;
@@ -116,8 +116,9 @@
getPackageFilter(TARGET_OVERLAY_PACKAGE, ACTION_OVERLAY_CHANGED));
WindowManagerProxy wmProxy = WindowManagerProxy.INSTANCE.get(context);
- mInfo = new Info(getDisplayInfoContext(display), display,
- wmProxy, wmProxy.estimateInternalDisplayBounds(context));
+ Context displayInfoContext = getDisplayInfoContext(display);
+ mInfo = new Info(displayInfoContext, wmProxy,
+ wmProxy.estimateInternalDisplayBounds(displayInfoContext));
}
/**
@@ -215,18 +216,18 @@
WindowManagerProxy wmProxy = WindowManagerProxy.INSTANCE.get(mContext);
Info oldInfo = mInfo;
- Context displayContext = getDisplayInfoContext(display);
- Info newInfo = new Info(displayContext, display, wmProxy, oldInfo.mPerDisplayBounds);
+ Context displayInfoContext = getDisplayInfoContext(display);
+ Info newInfo = new Info(displayInfoContext, wmProxy, oldInfo.mPerDisplayBounds);
if (newInfo.densityDpi != oldInfo.densityDpi || newInfo.fontScale != oldInfo.fontScale
|| newInfo.navigationMode != oldInfo.navigationMode) {
// Cache may not be valid anymore, recreate without cache
- newInfo = new Info(displayContext, display, wmProxy,
- wmProxy.estimateInternalDisplayBounds(displayContext));
+ newInfo = new Info(displayInfoContext, wmProxy,
+ wmProxy.estimateInternalDisplayBounds(displayInfoContext));
}
int change = 0;
- if (!newInfo.displayId.equals(oldInfo.displayId)) {
+ if (!newInfo.normalizedDisplayInfo.equals(oldInfo.normalizedDisplayInfo)) {
change |= CHANGE_ACTIVE_SCREEN;
}
if (newInfo.rotation != oldInfo.rotation) {
@@ -238,34 +239,19 @@
if (newInfo.navigationMode != oldInfo.navigationMode) {
change |= CHANGE_NAVIGATION_MODE;
}
- if (!newInfo.supportedBounds.equals(oldInfo.supportedBounds)) {
+ if (!newInfo.supportedBounds.equals(oldInfo.supportedBounds)
+ || !newInfo.mPerDisplayBounds.equals(oldInfo.mPerDisplayBounds)) {
change |= CHANGE_SUPPORTED_BOUNDS;
-
- Point currentS = newInfo.currentSize;
- Pair<CachedDisplayInfo, WindowBounds[]> cachedBounds =
- oldInfo.mPerDisplayBounds.get(newInfo.displayId);
- Point expectedS = cachedBounds == null ? null : cachedBounds.first.size;
- if (newInfo.supportedBounds.size() != oldInfo.supportedBounds.size()) {
- Log.e("b/198965093",
- "Inconsistent number of displays"
- + "\ndisplay state: " + display.getState()
- + "\noldInfo.supportedBounds: " + oldInfo.supportedBounds
- + "\nnewInfo.supportedBounds: " + newInfo.supportedBounds);
- }
- if (expectedS != null
- && (Math.min(currentS.x, currentS.y) != Math.min(expectedS.x, expectedS.y)
- || Math.max(currentS.x, currentS.y) != Math.max(expectedS.x, expectedS.y))
- && display.getState() == Display.STATE_OFF) {
- Log.e("b/198965093",
- "Display size changed while display is off, ignoring change");
- return;
- }
}
+ Log.d("b/198965093", "handleInfoChange"
+ + "\n\tchange: 0b" + Integer.toBinaryString(change)
+ + "\n\tConfiguration diff: 0x" + Integer.toHexString(
+ newInfo.mConfiguration.diff(oldInfo.mConfiguration)));
if (change != 0) {
mInfo = newInfo;
final int flags = change;
- MAIN_EXECUTOR.execute(() -> notifyChange(displayContext, flags));
+ MAIN_EXECUTOR.execute(() -> notifyChange(displayInfoContext, flags));
}
}
@@ -283,8 +269,8 @@
public static class Info {
// Cached property
+ public final CachedDisplayInfo normalizedDisplayInfo;
public final int rotation;
- public final String displayId;
public final Point currentSize;
public final Rect cutout;
@@ -297,51 +283,71 @@
public final Set<WindowBounds> supportedBounds = new ArraySet<>();
- private final ArrayMap<String, Pair<CachedDisplayInfo, WindowBounds[]>> mPerDisplayBounds =
+ private final ArrayMap<CachedDisplayInfo, WindowBounds[]> mPerDisplayBounds =
new ArrayMap<>();
- public Info(Context context, Display display) {
+ // TODO(b/198965093): Remove after investigation
+ private Configuration mConfiguration;
+
+ public Info(Context displayInfoContext) {
/* don't need system overrides for external displays */
- this(context, display, new WindowManagerProxy(), new ArrayMap<>());
+ this(displayInfoContext, new WindowManagerProxy(), new ArrayMap<>());
}
// Used for testing
- public Info(Context context, Display display,
+ public Info(Context displayInfoContext,
WindowManagerProxy wmProxy,
- ArrayMap<String, Pair<CachedDisplayInfo, WindowBounds[]>> perDisplayBoundsCache) {
- CachedDisplayInfo displayInfo = wmProxy.getDisplayInfo(context, display);
+ ArrayMap<CachedDisplayInfo, WindowBounds[]> perDisplayBoundsCache) {
+ CachedDisplayInfo displayInfo = wmProxy.getDisplayInfo(displayInfoContext);
+ normalizedDisplayInfo = displayInfo.normalize();
rotation = displayInfo.rotation;
currentSize = displayInfo.size;
- displayId = displayInfo.id;
cutout = displayInfo.cutout;
- Configuration config = context.getResources().getConfiguration();
+ Configuration config = displayInfoContext.getResources().getConfiguration();
fontScale = config.fontScale;
densityDpi = config.densityDpi;
mScreenSizeDp = new PortraitSize(config.screenHeightDp, config.screenWidthDp);
- navigationMode = parseNavigationMode(context);
+ navigationMode = parseNavigationMode(displayInfoContext);
+
+ // TODO(b/198965093): Remove after investigation
+ mConfiguration = config;
mPerDisplayBounds.putAll(perDisplayBoundsCache);
- Pair<CachedDisplayInfo, WindowBounds[]> cachedValue = mPerDisplayBounds.get(displayId);
+ WindowBounds[] cachedValue = mPerDisplayBounds.get(normalizedDisplayInfo);
- WindowBounds realBounds = wmProxy.getRealBounds(context, display, displayInfo);
+ WindowBounds realBounds = wmProxy.getRealBounds(displayInfoContext, displayInfo);
if (cachedValue == null) {
- supportedBounds.add(realBounds);
- } else {
+ // Unexpected normalizedDisplayInfo is found, recreate the cache
+ Log.e("b/198965093", "Unexpected normalizedDisplayInfo found, invalidating cache");
+ mPerDisplayBounds.clear();
+ mPerDisplayBounds.putAll(wmProxy.estimateInternalDisplayBounds(displayInfoContext));
+ cachedValue = mPerDisplayBounds.get(normalizedDisplayInfo);
+ if (cachedValue == null) {
+ Log.e("b/198965093", "normalizedDisplayInfo not found in estimation: "
+ + normalizedDisplayInfo);
+ supportedBounds.add(realBounds);
+ }
+ }
+
+ if (cachedValue != null) {
// Verify that the real bounds are a match
- WindowBounds expectedBounds = cachedValue.second[displayInfo.rotation];
+ WindowBounds expectedBounds = cachedValue[displayInfo.rotation];
if (!realBounds.equals(expectedBounds)) {
WindowBounds[] clone = new WindowBounds[4];
- System.arraycopy(cachedValue.second, 0, clone, 0, 4);
+ System.arraycopy(cachedValue, 0, clone, 0, 4);
clone[displayInfo.rotation] = realBounds;
- cachedValue = Pair.create(displayInfo.normalize(), clone);
- mPerDisplayBounds.put(displayId, cachedValue);
+ mPerDisplayBounds.put(normalizedDisplayInfo, clone);
}
}
mPerDisplayBounds.values().forEach(
- pair -> Collections.addAll(supportedBounds, pair.second));
- Log.d("b/211775278", "displayId: " + displayId + ", currentSize: " + currentSize);
- Log.d("b/211775278", "perDisplayBounds: " + mPerDisplayBounds);
+ windowBounds -> Collections.addAll(supportedBounds, windowBounds));
+ Log.e("b/198965093", "mConfiguration: " + mConfiguration);
+ Log.d("b/198965093", "displayInfo: " + displayInfo);
+ Log.d("b/198965093", "realBounds: " + realBounds);
+ Log.d("b/198965093", "normalizedDisplayInfo: " + normalizedDisplayInfo);
+ mPerDisplayBounds.forEach((key, value) -> Log.d("b/198965093",
+ "perDisplayBounds - " + key + ": " + Arrays.deepToString(value)));
}
/**
@@ -369,13 +375,14 @@
public void dump(PrintWriter pw) {
Info info = mInfo;
pw.println("DisplayController.Info:");
- pw.println(" id=" + info.displayId);
+ pw.println(" normalizedDisplayInfo=" + info.normalizedDisplayInfo);
pw.println(" rotation=" + info.rotation);
pw.println(" fontScale=" + info.fontScale);
pw.println(" densityDpi=" + info.densityDpi);
pw.println(" navigationMode=" + info.navigationMode.name());
pw.println(" currentSize=" + info.currentSize);
- pw.println(" supportedBounds=" + info.supportedBounds);
+ info.mPerDisplayBounds.forEach((key, value) -> pw.println(
+ " perDisplayBounds - " + key + ": " + Arrays.deepToString(value)));
}
/**
diff --git a/src/com/android/launcher3/util/HorizontalInsettableView.java b/src/com/android/launcher3/util/HorizontalInsettableView.java
index 7979bc0..486b73d 100644
--- a/src/com/android/launcher3/util/HorizontalInsettableView.java
+++ b/src/com/android/launcher3/util/HorizontalInsettableView.java
@@ -15,6 +15,8 @@
*/
package com.android.launcher3.util;
+import android.util.FloatProperty;
+
/**
* Allows the implementing view to add insets to the left and right.
*/
@@ -32,4 +34,22 @@
*/
void setHorizontalInsets(float insetPercentage);
+ /**
+ * Returns the width percentage to inset the content from the left and from the right. See
+ * {@link #setHorizontalInsets};
+ */
+ float getHorizontalInsets();
+
+ FloatProperty<HorizontalInsettableView> HORIZONTAL_INSETS =
+ new FloatProperty<HorizontalInsettableView>("horizontalInsets") {
+ @Override
+ public Float get(HorizontalInsettableView view) {
+ return view.getHorizontalInsets();
+ }
+
+ @Override
+ public void setValue(HorizontalInsettableView view, float insetPercentage) {
+ view.setHorizontalInsets(insetPercentage);
+ }
+ };
}
diff --git a/src/com/android/launcher3/util/OnboardingPrefs.java b/src/com/android/launcher3/util/OnboardingPrefs.java
index c1e4fa8..f4cf21e 100644
--- a/src/com/android/launcher3/util/OnboardingPrefs.java
+++ b/src/com/android/launcher3/util/OnboardingPrefs.java
@@ -140,4 +140,14 @@
mSharedPrefs.edit().putInt(eventKey, count).apply();
return hasReachedMaxCount(count, eventKey);
}
+
+ /**
+ * Sets the event count to the given value.
+ *
+ * @return Whether we have now reached the max count.
+ */
+ public boolean setEventCount(int count, @EventCountKey String eventKey) {
+ mSharedPrefs.edit().putInt(eventKey, count).apply();
+ return hasReachedMaxCount(count, eventKey);
+ }
}
diff --git a/src/com/android/launcher3/util/SplitConfigurationOptions.java b/src/com/android/launcher3/util/SplitConfigurationOptions.java
index 6a336cc..f14d985 100644
--- a/src/com/android/launcher3/util/SplitConfigurationOptions.java
+++ b/src/com/android/launcher3/util/SplitConfigurationOptions.java
@@ -96,7 +96,7 @@
*
* If you make changes here, consider making the same changes there
*/
- public static class StagedSplitBounds {
+ public static class SplitBounds {
public final Rect leftTopBounds;
public final Rect rightBottomBounds;
/** This rect represents the actual gap between the two apps */
@@ -124,7 +124,7 @@
public final int leftTopTaskId;
public final int rightBottomTaskId;
- public StagedSplitBounds(Rect leftTopBounds, Rect rightBottomBounds, int leftTopTaskId,
+ public SplitBounds(Rect leftTopBounds, Rect rightBottomBounds, int leftTopTaskId,
int rightBottomTaskId) {
this.leftTopBounds = leftTopBounds;
this.rightBottomBounds = rightBottomBounds;
@@ -163,7 +163,7 @@
}
}
- public static class StagedSplitTaskPosition {
+ public static class SplitStageInfo {
public int taskId = -1;
@StagePosition
public int stagePosition = STAGE_POSITION_UNDEFINED;
diff --git a/src/com/android/launcher3/util/UiThreadHelper.java b/src/com/android/launcher3/util/UiThreadHelper.java
index a1f31fe..7e6711f 100644
--- a/src/com/android/launcher3/util/UiThreadHelper.java
+++ b/src/com/android/launcher3/util/UiThreadHelper.java
@@ -25,9 +25,13 @@
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
+import android.util.Log;
import android.view.View;
+import android.view.WindowInsets;
+import android.view.WindowInsetsController;
import android.view.inputmethod.InputMethodManager;
+import com.android.launcher3.Utilities;
import com.android.launcher3.views.ActivityContext;
/**
@@ -48,6 +52,25 @@
public static void hideKeyboardAsync(ActivityContext activityContext, IBinder token) {
View root = activityContext.getDragLayer();
+ if (Utilities.ATLEAST_R) {
+ Preconditions.assertUIThread();
+ // Hide keyboard with WindowInsetsController if could. In case
+ // hideSoftInputFromWindow may get ignored by input connection being finished
+ // when the screen is off.
+ //
+ // In addition, inside IMF, the keyboards are closed asynchronously that launcher no
+ // longer need to post to the message queue.
+ final WindowInsetsController wic = root.getWindowInsetsController();
+ WindowInsets insets = root.getRootWindowInsets();
+ boolean isImeShown = insets != null && insets.isVisible(WindowInsets.Type.ime());
+ if (wic != null && isImeShown) {
+ // this method cannot be called cross threads
+ wic.hide(WindowInsets.Type.ime());
+ activityContext.getStatsLogManager().logger()
+ .log(LAUNCHER_ALLAPPS_KEYBOARD_CLOSED);
+ return;
+ }
+ }
// Since the launcher context cannot be accessed directly from callback, adding secondary
// message to log keyboard close event asynchronously.
Bundle mHideKeyboardLoggerMsg = new Bundle();
@@ -55,7 +78,7 @@
STATS_LOGGER_KEY,
Message.obtain(
HANDLER.get(root.getContext()),
- () -> ActivityContext.lookupContext(root.getContext())
+ () -> activityContext
.getStatsLogManager()
.logger()
.log(LAUNCHER_ALLAPPS_KEYBOARD_CLOSED)
diff --git a/src/com/android/launcher3/util/ViewCache.java b/src/com/android/launcher3/util/ViewCache.java
index 08b8744..98e6822 100644
--- a/src/com/android/launcher3/util/ViewCache.java
+++ b/src/com/android/launcher3/util/ViewCache.java
@@ -21,6 +21,8 @@
import android.view.View;
import android.view.ViewGroup;
+import com.android.launcher3.R;
+
/**
* Utility class to cache views at an activity level
*/
@@ -39,18 +41,26 @@
mCache.put(layoutId, entry);
}
+ T result;
if (entry.mCurrentSize > 0) {
entry.mCurrentSize --;
- T result = (T) entry.mViews[entry.mCurrentSize];
+ result = (T) entry.mViews[entry.mCurrentSize];
entry.mViews[entry.mCurrentSize] = null;
- return result;
+ } else {
+ result = (T) LayoutInflater.from(context).inflate(layoutId, parent, false);
+ result.setTag(R.id.cache_entry_tag_id, entry);
}
-
- return (T) LayoutInflater.from(context).inflate(layoutId, parent, false);
+ return result;
}
public void recycleView(int layoutId, View view) {
CacheEntry entry = mCache.get(layoutId);
+ if (entry != view.getTag(R.id.cache_entry_tag_id)) {
+ // Since this view was created, the cache has been reset. The view should not be
+ // recycled since this means the environment could also have changed, requiring new
+ // view setup.
+ return;
+ }
if (entry != null && entry.mCurrentSize < entry.mMaxSize) {
entry.mViews[entry.mCurrentSize] = view;
entry.mCurrentSize++;
diff --git a/src/com/android/launcher3/util/WindowBounds.java b/src/com/android/launcher3/util/WindowBounds.java
index a15679a..91480e1 100644
--- a/src/com/android/launcher3/util/WindowBounds.java
+++ b/src/com/android/launcher3/util/WindowBounds.java
@@ -76,6 +76,7 @@
+ "bounds=" + bounds
+ ", insets=" + insets
+ ", availableSize=" + availableSize
+ + ", rotationHint=" + rotationHint
+ '}';
}
diff --git a/src/com/android/launcher3/util/window/CachedDisplayInfo.java b/src/com/android/launcher3/util/window/CachedDisplayInfo.java
index 06b9829..23f37aa 100644
--- a/src/com/android/launcher3/util/window/CachedDisplayInfo.java
+++ b/src/com/android/launcher3/util/window/CachedDisplayInfo.java
@@ -30,7 +30,6 @@
*/
public class CachedDisplayInfo {
- public final String id;
public final Point size;
public final int rotation;
public final Rect cutout;
@@ -40,11 +39,10 @@
}
public CachedDisplayInfo(Point size, int rotation) {
- this("", size, rotation, new Rect());
+ this(size, rotation, new Rect());
}
- public CachedDisplayInfo(String id, Point size, int rotation, Rect cutout) {
- this.id = id;
+ public CachedDisplayInfo(Point size, int rotation, Rect cutout) {
this.size = size;
this.rotation = rotation;
this.cutout = cutout;
@@ -62,16 +60,15 @@
Rect newCutout = new Rect(cutout);
rotateRect(newCutout, deltaRotation(rotation, Surface.ROTATION_0));
- return new CachedDisplayInfo(id, newSize, Surface.ROTATION_0, newCutout);
+ return new CachedDisplayInfo(newSize, Surface.ROTATION_0, newCutout);
}
@Override
public String toString() {
return "CachedDisplayInfo{"
- + "id='" + id + '\''
- + ", size=" + size
- + ", rotation=" + rotation
+ + "size=" + size
+ ", cutout=" + cutout
+ + ", rotation=" + rotation
+ '}';
}
@@ -80,13 +77,13 @@
if (this == o) return true;
if (!(o instanceof CachedDisplayInfo)) return false;
CachedDisplayInfo that = (CachedDisplayInfo) o;
- return rotation == that.rotation && Objects.equals(id, that.id)
- && Objects.equals(size, that.size) && Objects.equals(cutout,
- that.cutout);
+ return rotation == that.rotation
+ && Objects.equals(size, that.size)
+ && Objects.equals(cutout, that.cutout);
}
@Override
public int hashCode() {
- return Objects.hash(id, size, rotation, cutout);
+ return Objects.hash(size, rotation, cutout);
}
}
diff --git a/src/com/android/launcher3/util/window/WindowManagerProxy.java b/src/com/android/launcher3/util/window/WindowManagerProxy.java
index 92f718e..d5a065a 100644
--- a/src/com/android/launcher3/util/window/WindowManagerProxy.java
+++ b/src/com/android/launcher3/util/window/WindowManagerProxy.java
@@ -16,7 +16,6 @@
package com.android.launcher3.util.window;
import static android.view.Display.DEFAULT_DISPLAY;
-import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
import static com.android.launcher3.ResourceUtils.INVALID_RESOURCE_HANDLE;
import static com.android.launcher3.ResourceUtils.NAVBAR_HEIGHT;
@@ -41,7 +40,6 @@
import android.hardware.display.DisplayManager;
import android.os.Build;
import android.util.ArrayMap;
-import android.util.Pair;
import android.view.Display;
import android.view.DisplayCutout;
import android.view.Surface;
@@ -88,20 +86,12 @@
* Returns a map of normalized info of internal displays to estimated window bounds
* for that display
*/
- public ArrayMap<String, Pair<CachedDisplayInfo, WindowBounds[]>> estimateInternalDisplayBounds(
- Context context) {
- Display[] displays = context.getSystemService(DisplayManager.class).getDisplays();
- ArrayMap<String, Pair<CachedDisplayInfo, WindowBounds[]>> result = new ArrayMap<>();
- for (Display display : displays) {
- if (isInternalDisplay(display)) {
- Context displayContext = Utilities.ATLEAST_S
- ? context.createWindowContext(display, TYPE_APPLICATION, null)
- : context.createDisplayContext(display);
- CachedDisplayInfo info = getDisplayInfo(displayContext, display).normalize();
- WindowBounds[] bounds = estimateWindowBounds(context, info);
- result.put(info.id, Pair.create(info, bounds));
- }
- }
+ public ArrayMap<CachedDisplayInfo, WindowBounds[]> estimateInternalDisplayBounds(
+ Context displayInfoContext) {
+ CachedDisplayInfo info = getDisplayInfo(displayInfoContext).normalize();
+ WindowBounds[] bounds = estimateWindowBounds(displayInfoContext, info);
+ ArrayMap<CachedDisplayInfo, WindowBounds[]> result = new ArrayMap<>();
+ result.put(info, bounds);
return result;
}
@@ -109,12 +99,11 @@
* Returns the real bounds for the provided display after applying any insets normalization
*/
@TargetApi(Build.VERSION_CODES.R)
- public WindowBounds getRealBounds(Context windowContext,
- Display display, CachedDisplayInfo info) {
+ public WindowBounds getRealBounds(Context displayInfoContext, CachedDisplayInfo info) {
if (!Utilities.ATLEAST_R) {
Point smallestSize = new Point();
Point largestSize = new Point();
- display.getCurrentSizeRange(smallestSize, largestSize);
+ getDisplay(displayInfoContext).getCurrentSizeRange(smallestSize, largestSize);
if (info.size.y > info.size.x) {
// Portrait
@@ -122,17 +111,16 @@
info.rotation);
} else {
// Landscape
- new WindowBounds(info.size.x, info.size.y, largestSize.x, smallestSize.y,
+ return new WindowBounds(info.size.x, info.size.y, largestSize.x, smallestSize.y,
info.rotation);
}
}
- WindowMetrics wm = windowContext.getSystemService(WindowManager.class)
+ WindowMetrics windowMetrics = displayInfoContext.getSystemService(WindowManager.class)
.getMaximumWindowMetrics();
-
Rect insets = new Rect();
- normalizeWindowInsets(windowContext, wm.getWindowInsets(), insets);
- return new WindowBounds(wm.getBounds(), insets, info.rotation);
+ normalizeWindowInsets(displayInfoContext, windowMetrics.getWindowInsets(), insets);
+ return new WindowBounds(windowMetrics.getBounds(), insets, info.rotation);
}
/**
@@ -169,12 +157,9 @@
insetsBuilder.setInsetsIgnoringVisibility(WindowInsets.Type.navigationBars(), newNavInsets);
Insets statusBarInsets = oldInsets.getInsets(WindowInsets.Type.statusBars());
-
-
int statusBarHeight = getDimenByName(systemRes,
(isPortrait) ? STATUS_BAR_HEIGHT_PORTRAIT : STATUS_BAR_HEIGHT_LANDSCAPE,
STATUS_BAR_HEIGHT);
-
Insets newStatusBarInsets = Insets.of(
statusBarInsets.left,
Math.max(statusBarInsets.top, statusBarHeight),
@@ -202,21 +187,14 @@
}
/**
- * Returns true if the display is an internal displays
- */
- protected boolean isInternalDisplay(Display display) {
- return display.getDisplayId() == Display.DEFAULT_DISPLAY;
- }
-
- /**
* Returns a list of possible WindowBounds for the display keyed on the 4 surface rotations
*/
- public WindowBounds[] estimateWindowBounds(Context context, CachedDisplayInfo display) {
+ protected WindowBounds[] estimateWindowBounds(Context context, CachedDisplayInfo displayInfo) {
int densityDpi = context.getResources().getConfiguration().densityDpi;
- int rotation = display.rotation;
- Rect safeCutout = display.cutout;
+ int rotation = displayInfo.rotation;
+ Rect safeCutout = displayInfo.cutout;
- int minSize = Math.min(display.size.x, display.size.y);
+ int minSize = Math.min(displayInfo.size.x, displayInfo.size.y);
int swDp = (int) dpiFromPx(minSize, densityDpi);
Resources systemRes;
@@ -255,7 +233,7 @@
Point tempSize = new Point();
for (int i = 0; i < 4; i++) {
int rotationChange = deltaRotation(rotation, i);
- tempSize.set(display.size.x, display.size.y);
+ tempSize.set(displayInfo.size.x, displayInfo.size.y);
rotateSize(tempSize, rotationChange);
Rect bounds = new Rect(0, 0, tempSize.x, tempSize.y);
@@ -311,48 +289,58 @@
* Returns a CachedDisplayInfo initialized for the current display
*/
@TargetApi(Build.VERSION_CODES.S)
- public CachedDisplayInfo getDisplayInfo(Context displayContext, Display display) {
- int rotation = getRotation(displayContext);
- Rect cutoutRect = new Rect();
- Point size = new Point();
+ public CachedDisplayInfo getDisplayInfo(Context displayInfoContext) {
+ int rotation = getRotation(displayInfoContext);
if (Utilities.ATLEAST_S) {
- WindowMetrics wm = displayContext.getSystemService(WindowManager.class)
+ WindowMetrics windowMetrics = displayInfoContext.getSystemService(WindowManager.class)
.getMaximumWindowMetrics();
- DisplayCutout cutout = wm.getWindowInsets().getDisplayCutout();
- if (cutout != null) {
- cutoutRect.set(cutout.getSafeInsetLeft(), cutout.getSafeInsetTop(),
- cutout.getSafeInsetRight(), cutout.getSafeInsetBottom());
- }
-
- size.set(wm.getBounds().right, wm.getBounds().bottom);
+ return getDisplayInfo(windowMetrics, rotation);
} else {
+ Point size = new Point();
+ Display display = getDisplay(displayInfoContext);
display.getRealSize(size);
+ Rect cutoutRect = new Rect();
+ return new CachedDisplayInfo(size, rotation, cutoutRect);
}
- return new CachedDisplayInfo(getDisplayId(display), size, rotation, cutoutRect);
}
/**
- * Returns a unique ID representing the display
+ * Returns a CachedDisplayInfo initialized for the current display
*/
- protected String getDisplayId(Display display) {
- return Integer.toString(display.getDisplayId());
+ @TargetApi(Build.VERSION_CODES.S)
+ protected CachedDisplayInfo getDisplayInfo(WindowMetrics windowMetrics, int rotation) {
+ Point size = new Point(windowMetrics.getBounds().right, windowMetrics.getBounds().bottom);
+ Rect cutoutRect = new Rect();
+ DisplayCutout cutout = windowMetrics.getWindowInsets().getDisplayCutout();
+ if (cutout != null) {
+ cutoutRect.set(cutout.getSafeInsetLeft(), cutout.getSafeInsetTop(),
+ cutout.getSafeInsetRight(), cutout.getSafeInsetBottom());
+ }
+ return new CachedDisplayInfo(size, rotation, cutoutRect);
}
/**
- * Returns rotation of the display associated with the context.
+ * Returns rotation of the display associated with the context, or rotation of DEFAULT_DISPLAY
+ * if the context isn't associated with a display.
*/
- public int getRotation(Context context) {
- Display d = null;
+ public int getRotation(Context displayInfoContext) {
+ return getDisplay(displayInfoContext).getRotation();
+ }
+
+ /**
+ *
+ * Returns the display associated with the context, or DEFAULT_DISPLAY if the context isn't
+ * associated with a display.
+ */
+ protected Display getDisplay(Context displayInfoContext) {
if (Utilities.ATLEAST_R) {
try {
- d = context.getDisplay();
+ return displayInfoContext.getDisplay();
} catch (UnsupportedOperationException e) {
// Ignore
}
}
- if (d == null) {
- d = context.getSystemService(DisplayManager.class).getDisplay(DEFAULT_DISPLAY);
- }
- return d.getRotation();
+ return displayInfoContext.getSystemService(DisplayManager.class).getDisplay(
+ DEFAULT_DISPLAY);
}
}
diff --git a/src/com/android/launcher3/views/FloatingIconView.java b/src/com/android/launcher3/views/FloatingIconView.java
index babe607..efc83eb 100644
--- a/src/com/android/launcher3/views/FloatingIconView.java
+++ b/src/com/android/launcher3/views/FloatingIconView.java
@@ -58,6 +58,8 @@
import com.android.launcher3.popup.SystemShortcut;
import com.android.launcher3.shortcuts.DeepShortcutView;
+import java.util.function.Supplier;
+
/**
* A view that is created to look like another view with the purpose of creating fluid animations.
*/
@@ -295,9 +297,11 @@
drawable = drawable == null ? null : drawable.getConstantState().newDrawable();
int iconOffset = getOffsetForIconBounds(l, drawable, pos);
+ // Clone right away as we are on the background thread instead of blocking the
+ // main thread later
+ Drawable btvClone = btvIcon == null ? null : btvIcon.getConstantState().newDrawable();
synchronized (outIconLoadResult) {
- outIconLoadResult.btvDrawable = btvIcon == null || drawable == btvIcon
- ? null : btvIcon.getConstantState().newDrawable();
+ outIconLoadResult.btvDrawable = () -> btvClone;
outIconLoadResult.drawable = drawable;
outIconLoadResult.badge = badge;
outIconLoadResult.iconOffset = iconOffset;
@@ -318,7 +322,7 @@
*/
@UiThread
private void setIcon(@Nullable Drawable drawable, @Nullable Drawable badge,
- @Nullable Drawable btvIcon, int iconOffset) {
+ @Nullable Supplier<Drawable> btvIcon, int iconOffset) {
final DeviceProfile dp = mLauncher.getDeviceProfile();
final InsettableFrameLayout.LayoutParams lp =
(InsettableFrameLayout.LayoutParams) getLayoutParams();
@@ -361,9 +365,9 @@
*
* Allows nullable as this may be cleared when drawing is deferred to ClipIconView.
*/
- private void setOriginalDrawableBackground(@Nullable Drawable btvIcon) {
+ private void setOriginalDrawableBackground(@Nullable Supplier<Drawable> btvIcon) {
if (!mIsOpening) {
- mBtvDrawable.setBackground(btvIcon);
+ mBtvDrawable.setBackground(btvIcon == null ? null : btvIcon.get());
}
}
@@ -518,21 +522,26 @@
getLocationBoundsForView(l, v, isOpening, position);
final FastBitmapDrawable btvIcon;
+ final Supplier<Drawable> btvDrawableSupplier;
if (v instanceof BubbleTextView) {
BubbleTextView btv = (BubbleTextView) v;
if (info instanceof ItemInfoWithIcon
&& (((ItemInfoWithIcon) info).runtimeStatusFlags
& ItemInfoWithIcon.FLAG_SHOW_DOWNLOAD_PROGRESS_MASK) != 0) {
btvIcon = btv.makePreloadIcon();
+ btvDrawableSupplier = () -> btvIcon;
} else {
btvIcon = btv.getIcon();
+ // Clone when needed
+ btvDrawableSupplier = () -> btvIcon.getConstantState().newDrawable();
}
} else {
btvIcon = null;
+ btvDrawableSupplier = null;
}
IconLoadResult result = new IconLoadResult(info, btvIcon != null && btvIcon.isThemed());
- result.btvDrawable = btvIcon;
+ result.btvDrawable = btvDrawableSupplier;
final long fetchIconId = sFetchIconId++;
MODEL_EXECUTOR.getHandler().postAtFrontOfQueue(() -> {
@@ -647,7 +656,7 @@
private static class IconLoadResult {
final ItemInfo itemInfo;
final boolean isThemed;
- Drawable btvDrawable;
+ Supplier<Drawable> btvDrawable;
Drawable drawable;
Drawable badge;
int iconOffset;
diff --git a/src/com/android/launcher3/views/RecyclerViewFastScroller.java b/src/com/android/launcher3/views/RecyclerViewFastScroller.java
index 7a8e9d5..11ca130 100644
--- a/src/com/android/launcher3/views/RecyclerViewFastScroller.java
+++ b/src/com/android/launcher3/views/RecyclerViewFastScroller.java
@@ -45,7 +45,7 @@
import androidx.annotation.RequiresApi;
import androidx.recyclerview.widget.RecyclerView;
-import com.android.launcher3.BaseRecyclerView;
+import com.android.launcher3.FastScrollRecyclerView;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.graphics.FastScrollThumbDrawable;
@@ -129,7 +129,7 @@
private String mPopupSectionName;
private Insets mSystemGestureInsets;
- protected BaseRecyclerView mRv;
+ protected FastScrollRecyclerView mRv;
private RecyclerView.OnScrollListener mOnScrollListener;
private int mDownX;
@@ -174,7 +174,7 @@
ta.recycle();
}
- public void setRecyclerView(BaseRecyclerView rv, TextView popupView) {
+ public void setRecyclerView(FastScrollRecyclerView rv, TextView popupView) {
if (mRv != null && mOnScrollListener != null) {
mRv.removeOnScrollListener(mOnScrollListener);
}
@@ -285,9 +285,6 @@
}
break;
case MotionEvent.ACTION_UP:
- hideKeyboardAsync(ActivityContext.lookupContext(getContext()),
- getApplicationWindowToken());
- break;
case MotionEvent.ACTION_CANCEL:
mRv.onFastScrollCompleted();
mTouchOffsetY = 0;
@@ -311,6 +308,7 @@
}
private void calcTouchOffsetAndPrepToFastScroll(int downY, int lastY) {
+ hideKeyboardAsync(ActivityContext.lookupContext(getContext()), getWindowToken());
mIsDragging = true;
if (mCanThumbDetach) {
mIsThumbDetached = true;
diff --git a/src/com/android/launcher3/widget/BaseWidgetSheet.java b/src/com/android/launcher3/widget/BaseWidgetSheet.java
index 1bcba14..8962c4f 100644
--- a/src/com/android/launcher3/widget/BaseWidgetSheet.java
+++ b/src/com/android/launcher3/widget/BaseWidgetSheet.java
@@ -198,7 +198,9 @@
/** Returns the number of cells that can fit horizontally in a given {@code content}. */
protected int computeMaxHorizontalSpans(View content, int contentHorizontalPaddingPx) {
DeviceProfile deviceProfile = mActivityContext.getDeviceProfile();
- int availableWidth = content.getMeasuredWidth() - contentHorizontalPaddingPx;
+ int availableWidth = content.getMeasuredWidth()
+ - contentHorizontalPaddingPx
+ - (2 * mContentHorizontalMarginInPx);
Point cellSize = deviceProfile.getCellSize();
if (cellSize.x > 0) {
return availableWidth / cellSize.x;
diff --git a/src/com/android/launcher3/widget/picker/WidgetsRecyclerView.java b/src/com/android/launcher3/widget/picker/WidgetsRecyclerView.java
index 755e4a9..bdf646b 100644
--- a/src/com/android/launcher3/widget/picker/WidgetsRecyclerView.java
+++ b/src/com/android/launcher3/widget/picker/WidgetsRecyclerView.java
@@ -27,8 +27,8 @@
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView.OnItemTouchListener;
-import com.android.launcher3.BaseRecyclerView;
import com.android.launcher3.DeviceProfile;
+import com.android.launcher3.FastScrollRecyclerView;
import com.android.launcher3.R;
import com.android.launcher3.views.ActivityContext;
import com.android.launcher3.widget.model.WidgetListSpaceEntry;
@@ -41,7 +41,7 @@
/**
* The widgets recycler view.
*/
-public class WidgetsRecyclerView extends BaseRecyclerView implements OnItemTouchListener {
+public class WidgetsRecyclerView extends FastScrollRecyclerView implements OnItemTouchListener {
private WidgetsListAdapter mAdapter;
diff --git a/tests/src/com/android/launcher3/deviceemulator/DisplayEmulator.java b/tests/src/com/android/launcher3/deviceemulator/DisplayEmulator.java
index 31468c5..e2ed65f 100644
--- a/tests/src/com/android/launcher3/deviceemulator/DisplayEmulator.java
+++ b/tests/src/com/android/launcher3/deviceemulator/DisplayEmulator.java
@@ -47,8 +47,7 @@
* By changing the WindowManagerProxy we can override the window insets information
**/
private IWindowManager changeWindowManagerInstance(DeviceEmulationData deviceData) {
- WindowManagerProxy.INSTANCE.initializeForTesting(
- new TestWindowManagerProxy(mContext, deviceData));
+ WindowManagerProxy.INSTANCE.initializeForTesting(new TestWindowManagerProxy(deviceData));
return WindowManagerGlobal.getWindowManagerService();
}
@@ -57,8 +56,7 @@
WindowManagerProxy original = WindowManagerProxy.INSTANCE.get(mContext);
// Set up emulation
final int userId = UserHandle.myUserId();
- WindowManagerProxy.INSTANCE.initializeForTesting(
- new TestWindowManagerProxy(mContext, device));
+ WindowManagerProxy.INSTANCE.initializeForTesting(new TestWindowManagerProxy(device));
IWindowManager wm = changeWindowManagerInstance(device);
// Change density twice to force display controller to reset its state
wm.setForcedDisplayDensityForUser(Display.DEFAULT_DISPLAY, device.density / 2, userId);
diff --git a/tests/src/com/android/launcher3/deviceemulator/TestWindowManagerProxy.java b/tests/src/com/android/launcher3/deviceemulator/TestWindowManagerProxy.java
index cbea688..2d6bbcc 100644
--- a/tests/src/com/android/launcher3/deviceemulator/TestWindowManagerProxy.java
+++ b/tests/src/com/android/launcher3/deviceemulator/TestWindowManagerProxy.java
@@ -19,7 +19,6 @@
import android.content.res.Resources;
import android.graphics.Point;
import android.graphics.Rect;
-import android.view.Display;
import android.view.WindowInsets;
import com.android.launcher3.deviceemulator.models.DeviceEmulationData;
@@ -32,17 +31,12 @@
private final DeviceEmulationData mDevice;
- public TestWindowManagerProxy(Context context, DeviceEmulationData device) {
+ public TestWindowManagerProxy(DeviceEmulationData device) {
super(true);
mDevice = device;
}
@Override
- public boolean isInternalDisplay(Display display) {
- return display.getDisplayId() == Display.DEFAULT_DISPLAY;
- }
-
- @Override
protected int getDimenByName(Resources res, String resName) {
Integer mock = mDevice.resourceOverrides.get(resName);
return mock != null ? mock : super.getDimenByName(res, resName);
@@ -54,27 +48,25 @@
}
@Override
- public CachedDisplayInfo getDisplayInfo(Context context, Display display) {
- int rotation = display.getRotation();
+ public CachedDisplayInfo getDisplayInfo(Context displayInfoContext) {
+ int rotation = getRotation(displayInfoContext);
Point size = new Point(mDevice.width, mDevice.height);
RotationUtils.rotateSize(size, rotation);
Rect cutout = new Rect(mDevice.cutout);
RotationUtils.rotateRect(cutout, rotation);
- return new CachedDisplayInfo(getDisplayId(display), size, rotation, cutout);
+ return new CachedDisplayInfo(size, rotation, cutout);
}
@Override
- public WindowBounds getRealBounds(Context windowContext, Display display,
- CachedDisplayInfo info) {
- return estimateInternalDisplayBounds(windowContext)
- .get(getDisplayId(display)).second[display.getRotation()];
+ public WindowBounds getRealBounds(Context displayInfoContext, CachedDisplayInfo info) {
+ return estimateInternalDisplayBounds(displayInfoContext).get(
+ getDisplayInfo(displayInfoContext))[getDisplay(displayInfoContext).getRotation()];
}
@Override
public WindowInsets normalizeWindowInsets(Context context, WindowInsets oldInsets,
Rect outInsets) {
- outInsets.set(getRealBounds(context, context.getDisplay(),
- getDisplayInfo(context, context.getDisplay())).insets);
+ outInsets.set(getRealBounds(context, getDisplayInfo(context)).insets);
return oldInsets;
}
}
diff --git a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
index 8a97c6b..e00b569 100644
--- a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
+++ b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
@@ -53,7 +53,6 @@
import com.android.launcher3.widget.picker.WidgetsRecyclerView;
import org.junit.Before;
-import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -199,8 +198,8 @@
// Test that ensureWorkspaceIsScrollable adds a page by dragging an icon there.
executeOnLauncher(launcher -> assertFalse("Initial workspace state is scrollable",
isWorkspaceScrollable(launcher)));
- assertNull("Chrome app was found on empty workspace",
- workspace.tryGetWorkspaceAppIcon("Chrome"));
+ workspace.verifyWorkspaceAppIconIsGone(
+ "Chrome app was found on empty workspace", "Chrome");
workspace.ensureWorkspaceIsScrollable();
@@ -376,6 +375,7 @@
@Test
@PortraitLandscape
+ @ScreenRecord
public void testDragToFolder() {
// TODO: add the use case to drag an icon to an existing folder. Currently it either fails
// on tablets or phones due to difference in resolution.
@@ -388,10 +388,10 @@
folder.getAppIcon(GMAIL_APP_NAME);
Workspace workspace = folder.close();
- assertNull(STORE_APP_NAME + " should be moved to a folder.",
- workspace.tryGetWorkspaceAppIcon(STORE_APP_NAME));
- assertNull(GMAIL_APP_NAME + " should be moved to a folder.",
- workspace.tryGetWorkspaceAppIcon(GMAIL_APP_NAME));
+ workspace.verifyWorkspaceAppIconIsGone(STORE_APP_NAME + " should be moved to a folder.",
+ STORE_APP_NAME);
+ workspace.verifyWorkspaceAppIconIsGone(GMAIL_APP_NAME + " should be moved to a folder.",
+ GMAIL_APP_NAME);
final HomeAppIcon mapIcon = createShortcutInCenterIfNotExist(MAPS_APP_NAME);
folderIcon = mapIcon.dragToIcon(folderIcon);
@@ -399,8 +399,8 @@
folder.getAppIcon(MAPS_APP_NAME);
workspace = folder.close();
- assertNull(MAPS_APP_NAME + " should be moved to a folder.",
- workspace.tryGetWorkspaceAppIcon(MAPS_APP_NAME));
+ workspace.verifyWorkspaceAppIconIsGone(MAPS_APP_NAME + " should be moved to a folder.",
+ MAPS_APP_NAME);
}
@Test
@@ -424,8 +424,9 @@
for (String appName : new String[]{"Gmail", "Play Store", APP_NAME}) {
final HomeAppIcon homeAppIcon = createShortcutInCenterIfNotExist(appName);
Workspace workspace = mLauncher.getWorkspace().deleteAppIcon(homeAppIcon);
- assertNull(appName + " app was found after being deleted from workspace",
- workspace.tryGetWorkspaceAppIcon(appName));
+ workspace.verifyWorkspaceAppIconIsGone(
+ appName + " app was found after being deleted from workspace",
+ appName);
}
}
@@ -509,10 +510,8 @@
.containsAtLeast(DUMMY_APP_NAME, MAPS_APP_NAME, STORE_APP_NAME);
mLauncher.getWorkspace().getWorkspaceAppIcon(DUMMY_APP_NAME).uninstall();
-
- assertNull(
- DUMMY_APP_NAME + " app was found after being uninstalled",
- mLauncher.getWorkspace().tryGetWorkspaceAppIcon(DUMMY_APP_NAME));
+ mLauncher.getWorkspace().verifyWorkspaceAppIconIsGone(
+ DUMMY_APP_NAME + " was expected to disappear after uninstall.", DUMMY_APP_NAME);
Map<String, Point> finalPositions =
mLauncher.getWorkspace().getWorkspaceIconsPositions();
diff --git a/tests/src/com/android/launcher3/ui/WorkProfileTest.java b/tests/src/com/android/launcher3/ui/WorkProfileTest.java
index 7c1be1d..35b4ca6 100644
--- a/tests/src/com/android/launcher3/ui/WorkProfileTest.java
+++ b/tests/src/com/android/launcher3/ui/WorkProfileTest.java
@@ -140,8 +140,8 @@
executeOnLauncher(l -> {
ActivityAllAppsContainerView<?> allApps = l.getAppsView();
assertEquals("Work tab is not focused", allApps.getCurrentPage(), WORK_PAGE);
- View workPausedCard = allApps.getActiveRecyclerView().findViewHolderForAdapterPosition(
- 0).itemView;
+ View workPausedCard = allApps.getActiveRecyclerView()
+ .findViewHolderForAdapterPosition(0).itemView;
workPausedCard.findViewById(R.id.enable_work_apps).performClick();
});
waitForLauncherCondition("Work profile toggle ON failed", launcher -> {
diff --git a/tests/tapl/com/android/launcher3/tapl/Launchable.java b/tests/tapl/com/android/launcher3/tapl/Launchable.java
index 91ab1bd..33fea2d 100644
--- a/tests/tapl/com/android/launcher3/tapl/Launchable.java
+++ b/tests/tapl/com/android/launcher3/tapl/Launchable.java
@@ -66,20 +66,19 @@
"want to launch an app from " + launchableType())) {
LauncherInstrumentation.log("Launchable.launch before click "
+ mObject.getVisibleCenter() + " in " + mLauncher.getVisibleBounds(mObject));
- final String label = mObject.getText();
mLauncher.clickLauncherObject(mObject);
try (LauncherInstrumentation.Closable c2 = mLauncher.addContextLayer("clicked")) {
expectActivityStartEvents();
- return assertAppLaunched(label, selector);
+ return assertAppLaunched(selector);
}
}
}
- protected LaunchedAppState assertAppLaunched(String label, BySelector selector) {
+ protected LaunchedAppState assertAppLaunched(BySelector selector) {
mLauncher.assertTrue(
- "App didn't start: " + label + " (" + selector + ")",
+ "App didn't start: (" + selector + ")",
mLauncher.getDevice().wait(Until.hasObject(selector),
LauncherInstrumentation.WAIT_TIME_MS));
return new LaunchedAppState(mLauncher);
diff --git a/tests/tapl/com/android/launcher3/tapl/LaunchedAppState.java b/tests/tapl/com/android/launcher3/tapl/LaunchedAppState.java
index face02a..046d36b 100644
--- a/tests/tapl/com/android/launcher3/tapl/LaunchedAppState.java
+++ b/tests/tapl/com/android/launcher3/tapl/LaunchedAppState.java
@@ -97,12 +97,16 @@
}
static void dragToSplitscreen(
- LauncherInstrumentation launcher, Launchable launchable, String expectedNewPackageName,
+ LauncherInstrumentation launcher,
+ Launchable launchable,
+ String expectedNewPackageName,
String expectedExistingPackageName) {
try (LauncherInstrumentation.Closable c1 = launcher.addContextLayer(
"want to drag taskbar item to splitscreen")) {
final Point displaySize = launcher.getRealDisplaySize();
- final Point endPoint = new Point(displaySize.x / 4, 3 * displaySize.y / 4);
+ // Drag to the center of the top-left quadrant of the screen, this point will work in
+ // both portrait and landscape.
+ final Point endPoint = new Point(displaySize.x / 4, displaySize.y / 4);
final long downTime = SystemClock.uptimeMillis();
// Use mObject before starting drag since the system drag and drop moves the original
// view.
@@ -142,9 +146,8 @@
try (LauncherInstrumentation.Closable c4 = launcher.addContextLayer(
"dropped item")) {
- launchable.assertAppLaunched(itemLabel, By.pkg(expectedNewPackageName));
- launchable.assertAppLaunched(
- itemLabel, By.pkg(expectedExistingPackageName));
+ launchable.assertAppLaunched(By.pkg(expectedNewPackageName));
+ launchable.assertAppLaunched(By.pkg(expectedExistingPackageName));
}
}
}
diff --git a/tests/tapl/com/android/launcher3/tapl/Workspace.java b/tests/tapl/com/android/launcher3/tapl/Workspace.java
index eb7f05b..e919740 100644
--- a/tests/tapl/com/android/launcher3/tapl/Workspace.java
+++ b/tests/tapl/com/android/launcher3/tapl/Workspace.java
@@ -140,6 +140,20 @@
}
}
+ /**
+ * Waits for an app icon to be gone (e.g. after uninstall). Fails if it remains.
+ *
+ * @param errorMessage error message thrown then the icon doesn't disappear.
+ * @param appName app that should be gone.
+ */
+ public void verifyWorkspaceAppIconIsGone(String errorMessage, String appName) {
+ final UiObject2 workspace = verifyActiveContainer();
+ assertTrue(errorMessage,
+ workspace.wait(
+ Until.gone(AppIcon.getAppIconSelector(appName, mLauncher)),
+ LauncherInstrumentation.WAIT_TIME_MS));
+ }
+
/**
* Returns an icon for the app; fails if the icon doesn't exist.