Merge "Change flag type to control Quickstep widget app launch" into sc-dev
diff --git a/Android.mk b/Android.mk
index 54a80b7..c222f24 100644
--- a/Android.mk
+++ b/Android.mk
@@ -47,6 +47,9 @@
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_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
include $(BUILD_PACKAGE)
#
@@ -116,6 +119,9 @@
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_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
include $(BUILD_PACKAGE)
@@ -164,6 +170,9 @@
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_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
include $(BUILD_PACKAGE)
diff --git a/AndroidManifest-common.xml b/AndroidManifest-common.xml
index 4e72260..87a08af 100644
--- a/AndroidManifest-common.xml
+++ b/AndroidManifest-common.xml
@@ -94,12 +94,6 @@
</receiver>
<service
- android:name="com.android.launcher3.uioverrides.dynamicui.WallpaperManagerCompatVL$ColorExtractionService"
- android:exported="false"
- android:process=":wallpaper_chooser"
- android:permission="android.permission.BIND_JOB_SERVICE" />
-
- <service
android:name="com.android.launcher3.notification.NotificationListener"
android:label="@string/notification_dots_service_title"
android:exported="true"
diff --git a/go/quickstep/src/com/android/quickstep/TaskOverlayFactoryGo.java b/go/quickstep/src/com/android/quickstep/TaskOverlayFactoryGo.java
index 350e0d1..67e9d89 100644
--- a/go/quickstep/src/com/android/quickstep/TaskOverlayFactoryGo.java
+++ b/go/quickstep/src/com/android/quickstep/TaskOverlayFactoryGo.java
@@ -21,14 +21,18 @@
import android.annotation.SuppressLint;
import android.app.assist.AssistContent;
+import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.graphics.Matrix;
+import android.net.Uri;
import android.os.SystemClock;
+import android.provider.Settings;
import android.text.TextUtils;
import androidx.annotation.VisibleForTesting;
+import com.android.launcher3.BuildConfig;
import com.android.launcher3.R;
import com.android.quickstep.util.AssistContentRequester;
import com.android.quickstep.views.OverviewActionsView;
@@ -45,7 +49,13 @@
public static final String ACTION_SEARCH = "com.android.quickstep.ACTION_SEARCH";
public static final String ELAPSED_NANOS = "niu_actions_elapsed_realtime_nanos";
public static final String ACTIONS_URL = "niu_actions_app_url";
+ public static final String ACTIONS_APP_PACKAGE = "niu_actions_app_package";
+ public static final String ACTIONS_ERROR_CODE = "niu_actions_app_error_code";
+ public static final int ERROR_PERMISSIONS = 1;
private static final String TAG = "TaskOverlayFactoryGo";
+ private static final String URI_AUTHORITY =
+ BuildConfig.APPLICATION_ID + ".overview.fileprovider";
+ private static final String FAKE_FILEPATH = "shared_images/null.png";
// Empty constructor required for ResourceBasedOverride
public TaskOverlayFactoryGo(Context context) {}
@@ -63,7 +73,9 @@
*/
public static final class TaskOverlayGo<T extends OverviewActionsView> extends TaskOverlay {
private String mNIUPackageName;
+ private String mTaskPackageName;
private String mWebUrl;
+ private boolean mAssistPermissionsEnabled;
private TaskOverlayGo(TaskThumbnailView taskThumbnailView) {
super(taskThumbnailView);
@@ -77,7 +89,7 @@
boolean rotated) {
getActionsView().updateDisabledFlags(DISABLED_NO_THUMBNAIL, thumbnail == null);
mNIUPackageName =
- mApplicationContext.getResources().getString(R.string.niu_actions_package);
+ mApplicationContext.getString(R.string.niu_actions_package);
if (thumbnail == null || TextUtils.isEmpty(mNIUPackageName)) {
return;
@@ -86,6 +98,12 @@
getActionsView().updateDisabledFlags(DISABLED_ROTATED, rotated);
boolean isAllowedByPolicy = mThumbnailView.isRealSnapshot();
getActionsView().setCallbacks(new OverlayUICallbacksGoImpl(isAllowedByPolicy, task));
+ mTaskPackageName = task.key.getPackageName();
+
+ checkPermissions();
+ if (!mAssistPermissionsEnabled) {
+ return;
+ }
int taskId = task.key.id;
AssistContentRequester contentRequester =
@@ -112,7 +130,22 @@
@VisibleForTesting
public void sendNIUIntent(String actionType) {
Intent intent = createNIUIntent(actionType);
- mImageApi.shareAsDataWithExplicitIntent(/* crop */ null, intent);
+ // Only add and send the image if the appropriate permissions are held
+ if (mAssistPermissionsEnabled) {
+ mImageApi.shareAsDataWithExplicitIntent(/* crop */ null, intent);
+ } else {
+ intent.putExtra(ACTIONS_ERROR_CODE, ERROR_PERMISSIONS);
+ // The Intent recipient expects an image URI, and omitting one or using a
+ // completely invalid URI will cause the Intent parsing to crash.
+ // So we construct a URI for a nonexistent image.
+ Uri uri = new Uri.Builder()
+ .scheme(ContentResolver.SCHEME_CONTENT)
+ .authority(URI_AUTHORITY)
+ .path(FAKE_FILEPATH)
+ .build();
+ intent.setData(uri);
+ mApplicationContext.startActivity(intent);
+ }
}
private Intent createNIUIntent(String actionType) {
@@ -120,6 +153,7 @@
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION)
.setPackage(mNIUPackageName)
+ .putExtra(ACTIONS_APP_PACKAGE, mTaskPackageName)
.putExtra(ELAPSED_NANOS, SystemClock.elapsedRealtimeNanos());
if (mWebUrl != null) {
@@ -129,6 +163,19 @@
return intent;
}
+ /**
+ * Checks whether the Assistant has screen context permissions
+ */
+ @VisibleForTesting
+ public void checkPermissions() {
+ ContentResolver contentResolver = mApplicationContext.getContentResolver();
+ boolean structureEnabled = Settings.Secure.getInt(contentResolver,
+ Settings.Secure.ASSIST_STRUCTURE_ENABLED, 0) != 0;
+ boolean screenshotEnabled = Settings.Secure.getInt(contentResolver,
+ Settings.Secure.ASSIST_SCREENSHOT_ENABLED, 0) != 0;
+ mAssistPermissionsEnabled = structureEnabled && screenshotEnabled;
+ }
+
protected class OverlayUICallbacksGoImpl extends OverlayUICallbacksImpl
implements OverlayUICallbacksGo {
public OverlayUICallbacksGoImpl(boolean isAllowedByPolicy, Task task) {
diff --git a/protos/launcher_atom.proto b/protos/launcher_atom.proto
index fe81b4c..fb47b0a 100644
--- a/protos/launcher_atom.proto
+++ b/protos/launcher_atom.proto
@@ -125,6 +125,22 @@
// Folder's label is empty(i.e., title == "").
// Not eligible for auto-labeling.
EMPTY_LABEL = 12;
+
+ ALL_APPS_SEARCH_RESULT_APPLICATION = 13;
+ ALL_APPS_SEARCH_RESULT_SHORTCUT = 14;
+ ALL_APPS_SEARCH_RESULT_PEOPLE = 15;
+ ALL_APPS_SEARCH_RESULT_ACTION = 16;
+ ALL_APPS_SEARCH_RESULT_SETTING = 17;
+ ALL_APPS_SEARCH_RESULT_SCREENSHOT = 18;
+ ALL_APPS_SEARCH_RESULT_SLICE = 19;
+ ALL_APPS_SEARCH_RESULT_WIDGETS = 20;
+ ALL_APPS_SEARCH_RESULT_PLAY = 21;
+ ALL_APPS_SEARCH_RESULT_SUGGEST = 22;
+ ALL_APPS_SEARCH_RESULT_ASSISTANT = 23;
+ ALL_APPS_SEARCH_RESULT_CHROMETAB = 24;
+ ALL_APPS_SEARCH_RESULT_NAVVYSITE = 25;
+ ALL_APPS_SEARCH_RESULT_TIPS = 26;
+ ALL_APPS_SEARCH_RESULT_PEOPLE_TILE = 27;
}
// Main app icons
diff --git a/quickstep/AndroidManifest.xml b/quickstep/AndroidManifest.xml
index 5e5cf73..842abc3 100644
--- a/quickstep/AndroidManifest.xml
+++ b/quickstep/AndroidManifest.xml
@@ -97,9 +97,6 @@
android:resource="@xml/overview_file_provider_paths"/>
</provider>
- <service android:name="com.android.launcher3.uioverrides.dynamicui.WallpaperManagerCompatVL$ColorExtractionService"
- tools:node="remove"/>
-
<activity android:name="com.android.launcher3.proxy.ProxyActivityStarter"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
android:launchMode="singleTask"
diff --git a/quickstep/res/layout/fallback_recents_activity.xml b/quickstep/res/layout/fallback_recents_activity.xml
index 55400a7..a43296f 100644
--- a/quickstep/res/layout/fallback_recents_activity.xml
+++ b/quickstep/res/layout/fallback_recents_activity.xml
@@ -33,6 +33,12 @@
android:layout_height="match_parent"
android:clipChildren="false">
+ <com.android.launcher3.views.ScrimView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:id="@+id/scrim_view"
+ android:background="@android:color/transparent" />
+
<com.android.quickstep.fallback.FallbackRecentsView
android:id="@id/overview_panel"
android:layout_width="match_parent"
diff --git a/quickstep/res/layout/task_menu.xml b/quickstep/res/layout/task_menu.xml
index 3916ff9..a219bca 100644
--- a/quickstep/res/layout/task_menu.xml
+++ b/quickstep/res/layout/task_menu.xml
@@ -16,7 +16,7 @@
-->
<com.android.quickstep.views.TaskMenuView
xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:animateLayoutChanges="true"
android:background="@drawable/task_menu_bg"
@@ -35,12 +35,10 @@
<LinearLayout
android:id="@+id/menu_option_layout"
- style="@style/TaskMenu"
- android:divider="@drawable/all_apps_divider"
- android:showDividers="beginning"
- android:paddingStart="@dimen/task_card_menu_horizontal_padding"
- android:paddingEnd="@dimen/task_card_menu_horizontal_padding"
android:layout_width="match_parent"
- android:layout_height="wrap_content"/>
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:divider="@drawable/all_apps_divider"
+ android:showDividers="beginning" />
</com.android.quickstep.views.TaskMenuView>
\ No newline at end of file
diff --git a/quickstep/res/layout/task_view_menu_option.xml b/quickstep/res/layout/task_view_menu_option.xml
index 102ae9b..a7d6e89 100644
--- a/quickstep/res/layout/task_view_menu_option.xml
+++ b/quickstep/res/layout/task_view_menu_option.xml
@@ -16,9 +16,8 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- style="@style/TaskMenu.Option"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center"
android:orientation="vertical"
android:paddingTop="@dimen/task_card_menu_option_vertical_padding"
android:paddingBottom="@dimen/task_card_menu_option_vertical_padding"
@@ -29,22 +28,19 @@
android:id="@+id/icon"
android:layout_width="@dimen/system_shortcut_icon_size"
android:layout_height="@dimen/system_shortcut_icon_size"
- android:layout_marginTop="@dimen/system_shortcut_header_icon_padding"
- android:layout_marginBottom="@dimen/deep_shortcut_drawable_padding"
+ android:layout_marginStart="@dimen/task_menu_option_start_margin"
android:layout_gravity="center_horizontal"
android:backgroundTint="?android:attr/textColorTertiary"/>
<TextView
style="@style/BaseIcon"
android:id="@+id/text"
- android:layout_width="match_parent"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:paddingBottom="@dimen/popup_padding_end"
+ android:layout_marginStart="@dimen/task_menu_option_start_margin"
android:textSize="12sp"
android:textColor="?android:attr/textColorPrimary"
android:fontFamily="sans-serif"
- android:gravity="center_horizontal"
- android:layout_gravity="center_horizontal"
android:focusable="false" />
</LinearLayout>
diff --git a/quickstep/res/values-land/dimens.xml b/quickstep/res/values-land/dimens.xml
index 7cb01f6..668aea2 100644
--- a/quickstep/res/values-land/dimens.xml
+++ b/quickstep/res/values-land/dimens.xml
@@ -15,7 +15,5 @@
limitations under the License.
-->
<resources>
- <dimen name="task_card_menu_horizontal_padding">24dp</dimen>
-
<dimen name="overview_task_margin">8dp</dimen>
</resources>
\ No newline at end of file
diff --git a/quickstep/res/values-land/styles.xml b/quickstep/res/values-land/styles.xml
deleted file mode 100644
index 0824b4f..0000000
--- a/quickstep/res/values-land/styles.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 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.
--->
-<resources>
- <!-- Task Menu layout styles. -->
- <style name="TaskMenu">
- <item name="android:orientation">horizontal</item>
- </style>
-
- <!-- Task Menu Option layout styles. -->
- <style name="TaskMenu.Option">
- <item name="android:layout_width">0dp</item>
- <item name="android:layout_weight">1</item>
- </style>
-</resources>
\ No newline at end of file
diff --git a/quickstep/res/values-ne/strings.xml b/quickstep/res/values-ne/strings.xml
index 99ad814..f3b1151 100644
--- a/quickstep/res/values-ne/strings.xml
+++ b/quickstep/res/values-ne/strings.xml
@@ -45,72 +45,40 @@
<string name="hotsaet_tip_prediction_enabled" msgid="2233554377501347650">"सिफारिस गरिएका एपहरू देखाउने सुविधा सक्षम पारिएका छन्"</string>
<string name="hotsaet_tip_prediction_disabled" msgid="1506426298884658491">"सिफारिस गरिएका एपहरू देखाउने सुविधा असक्षम पारिएको छ"</string>
<string name="hotseat_prediction_content_description" msgid="4582028296938078419">"पूर्वानुमान गरिएको एप: <xliff:g id="TITLE">%1$s</xliff:g>"</string>
- <!-- no translation found for back_gesture_feedback_swipe_too_far_from_left_edge (340972404868601012) -->
- <skip />
- <!-- no translation found for back_gesture_feedback_cancelled_left_edge (6671316150388702530) -->
- <skip />
- <!-- no translation found for back_gesture_feedback_complete_left_edge (3220478647881674266) -->
- <skip />
- <!-- no translation found for back_gesture_feedback_swipe_too_far_from_right_edge (4306700023773832353) -->
- <skip />
- <!-- no translation found for back_gesture_feedback_cancelled_right_edge (4951916546256902552) -->
- <skip />
- <!-- no translation found for back_gesture_feedback_complete (7261221999760772210) -->
- <skip />
- <!-- no translation found for back_gesture_feedback_swipe_in_nav_bar (1148198467090405643) -->
- <skip />
- <!-- no translation found for back_gesture_tutorial_confirm_subtitle (5181305411668713250) -->
- <skip />
- <!-- no translation found for back_gesture_intro_title (19551256430224428) -->
- <skip />
- <!-- no translation found for back_gesture_intro_subtitle (7912576483031802797) -->
- <skip />
- <!-- no translation found for home_gesture_feedback_swipe_too_far_from_edge (1446774096007065298) -->
- <skip />
- <!-- no translation found for home_gesture_feedback_overview_detected (1557523944897393013) -->
- <skip />
- <!-- no translation found for home_gesture_feedback_wrong_swipe_direction (6993979358080825438) -->
- <skip />
- <!-- no translation found for home_gesture_feedback_complete (2324789183070815517) -->
- <skip />
- <!-- no translation found for home_gesture_intro_title (836590312858441830) -->
- <skip />
- <!-- no translation found for home_gesture_intro_subtitle (2632238748497975326) -->
- <skip />
- <!-- no translation found for overview_gesture_feedback_swipe_too_far_from_edge (3032757898111577225) -->
- <skip />
- <!-- no translation found for overview_gesture_feedback_home_detected (1411130969354020489) -->
- <skip />
- <!-- no translation found for overview_gesture_feedback_wrong_swipe_direction (6725820500906747925) -->
- <skip />
- <!-- no translation found for overview_gesture_feedback_complete (5477014491632199169) -->
- <skip />
- <!-- no translation found for overview_gesture_intro_title (2902054412868489378) -->
- <skip />
- <!-- no translation found for overview_gesture_intro_subtitle (1579517193845186042) -->
- <skip />
- <!-- no translation found for gesture_tutorial_confirm_title (6201516182040074092) -->
- <skip />
- <!-- no translation found for gesture_tutorial_action_button_label_next (2556263116424738762) -->
- <skip />
- <!-- no translation found for gesture_tutorial_action_button_label_done (671834508127014231) -->
- <skip />
- <!-- no translation found for gesture_tutorial_action_button_label_settings (2923621047916486604) -->
- <skip />
- <!-- no translation found for gesture_tutorial_try_again (65962545858556697) -->
- <skip />
- <!-- no translation found for gesture_tutorial_nice (2936275692616928280) -->
- <skip />
- <!-- no translation found for gesture_tutorial_step (1279786122817620968) -->
- <skip />
+ <string name="back_gesture_feedback_swipe_too_far_from_left_edge" msgid="340972404868601012">"स्क्रिनको सबैभन्दा बायाँ किनाराबाट स्वाइप गर्नुहोस्।"</string>
+ <string name="back_gesture_feedback_cancelled_left_edge" msgid="6671316150388702530">"स्क्रिनको बायाँ किनाराबाट मध्य भागसम्म स्वाइप गर्नुहोस् अनि औँला उठाउनुहोस्।"</string>
+ <string name="back_gesture_feedback_complete_left_edge" msgid="3220478647881674266">"यत्ति हो! अब दायाँ किनाराबाट स्वाइप गरी हेर्नुहोस्।"</string>
+ <string name="back_gesture_feedback_swipe_too_far_from_right_edge" msgid="4306700023773832353">"स्क्रिनको सबैभन्दा दायाँ किनाराबाट स्वाइप गर्नुहोस्।"</string>
+ <string name="back_gesture_feedback_cancelled_right_edge" msgid="4951916546256902552">"स्क्रिनको दायाँ किनाराबाट मध्य भागसम्म स्वाइप गर्नुहोस् अनि औँला उठाउनुहोस्।"</string>
+ <string name="back_gesture_feedback_complete" msgid="7261221999760772210">"तपाईंले \'पछाडि जानुहोस्\' नामक इसारा प्रयोग गर्ने तरिका सिक्नुभयो। अब होम स्क्रिनमा जाने तरिका सिक्नुहोस्।"</string>
+ <string name="back_gesture_feedback_swipe_in_nav_bar" msgid="1148198467090405643">"स्क्रिनको फेदको धेरै नजिकसम्म स्वाइप नगर्नुहोस्।"</string>
+ <string name="back_gesture_tutorial_confirm_subtitle" msgid="5181305411668713250">"\'पछाडि\' नामक इसाराको संवेदनशीलता बदल्न सेटिङमा जानुहोस्"</string>
+ <string name="back_gesture_intro_title" msgid="19551256430224428">"पछाडि जान स्वाइप गर्नुहोस्"</string>
+ <string name="back_gesture_intro_subtitle" msgid="7912576483031802797">"यसअघिको स्क्रिनमा फर्कन स्क्रिनको बायाँ वा दायाँ किनाराबाट मध्य भागसम्म स्वाइप गर्नुहोस्।"</string>
+ <string name="home_gesture_feedback_swipe_too_far_from_edge" msgid="1446774096007065298">"स्क्रिनको फेदबाट माथितिर स्वाइप गर्नुहोस्।"</string>
+ <string name="home_gesture_feedback_overview_detected" msgid="1557523944897393013">"औँला उठाउनुअघि नरोकिनुहोस्।"</string>
+ <string name="home_gesture_feedback_wrong_swipe_direction" msgid="6993979358080825438">"सीधै माथितिर स्वाइप गर्नुहोस्।"</string>
+ <string name="home_gesture_feedback_complete" msgid="2324789183070815517">"तपाईंले \'होम स्क्रिनमा जानुहोस्\' नामक इसारा प्रयोग गर्ने तरिका सिक्नुभयो। अब एउटा एपबाट अर्को एपमा जाने तरिका सिक्नुहोस्।"</string>
+ <string name="home_gesture_intro_title" msgid="836590312858441830">"होम स्क्रिनमा जान स्वाइप गर्नुहोस्"</string>
+ <string name="home_gesture_intro_subtitle" msgid="2632238748497975326">"स्क्रिनको फेदबाट माथितिर स्वाइप गर्नुहोस्। यो इसारा प्रयोग गर्दा सधैँ होम स्क्रिन खुल्छ।"</string>
+ <string name="overview_gesture_feedback_swipe_too_far_from_edge" msgid="3032757898111577225">"स्क्रिनको फेदबाट माथितिर स्वाइप गर्नुहोस्।"</string>
+ <string name="overview_gesture_feedback_home_detected" msgid="1411130969354020489">"स्क्रिनबाट औँला उठाउनुअघि एपको विन्डोमा केही बेर छोइराख्नुहोस्।"</string>
+ <string name="overview_gesture_feedback_wrong_swipe_direction" msgid="6725820500906747925">"सीधै माथितिर स्वाइप गर्नुहोस् अनि रोकिनुहोस्।"</string>
+ <string name="overview_gesture_feedback_complete" msgid="5477014491632199169">"तपाईंले \'एउटा एपबाट अर्को एपमा जानुहोस्\' नामक इसारा प्रयोग गर्ने तरिका सिक्नुभयो। तपाईं अब आफ्नो फोन चलाउन सक्नुहुन्छ!"</string>
+ <string name="overview_gesture_intro_title" msgid="2902054412868489378">"एउटा एपबाट अर्को एपमा जान स्वाइप गर्नुहोस्"</string>
+ <string name="overview_gesture_intro_subtitle" msgid="1579517193845186042">"स्क्रिनको फेदबाट माथितिर स्वाइप गर्नुहोस्, छोइराख्नुहोस् अनि औँला उठाउनुहोस्।"</string>
+ <string name="gesture_tutorial_confirm_title" msgid="6201516182040074092">"सबै तयार छ"</string>
+ <string name="gesture_tutorial_action_button_label_next" msgid="2556263116424738762">"अर्को"</string>
+ <string name="gesture_tutorial_action_button_label_done" msgid="671834508127014231">"सम्पन्न भयो"</string>
+ <string name="gesture_tutorial_action_button_label_settings" msgid="2923621047916486604">"सेटिङ"</string>
+ <string name="gesture_tutorial_try_again" msgid="65962545858556697">"फेरि प्रयास गर्नुहोस्"</string>
+ <string name="gesture_tutorial_nice" msgid="2936275692616928280">"राम्रो!"</string>
+ <string name="gesture_tutorial_step" msgid="1279786122817620968">"ट्युटोरियल <xliff:g id="CURRENT">%1$d</xliff:g>/<xliff:g id="TOTAL">%2$d</xliff:g>"</string>
<string name="action_share" msgid="2648470652637092375">"सेयर गर्नुहोस्"</string>
<string name="action_screenshot" msgid="8171125848358142917">"स्क्रिनसट"</string>
<string name="blocked_by_policy" msgid="2071401072261365546">"यो एप वा तपाईंको सङ्गठनले यो कारबाही गर्ने अनुमति दिँदैन"</string>
- <!-- no translation found for skip_tutorial_dialog_title (2725643161260038458) -->
- <skip />
+ <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>
- <!-- no translation found for gesture_tutorial_action_button_label_cancel (3809842569351264108) -->
- <skip />
- <!-- no translation found for gesture_tutorial_action_button_label_skip (394452764989751960) -->
- <skip />
+ <string name="gesture_tutorial_action_button_label_cancel" msgid="3809842569351264108">"रद्द गर्नुहोस्"</string>
+ <string name="gesture_tutorial_action_button_label_skip" msgid="394452764989751960">"स्किप गर्नु…"</string>
</resources>
diff --git a/quickstep/res/values/dimens.xml b/quickstep/res/values/dimens.xml
index 99be502..9c0a083 100644
--- a/quickstep/res/values/dimens.xml
+++ b/quickstep/res/values/dimens.xml
@@ -67,7 +67,7 @@
in various configurations -->
<dimen name="task_card_menu_option_vertical_padding">8dp</dimen>
<dimen name="task_card_menu_shadow_height">3dp</dimen>
- <dimen name="task_card_menu_horizontal_padding">0dp</dimen>
+ <dimen name="task_menu_option_start_margin">12dp</dimen>
<!-- Copied from framework resource:
docked_stack_divider_thickness - 2 * docked_stack_divider_insets -->
<dimen name="multi_window_task_divider_size">10dp</dimen>
diff --git a/quickstep/res/values/styles.xml b/quickstep/res/values/styles.xml
index 82a91a7..7c7d20a 100644
--- a/quickstep/res/values/styles.xml
+++ b/quickstep/res/values/styles.xml
@@ -15,16 +15,6 @@
limitations under the License.
-->
<resources>
- <!-- Task Menu layout styles. -->
- <style name="TaskMenu">
- <item name="android:orientation">vertical</item>
- </style>
-
- <!-- Task Menu Option layout styles. -->
- <style name="TaskMenu.Option">
- <item name="android:layout_width">match_parent</item>
- <item name="android:layout_height">wrap_content</item>
- </style>
<style name="TextAppearance.GestureTutorial"
parent="android:TextAppearance.Material.Body1" />
diff --git a/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java b/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java
index 7aae38c..c6c6c01 100644
--- a/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java
+++ b/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java
@@ -443,11 +443,25 @@
if (info == null) {
return;
}
+ switch (info.container) {
+ case LauncherSettings.Favorites.CONTAINER_DESKTOP:
+ case LauncherSettings.Favorites.CONTAINER_HOTSEAT:
+ // Fall through and continue it's on the workspace (we don't support swiping back
+ // to other containers like all apps or the hotseat predictions (which can change)
+ break;
+ default:
+ if (info.container >= 0) {
+ // Also allow swiping to folders
+ break;
+ }
+ return;
+ }
switch (info.itemType) {
case LauncherSettings.Favorites.ITEM_TYPE_APPLICATION:
case LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT:
case LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT:
- // Fall through and continue if it's an app or shortcut
+ case LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET:
+ // Fall through and continue if it's an app, shortcut, or widget
break;
default:
return;
diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java
index 1a464b1..36764a1 100644
--- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java
+++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java
@@ -60,6 +60,7 @@
import android.os.Looper;
import android.os.SystemProperties;
import android.util.Pair;
+import android.util.Size;
import android.view.View;
import android.view.animation.Interpolator;
import android.view.animation.PathInterpolator;
@@ -102,7 +103,9 @@
import com.android.systemui.shared.system.WindowManagerWrapper;
import com.android.wm.shell.startingsurface.IStartingWindowListener;
+import java.util.ArrayList;
import java.util.LinkedHashMap;
+import java.util.List;
/**
* Manages the opening and closing app transitions from Launcher
@@ -485,32 +488,29 @@
alpha.setInterpolator(LINEAR);
launcherAnimator.play(alpha);
+ List<View> viewsToAnimate = new ArrayList<>();
+
Workspace workspace = mLauncher.getWorkspace();
- View currentPage = ((CellLayout) workspace.getChildAt(workspace.getCurrentPage()))
- .getShortcutsAndWidgets();
- View hotseat = mLauncher.getHotseat();
- View qsb = mLauncher.findViewById(R.id.search_container_all_apps);
+ workspace.getVisiblePages().forEach(
+ view -> viewsToAnimate.add(((CellLayout) view).getShortcutsAndWidgets()));
- currentPage.setLayerType(View.LAYER_TYPE_HARDWARE, null);
- hotseat.setLayerType(View.LAYER_TYPE_HARDWARE, null);
- qsb.setLayerType(View.LAYER_TYPE_HARDWARE, null);
+ viewsToAnimate.add(mLauncher.getHotseat());
+ // Add QSB
+ viewsToAnimate.add(mLauncher.findViewById(R.id.search_container_all_apps));
- launcherAnimator.play(ObjectAnimator.ofFloat(currentPage, View.TRANSLATION_Y, trans));
- launcherAnimator.play(ObjectAnimator.ofFloat(hotseat, View.TRANSLATION_Y, trans));
- launcherAnimator.play(ObjectAnimator.ofFloat(qsb, View.TRANSLATION_Y, trans));
+ viewsToAnimate.forEach(view -> {
+ view.setLayerType(View.LAYER_TYPE_HARDWARE, null);
+ launcherAnimator.play(ObjectAnimator.ofFloat(view, View.TRANSLATION_Y, trans));
+ });
// Pause page indicator animations as they lead to layer trashing.
mLauncher.getWorkspace().getPageIndicator().pauseAnimations();
endListener = () -> {
- currentPage.setTranslationY(0);
- hotseat.setTranslationY(0);
- qsb.setTranslationY(0);
-
- currentPage.setLayerType(View.LAYER_TYPE_NONE, null);
- hotseat.setLayerType(View.LAYER_TYPE_NONE, null);
- qsb.setLayerType(View.LAYER_TYPE_NONE, null);
-
+ viewsToAnimate.forEach(view -> {
+ view.setTranslationY(0);
+ view.setLayerType(View.LAYER_TYPE_NONE, null);
+ });
mDragLayerAlpha.setValue(1f);
mLauncher.getWorkspace().getPageIndicator().skipAnimationsToEnd();
};
@@ -781,7 +781,9 @@
final float finalWindowRadius = mDeviceProfile.isMultiWindowMode
? 0 : getWindowCornerRadius(mLauncher.getResources());
final FloatingWidgetView floatingView = FloatingWidgetView.getFloatingWidgetView(mLauncher,
- v, widgetBackgroundBounds, windowTargetBounds, finalWindowRadius);
+ v, widgetBackgroundBounds,
+ new Size(windowTargetBounds.width(), windowTargetBounds.height()),
+ finalWindowRadius);
final float initialWindowRadius = supportsRoundedCornersOnWindows(mLauncher.getResources())
? floatingView.getInitialCornerRadius() : 0;
diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepInteractionHandler.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepInteractionHandler.java
index 66e4f4c..5c19ab8 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepInteractionHandler.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepInteractionHandler.java
@@ -23,6 +23,7 @@
import android.view.View;
import android.widget.RemoteViews;
+import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.util.ActivityOptionsWrapper;
import com.android.launcher3.widget.LauncherAppWidgetHostView;
@@ -49,6 +50,10 @@
Pair<Intent, ActivityOptions> options = remoteResponse.getLaunchOptions(hostView);
ActivityOptionsWrapper activityOptions = mLauncher.getAppTransitionManager()
.getActivityLaunchOptions(mLauncher, hostView);
+ Object itemInfo = hostView.getTag();
+ if (itemInfo instanceof ItemInfo) {
+ mLauncher.addLaunchCookie((ItemInfo) itemInfo, activityOptions.options);
+ }
options = Pair.create(options.first, activityOptions.options);
return RemoteViews.startPendingIntent(hostView, pendingIntent, options);
}
diff --git a/quickstep/src/com/android/launcher3/uioverrides/WallpaperColorInfo.java b/quickstep/src/com/android/launcher3/uioverrides/WallpaperColorInfo.java
deleted file mode 100644
index 1417995..0000000
--- a/quickstep/src/com/android/launcher3/uioverrides/WallpaperColorInfo.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (C) 2018 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.uioverrides;
-
-import static android.app.WallpaperManager.FLAG_SYSTEM;
-
-import android.annotation.TargetApi;
-import android.app.WallpaperColors;
-import android.app.WallpaperManager;
-import android.app.WallpaperManager.OnColorsChangedListener;
-import android.content.Context;
-import android.os.Build;
-import android.os.Handler;
-import android.os.Looper;
-
-import com.android.launcher3.util.MainThreadInitializedObject;
-import com.android.systemui.shared.system.TonalCompat;
-import com.android.systemui.shared.system.TonalCompat.ExtractionInfo;
-
-import java.util.ArrayList;
-
-@TargetApi(Build.VERSION_CODES.P)
-public class WallpaperColorInfo implements OnColorsChangedListener {
-
- private static final int MAIN_COLOR_LIGHT = 0xffdadce0;
- private static final int MAIN_COLOR_DARK = 0xff202124;
- private static final int MAIN_COLOR_REGULAR = 0xff000000;
-
- public static final MainThreadInitializedObject<WallpaperColorInfo> INSTANCE =
- new MainThreadInitializedObject<>(WallpaperColorInfo::new);
-
- private final ArrayList<OnChangeListener> mListeners = new ArrayList<>();
- private final WallpaperManager mWallpaperManager;
- private final TonalCompat mTonalCompat;
-
- private ExtractionInfo mExtractionInfo;
-
- private OnChangeListener[] mTempListeners = new OnChangeListener[0];
-
- private WallpaperColorInfo(Context context) {
- mWallpaperManager = context.getSystemService(WallpaperManager.class);
- mTonalCompat = new TonalCompat(context);
-
- mWallpaperManager.addOnColorsChangedListener(this, new Handler(Looper.getMainLooper()));
- update(mWallpaperManager.getWallpaperColors(FLAG_SYSTEM));
- }
-
- public int getMainColor() {
- return mExtractionInfo.mainColor;
- }
-
- public int getSecondaryColor() {
- return mExtractionInfo.secondaryColor;
- }
-
- public boolean isDark() {
- return mExtractionInfo.supportsDarkTheme;
- }
-
- public boolean supportsDarkText() {
- return mExtractionInfo.supportsDarkText;
- }
-
- public boolean isMainColorDark() {
- return mExtractionInfo.mainColor == MAIN_COLOR_DARK;
- }
-
- @Override
- public void onColorsChanged(WallpaperColors colors, int which) {
- if ((which & FLAG_SYSTEM) != 0) {
- update(colors);
- notifyChange();
- }
- }
-
- private void update(WallpaperColors wallpaperColors) {
- mExtractionInfo = mTonalCompat.extractDarkColors(wallpaperColors);
- }
-
- public void addOnChangeListener(OnChangeListener listener) {
- mListeners.add(listener);
- }
-
- public void removeOnChangeListener(OnChangeListener listener) {
- mListeners.remove(listener);
- }
-
- private void notifyChange() {
- // Create a new array to avoid concurrent modification when the activity destroys itself.
- mTempListeners = mListeners.toArray(mTempListeners);
- for (int i = mTempListeners.length - 1; i >= 0; --i) {
- final OnChangeListener listener = mTempListeners[i];
- if (listener != null) {
- listener.onExtractedColorsChanged(this);
- mTempListeners[i] = null;
- }
- }
- }
-
- public interface OnChangeListener {
- void onExtractedColorsChanged(WallpaperColorInfo wallpaperColorInfo);
- }
-}
diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/AllAppsState.java b/quickstep/src/com/android/launcher3/uioverrides/states/AllAppsState.java
index 4e03971..a81bdd5 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/states/AllAppsState.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/states/AllAppsState.java
@@ -22,7 +22,9 @@
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherState;
+import com.android.launcher3.R;
import com.android.launcher3.allapps.AllAppsContainerView;
+import com.android.launcher3.util.Themes;
/**
* Definition for AllApps state
@@ -92,7 +94,7 @@
}
@Override
- public float getWorkspaceScrimAlpha(Launcher launcher) {
- return 1;
+ public int getWorkspaceScrimColor(Launcher launcher) {
+ return Themes.getAttrColor(launcher, R.attr.allAppsScrimColor);
}
}
diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java b/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java
index aa770d2..77c2611 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java
@@ -18,6 +18,7 @@
import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_BACKGROUND;
import android.content.Context;
+import android.graphics.Color;
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.DeviceProfile;
@@ -86,6 +87,11 @@
return 1f;
}
+ @Override
+ public int getWorkspaceScrimColor(Launcher launcher) {
+ return Color.TRANSPARENT;
+ }
+
public static float[] getOverviewScaleAndOffsetForBackgroundState(
BaseDraggingActivity activity) {
return new float[] {
diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java b/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java
index 30c07b0..135c478 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java
@@ -29,6 +29,7 @@
import com.android.launcher3.R;
import com.android.launcher3.Workspace;
import com.android.launcher3.config.FeatureFlags;
+import com.android.launcher3.util.Themes;
import com.android.quickstep.SysUINavigationMode;
import com.android.quickstep.util.LayoutUtils;
import com.android.quickstep.views.RecentsView;
@@ -108,8 +109,8 @@
}
@Override
- public float getWorkspaceScrimAlpha(Launcher launcher) {
- return 1f;
+ public int getWorkspaceScrimColor(Launcher launcher) {
+ return Themes.getAttrColor(launcher, R.attr.overviewScrimColor);
}
@Override
diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/QuickSwitchState.java b/quickstep/src/com/android/launcher3/uioverrides/states/QuickSwitchState.java
index 53afd21..d36e76b 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/states/QuickSwitchState.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/states/QuickSwitchState.java
@@ -18,6 +18,8 @@
import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_BACKGROUND;
import com.android.launcher3.Launcher;
+import com.android.launcher3.R;
+import com.android.launcher3.util.Themes;
/**
* State to indicate we are about to launch a recent task. Note that this state is only used when
@@ -39,6 +41,11 @@
}
@Override
+ public int getWorkspaceScrimColor(Launcher launcher) {
+ return Themes.getAttrColor(launcher, R.attr.overviewScrimColor);
+ }
+
+ @Override
public float getVerticalProgress(Launcher launcher) {
// Don't move all apps shelf while quick-switching (just let it fade).
return 1f;
diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java b/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java
index ba61923..3ac7866 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java
@@ -77,6 +77,7 @@
@Override
public void prepareForAtomicAnimation(LauncherState fromState, LauncherState toState,
StateAnimationConfig config) {
+ RecentsView overview = mActivity.getOverviewPanel();
if (toState == NORMAL && fromState == OVERVIEW) {
config.setInterpolator(ANIM_WORKSPACE_SCALE, DEACCEL);
config.setInterpolator(ANIM_WORKSPACE_FADE, ACCEL);
@@ -85,7 +86,12 @@
config.setInterpolator(ANIM_OVERVIEW_TRANSLATE_X, ACCEL_DEACCEL);
if (SysUINavigationMode.getMode(mActivity) == NO_BUTTON) {
- config.setInterpolator(ANIM_OVERVIEW_FADE, FINAL_FRAME);
+ // Scrolling in tasks, so make visible straight away
+ if (overview.getTaskViewCount() > 0) {
+ config.setInterpolator(ANIM_OVERVIEW_FADE, FINAL_FRAME);
+ } else {
+ config.setInterpolator(ANIM_OVERVIEW_FADE, DEACCEL_1_7);
+ }
} else {
config.setInterpolator(ANIM_OVERVIEW_FADE, DEACCEL_1_7);
}
@@ -122,13 +128,18 @@
config.setInterpolator(ANIM_WORKSPACE_SCALE,
fromState == NORMAL ? ACCEL : OVERSHOOT_1_2);
config.setInterpolator(ANIM_WORKSPACE_TRANSLATE, ACCEL);
- config.setInterpolator(ANIM_OVERVIEW_FADE, INSTANT);
+
+ // Scrolling in tasks, so show straight away
+ if (overview.getTaskViewCount() > 0) {
+ config.setInterpolator(ANIM_OVERVIEW_FADE, INSTANT);
+ } else {
+ config.setInterpolator(ANIM_OVERVIEW_FADE, OVERSHOOT_1_2);
+ }
} else {
config.setInterpolator(ANIM_WORKSPACE_SCALE, OVERSHOOT_1_2);
config.setInterpolator(ANIM_OVERVIEW_FADE, OVERSHOOT_1_2);
// Scale up the recents, if it is not coming from the side
- RecentsView overview = mActivity.getOverviewPanel();
if (overview.getVisibility() != VISIBLE || overview.getContentAlpha() == 0) {
RECENTS_SCALE_PROPERTY.set(overview, RECENTS_PREPARE_SCALE);
}
diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java
index 694998c..729e2cb 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonNavbarToOverviewTouchController.java
@@ -16,22 +16,13 @@
package com.android.launcher3.uioverrides.touchcontrollers;
-import static com.android.launcher3.LauncherAnimUtils.VIEW_ALPHA;
+import static com.android.launcher3.LauncherAnimUtils.VIEW_BACKGROUND_COLOR;
import static com.android.launcher3.LauncherAnimUtils.newCancelListener;
-import static com.android.launcher3.LauncherState.ALL_APPS;
import static com.android.launcher3.LauncherState.HINT_STATE;
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.Utilities.EDGE_NAV_BAR;
-import static com.android.launcher3.anim.Interpolators.ACCEL;
import static com.android.launcher3.anim.Interpolators.ACCEL_DEACCEL;
-import static com.android.launcher3.anim.Interpolators.DEACCEL;
-import static com.android.launcher3.anim.Interpolators.DEACCEL_3;
-import static com.android.launcher3.states.StateAnimationConfig.ANIM_ALL_APPS_FADE;
-import static com.android.launcher3.states.StateAnimationConfig.ANIM_ALL_APPS_HEADER_FADE;
-import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_FADE;
-import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_SCALE;
-import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_TRANSLATE;
import static com.android.launcher3.util.VibratorWrapper.OVERVIEW_HAPTIC;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED;
@@ -45,7 +36,6 @@
import com.android.launcher3.LauncherState;
import com.android.launcher3.Utilities;
import com.android.launcher3.anim.AnimatorPlaybackController;
-import com.android.launcher3.anim.Interpolators;
import com.android.launcher3.states.StateAnimationConfig;
import com.android.launcher3.util.VibratorWrapper;
import com.android.quickstep.SystemUiProxy;
@@ -127,11 +117,11 @@
}
if (mFromState == NORMAL && mToState == HINT_STATE) {
- mNormalToHintOverviewScrimAnimator = ObjectAnimator.ofFloat(
+ mNormalToHintOverviewScrimAnimator = ObjectAnimator.ofArgb(
mLauncher.getScrimView(),
- VIEW_ALPHA,
- mFromState.getWorkspaceScrimAlpha(mLauncher),
- mToState.getWorkspaceScrimAlpha(mLauncher));
+ VIEW_BACKGROUND_COLOR,
+ mFromState.getWorkspaceScrimColor(mLauncher),
+ mToState.getWorkspaceScrimColor(mLauncher));
}
mStartedOverview = false;
mReachedOverview = false;
@@ -269,39 +259,4 @@
private float dpiFromPx(float pixels) {
return Utilities.dpiFromPx(pixels, mLauncher.getResources().getDisplayMetrics().densityDpi);
}
-
- @Override
- protected StateAnimationConfig getConfigForStates(
- LauncherState fromState, LauncherState toState) {
- if (fromState == NORMAL && toState == ALL_APPS) {
- StateAnimationConfig builder = new StateAnimationConfig();
- builder.setInterpolator(ANIM_ALL_APPS_HEADER_FADE, Interpolators.clampToProgress(
- ACCEL,
- 0,
- ALL_APPS_CONTENT_FADE_MAX_CLAMPING_THRESHOLD));
- builder.setInterpolator(ANIM_ALL_APPS_FADE, Interpolators.clampToProgress(
- ACCEL,
- ALL_APPS_CONTENT_FADE_MIN_CLAMPING_THRESHOLD,
- ALL_APPS_CONTENT_FADE_MAX_CLAMPING_THRESHOLD));
-
- // Get workspace out of the way quickly, to prepare for potential pause.
- builder.setInterpolator(ANIM_WORKSPACE_SCALE, DEACCEL_3);
- builder.setInterpolator(ANIM_WORKSPACE_TRANSLATE, DEACCEL_3);
- builder.setInterpolator(ANIM_WORKSPACE_FADE, DEACCEL_3);
- return builder;
- } else if (fromState == ALL_APPS && toState == NORMAL) {
- StateAnimationConfig builder = new StateAnimationConfig();
-
- builder.setInterpolator(ANIM_ALL_APPS_FADE, Interpolators.clampToProgress(
- DEACCEL,
- 1 - ALL_APPS_CONTENT_FADE_MAX_CLAMPING_THRESHOLD,
- 1 - ALL_APPS_CONTENT_FADE_MIN_CLAMPING_THRESHOLD));
- builder.setInterpolator(ANIM_ALL_APPS_HEADER_FADE, Interpolators.clampToProgress(
- DEACCEL,
- 1 - ALL_APPS_CONTENT_FADE_MAX_CLAMPING_THRESHOLD,
- 1));
- return builder;
- }
- return super.getConfigForStates(fromState, toState);
- }
}
diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
index 77b0804..12de4a6 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java
@@ -15,7 +15,6 @@
*/
package com.android.launcher3.uioverrides.touchcontrollers;
-import static com.android.launcher3.LauncherAnimUtils.VIEW_ALPHA;
import static com.android.launcher3.LauncherAnimUtils.newCancelListener;
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.LauncherState.OVERVIEW;
@@ -232,8 +231,8 @@
// - OverviewScrim
PendingAnimation xAnim = new PendingAnimation((long) (mXRange * 2));
xAnim.setFloat(mRecentsView, ADJACENT_PAGE_OFFSET, scaleAndOffset[1], LINEAR);
- xAnim.setFloat(mLauncher.getScrimView(), VIEW_ALPHA,
- toState.getWorkspaceScrimAlpha(mLauncher), LINEAR);
+ xAnim.setViewBackgroundColor(mLauncher.getScrimView(),
+ toState.getWorkspaceScrimColor(mLauncher), LINEAR);
mXOverviewAnim = xAnim.createPlaybackController();
mXOverviewAnim.dispatchOnStart();
diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java
index b8f9452..3c83d25 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java
@@ -24,6 +24,7 @@
import static com.android.launcher3.anim.Interpolators.ACCEL;
import static com.android.launcher3.anim.Interpolators.DEACCEL;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_ALL_APPS_FADE;
+import static com.android.launcher3.states.StateAnimationConfig.ANIM_SCRIM_FADE;
import android.view.MotionEvent;
@@ -56,13 +57,17 @@
/**
* Minimum clamping progress for fading in all apps content
*/
- protected static final float ALL_APPS_CONTENT_FADE_MIN_CLAMPING_THRESHOLD = 0.4f;
-
+ protected static final float ALL_APPS_CONTENT_FADE_MIN_CLAMPING_THRESHOLD = 0.5f;
/**
- * The progress at which recents will begin fading out when swiping up from overview.
+ * Minimum clamping progress for fading in all apps scrim
*/
- private static final float RECENTS_FADE_THRESHOLD = 0.88f;
+ protected static final float ALL_APPS_SCRIM_VISIBLE_THRESHOLD = .1f;
+
+ /**
+ * Maximum clamping progress for opaque all apps scrim
+ */
+ protected static final float ALL_APPS_SCRIM_OPAQUE_THRESHOLD = .5f;
private final PortraitOverviewStateTouchHelper mOverviewPortraitStateTouchHelper;
@@ -122,14 +127,22 @@
private StateAnimationConfig getNormalToAllAppsAnimation() {
StateAnimationConfig builder = new StateAnimationConfig();
builder.setInterpolator(ANIM_ALL_APPS_FADE, Interpolators.clampToProgress(ACCEL,
- 0, ALL_APPS_CONTENT_FADE_MAX_CLAMPING_THRESHOLD));
+ ALL_APPS_CONTENT_FADE_MIN_CLAMPING_THRESHOLD,
+ ALL_APPS_CONTENT_FADE_MAX_CLAMPING_THRESHOLD));
+ builder.setInterpolator(ANIM_SCRIM_FADE, Interpolators.clampToProgress(ACCEL,
+ ALL_APPS_SCRIM_VISIBLE_THRESHOLD,
+ ALL_APPS_SCRIM_OPAQUE_THRESHOLD));
return builder;
}
private StateAnimationConfig getAllAppsToNormalAnimation() {
StateAnimationConfig builder = new StateAnimationConfig();
builder.setInterpolator(ANIM_ALL_APPS_FADE, Interpolators.clampToProgress(DEACCEL,
- 1 - ALL_APPS_CONTENT_FADE_MAX_CLAMPING_THRESHOLD, 1));
+ 1 - ALL_APPS_CONTENT_FADE_MAX_CLAMPING_THRESHOLD,
+ 1 - ALL_APPS_CONTENT_FADE_MIN_CLAMPING_THRESHOLD));
+ builder.setInterpolator(ANIM_SCRIM_FADE, Interpolators.clampToProgress(DEACCEL,
+ 1 - ALL_APPS_SCRIM_OPAQUE_THRESHOLD,
+ 1 - ALL_APPS_SCRIM_VISIBLE_THRESHOLD));
return builder;
}
diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java
index 94a7442..3953e42 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java
@@ -29,7 +29,7 @@
import static com.android.launcher3.states.StateAnimationConfig.ANIM_VERTICAL_PROGRESS;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_FADE;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_TRANSLATE;
-import static com.android.launcher3.util.SystemUiController.UI_STATE_OVERVIEW;
+import static com.android.launcher3.util.SystemUiController.UI_STATE_FULLSCREEN_TASK;
import static com.android.quickstep.views.RecentsView.UPDATE_SYSUI_FLAGS_THRESHOLD;
import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_RECENTS;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED;
@@ -143,10 +143,9 @@
if (tv != null) {
sysuiFlags = tv.getThumbnail().getSysUiStatusNavFlags();
}
- mLauncher.getSystemUiController().updateUiState(UI_STATE_OVERVIEW, sysuiFlags);
+ mLauncher.getSystemUiController().updateUiState(UI_STATE_FULLSCREEN_TASK, sysuiFlags);
} else {
- mLauncher.getSystemUiController().updateUiState(
- UI_STATE_OVERVIEW, mOverviewPanel.hasLightBackground());
+ mLauncher.getSystemUiController().updateUiState(UI_STATE_FULLSCREEN_TASK, 0);
}
}
diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
index 53f1fd0..ecaac94 100644
--- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
+++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
@@ -34,7 +34,7 @@
import static com.android.launcher3.util.DisplayController.getSingleFrameMs;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
-import static com.android.launcher3.util.SystemUiController.UI_STATE_OVERVIEW;
+import static com.android.launcher3.util.SystemUiController.UI_STATE_FULLSCREEN_TASK;
import static com.android.launcher3.util.VibratorWrapper.OVERVIEW_HAPTIC;
import static com.android.quickstep.GestureState.GestureEndTarget.HOME;
import static com.android.quickstep.GestureState.GestureEndTarget.LAST_TASK;
@@ -150,6 +150,9 @@
protected Runnable mGestureEndCallback;
protected MultiStateCallback mStateCallback;
protected boolean mCanceled;
+ // One time flag set when onConsumerAboutToBeSwitched() is called, indicating that certain
+ // shared animations should not be canceled when this handler is invalidated
+ private boolean mConsumerIsSwitching;
private boolean mRecentsViewScrollLinked = false;
private static int getFlagForIndex(int index, String name) {
@@ -664,11 +667,10 @@
mRecentsAnimationController.setSplitScreenMinimized(swipeUpThresholdPassed);
if (swipeUpThresholdPassed) {
- mActivity.getSystemUiController().updateUiState(
- UI_STATE_OVERVIEW, mRecentsView.hasLightBackground());
+ mActivity.getSystemUiController().updateUiState(UI_STATE_FULLSCREEN_TASK, 0);
} else {
mActivity.getSystemUiController().updateUiState(
- UI_STATE_OVERVIEW, centermostTaskFlags);
+ UI_STATE_FULLSCREEN_TASK, centermostTaskFlags);
}
}
}
@@ -1003,7 +1005,14 @@
animateToProgress(startShift, endShift, duration, interpolator, endTarget, velocity);
}
- private void doLogGesture(GestureEndTarget endTarget, @Nullable TaskView targetTask) {
+ private int getLogGestureTaskIndex(@Nullable TaskView targetTask) {
+ return mRecentsView == null || targetTask == null
+ ? LOG_NO_OP_PAGE_INDEX
+ : mRecentsView.indexOfChild(targetTask);
+ }
+
+ private void doLogGesture(GestureEndTarget endTarget, @Nullable TaskView targetTask,
+ int pageIndex) {
StatsLogManager.EventEnum event;
switch (endTarget) {
case HOME:
@@ -1032,9 +1041,6 @@
// We probably never received an animation controller, skip logging.
return;
}
- int pageIndex = endTarget == LAST_TASK
- ? LOG_NO_OP_PAGE_INDEX
- : mRecentsView.getNextPage();
// TODO: set correct container using the pageIndex
logger.log(event);
}
@@ -1089,8 +1095,10 @@
final RemoteAnimationTargetCompat runningTaskTarget = mRecentsAnimationTargets != null
? mRecentsAnimationTargets.findTask(mGestureState.getRunningTaskId())
: null;
- HomeAnimationFactory homeAnimFactory = createHomeAnimationFactory(
- runningTaskTarget.taskInfo.launchCookies, duration);
+ final ArrayList<IBinder> cookies = runningTaskTarget != null
+ ? runningTaskTarget.taskInfo.launchCookies
+ : new ArrayList<>();
+ HomeAnimationFactory homeAnimFactory = createHomeAnimationFactory(cookies, duration);
mIsSwipingPipToHome = homeAnimFactory.supportSwipePipToHome()
&& runningTaskTarget != null
&& runningTaskTarget.taskInfo.pictureInPictureParams != null
@@ -1279,18 +1287,18 @@
}
public void onConsumerAboutToBeSwitched() {
+ mConsumerIsSwitching = true;
if (mActivity != null) {
// In the off chance that the gesture ends before Launcher is started, we should clear
// the callback here so that it doesn't update with the wrong state
mActivity.clearRunOnceOnStartCallback();
- resetLauncherListeners();
}
if (mGestureState.getEndTarget() != null && !mGestureState.isRunningAnimationToLauncher()) {
cancelCurrentAnimation();
} else {
mStateCallback.setStateOnUiThread(STATE_FINISH_WITH_NO_END);
- reset();
}
+ reset();
}
public boolean isCanceled() {
@@ -1301,13 +1309,14 @@
private void resumeLastTask() {
mRecentsAnimationController.finish(false /* toRecents */, null);
ActiveGestureLog.INSTANCE.addLog("finishRecentsAnimation", false);
- doLogGesture(LAST_TASK, null);
+ doLogGesture(LAST_TASK, null, getLogGestureTaskIndex(null));
reset();
}
@UiThread
private void startNewTask() {
TaskView taskToLaunch = mRecentsView == null ? null : mRecentsView.getNextPageTaskView();
+ int taskPageIndex = getLogGestureTaskIndex(taskToLaunch);
startNewTask(success -> {
if (!success) {
reset();
@@ -1316,7 +1325,7 @@
endLauncherTransitionController();
updateSysUiFlags(1 /* windowProgress == overview */);
}
- doLogGesture(NEW_TASK, taskToLaunch);
+ doLogGesture(NEW_TASK, taskToLaunch, taskPageIndex);
});
}
@@ -1350,32 +1359,38 @@
}
private void invalidateHandler() {
- if (!LIVE_TILE.get() || !mActivityInterface.isInLiveTileMode()
- || mGestureState.getEndTarget() != RECENTS) {
- mInputConsumerProxy.destroy();
- mTaskAnimationManager.setLiveTileCleanUpHandler(null);
+ if (!mConsumerIsSwitching) {
+ if (!LIVE_TILE.get() || !mActivityInterface.isInLiveTileMode()
+ || mGestureState.getEndTarget() != RECENTS) {
+ mInputConsumerProxy.destroy();
+ mTaskAnimationManager.setLiveTileCleanUpHandler(null);
+ }
+ endRunningWindowAnim(false /* cancel */);
+
+ if (mGestureEndCallback != null) {
+ mGestureEndCallback.run();
+ }
}
+
mInputConsumerProxy.unregisterCallback();
- endRunningWindowAnim(false /* cancel */);
-
- if (mGestureEndCallback != null) {
- mGestureEndCallback.run();
- }
-
mActivityInitListener.unregister();
ActivityManagerWrapper.getInstance().unregisterTaskStackListener(mActivityRestartListener);
mTaskSnapshot = null;
mHandler.post(() -> {
// Defer clearing the activity since invalidation can happen over multiple callbacks
+ // ie. invalidateHandlerWithLauncher()
mActivity = null;
+ mRecentsView = null;
});
}
private void invalidateHandlerWithLauncher() {
- endLauncherTransitionController();
+ if (!mConsumerIsSwitching) {
+ endLauncherTransitionController();
+ mRecentsView.onGestureAnimationEnd();
+ }
mRecentsView.removeOnScrollChangedListener(mOnRecentsScrollListener);
- mRecentsView.onGestureAnimationEnd();
resetLauncherListeners();
}
@@ -1408,23 +1423,17 @@
}
protected void switchToScreenshot() {
- final int runningTaskId = mGestureState.getRunningTaskId();
- if (LIVE_TILE.get()) {
- if (mRecentsAnimationController != null) {
- mRecentsAnimationController.getController().setWillFinishToHome(true);
- // Update the screenshot of the task
- if (mTaskSnapshot == null) {
- mTaskSnapshot = mRecentsAnimationController.screenshotTask(runningTaskId);
- }
- mRecentsView.updateThumbnail(runningTaskId, mTaskSnapshot, false /* refreshNow */);
- }
- mStateCallback.setStateOnUiThread(STATE_SCREENSHOT_CAPTURED);
- } else if (!hasTargets()) {
+ if (!hasTargets()) {
// If there are no targets, then we don't need to capture anything
mStateCallback.setStateOnUiThread(STATE_SCREENSHOT_CAPTURED);
} else {
+ final int runningTaskId = mGestureState.getRunningTaskId();
+ final boolean refreshView = !LIVE_TILE.get() /* refreshView */;
boolean finishTransitionPosted = false;
if (mRecentsAnimationController != null) {
+ if (LIVE_TILE.get()) {
+ mRecentsAnimationController.getController().setWillFinishToHome(true);
+ }
// Update the screenshot of the task
if (mTaskSnapshot == null) {
UI_HELPER_EXECUTOR.execute(() -> {
@@ -1433,14 +1442,14 @@
mRecentsAnimationController.screenshotTask(runningTaskId);
MAIN_EXECUTOR.execute(() -> {
mTaskSnapshot = taskSnapshot;
- if (!updateThumbnail(runningTaskId)) {
+ if (!updateThumbnail(runningTaskId, refreshView)) {
setScreenshotCapturedState();
}
});
});
return;
}
- finishTransitionPosted = updateThumbnail(runningTaskId);
+ finishTransitionPosted = updateThumbnail(runningTaskId, refreshView);
}
if (!finishTransitionPosted) {
setScreenshotCapturedState();
@@ -1449,17 +1458,17 @@
}
// Returns whether finish transition was posted.
- private boolean updateThumbnail(int runningTaskId) {
+ private boolean updateThumbnail(int runningTaskId, boolean refreshView) {
boolean finishTransitionPosted = false;
final TaskView taskView;
- if (mGestureState.getEndTarget() == HOME) {
- // Capture the screenshot before finishing the transition to home to ensure it's
- // taken in the correct orientation, but no need to update the thumbnail.
+ if (mGestureState.getEndTarget() == HOME || mGestureState.getEndTarget() == NEW_TASK) {
+ // Capture the screenshot before finishing the transition to home or quickswitching to
+ // ensure it's taken in the correct orientation, but no need to update the thumbnail.
taskView = null;
} else {
- taskView = mRecentsView.updateThumbnail(runningTaskId, mTaskSnapshot);
+ taskView = mRecentsView.updateThumbnail(runningTaskId, mTaskSnapshot, refreshView);
}
- if (taskView != null && !mCanceled) {
+ if (taskView != null && refreshView && !mCanceled) {
// Defer finishing the animation until the next launcher frame with the
// new thumbnail
finishTransitionPosted = ViewUtils.postFrameDrawn(taskView,
@@ -1500,7 +1509,8 @@
() -> mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED));
}
ActiveGestureLog.INSTANCE.addLog("finishRecentsAnimation", true);
- doLogGesture(HOME, mRecentsView == null ? null : mRecentsView.getCurrentPageTaskView());
+ TaskView taskToLaunch = mRecentsView == null ? null : mRecentsView.getCurrentPageTaskView();
+ doLogGesture(HOME, taskToLaunch, getLogGestureTaskIndex(taskToLaunch));
}
/**
@@ -1531,7 +1541,8 @@
}
SystemUiProxy.INSTANCE.get(mContext).onOverviewShown(false, TAG);
- doLogGesture(RECENTS, mRecentsView.getCurrentPageTaskView());
+ TaskView taskToLaunch = mRecentsView.getCurrentPageTaskView();
+ doLogGesture(RECENTS, taskToLaunch, getLogGestureTaskIndex(taskToLaunch));
reset();
}
diff --git a/quickstep/src/com/android/quickstep/BaseActivityInterface.java b/quickstep/src/com/android/quickstep/BaseActivityInterface.java
index 147297a..7aa81d4 100644
--- a/quickstep/src/com/android/quickstep/BaseActivityInterface.java
+++ b/quickstep/src/com/android/quickstep/BaseActivityInterface.java
@@ -15,10 +15,12 @@
*/
package com.android.quickstep;
+import static com.android.launcher3.LauncherAnimUtils.VIEW_BACKGROUND_COLOR;
import static com.android.launcher3.anim.Interpolators.ACCEL_2;
import static com.android.launcher3.anim.Interpolators.INSTANT;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.quickstep.AbsSwipeUpHandler.RECENTS_ATTACH_DURATION;
+import static com.android.quickstep.GestureState.GestureEndTarget.RECENTS;
import static com.android.quickstep.SysUINavigationMode.getMode;
import static com.android.quickstep.util.RecentsAtomicAnimationFactory.INDEX_RECENTS_FADE_ANIM;
import static com.android.quickstep.util.RecentsAtomicAnimationFactory.INDEX_RECENTS_TRANSLATE_X_ANIM;
@@ -28,9 +30,11 @@
import static com.android.quickstep.views.RecentsView.TASK_SECONDARY_TRANSLATION;
import android.animation.Animator;
+import android.animation.ObjectAnimator;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.Resources;
+import android.graphics.Color;
import android.graphics.PointF;
import android.graphics.Rect;
import android.os.Build;
@@ -51,6 +55,7 @@
import com.android.launcher3.taskbar.TaskbarController;
import com.android.launcher3.touch.PagedOrientationHandler;
import com.android.launcher3.util.WindowBounds;
+import com.android.launcher3.views.ScrimView;
import com.android.quickstep.SysUINavigationMode.Mode;
import com.android.quickstep.util.ActivityInitListener;
import com.android.quickstep.util.AnimatorControllerWithResistance;
@@ -344,15 +349,33 @@
}
/**
- * Called when the gesture ends and the animation starts towards the given target. No-op by
- * default, but subclasses can override to add an additional animation with the same duration.
+ * Called when the gesture ends and the animation starts towards the given target. Used to add
+ * an optional additional animation with the same duration.
*/
public @Nullable Animator getParallelAnimationToLauncher(
GestureState.GestureEndTarget endTarget, long duration) {
+ if (endTarget == RECENTS) {
+ ACTIVITY_TYPE activity = getCreatedActivity();
+ if (activity == null) {
+ return null;
+ }
+ STATE_TYPE state = stateFromGestureEndTarget(endTarget);
+ ScrimView scrimView = activity.getScrimView();
+ ObjectAnimator anim = ObjectAnimator.ofArgb(scrimView, VIEW_BACKGROUND_COLOR,
+ getOverviewScrimColorForState(activity, state));
+ anim.setDuration(duration);
+ return anim;
+ }
return null;
}
/**
+ * Returns the color of the scrim behind overview when at rest in this state.
+ * Return {@link Color#TRANSPARENT} for no scrim.
+ */
+ protected abstract int getOverviewScrimColorForState(ACTIVITY_TYPE activity, STATE_TYPE state);
+
+ /**
* See {@link com.android.systemui.shared.system.QuickStepContract.SystemUiStateFlags}
* @param systemUiStateFlags The latest SystemUiStateFlags
*/
diff --git a/quickstep/src/com/android/quickstep/FallbackActivityInterface.java b/quickstep/src/com/android/quickstep/FallbackActivityInterface.java
index 8168e88..9fa65d9 100644
--- a/quickstep/src/com/android/quickstep/FallbackActivityInterface.java
+++ b/quickstep/src/com/android/quickstep/FallbackActivityInterface.java
@@ -196,4 +196,9 @@
recentsView.setLayoutRotation(rotationTouchHelper.getCurrentActiveRotation(),
rotationTouchHelper.getDisplayRotation());
}
+
+ @Override
+ protected int getOverviewScrimColorForState(RecentsActivity activity, RecentsState state) {
+ return state.getScrimColor(activity);
+ }
}
diff --git a/quickstep/src/com/android/quickstep/LauncherActivityInterface.java b/quickstep/src/com/android/quickstep/LauncherActivityInterface.java
index 878f5c9..dffee7f 100644
--- a/quickstep/src/com/android/quickstep/LauncherActivityInterface.java
+++ b/quickstep/src/com/android/quickstep/LauncherActivityInterface.java
@@ -23,6 +23,7 @@
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SHOWING;
import android.animation.Animator;
+import android.animation.AnimatorSet;
import android.content.Context;
import android.graphics.Rect;
import android.view.MotionEvent;
@@ -271,11 +272,25 @@
public @Nullable Animator getParallelAnimationToLauncher(GestureEndTarget endTarget,
long duration) {
TaskbarController taskbarController = getTaskbarController();
+ Animator superAnimator = super.getParallelAnimationToLauncher(endTarget, duration);
if (taskbarController == null) {
- return null;
+ return superAnimator;
}
LauncherState toState = stateFromGestureEndTarget(endTarget);
- return taskbarController.createAnimToLauncher(toState, duration);
+ Animator taskbarAnimator = taskbarController.createAnimToLauncher(toState, duration);
+ if (superAnimator == null) {
+ return taskbarAnimator;
+ } else {
+ AnimatorSet animatorSet = new AnimatorSet();
+ animatorSet.playTogether(superAnimator, taskbarAnimator);
+ return animatorSet;
+ }
+ }
+
+ @Override
+ protected int getOverviewScrimColorForState(BaseQuickstepLauncher launcher,
+ LauncherState state) {
+ return state.getWorkspaceScrimColor(launcher);
}
@Override
diff --git a/quickstep/src/com/android/quickstep/LauncherSwipeHandlerV2.java b/quickstep/src/com/android/quickstep/LauncherSwipeHandlerV2.java
index dd35d68..9398277 100644
--- a/quickstep/src/com/android/quickstep/LauncherSwipeHandlerV2.java
+++ b/quickstep/src/com/android/quickstep/LauncherSwipeHandlerV2.java
@@ -30,9 +30,11 @@
import android.animation.AnimatorSet;
import android.animation.ValueAnimator;
import android.content.Context;
+import android.graphics.Rect;
import android.graphics.RectF;
import android.os.IBinder;
import android.os.UserHandle;
+import android.util.Size;
import android.view.View;
import androidx.annotation.NonNull;
@@ -50,9 +52,11 @@
import com.android.launcher3.util.DynamicResource;
import com.android.launcher3.util.ObjectWrapper;
import com.android.launcher3.views.FloatingIconView;
+import com.android.launcher3.widget.LauncherAppWidgetHostView;
import com.android.quickstep.util.AppCloseConfig;
import com.android.quickstep.util.RectFSpringAnim;
import com.android.quickstep.util.StaggeredWorkspaceAnim;
+import com.android.quickstep.views.FloatingWidgetView;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.TaskView;
import com.android.systemui.plugins.ResourceProvider;
@@ -77,155 +81,206 @@
@Override
protected HomeAnimationFactory createHomeAnimationFactory(ArrayList<IBinder> launchCookies,
long duration) {
- HomeAnimationFactory homeAnimFactory;
- if (mActivity != null) {
- final View workspaceView = findWorkspaceView(launchCookies,
- mRecentsView.getRunningTaskView());
- boolean canUseWorkspaceView =
- workspaceView != null && workspaceView.isAttachedToWindow();
-
- mActivity.getRootView().setForceHideBackArrow(true);
- mActivity.setHintUserWillBeActive();
-
- if (canUseWorkspaceView) {
- final ResourceProvider rp = DynamicResource.provider(mActivity);
- final float transY = dpToPx(rp.getFloat(R.dimen.swipe_up_trans_y_dp));
- float dpPerSecond = dpToPx(rp.getFloat(R.dimen.swipe_up_trans_y_dp_per_s));
- final float launcherAlphaMax =
- rp.getFloat(R.dimen.swipe_up_launcher_alpha_max_progress);
-
- RectF iconLocation = new RectF();
- FloatingIconView floatingIconView = getFloatingIconView(mActivity, workspaceView,
- true /* hideOriginal */, iconLocation, false /* isOpening */);
-
- // We want the window alpha to be 0 once this threshold is met, so that the
- // FolderIconView can be seen morphing into the icon shape.
- float windowAlphaThreshold = 1f - SHAPE_PROGRESS_DURATION;
- homeAnimFactory = new LauncherHomeAnimationFactory() {
-
- // There is a delay in loading the icon, so we need to keep the window
- // opaque until it is ready.
- private boolean mIsFloatingIconReady = false;
-
- private @Nullable ValueAnimator mBounceBackAnimator;
-
- @Override
- public RectF getWindowTargetRect() {
- if (PROTOTYPE_APP_CLOSE.get()) {
- // We want the target rect to be at this offset position, so that all
- // launcher content can spring back upwards.
- floatingIconView.setPositionOffsetY(transY);
- }
- return iconLocation;
- }
-
- @Override
- public void setAnimation(RectFSpringAnim anim) {
- anim.addAnimatorListener(floatingIconView);
- floatingIconView.setOnTargetChangeListener(anim::onTargetPositionChanged);
- floatingIconView.setFastFinishRunnable(anim::end);
- if (PROTOTYPE_APP_CLOSE.get()) {
- mBounceBackAnimator = bounceBackToRestingPosition();
- // Use a spring to put drag layer translation back to 0.
- anim.addAnimatorListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- floatingIconView.setPositionOffsetY(0);
- mBounceBackAnimator.start();
- }
- });
-
- Workspace workspace = mActivity.getWorkspace();
- workspace.setPivotToScaleWithSelf(mActivity.getHotseat());
- }
- }
-
- private ValueAnimator bounceBackToRestingPosition() {
- DragLayer dl = mActivity.getDragLayer();
- Workspace workspace = mActivity.getWorkspace();
- Hotseat hotseat = mActivity.getHotseat();
-
- final float startValue = transY;
- final float endValue = 0;
- // Ensures the velocity is always aligned with the direction.
- float pixelPerSecond = Math.abs(dpPerSecond)
- * Math.signum(endValue - transY);
-
- ValueAnimator springTransY = new SpringAnimationBuilder(dl.getContext())
- .setStiffness(rp.getFloat(R.dimen.swipe_up_trans_y_stiffness))
- .setDampingRatio(rp.getFloat(R.dimen.swipe_up_trans_y_damping))
- .setMinimumVisibleChange(1f)
- .setStartValue(startValue)
- .setEndValue(endValue)
- .setStartVelocity(pixelPerSecond)
- .build(dl, VIEW_TRANSLATE_Y);
- springTransY.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- dl.setTranslationY(0f);
- dl.setAlpha(1f);
- SCALE_PROPERTY.set(workspace, 1f);
- SCALE_PROPERTY.set(hotseat, 1f);
- }
- });
- return springTransY;
- }
-
- @Override
- public boolean keepWindowOpaque() {
- if (mIsFloatingIconReady || floatingIconView.isVisibleToUser()) {
- mIsFloatingIconReady = true;
- return false;
- }
- return true;
- }
-
- @Override
- public void update(@Nullable AppCloseConfig config, RectF currentRect,
- float progress, float radius) {
- int fgAlpha = 255;
- if (config != null && PROTOTYPE_APP_CLOSE.get()) {
- DragLayer dl = mActivity.getDragLayer();
- float translationY = config.getWorkspaceTransY();
- dl.setTranslationY(translationY);
-
- float alpha = mapToRange(progress, 0, launcherAlphaMax, 0, 1f, LINEAR);
- dl.setAlpha(Math.min(alpha, 1f));
-
- float scale = Math.min(1f, config.getWorkspaceScale());
- SCALE_PROPERTY.set(mActivity.getWorkspace(), scale);
- SCALE_PROPERTY.set(mActivity.getHotseat(), scale);
- SCALE_PROPERTY.set(mActivity.getAppsView(), scale);
-
- progress = config.getInterpolatedProgress();
- fgAlpha = config.getFgAlpha();
- }
- floatingIconView.update(1f, fgAlpha, currentRect, progress,
- windowAlphaThreshold, radius, false);
- }
-
- @Override
- public void onCancel() {
- floatingIconView.fastFinish();
- if (mBounceBackAnimator != null) {
- mBounceBackAnimator.cancel();
- }
- }
- };
- } else {
- homeAnimFactory = new LauncherHomeAnimationFactory();
- }
- } else {
- homeAnimFactory = new HomeAnimationFactory() {
+ if (mActivity == null) {
+ mStateCallback.addChangeListener(STATE_LAUNCHER_PRESENT | STATE_HANDLER_INVALIDATED,
+ isPresent -> mRecentsView.startHome());
+ return new HomeAnimationFactory() {
@Override
public AnimatorPlaybackController createActivityAnimationToHome() {
return AnimatorPlaybackController.wrap(new AnimatorSet(), duration);
}
};
- mStateCallback.addChangeListener(STATE_LAUNCHER_PRESENT | STATE_HANDLER_INVALIDATED,
- isPresent -> mRecentsView.startHome());
}
- return homeAnimFactory;
+
+ final View workspaceView = findWorkspaceView(launchCookies,
+ mRecentsView.getRunningTaskView());
+ boolean canUseWorkspaceView = workspaceView != null && workspaceView.isAttachedToWindow();
+
+ mActivity.getRootView().setForceHideBackArrow(true);
+ mActivity.setHintUserWillBeActive();
+
+ if (!canUseWorkspaceView) {
+ return new LauncherHomeAnimationFactory();
+ }
+ if (workspaceView instanceof LauncherAppWidgetHostView) {
+ return createWidgetHomeAnimationFactory((LauncherAppWidgetHostView) workspaceView);
+ }
+ return createIconHomeAnimationFactory(workspaceView);
+ }
+
+ private HomeAnimationFactory createIconHomeAnimationFactory(View workspaceView) {
+ final ResourceProvider rp = DynamicResource.provider(mActivity);
+ final float transY = dpToPx(rp.getFloat(R.dimen.swipe_up_trans_y_dp));
+ float dpPerSecond = dpToPx(rp.getFloat(R.dimen.swipe_up_trans_y_dp_per_s));
+ final float launcherAlphaMax =
+ rp.getFloat(R.dimen.swipe_up_launcher_alpha_max_progress);
+
+ RectF iconLocation = new RectF();
+ FloatingIconView floatingIconView = getFloatingIconView(mActivity, workspaceView,
+ true /* hideOriginal */, iconLocation, false /* isOpening */);
+
+ // We want the window alpha to be 0 once this threshold is met, so that the
+ // FolderIconView can be seen morphing into the icon shape.
+ float windowAlphaThreshold = 1f - SHAPE_PROGRESS_DURATION;
+ return new LauncherHomeAnimationFactory() {
+
+ // There is a delay in loading the icon, so we need to keep the window
+ // opaque until it is ready.
+ private boolean mIsFloatingIconReady = false;
+
+ private @Nullable ValueAnimator mBounceBackAnimator;
+
+ @Override
+ public RectF getWindowTargetRect() {
+ if (PROTOTYPE_APP_CLOSE.get()) {
+ // We want the target rect to be at this offset position, so that all
+ // launcher content can spring back upwards.
+ floatingIconView.setPositionOffsetY(transY);
+ }
+ return iconLocation;
+ }
+
+ @Override
+ public void setAnimation(RectFSpringAnim anim) {
+ anim.addAnimatorListener(floatingIconView);
+ floatingIconView.setOnTargetChangeListener(anim::onTargetPositionChanged);
+ floatingIconView.setFastFinishRunnable(anim::end);
+ if (PROTOTYPE_APP_CLOSE.get()) {
+ mBounceBackAnimator = bounceBackToRestingPosition();
+ // Use a spring to put drag layer translation back to 0.
+ anim.addAnimatorListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ floatingIconView.setPositionOffsetY(0);
+ mBounceBackAnimator.start();
+ }
+ });
+
+ Workspace workspace = mActivity.getWorkspace();
+ workspace.setPivotToScaleWithSelf(mActivity.getHotseat());
+ }
+ }
+
+ private ValueAnimator bounceBackToRestingPosition() {
+ DragLayer dl = mActivity.getDragLayer();
+ Workspace workspace = mActivity.getWorkspace();
+ Hotseat hotseat = mActivity.getHotseat();
+
+ final float startValue = transY;
+ final float endValue = 0;
+ // Ensures the velocity is always aligned with the direction.
+ float pixelPerSecond = Math.abs(dpPerSecond) * Math.signum(endValue - transY);
+
+ ValueAnimator springTransY = new SpringAnimationBuilder(dl.getContext())
+ .setStiffness(rp.getFloat(R.dimen.swipe_up_trans_y_stiffness))
+ .setDampingRatio(rp.getFloat(R.dimen.swipe_up_trans_y_damping))
+ .setMinimumVisibleChange(1f)
+ .setStartValue(startValue)
+ .setEndValue(endValue)
+ .setStartVelocity(pixelPerSecond)
+ .build(dl, VIEW_TRANSLATE_Y);
+ springTransY.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ dl.setTranslationY(0f);
+ dl.setAlpha(1f);
+ SCALE_PROPERTY.set(workspace, 1f);
+ SCALE_PROPERTY.set(hotseat, 1f);
+ }
+ });
+ return springTransY;
+ }
+
+ @Override
+ public boolean keepWindowOpaque() {
+ if (mIsFloatingIconReady || floatingIconView.isVisibleToUser()) {
+ mIsFloatingIconReady = true;
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public void update(@Nullable AppCloseConfig config, RectF currentRect,
+ float progress, float radius) {
+ int fgAlpha = 255;
+ if (config != null && PROTOTYPE_APP_CLOSE.get()) {
+ DragLayer dl = mActivity.getDragLayer();
+ float translationY = config.getWorkspaceTransY();
+ dl.setTranslationY(translationY);
+
+ float alpha = mapToRange(progress, 0, launcherAlphaMax, 0, 1f, LINEAR);
+ dl.setAlpha(Math.min(alpha, 1f));
+
+ float scale = Math.min(1f, config.getWorkspaceScale());
+ SCALE_PROPERTY.set(mActivity.getWorkspace(), scale);
+ SCALE_PROPERTY.set(mActivity.getHotseat(), scale);
+ SCALE_PROPERTY.set(mActivity.getAppsView(), scale);
+
+ progress = config.getInterpolatedProgress();
+ fgAlpha = config.getFgAlpha();
+ }
+ floatingIconView.update(1f, fgAlpha, currentRect, progress,
+ windowAlphaThreshold, radius, false);
+ }
+
+ @Override
+ public void onCancel() {
+ floatingIconView.fastFinish();
+ if (mBounceBackAnimator != null) {
+ mBounceBackAnimator.cancel();
+ }
+ }
+ };
+ }
+
+ private HomeAnimationFactory createWidgetHomeAnimationFactory(
+ LauncherAppWidgetHostView hostView) {
+
+ RectF backgroundLocation = new RectF();
+ Rect crop = new Rect();
+ mTaskViewSimulator.getCurrentCropRect().roundOut(crop);
+ Size windowSize = new Size(crop.width(), crop.height());
+ FloatingWidgetView floatingWidgetView = FloatingWidgetView.getFloatingWidgetView(mActivity,
+ hostView, backgroundLocation, windowSize,
+ mTaskViewSimulator.getCurrentCornerRadius());
+
+ return new LauncherHomeAnimationFactory() {
+
+ @Override
+ public RectF getWindowTargetRect() {
+ return backgroundLocation;
+ }
+
+ @Override
+ public float getEndRadius(RectF cropRectF) {
+ return floatingWidgetView.getInitialCornerRadius();
+ }
+
+ @Override
+ public void setAnimation(RectFSpringAnim anim) {
+ anim.addAnimatorListener(floatingWidgetView);
+ floatingWidgetView.setFastFinishRunnable(anim::end);
+ }
+
+ @Override
+ public boolean keepWindowOpaque() {
+ return false;
+ }
+
+ @Override
+ public void update(@Nullable AppCloseConfig config, RectF currentRect,
+ float progress, float radius) {
+ floatingWidgetView.update(currentRect, 1 /* floatingWidgetAlpha */,
+ config != null ? config.getFgAlpha() : 1f /* foregroundAlpha */,
+ 0 /* fallbackBackgroundAlpha */, 1 - progress);
+ }
+
+ @Override
+ public void onCancel() {
+ floatingWidgetView.fastFinish();
+ }
+ };
}
/**
@@ -244,8 +299,9 @@
return null;
}
- // Find the associated item info for the launch cookie (if available)
- int launchCookieItemId = -1;
+ // Find the associated item info for the launch cookie (if available), note that predicted
+ // apps actually have an id of -1, so use another default id here
+ int launchCookieItemId = -2;
for (IBinder cookie : launchCookies) {
Integer itemId = ObjectWrapper.unwrap(cookie);
if (itemId != null) {
diff --git a/quickstep/src/com/android/quickstep/OrientationTouchTransformer.java b/quickstep/src/com/android/quickstep/OrientationTouchTransformer.java
index 2a6e478..c47300c 100644
--- a/quickstep/src/com/android/quickstep/OrientationTouchTransformer.java
+++ b/quickstep/src/com/android/quickstep/OrientationTouchTransformer.java
@@ -92,7 +92,7 @@
};
private static final String TAG = "OrientationTouchTransformer";
- private static final boolean DEBUG = false;
+ private static final boolean DEBUG = true;
private static final int QUICKSTEP_ROTATION_UNINITIALIZED = -1;
@@ -163,6 +163,10 @@
void setNavigationMode(SysUINavigationMode.Mode newMode, Info info,
Resources newRes) {
+ if (DEBUG) {
+ Log.d(TestProtocol.NO_SWIPE_TO_HOME, "setNavigationMode new: " + newMode
+ + " oldMode: " + mMode + " " + this);
+ }
if (mMode == newMode) {
return;
}
@@ -254,10 +258,18 @@
mCurrentDisplay = new CurrentDisplay(region.realSize, region.rotation);
OrientationRectF regionToKeep = mSwipeTouchRegions.get(mCurrentDisplay);
+ if (DEBUG) {
+ Log.d(TestProtocol.NO_SWIPE_TO_HOME, "cached region: " + regionToKeep
+ + " mCurrentDisplay: " + mCurrentDisplay + " " + this);
+ }
if (regionToKeep == null) {
regionToKeep = createRegionForDisplay(region);
}
mSwipeTouchRegions.clear();
+ if (DEBUG) {
+ Log.d(TestProtocol.NO_SWIPE_TO_HOME, "adding region: " + regionToKeep
+ + " mCurrentDisplay: " + mCurrentDisplay + " " + this);
+ }
mSwipeTouchRegions.put(mCurrentDisplay, regionToKeep);
updateAssistantRegions(regionToKeep);
}
@@ -273,7 +285,8 @@
private OrientationRectF createRegionForDisplay(Info display) {
if (DEBUG) {
- Log.d(TAG, "creating rotation region for: " + mCurrentDisplay.rotation);
+ Log.d(TAG, "creating rotation region for: " + mCurrentDisplay.rotation
+ + " with mode: " + mMode + " displayRotation: " + display.rotation);
}
Point size = display.realSize;
@@ -287,14 +300,19 @@
} else {
mAssistantLeftRegion.setEmpty();
mAssistantRightRegion.setEmpty();
+ int navbarSize = getNavbarSize(ResourceUtils.NAVBAR_LANDSCAPE_LEFT_RIGHT_SIZE);
+ if (DEBUG) {
+ Log.d(TestProtocol.NO_SWIPE_TO_HOME, "else case mode: " + mMode
+ + " getNavbarSize: " + navbarSize + " rotation: " + rotation + " " + this);
+ }
switch (rotation) {
case Surface.ROTATION_90:
orientationRectF.left = orientationRectF.right
- - getNavbarSize(ResourceUtils.NAVBAR_LANDSCAPE_LEFT_RIGHT_SIZE);
+ - navbarSize;
break;
case Surface.ROTATION_270:
orientationRectF.right = orientationRectF.left
- + getNavbarSize(ResourceUtils.NAVBAR_LANDSCAPE_LEFT_RIGHT_SIZE);
+ + navbarSize;
break;
default:
orientationRectF.top = orientationRectF.bottom - touchHeight;
@@ -339,7 +357,7 @@
boolean touchInValidSwipeRegions(float x, float y) {
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.NO_SWIPE_TO_HOME, "touchInValidSwipeRegions " + x + "," + y + " in "
- + mLastRectTouched);
+ + mLastRectTouched + " this: " + this);
}
if (mLastRectTouched != null) {
return mLastRectTouched.contains(x, y);
@@ -462,7 +480,8 @@
if (DEBUG) {
Log.d(TAG, "Transforming rotation due to forceTransform, "
+ "mCurrentRotation: " + mCurrentDisplay.rotation
- + "mRotation: " + mRotation);
+ + "mRotation: " + mRotation
+ + " this: " + this);
}
event.transform(mTmpMatrix);
return true;
@@ -473,9 +492,10 @@
if (DEBUG) {
Log.d(TAG, "original: " + event.getX() + ", " + event.getY()
- + " new: " + mTmpPoint[0] + ", " + mTmpPoint[1]
- + " rect: " + this + " forceTransform: " + forceTransform
- + " contains: " + contains(mTmpPoint[0], mTmpPoint[1]));
+ + " new: " + mTmpPoint[0] + ", " + mTmpPoint[1]
+ + " rect: " + this + " forceTransform: " + forceTransform
+ + " contains: " + contains(mTmpPoint[0], mTmpPoint[1])
+ + " this: " + this);
}
if (contains(mTmpPoint[0], mTmpPoint[1])) {
diff --git a/quickstep/src/com/android/quickstep/RecentsActivity.java b/quickstep/src/com/android/quickstep/RecentsActivity.java
index ec224ed..3b92779 100644
--- a/quickstep/src/com/android/quickstep/RecentsActivity.java
+++ b/quickstep/src/com/android/quickstep/RecentsActivity.java
@@ -59,7 +59,9 @@
import com.android.launcher3.util.ActivityTracker;
import com.android.launcher3.util.RunnableList;
import com.android.launcher3.util.SystemUiController;
+import com.android.launcher3.util.Themes;
import com.android.launcher3.views.BaseDragLayer;
+import com.android.launcher3.views.ScrimView;
import com.android.quickstep.fallback.FallbackRecentsStateController;
import com.android.quickstep.fallback.FallbackRecentsView;
import com.android.quickstep.fallback.RecentsDragLayer;
@@ -89,6 +91,7 @@
private Handler mUiHandler = new Handler(Looper.getMainLooper());
private RecentsDragLayer mDragLayer;
+ private ScrimView mScrimView;
private FallbackRecentsView mFallbackRecentsView;
private OverviewActionsView mActionsView;
@@ -106,6 +109,7 @@
inflateRootView(R.layout.fallback_recents_activity);
setContentView(getRootView());
mDragLayer = findViewById(R.id.drag_layer);
+ mScrimView = findViewById(R.id.scrim_view);
mFallbackRecentsView = findViewById(R.id.overview_panel);
mActionsView = findViewById(R.id.overview_actions_view);
@@ -164,6 +168,10 @@
return mDragLayer;
}
+ public ScrimView getScrimView() {
+ return mScrimView;
+ }
+
@Override
public <T extends View> T getOverviewPanel() {
return (T) mFallbackRecentsView;
@@ -269,7 +277,7 @@
setupViews();
getSystemUiController().updateUiState(SystemUiController.UI_STATE_BASE_WINDOW,
- mFallbackRecentsView.hasLightBackground());
+ Themes.getAttrBoolean(this, R.attr.isWorkspaceDarkText));
ACTIVITY_TRACKER.handleCreate(this);
}
diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationController.java b/quickstep/src/com/android/quickstep/RecentsAnimationController.java
index 4560735..78da311 100644
--- a/quickstep/src/com/android/quickstep/RecentsAnimationController.java
+++ b/quickstep/src/com/android/quickstep/RecentsAnimationController.java
@@ -25,6 +25,7 @@
import androidx.annotation.UiThread;
import com.android.launcher3.util.Preconditions;
+import com.android.launcher3.util.RunnableList;
import com.android.systemui.shared.recents.model.ThumbnailData;
import com.android.systemui.shared.system.InteractionJankMonitorWrapper;
import com.android.systemui.shared.system.RecentsAnimationControllerCompat;
@@ -43,6 +44,8 @@
private boolean mUseLauncherSysBarFlags = false;
private boolean mSplitScreenMinimized = false;
+ private boolean mFinishRequested = false;
+ private RunnableList mPendingFinishCallbacks = new RunnableList();
public RecentsAnimationController(RecentsAnimationControllerCompat controller,
boolean allowMinimizeSplitScreen,
@@ -132,14 +135,22 @@
@UiThread
public void finishController(boolean toRecents, Runnable callback, boolean sendUserLeaveHint) {
+ if (mFinishRequested) {
+ // If finishing, add to pending finish callbacks, otherwise, if finished, adding to the
+ // destroyed RunnableList will just trigger the callback to be called immediately
+ mPendingFinishCallbacks.add(callback);
+ return;
+ }
+
+ // Finish not yet requested
+ mFinishRequested = true;
mOnFinishedListener.accept(this);
+ mPendingFinishCallbacks.add(callback);
UI_HELPER_EXECUTOR.execute(() -> {
mController.finish(toRecents, sendUserLeaveHint);
InteractionJankMonitorWrapper.end(InteractionJankMonitorWrapper.CUJ_QUICK_SWITCH);
InteractionJankMonitorWrapper.end(InteractionJankMonitorWrapper.CUJ_APP_CLOSE_TO_HOME);
- if (callback != null) {
- MAIN_EXECUTOR.execute(callback);
- }
+ MAIN_EXECUTOR.execute(mPendingFinishCallbacks::executeAllAndDestroy);
});
}
diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java b/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java
index b4f1330..ef09957 100644
--- a/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java
+++ b/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java
@@ -54,6 +54,7 @@
import android.provider.Settings;
import android.text.TextUtils;
import android.util.DisplayMetrics;
+import android.util.Log;
import android.view.MotionEvent;
import android.view.Surface;
@@ -61,6 +62,7 @@
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
+import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.util.DisplayController;
import com.android.launcher3.util.DisplayController.DisplayInfoChangeListener;
import com.android.launcher3.util.DisplayController.Info;
@@ -127,14 +129,27 @@
private boolean mIsUserSetupComplete;
public RecentsAnimationDeviceState(Context context) {
+ this(context, false);
+ }
+
+ /**
+ * @param isInstanceForTouches {@code true} if this is the persistent instance being used for
+ * gesture touch handling
+ */
+ public RecentsAnimationDeviceState(Context context, boolean isInstanceForTouches) {
mContext = context;
mDisplayController = DisplayController.INSTANCE.get(context);
mSysUiNavMode = SysUINavigationMode.INSTANCE.get(context);
mDisplayId = mDisplayController.getInfo().id;
mIsOneHandedModeSupported = SystemProperties.getBoolean(SUPPORT_ONE_HANDED_MODE, false);
runOnDestroy(() -> mDisplayController.removeChangeListener(this));
- mRotationTouchHelper = new RotationTouchHelper(context, mDisplayController);
- runOnDestroy(mRotationTouchHelper::destroy);
+ mRotationTouchHelper = RotationTouchHelper.INSTANCE.get(context);
+ if (isInstanceForTouches) {
+ // rotationTouchHelper doesn't get initialized after being destroyed, so only destroy
+ // if primary TouchInteractionService instance needs to be destroyed.
+ mRotationTouchHelper.init();
+ runOnDestroy(mRotationTouchHelper::destroy);
+ }
// Register for user unlocked if necessary
mIsUserUnlocked = context.getSystemService(UserManager.class)
@@ -214,6 +229,7 @@
* Cleans up all the registered listeners and receivers.
*/
public void destroy() {
+ Log.d(TestProtocol.NO_SWIPE_TO_HOME, "destroying RADS", new Throwable());
for (Runnable r : mOnDestroyActions) {
r.run();
}
diff --git a/quickstep/src/com/android/quickstep/RotationTouchHelper.java b/quickstep/src/com/android/quickstep/RotationTouchHelper.java
index f4688a1..fd0de42 100644
--- a/quickstep/src/com/android/quickstep/RotationTouchHelper.java
+++ b/quickstep/src/com/android/quickstep/RotationTouchHelper.java
@@ -24,6 +24,7 @@
import android.content.Context;
import android.content.res.Resources;
+import android.util.Log;
import android.view.MotionEvent;
import android.view.OrientationEventListener;
@@ -31,6 +32,7 @@
import com.android.launcher3.util.DisplayController;
import com.android.launcher3.util.DisplayController.DisplayInfoChangeListener;
import com.android.launcher3.util.DisplayController.Info;
+import com.android.launcher3.util.MainThreadInitializedObject;
import com.android.quickstep.util.RecentsOrientedState;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.QuickStepContract;
@@ -43,10 +45,13 @@
SysUINavigationMode.NavigationModeChangeListener,
DisplayInfoChangeListener {
- private final OrientationTouchTransformer mOrientationTouchTransformer;
- private final DisplayController mDisplayController;
- private final SysUINavigationMode mSysUiNavMode;
- private final int mDisplayId;
+ public static final MainThreadInitializedObject<RotationTouchHelper> INSTANCE =
+ new MainThreadInitializedObject<>(RotationTouchHelper::new);
+
+ private OrientationTouchTransformer mOrientationTouchTransformer;
+ private DisplayController mDisplayController;
+ private SysUINavigationMode mSysUiNavMode;
+ private int mDisplayId;
private int mDisplayRotation;
private final ArrayList<Runnable> mOnDestroyActions = new ArrayList<>();
@@ -117,25 +122,46 @@
*/
private boolean mInOverview;
private boolean mTaskListFrozen;
-
-
private final Context mContext;
- public RotationTouchHelper(Context context, DisplayController displayController) {
+ /**
+ * Keeps track of whether destroy has been called for this instance. Mainly used for TAPL tests
+ * where multiple instances of RotationTouchHelper are being created. b/177316094
+ */
+ private boolean mNeedsInit = true;
+
+ private RotationTouchHelper(Context context) {
mContext = context;
- mDisplayController = displayController;
+ Log.d(TestProtocol.NO_SWIPE_TO_HOME, "RotationTouchHelper ctor init? " + mNeedsInit
+ + " " + this);
+ if (mNeedsInit) {
+ init();
+ }
+ }
+
+ public void init() {
+ if (!mNeedsInit) {
+ Log.d(TestProtocol.NO_SWIPE_TO_HOME, "Did not need init? " + " " + this);
+ return;
+ }
+ Log.d(TestProtocol.NO_SWIPE_TO_HOME, "RotationTouchHelper init() " + this,
+ new Throwable());
+ mDisplayController = DisplayController.INSTANCE.get(mContext);
Resources resources = mContext.getResources();
- mSysUiNavMode = SysUINavigationMode.INSTANCE.get(context);
+ mSysUiNavMode = SysUINavigationMode.INSTANCE.get(mContext);
mDisplayId = mDisplayController.getInfo().id;
mOrientationTouchTransformer = new OrientationTouchTransformer(resources, mMode,
() -> QuickStepContract.getWindowCornerRadius(resources));
// Register for navigation mode changes
- onNavigationModeChanged(mSysUiNavMode.addModeChangeListener(this));
+ SysUINavigationMode.Mode newMode = mSysUiNavMode.addModeChangeListener(this);
+ Log.d(TestProtocol.NO_SWIPE_TO_HOME, "AddedModeChangeListener: " + this +
+ " currentMode: " + newMode);
+ onNavigationModeChanged(newMode);
runOnDestroy(() -> mSysUiNavMode.removeModeChangeListener(this));
- mOrientationListener = new OrientationEventListener(context) {
+ mOrientationListener = new OrientationEventListener(mContext) {
@Override
public void onOrientationChanged(int degrees) {
int newRotation = RecentsOrientedState.getRotationForUserDegreesRotated(degrees,
@@ -154,6 +180,7 @@
}
}
};
+ mNeedsInit = false;
}
private void setupOrientationSwipeHandler() {
@@ -176,9 +203,11 @@
* Cleans up all the registered listeners and receivers.
*/
public void destroy() {
+ Log.d(TestProtocol.NO_SWIPE_TO_HOME, "destroying " + this);
for (Runnable r : mOnDestroyActions) {
r.run();
}
+ mNeedsInit = true;
}
public boolean isTaskListFrozen() {
@@ -223,6 +252,7 @@
@Override
public void onNavigationModeChanged(SysUINavigationMode.Mode newMode) {
+ Log.d(TestProtocol.NO_SWIPE_TO_HOME, "nav mode changed: " + newMode);
mDisplayController.removeChangeListener(this);
mDisplayController.addChangeListener(this);
onDisplayInfoChanged(mContext, mDisplayController.getInfo(), CHANGE_ALL);
@@ -374,4 +404,8 @@
pw.println(" displayRotation=" + getDisplayRotation());
mOrientationTouchTransformer.dump(pw);
}
+
+ public OrientationTouchTransformer getOrientationTouchTransformer() {
+ return mOrientationTouchTransformer;
+ }
}
diff --git a/quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java b/quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java
index 0f34a72..29a00d1 100644
--- a/quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java
+++ b/quickstep/src/com/android/quickstep/SwipeUpAnimationLogic.java
@@ -145,6 +145,11 @@
targetX + halfIconSize, targetY + halfIconSize);
}
+ /** Returns the corner radius of the window at the end of the animation. */
+ public float getEndRadius(RectF cropRectF) {
+ return cropRectF.width() / 2f;
+ }
+
public abstract @NonNull AnimatorPlaybackController createActivityAnimationToHome();
public void playAtomicAnimation(float velocity) {
@@ -197,8 +202,7 @@
final RectF targetRect = homeAnimationFactory.getWindowTargetRect();
Matrix homeToWindowPositionMap = new Matrix();
- final RectF startRect = updateProgressForStartRect(
- homeToWindowPositionMap, startProgress);
+ final RectF startRect = updateProgressForStartRect(homeToWindowPositionMap, startProgress);
RectF cropRectF = new RectF(mTaskViewSimulator.getCurrentCropRect());
// Move the startRect to Launcher space as floatingIconView runs in Launcher
@@ -210,7 +214,7 @@
if (PROTOTYPE_APP_CLOSE.get()) {
anim = new RectFSpringAnim2(startRect, targetRect, mContext,
mTaskViewSimulator.getCurrentCornerRadius(),
- cropRectF.width() / 2f);
+ homeAnimationFactory.getEndRadius(cropRectF));
} else {
anim = new RectFSpringAnim(startRect, targetRect, mContext);
}
@@ -269,7 +273,7 @@
// End on a "round-enough" radius so that the shape reveal doesn't have to do too much
// rounding at the end of the animation.
mStartRadius = mTaskViewSimulator.getCurrentCornerRadius();
- mEndRadius = cropRectF.width() / 2f;
+ mEndRadius = factory.getEndRadius(cropRectF);
}
@Override
diff --git a/quickstep/src/com/android/quickstep/TaskAnimationManager.java b/quickstep/src/com/android/quickstep/TaskAnimationManager.java
index b6dad2d..c87cd17 100644
--- a/quickstep/src/com/android/quickstep/TaskAnimationManager.java
+++ b/quickstep/src/com/android/quickstep/TaskAnimationManager.java
@@ -86,6 +86,7 @@
@UiThread
public RecentsAnimationCallbacks startRecentsAnimation(GestureState gestureState,
Intent intent, RecentsAnimationCallbacks.RecentsAnimationListener listener) {
+ Log.d("b/186444448", "startRecentsAnimation");
// Notify if recents animation is still running
if (mController != null) {
String msg = "New recents animation started before old animation completed";
diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java
index f3fe0b4..4fc9770 100644
--- a/quickstep/src/com/android/quickstep/TouchInteractionService.java
+++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java
@@ -300,7 +300,9 @@
// Everything else should be initialized in onUserUnlocked() below.
mMainChoreographer = Choreographer.getInstance();
mAM = ActivityManagerWrapper.getInstance();
- mDeviceState = new RecentsAnimationDeviceState(this);
+ mDeviceState = new RecentsAnimationDeviceState(this, true);
+ Log.d(TestProtocol.NO_SWIPE_TO_HOME, "RADS OTT instance: " +
+ mDeviceState.getRotationTouchHelper().getOrientationTouchTransformer());
mRotationTouchHelper = mDeviceState.getRotationTouchHelper();
mDeviceState.addNavigationModeChangedCallback(this::onNavigationModeChanged);
mDeviceState.addOneHandedModeChangedCallback(this::onOneHandedModeOverlayChanged);
@@ -515,7 +517,8 @@
}
mRotationTouchHelper.setOrientationTransformIfNeeded(event);
- if (mRotationTouchHelper.isInSwipeUpTouchRegion(event)) {
+ if (!mDeviceState.isOneHandedModeActive()
+ && mRotationTouchHelper.isInSwipeUpTouchRegion(event)) {
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.NO_SWIPE_TO_HOME,
"TouchInteractionService.onInputEvent:isInSwipeUpTouchRegion");
@@ -544,8 +547,7 @@
InputConsumer.NO_OP, mInputMonitorCompat,
mDeviceState,
event);
- } else if (mDeviceState.canTriggerOneHandedAction(event)
- && !mDeviceState.isOneHandedModeActive()) {
+ } else if (mDeviceState.canTriggerOneHandedAction(event)) {
// Consume gesture event for triggering one handed feature.
mUncheckedConsumer = new OneHandedModeInputConsumer(this, mDeviceState,
InputConsumer.NO_OP, mInputMonitorCompat);
diff --git a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
index 8962ec9..e4d148c 100644
--- a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
+++ b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
@@ -20,6 +20,7 @@
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_SCALE;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_TRANSLATE_X;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_TRANSLATE_Y;
+import static com.android.launcher3.states.StateAnimationConfig.ANIM_SCRIM_FADE;
import static com.android.launcher3.states.StateAnimationConfig.SKIP_OVERVIEW;
import static com.android.quickstep.views.RecentsView.ADJACENT_PAGE_OFFSET;
import static com.android.quickstep.views.RecentsView.FULLSCREEN_PROGRESS;
@@ -95,5 +96,8 @@
setter.setFloat(mRecentsView, FULLSCREEN_PROGRESS, state.isFullScreen() ? 1 : 0, LINEAR);
setter.setFloat(mRecentsView, RECENTS_GRID_PROGRESS,
state.displayOverviewTasksAsGrid(mActivity.getDeviceProfile()) ? 1f : 0f, LINEAR);
+
+ setter.setViewBackgroundColor(mActivity.getScrimView(), state.getScrimColor(mActivity),
+ config.getInterpolator(ANIM_SCRIM_FADE, LINEAR));
}
}
diff --git a/quickstep/src/com/android/quickstep/fallback/RecentsDragLayer.java b/quickstep/src/com/android/quickstep/fallback/RecentsDragLayer.java
index a00015a..29c3dc8 100644
--- a/quickstep/src/com/android/quickstep/fallback/RecentsDragLayer.java
+++ b/quickstep/src/com/android/quickstep/fallback/RecentsDragLayer.java
@@ -16,11 +16,8 @@
package com.android.quickstep.fallback;
import android.content.Context;
-import android.graphics.Rect;
import android.util.AttributeSet;
-import com.android.launcher3.R;
-import com.android.launcher3.util.Themes;
import com.android.launcher3.util.TouchController;
import com.android.launcher3.views.BaseDragLayer;
import com.android.quickstep.RecentsActivity;
@@ -41,12 +38,4 @@
new FallbackNavBarTouchController(mActivity),
};
}
-
- @Override
- public void setInsets(Rect insets) {
- super.setInsets(insets);
- setBackground(insets.top == 0 || !mAllowSysuiScrims
- ? null
- : Themes.getAttrDrawable(getContext(), R.attr.workspaceStatusBarScrim));
- }
}
diff --git a/quickstep/src/com/android/quickstep/fallback/RecentsState.java b/quickstep/src/com/android/quickstep/fallback/RecentsState.java
index bbe279e..b3d6cfa 100644
--- a/quickstep/src/com/android/quickstep/fallback/RecentsState.java
+++ b/quickstep/src/com/android/quickstep/fallback/RecentsState.java
@@ -19,10 +19,13 @@
import static com.android.launcher3.uioverrides.states.OverviewModalTaskState.getOverviewScaleAndOffsetForModalState;
import android.content.Context;
+import android.graphics.Color;
import com.android.launcher3.DeviceProfile;
+import com.android.launcher3.R;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.statemanager.BaseState;
+import com.android.launcher3.util.Themes;
import com.android.quickstep.RecentsActivity;
/**
@@ -35,12 +38,13 @@
private static final int FLAG_FULL_SCREEN = BaseState.getFlag(2);
private static final int FLAG_OVERVIEW_ACTIONS = BaseState.getFlag(3);
private static final int FLAG_SHOW_AS_GRID = BaseState.getFlag(4);
+ private static final int FLAG_SCRIM = BaseState.getFlag(5);
public static final RecentsState DEFAULT = new RecentsState(0,
- FLAG_CLEAR_ALL_BUTTON | FLAG_OVERVIEW_ACTIONS | FLAG_SHOW_AS_GRID);
+ FLAG_CLEAR_ALL_BUTTON | FLAG_OVERVIEW_ACTIONS | FLAG_SHOW_AS_GRID | FLAG_SCRIM);
public static final RecentsState MODAL_TASK = new ModalState(1,
FLAG_DISABLE_RESTORE | FLAG_CLEAR_ALL_BUTTON | FLAG_OVERVIEW_ACTIONS | FLAG_MODAL
- | FLAG_SHOW_AS_GRID);
+ | FLAG_SHOW_AS_GRID | FLAG_SCRIM);
public static final RecentsState BACKGROUND_APP = new BackgroundAppState(2,
FLAG_DISABLE_RESTORE | FLAG_NON_INTERACTIVE | FLAG_FULL_SCREEN);
public static final RecentsState HOME = new RecentsState(3, 0);
@@ -103,6 +107,14 @@
return hasFlag(FLAG_OVERVIEW_ACTIONS);
}
+ /**
+ * For this state, what color scrim should be drawn behind overview.
+ */
+ public int getScrimColor(RecentsActivity activity) {
+ return hasFlag(FLAG_SCRIM) ? Themes.getAttrColor(activity, R.attr.overviewScrimColor)
+ : Color.TRANSPARENT;
+ }
+
public float[] getOverviewScaleAndOffset(RecentsActivity activity) {
return new float[] { NO_SCALE, NO_OFFSET };
}
diff --git a/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialController.java b/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialController.java
index c396eec..14c3a92 100644
--- a/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialController.java
@@ -20,9 +20,7 @@
import static com.android.quickstep.interaction.TutorialController.TutorialType.RIGHT_EDGE_BACK_NAVIGATION;
import android.graphics.PointF;
-import android.view.View;
-import androidx.annotation.Nullable;
import androidx.appcompat.content.res.AppCompatResources;
import com.android.launcher3.R;
@@ -36,11 +34,6 @@
super(fragment, tutorialType);
}
- @Nullable
- public View getMockLauncherView() {
- return null;
- }
-
@Override
public Integer getIntroductionTitle() {
return mTutorialType == LEFT_EDGE_BACK_NAVIGATION
diff --git a/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialController.java b/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialController.java
index 3c59ed3..06610e6 100644
--- a/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialController.java
@@ -16,15 +16,11 @@
package com.android.quickstep.interaction;
import static com.android.launcher3.anim.Interpolators.ACCEL;
-import static com.android.quickstep.interaction.TutorialController.TutorialType.OVERVIEW_NAVIGATION_COMPLETE;
import android.animation.AnimatorSet;
import android.annotation.TargetApi;
import android.graphics.PointF;
import android.os.Build;
-import android.view.View;
-
-import androidx.annotation.Nullable;
import com.android.launcher3.R;
import com.android.launcher3.anim.PendingAnimation;
@@ -52,12 +48,6 @@
return R.string.overview_gesture_intro_subtitle;
}
- @Nullable
- @Override
- public View getMockLauncherView() {
- return null;
- }
-
@Override
public void onBackGestureAttempted(BackGestureResult result) {
switch (mTutorialType) {
diff --git a/quickstep/src/com/android/quickstep/interaction/SandboxLauncherRenderer.java b/quickstep/src/com/android/quickstep/interaction/SandboxLauncherRenderer.java
deleted file mode 100644
index 80ffe66..0000000
--- a/quickstep/src/com/android/quickstep/interaction/SandboxLauncherRenderer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2020 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.interaction;
-
-import android.content.Context;
-import android.view.View;
-
-import com.android.launcher3.InvariantDeviceProfile;
-import com.android.launcher3.graphics.LauncherPreviewRenderer;
-
-/** Renders a fake Launcher for use in the Sandbox. */
-class SandboxLauncherRenderer extends LauncherPreviewRenderer {
- SandboxLauncherRenderer(Context context, InvariantDeviceProfile idp, boolean migrated) {
- super(context, idp, migrated);
- }
-
- @Override
- public boolean shouldShowRealLauncherPreview() {
- return false;
- }
-
- @Override
- public boolean shouldShowQsb() {
- return false;
- }
-
- @Override
- public View.OnLongClickListener getWorkspaceChildOnLongClickListener() {
- return null;
- }
-}
diff --git a/quickstep/src/com/android/quickstep/interaction/TutorialController.java b/quickstep/src/com/android/quickstep/interaction/TutorialController.java
index 6f82f85..55972ad 100644
--- a/quickstep/src/com/android/quickstep/interaction/TutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/TutorialController.java
@@ -37,7 +37,6 @@
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.content.res.AppCompatResources;
-import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.R;
import com.android.launcher3.anim.AnimationSuccessListener;
import com.android.launcher3.views.ClipIconView;
@@ -129,13 +128,6 @@
return R.drawable.default_sandbox_app_previous_task_thumbnail;
}
- @Nullable
- public View getMockLauncherView() {
- InvariantDeviceProfile dp = InvariantDeviceProfile.INSTANCE.get(mContext);
-
- return new SandboxLauncherRenderer(mContext, dp, true).getRenderedView();
- }
-
@DrawableRes
public int getMockAppIconResId() {
return R.drawable.default_sandbox_app_icon;
diff --git a/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java b/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java
index 66c24c8..3b26108 100644
--- a/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java
+++ b/quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java
@@ -84,6 +84,7 @@
private static final int FOLDER_HIERARCHY_OFFSET = 100;
private static final int SEARCH_RESULT_HIERARCHY_OFFSET = 200;
private static final int EXTENDED_CONTAINERS_HIERARCHY_OFFSET = 300;
+ private static final int ATTRIBUTE_MULTIPLIER = 100;
public static final CopyOnWriteArrayList<StatsLogConsumer> LOGS_CONSUMER =
new CopyOnWriteArrayList<>();
@@ -112,7 +113,8 @@
}
SysUiStatsLog.write(SysUiStatsLog.LAUNCHER_SNAPSHOT,
LAUNCHER_WORKSPACE_SNAPSHOT.getId() /* event_id */,
- info.getItemCase().getNumber() /* target_id */,
+ info.getAttribute().getNumber() * ATTRIBUTE_MULTIPLIER
+ + info.getItemCase().getNumber() /* target_id */,
instanceId.getId() /* instance_id */,
0 /* uid */,
getPackageName(info) /* package_name */,
@@ -329,7 +331,8 @@
null /* launcher extensions, deprecated */,
false /* quickstep_enabled, deprecated */,
event.getId() /* event_id */,
- atomInfo.getItemCase().getNumber() /* target_id */,
+ atomInfo.getAttribute().getNumber() * ATTRIBUTE_MULTIPLIER
+ + atomInfo.getItemCase().getNumber() /* target_id */,
instanceId.getId() /* instance_id TODO */,
0 /* uid TODO */,
getPackageName(atomInfo) /* package_name */,
diff --git a/quickstep/src/com/android/quickstep/util/OverviewToHomeAnim.java b/quickstep/src/com/android/quickstep/util/OverviewToHomeAnim.java
index 1128dac..42be9bb 100644
--- a/quickstep/src/com/android/quickstep/util/OverviewToHomeAnim.java
+++ b/quickstep/src/com/android/quickstep/util/OverviewToHomeAnim.java
@@ -20,7 +20,7 @@
import static com.android.launcher3.anim.Interpolators.DEACCEL;
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.INSTANT;
+import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.anim.Interpolators.clampToProgress;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_ACTIONS_FADE;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_FADE;
@@ -109,7 +109,7 @@
? clampToProgress(FAST_OUT_SLOW_IN, 0, 0.75f) : FINAL_FRAME);
config.setInterpolator(ANIM_OVERVIEW_TRANSLATE_Y, FINAL_FRAME);
config.setInterpolator(ANIM_OVERVIEW_SCALE, FINAL_FRAME);
- config.setInterpolator(ANIM_OVERVIEW_ACTIONS_FADE, INSTANT);
+ config.setInterpolator(ANIM_OVERVIEW_ACTIONS_FADE, LINEAR);
if (!isLayoutNaturalToLauncher) {
config.setInterpolator(ANIM_OVERVIEW_FADE, DEACCEL);
}
diff --git a/quickstep/src/com/android/quickstep/util/StaggeredWorkspaceAnim.java b/quickstep/src/com/android/quickstep/util/StaggeredWorkspaceAnim.java
index de6c4f5..ab95138 100644
--- a/quickstep/src/com/android/quickstep/util/StaggeredWorkspaceAnim.java
+++ b/quickstep/src/com/android/quickstep/util/StaggeredWorkspaceAnim.java
@@ -140,7 +140,7 @@
addDepthAnimationForState(launcher, NORMAL, DURATION_MS);
- mAnimators.play(launcher.getDragLayer().getSysUiScrim().createSysuiMultiplierAnim(0f, 1f)
+ mAnimators.play(launcher.getRootView().getSysUiScrim().createSysuiMultiplierAnim(0f, 1f)
.setDuration(DURATION_MS));
mAnimators.addListener(new AnimatorListenerAdapter() {
@Override
diff --git a/quickstep/src/com/android/quickstep/views/FloatingWidgetView.java b/quickstep/src/com/android/quickstep/views/FloatingWidgetView.java
index d23884c..8499902 100644
--- a/quickstep/src/com/android/quickstep/views/FloatingWidgetView.java
+++ b/quickstep/src/com/android/quickstep/views/FloatingWidgetView.java
@@ -20,10 +20,10 @@
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Matrix;
-import android.graphics.Rect;
import android.graphics.RectF;
import android.os.Build;
import android.util.AttributeSet;
+import android.util.Size;
import android.view.GhostView;
import android.view.View;
import android.view.ViewGroup;
@@ -113,7 +113,7 @@
}
private void init(DragLayer dragLayer, LauncherAppWidgetHostView originalView,
- RectF widgetBackgroundPosition, Rect windowTargetBounds, float windowCornerRadius) {
+ RectF widgetBackgroundPosition, Size windowSize, float windowCornerRadius) {
mAppWidgetView = originalView;
mAppWidgetView.beginDeferringUpdates();
mBackgroundPosition = widgetBackgroundPosition;
@@ -128,7 +128,7 @@
getRelativePosition(mAppWidgetBackgroundView, mAppWidgetView, mBackgroundOffset);
mBackgroundView.init(mAppWidgetView, mAppWidgetBackgroundView, windowCornerRadius);
// Layout call before GhostView creation so that the overlaid view isn't clipped
- layout(0, 0, windowTargetBounds.width(), windowTargetBounds.height());
+ layout(0, 0, windowSize.getWidth(), windowSize.getHeight());
mForegroundOverlayView = GhostView.addGhost(mAppWidgetView, this);
positionViews();
@@ -219,19 +219,19 @@
*
* @param widgetBackgroundPosition a {@link RectF} that will be updated with the widget's
* background bounds
- * @param windowTargetBounds the bounds of the window when launched
+ * @param windowSize the size of the window when launched
* @param windowCornerRadius the corner radius of the window
*/
public static FloatingWidgetView getFloatingWidgetView(Launcher launcher,
LauncherAppWidgetHostView originalView, RectF widgetBackgroundPosition,
- Rect windowTargetBounds, float windowCornerRadius) {
+ Size windowSize, float windowCornerRadius) {
final DragLayer dragLayer = launcher.getDragLayer();
ViewGroup parent = (ViewGroup) dragLayer.getParent();
FloatingWidgetView floatingView =
launcher.getViewCache().getView(R.layout.floating_widget_view, launcher, parent);
floatingView.recycle();
- floatingView.init(dragLayer, originalView, widgetBackgroundPosition, windowTargetBounds,
+ floatingView.init(dragLayer, originalView, widgetBackgroundPosition, windowSize,
windowCornerRadius);
parent.addView(floatingView);
return floatingView;
@@ -240,7 +240,7 @@
private static void getRelativePosition(View descendant, View ancestor, RectF position) {
float[] points = new float[]{0, 0, descendant.getWidth(), descendant.getHeight()};
Utilities.getDescendantCoordRelativeToAncestor(descendant, ancestor, points,
- false /* includeRootScroll */);
+ false /* includeRootScroll */, true /* ignoreTransform */);
position.set(
Math.min(points[0], points[2]),
Math.min(points[1], points[3]),
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 41076f3..53f880f 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -45,7 +45,7 @@
import static com.android.launcher3.touch.PagedOrientationHandler.CANVAS_TRANSLATE;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
-import static com.android.launcher3.util.SystemUiController.UI_STATE_OVERVIEW;
+import static com.android.launcher3.util.SystemUiController.UI_STATE_FULLSCREEN_TASK;
import static com.android.quickstep.TaskUtils.checkCurrentOrManagedUserId;
import static com.android.quickstep.util.NavigationModeFeatureFlag.LIVE_TILE;
import static com.android.quickstep.views.OverviewActionsView.HIDDEN_NON_ZERO_ROTATION;
@@ -450,7 +450,6 @@
private boolean mRunningTaskIconScaledDown = false;
- private final boolean mHasLightBackground;
private boolean mOverviewStateEnabled;
private boolean mHandleTaskStackChanges;
private boolean mSwipeDownShouldLaunchApp;
@@ -584,8 +583,6 @@
mLiveTileTaskViewSimulator.recentsViewScale.value = 1;
mLiveTileTaskViewSimulator.setOrientationState(mOrientationState);
mLiveTileTaskViewSimulator.setDrawsBelowRecents(true);
-
- mHasLightBackground = Themes.getAttrBoolean(mActivity, android.R.attr.isLightTheme);
}
public OverScroller getScroller() {
@@ -702,11 +699,6 @@
return taskView;
}
- /** See {@link #updateThumbnail(int, ThumbnailData, boolean)} */
- public TaskView updateThumbnail(int taskId, ThumbnailData thumbnailData) {
- return updateThumbnail(taskId, thumbnailData, true /* refreshNow */);
- }
-
@Override
protected void onWindowVisibilityChanged(int visibility) {
super.onWindowVisibilityChanged(visibility);
@@ -908,13 +900,6 @@
cancelSplitSelect(false);
}
}
-
- if (enabled) {
- mActivity.getSystemUiController().updateUiState(
- UI_STATE_OVERVIEW, hasLightBackground());
- } else {
- mActivity.getSystemUiController().updateUiState(UI_STATE_OVERVIEW, 0);
- }
}
/**
@@ -1277,23 +1262,20 @@
}
float accumulatedTranslationX = 0;
- float[] fullscreenTranslations = new float[taskCount];
for (int i = 0; i < taskCount; i++) {
TaskView taskView = getTaskViewAt(i);
taskView.updateTaskSize();
- fullscreenTranslations[i] += accumulatedTranslationX;
+ taskView.getPrimaryFullscreenTranslationProperty().set(taskView,
+ accumulatedTranslationX);
+ taskView.getSecondaryFullscreenTranslationProperty().set(taskView, 0f);
// Compensate space caused by TaskView scaling.
float widthDiff =
taskView.getLayoutParams().width * (1 - taskView.getFullscreenScale());
// Compensate page spacing widening caused by RecentsView scaling.
widthDiff += mPageSpacing * (1 - 1 / mFullscreenScale);
- float fullscreenTranslationX = mIsRtl ? widthDiff : -widthDiff;
- accumulatedTranslationX += fullscreenTranslationX;
+ accumulatedTranslationX += mIsRtl ? widthDiff : -widthDiff;
}
- for (int i = 0; i < taskCount; i++) {
- getTaskViewAt(i).setFullscreenTranslationX(fullscreenTranslations[i]);
- }
mClearAllButton.setFullscreenTranslationPrimary(accumulatedTranslationX);
updateGridProperties();
@@ -1526,7 +1508,6 @@
unloadVisibleTaskData(TaskView.FLAG_UPDATE_ALL);
setCurrentPage(0);
- mActivity.getSystemUiController().updateUiState(UI_STATE_OVERVIEW, 0);
LayoutUtils.setViewEnabled(mActionsView, true);
if (mOrientationState.setGestureActive(false)) {
updateOrientationHandler();
@@ -1600,8 +1581,9 @@
* {@link #onGestureAnimationStart} and {@link #onGestureAnimationEnd()}.
*/
public void onSwipeUpAnimationSuccess() {
+ Log.d("b/186444448", "onSwipeUpAnimationSuccess");
if (getRunningTaskView() != null) {
- animateUpRunningTaskIconScale(0f);
+ animateUpRunningTaskIconScale();
}
setSwipeDownShouldLaunchApp(true);
}
@@ -1664,20 +1646,22 @@
* Called when a gesture from an app has finished, and the animation to the target has ended.
*/
public void onGestureAnimationEnd() {
+ Log.d("b/186444448", "onGestureEnd");
mGestureActive = false;
if (mOrientationState.setGestureActive(false)) {
updateOrientationHandler();
}
setEnableFreeScroll(true);
- setEnableDrawingLiveTile(true);
+ setEnableDrawingLiveTile(mCurrentGestureEndTarget == GestureState.GestureEndTarget.RECENTS);
if (!LIVE_TILE.get()) {
setRunningTaskViewShowScreenshot(true);
}
setRunningTaskHidden(false);
animateUpRunningTaskIconScale();
- if (!showAsGrid() || getFocusedTaskView() != null) {
+ if (mCurrentGestureEndTarget == GestureState.GestureEndTarget.RECENTS
+ && (!showAsGrid() || getFocusedTaskView() != null)) {
animateActionsViewIn();
}
@@ -1817,15 +1801,13 @@
}
public void animateUpRunningTaskIconScale() {
- animateUpRunningTaskIconScale(0);
- }
-
- public void animateUpRunningTaskIconScale(float startProgress) {
mRunningTaskIconScaledDown = false;
TaskView firstTask = getRunningTaskView();
+ Log.d("b/186444448", "animateUpRunningTaskIconScale: firstTask="
+ + (firstTask != null ? "t:" + firstTask.getTask() : null));
if (firstTask != null) {
+ firstTask.setIconScaleAnimStartProgress(0f);
firstTask.animateIconScaleAndDimIntoView();
- firstTask.setIconScaleAnimStartProgress(startProgress);
}
}
@@ -1997,29 +1979,12 @@
gridTranslationAnimators.add(taskDismissAnimator);
}
taskView.setGridTranslationX(gridTranslations[i] - snappedTaskGridTranslationX);
- taskView.setNonFullscreenTranslationX(snappedTaskFullscreenScrollAdjustment);
+ taskView.getPrimaryNonFullscreenTranslationProperty().set(taskView,
+ snappedTaskFullscreenScrollAdjustment);
+ taskView.getSecondaryNonFullscreenTranslationProperty().set(taskView, 0f);
}
AnimatorSet gridTranslationAnimatorSet = new AnimatorSet();
gridTranslationAnimatorSet.playTogether(gridTranslationAnimators);
- gridTranslationAnimatorSet.addListener(new AnimatorListenerAdapter() {
- @Override
- // Allow the actions view to display again once in focus mode
- public void onAnimationEnd(Animator animation) {
- super.onAnimationEnd(animation);
- if (getFocusedTaskView() == null) {
- mActionsView.getScrollAlpha().setValue(1);
- }
- }
-
- @Override
- // Hide the actions view if not in focus mode
- public void onAnimationStart(Animator animation) {
- super.onAnimationStart(animation);
- if (getFocusedTaskView() == null) {
- mActionsView.getScrollAlpha().setValue(0);
- }
- }
- });
gridTranslationAnimatorSet.start();
// Use the accumulated translation of the row containing the last task.
@@ -2322,7 +2287,8 @@
snapToPageImmediately(pageToSnapTo);
// Grid got messed up, reapply.
updateGridProperties(taskView, draggedIndex - mTaskViewStartIndex);
- if (showAsGrid() && getFocusedTaskView() == null) {
+ if (showAsGrid() && getFocusedTaskView() == null
+ && mActionsView.getVisibilityAlpha().getValue() == 1) {
animateActionsViewOut();
}
}
@@ -2515,6 +2481,15 @@
@Override
protected void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
+ if (LIVE_TILE.get() && mRunningTaskId != -1) {
+ switchToScreenshot(
+ () -> finishRecentsAnimation(true, this::onConfigurationChangedInternal));
+ } else {
+ onConfigurationChangedInternal();
+ }
+ }
+
+ private void onConfigurationChangedInternal() {
final int rotation = mActivity.getDisplay().getRotation();
if (mOrientationState.setRecentsRotation(rotation)) {
updateOrientationHandler();
@@ -2819,14 +2794,6 @@
}
}
- /**
- * True if the background scrim of the recents view is light colored and the foreground elements
- * should use dark colors.
- */
- public boolean hasLightBackground() {
- return mHasLightBackground;
- }
-
public void initiateSplitSelect(TaskView taskView, SplitPositionOption splitPositionOption) {
mSplitHiddenTaskView = taskView;
SplitSelectStateController splitController = mSplitPlaceholderView.getSplitController();
@@ -3077,10 +3044,9 @@
// tasks' flags
if (animator.getAnimatedFraction() > UPDATE_SYSUI_FLAGS_THRESHOLD) {
mActivity.getSystemUiController().updateUiState(
- UI_STATE_OVERVIEW, targetSysUiFlags);
+ UI_STATE_FULLSCREEN_TASK, targetSysUiFlags);
} else {
- mActivity.getSystemUiController().updateUiState(
- UI_STATE_OVERVIEW, hasLightBackground());
+ mActivity.getSystemUiController().updateUiState(UI_STATE_FULLSCREEN_TASK, 0);
}
// Passing the threshold from taskview to fullscreen app will vibrate
@@ -3476,7 +3442,7 @@
* capturing the snapshot at the same time.
*/
public void switchToScreenshot(Runnable onFinishRunnable) {
- switchToScreenshot(mRunningTaskId == -1 ? null
+ switchToScreenshot(mRecentsAnimationController == null || mRunningTaskId == -1 ? null
: mRecentsAnimationController.screenshotTask(mRunningTaskId), onFinishRunnable);
}
diff --git a/quickstep/src/com/android/quickstep/views/TaskMenuView.java b/quickstep/src/com/android/quickstep/views/TaskMenuView.java
index f55cdac..32cd367 100644
--- a/quickstep/src/com/android/quickstep/views/TaskMenuView.java
+++ b/quickstep/src/com/android/quickstep/views/TaskMenuView.java
@@ -201,12 +201,13 @@
}
private void addMenuOption(SystemShortcut menuOption) {
- ViewGroup menuOptionView = (ViewGroup) mActivity.getLayoutInflater().inflate(
+ LinearLayout menuOptionView = (LinearLayout) mActivity.getLayoutInflater().inflate(
R.layout.task_view_menu_option, this, false);
menuOption.setIconAndLabelFor(
menuOptionView.findViewById(R.id.icon), menuOptionView.findViewById(R.id.text));
LayoutParams lp = (LayoutParams) menuOptionView.getLayoutParams();
- mTaskView.getPagedOrientationHandler().setLayoutParamsForTaskMenuOptionItem(lp);
+ mTaskView.getPagedOrientationHandler().setLayoutParamsForTaskMenuOptionItem(lp,
+ menuOptionView, mActivity.getDeviceProfile());
menuOptionView.setEnabled(menuOption.isEnabled());
menuOptionView.setAlpha(menuOption.isEnabled() ? 1 : 0.5f);
menuOptionView.setOnClickListener(view -> {
@@ -228,16 +229,15 @@
mActivity.getDragLayer().getDescendantRectRelativeToSelf(taskView, sTempRect);
Rect insets = mActivity.getDragLayer().getInsets();
BaseDragLayer.LayoutParams params = (BaseDragLayer.LayoutParams) getLayoutParams();
+ // TODO(b/186583656) Move the entire menu to the center/make smaller than thumbnail width
params.width = orientationHandler.getTaskMenuWidth(taskView.getThumbnail());
// Gravity set to Left instead of Start as sTempRect.left measures Left distance not Start
params.gravity = Gravity.LEFT;
setLayoutParams(params);
setScaleX(taskView.getScaleX());
setScaleY(taskView.getScaleY());
- boolean canActivityRotate = taskView.getRecentsView()
- .mOrientationState.isRecentsActivityRotationAllowed();
- mOptionLayout.setOrientation(orientationHandler
- .getTaskMenuLayoutOrientation(canActivityRotate, mOptionLayout));
+ orientationHandler.setTaskMenuLayoutOrientation(
+ mActivity.getDeviceProfile(), mOptionLayout);
setPosition(sTempRect.left - insets.left, sTempRect.top - insets.top, 0);
}
diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java
index 35acdd1..45bcdc3 100644
--- a/quickstep/src/com/android/quickstep/views/TaskView.java
+++ b/quickstep/src/com/android/quickstep/views/TaskView.java
@@ -250,6 +250,58 @@
}
};
+ private static final FloatProperty<TaskView> FULLSCREEN_TRANSLATION_X =
+ new FloatProperty<TaskView>("fullscreenTranslationX") {
+ @Override
+ public void setValue(TaskView taskView, float v) {
+ taskView.setFullscreenTranslationX(v);
+ }
+
+ @Override
+ public Float get(TaskView taskView) {
+ return taskView.mFullscreenTranslationX;
+ }
+ };
+
+ private static final FloatProperty<TaskView> FULLSCREEN_TRANSLATION_Y =
+ new FloatProperty<TaskView>("fullscreenTranslationY") {
+ @Override
+ public void setValue(TaskView taskView, float v) {
+ taskView.setFullscreenTranslationY(v);
+ }
+
+ @Override
+ public Float get(TaskView taskView) {
+ return taskView.mFullscreenTranslationY;
+ }
+ };
+
+ private static final FloatProperty<TaskView> NON_FULLSCREEN_TRANSLATION_X =
+ new FloatProperty<TaskView>("nonFullscreenTranslationX") {
+ @Override
+ public void setValue(TaskView taskView, float v) {
+ taskView.setNonFullscreenTranslationX(v);
+ }
+
+ @Override
+ public Float get(TaskView taskView) {
+ return taskView.mNonFullscreenTranslationX;
+ }
+ };
+
+ private static final FloatProperty<TaskView> NON_FULLSCREEN_TRANSLATION_Y =
+ new FloatProperty<TaskView>("nonFullscreenTranslationY") {
+ @Override
+ public void setValue(TaskView taskView, float v) {
+ taskView.setNonFullscreenTranslationY(v);
+ }
+
+ @Override
+ public Float get(TaskView taskView) {
+ return taskView.mNonFullscreenTranslationY;
+ }
+ };
+
private static final FloatProperty<TaskView> COLOR_TINT =
new FloatProperty<TaskView>("colorTint") {
@Override
@@ -284,9 +336,11 @@
private float mTaskResistanceTranslationY;
// The following translation variables should only be used in the same orientation as Launcher.
private float mFullscreenTranslationX;
+ private float mFullscreenTranslationY;
// Applied as a complement to fullscreenTranslation, for adjusting the carousel overview, or the
// in transition carousel before forming the grid on tablets.
private float mNonFullscreenTranslationX;
+ private float mNonFullscreenTranslationY;
private float mBoxTranslationY;
// The following grid translations scales with mGridProgress.
private float mGridTranslationX;
@@ -723,8 +777,7 @@
float upperClamp = invert ? 1 : iconScalePercentage;
float scale = Interpolators.clampToProgress(FAST_OUT_SLOW_IN, lowerClamp, upperClamp)
.getInterpolation(progress);
- mIconView.setScaleX(scale);
- mIconView.setScaleY(scale);
+ mIconView.setAlpha(scale);
if (mContextualChipWrapper != null && mContextualChipWrapper != null) {
mContextualChipWrapper.setAlpha(scale);
mContextualChipWrapper.setScaleX(Math.min(scale, comp(mModalness)));
@@ -740,6 +793,8 @@
}
public void animateIconScaleAndDimIntoView() {
+ Log.d("b/186444448", "animateIconScaleAndDimIntoView: startProgress="
+ + mIconScaleAnimStartProgress);
if (mIconAndDimAnimator != null) {
mIconAndDimAnimator.cancel();
}
@@ -749,6 +804,7 @@
mIconAndDimAnimator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
+ Log.d("b/186444448", "animateIconScaleAndDimIntoView: end");
mIconAndDimAnimator = null;
}
});
@@ -786,8 +842,9 @@
@Override
public void onRecycle() {
- mFullscreenTranslationX = mNonFullscreenTranslationX =
- mGridTranslationX = mGridTranslationY = mBoxTranslationY = 0f;
+ mFullscreenTranslationX = mFullscreenTranslationY = mNonFullscreenTranslationX =
+ mNonFullscreenTranslationY = mGridTranslationX = mGridTranslationY =
+ mBoxTranslationY = 0f;
resetViewTransforms();
// Clear any references to the thumbnail (it will be re-read either from the cache or the
// system on next bind)
@@ -929,16 +986,26 @@
applyTranslationY();
}
- public void setFullscreenTranslationX(float fullscreenTranslationX) {
+ private void setFullscreenTranslationX(float fullscreenTranslationX) {
mFullscreenTranslationX = fullscreenTranslationX;
applyTranslationX();
}
- public void setNonFullscreenTranslationX(float nonFullscreenTranslationX) {
+ private void setFullscreenTranslationY(float fullscreenTranslationY) {
+ mFullscreenTranslationY = fullscreenTranslationY;
+ applyTranslationY();
+ }
+
+ private void setNonFullscreenTranslationX(float nonFullscreenTranslationX) {
mNonFullscreenTranslationX = nonFullscreenTranslationX;
applyTranslationX();
}
+ private void setNonFullscreenTranslationY(float nonFullscreenTranslationY) {
+ mNonFullscreenTranslationY = nonFullscreenTranslationY;
+ applyTranslationY();
+ }
+
public void setGridTranslationX(float gridTranslationX) {
mGridTranslationX = gridTranslationX;
applyTranslationX();
@@ -960,9 +1027,9 @@
public float getScrollAdjustment(boolean fullscreenEnabled, boolean gridEnabled) {
float scrollAdjustment = 0;
if (fullscreenEnabled) {
- scrollAdjustment += mFullscreenTranslationX;
+ scrollAdjustment += getPrimaryFullscreenTranslationProperty().get(this);
} else {
- scrollAdjustment += mNonFullscreenTranslationX;
+ scrollAdjustment += getPrimaryNonFullscreenTranslationProperty().get(this);
}
if (gridEnabled) {
scrollAdjustment += mGridTranslationX;
@@ -1012,7 +1079,10 @@
* change according to a temporary state (e.g. task offset).
*/
public float getPersistentTranslationY() {
- return getGridTrans(mGridTranslationY) + mBoxTranslationY;
+ return mBoxTranslationY
+ + getFullscreenTrans(mFullscreenTranslationY)
+ + getNonFullscreenTrans(mNonFullscreenTranslationY)
+ + getGridTrans(mGridTranslationY);
}
public FloatProperty<TaskView> getPrimaryDismissTranslationProperty() {
@@ -1035,6 +1105,26 @@
TASK_RESISTANCE_TRANSLATION_X, TASK_RESISTANCE_TRANSLATION_Y);
}
+ public FloatProperty<TaskView> getPrimaryFullscreenTranslationProperty() {
+ return getPagedOrientationHandler().getPrimaryValue(
+ FULLSCREEN_TRANSLATION_X, FULLSCREEN_TRANSLATION_Y);
+ }
+
+ public FloatProperty<TaskView> getSecondaryFullscreenTranslationProperty() {
+ return getPagedOrientationHandler().getSecondaryValue(
+ FULLSCREEN_TRANSLATION_X, FULLSCREEN_TRANSLATION_Y);
+ }
+
+ public FloatProperty<TaskView> getPrimaryNonFullscreenTranslationProperty() {
+ return getPagedOrientationHandler().getPrimaryValue(
+ NON_FULLSCREEN_TRANSLATION_X, NON_FULLSCREEN_TRANSLATION_Y);
+ }
+
+ public FloatProperty<TaskView> getSecondaryNonFullscreenTranslationProperty() {
+ return getPagedOrientationHandler().getSecondaryValue(
+ NON_FULLSCREEN_TRANSLATION_X, NON_FULLSCREEN_TRANSLATION_Y);
+ }
+
@Override
public boolean hasOverlappingRendering() {
// TODO: Clip-out the icon region from the thumbnail, since they are overlapping.
diff --git a/quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java b/quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java
index 88f1850..f93d87c 100644
--- a/quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java
+++ b/quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java
@@ -61,6 +61,7 @@
import com.android.launcher3.util.rule.FailureWatcher;
import com.android.quickstep.views.RecentsView;
+import org.junit.After;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.RuleChain;
@@ -141,6 +142,12 @@
}
}
+ @After
+ public void verifyLauncherState() {
+ // Limits UI tests affecting tests running after them.
+ AbstractQuickStepTest.checkDetectedLeaks(mLauncher);
+ }
+
// b/143488140
//@NavigationModeSwitch
@Test
diff --git a/res/color-v31/overview_scrim.xml b/res/color-v31/overview_scrim.xml
new file mode 100644
index 0000000..8079995
--- /dev/null
+++ b/res/color-v31/overview_scrim.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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.
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:color="@android:color/system_neutral2_500" android:lStar="87" />
+</selector>
diff --git a/res/color-v31/overview_scrim_dark.xml b/res/color-v31/overview_scrim_dark.xml
new file mode 100644
index 0000000..b8ed774
--- /dev/null
+++ b/res/color-v31/overview_scrim_dark.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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.
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:color="@android:color/system_neutral1_800" />
+</selector>
diff --git a/res/color/arrow_tip_view_bg.xml b/res/color/arrow_tip_view_bg.xml
new file mode 100644
index 0000000..91eed50
--- /dev/null
+++ b/res/color/arrow_tip_view_bg.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2021, 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.
+*/
+-->
+<selector
+ xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:color="?android:attr/colorAccent" />
+</selector>
diff --git a/res/color/arrow_tip_view_content.xml b/res/color/arrow_tip_view_content.xml
new file mode 100644
index 0000000..87c733e
--- /dev/null
+++ b/res/color/arrow_tip_view_content.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2021, 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.
+*/
+-->
+<selector
+ xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:color="@android:color/white" />
+</selector>
diff --git a/res/color/cell_layout_bg_color_active.xml b/res/color/cell_layout_bg_color_active.xml
index e826489..d1a3d7c 100644
--- a/res/color/cell_layout_bg_color_active.xml
+++ b/res/color/cell_layout_bg_color_active.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:alpha="0.4"
+ <item android:alpha="0.3"
android:color="?android:attr/colorAccent"/>
</selector>
diff --git a/res/color/cell_layout_bg_color_inactive.xml b/res/color/cell_layout_bg_color_inactive.xml
index d60a27a..0632100 100644
--- a/res/color/cell_layout_bg_color_inactive.xml
+++ b/res/color/cell_layout_bg_color_inactive.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:alpha="0.3"
+ <item android:alpha="0.25"
android:color="?android:attr/colorAccent"/>
</selector>
\ No newline at end of file
diff --git a/res/color/overview_scrim.xml b/res/color/overview_scrim.xml
new file mode 100644
index 0000000..48cf576
--- /dev/null
+++ b/res/color/overview_scrim.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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.
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:color="#30000000" />
+</selector>
diff --git a/res/color/overview_scrim_dark.xml b/res/color/overview_scrim_dark.xml
new file mode 100644
index 0000000..48cf576
--- /dev/null
+++ b/res/color/overview_scrim_dark.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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.
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:color="#30000000" />
+</selector>
diff --git a/res/drawable/arrow_toast_rounded_background.xml b/res/drawable/arrow_toast_rounded_background.xml
index 52cc6fc..f3f2158 100644
--- a/res/drawable/arrow_toast_rounded_background.xml
+++ b/res/drawable/arrow_toast_rounded_background.xml
@@ -14,6 +14,6 @@
limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
- <solid android:color="?android:attr/colorAccent" />
+ <solid android:color="@color/arrow_tip_view_bg" />
<corners android:radius="8dp" />
</shape>
diff --git a/res/drawable/bg_widgets_searchbox.xml b/res/drawable/bg_widgets_searchbox.xml
index 2a50a51..3230ac8 100644
--- a/res/drawable/bg_widgets_searchbox.xml
+++ b/res/drawable/bg_widgets_searchbox.xml
@@ -14,6 +14,6 @@
limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
- <solid android:color="?android:attr/textColorPrimaryInverse" />
+ <solid android:color="@color/widgets_picker_surface" />
<corners android:radius="24dp" />
</shape>
\ No newline at end of file
diff --git a/res/drawable/top_round_rect_primary.xml b/res/drawable/drop_target_frame.xml
similarity index 64%
copy from res/drawable/top_round_rect_primary.xml
copy to res/drawable/drop_target_frame.xml
index 1caaa02..fa6dafd 100644
--- a/res/drawable/top_round_rect_primary.xml
+++ b/res/drawable/drop_target_frame.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (C) 2018 The Android Open Source Project
+ Copyright (C) 2021 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.
@@ -15,12 +15,8 @@
limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <solid android:color="?android:attr/colorPrimary" />
- <corners
- android:topLeftRadius="@dimen/bg_round_rect_radius"
- android:topRightRadius="@dimen/bg_round_rect_radius"
- android:bottomLeftRadius="0dp"
- android:bottomRightRadius="0dp"
- />
-</shape>
+ android:shape="rectangle">
+ <solid android:color="@android:color/transparent" />
+ <corners android:radius="28dp" />
+ <stroke android:width="2dp" android:color="?android:attr/colorAccent" />
+</shape>
\ No newline at end of file
diff --git a/res/drawable/top_round_rect_primary.xml b/res/drawable/drop_target_frame_hover.xml
similarity index 64%
copy from res/drawable/top_round_rect_primary.xml
copy to res/drawable/drop_target_frame_hover.xml
index 1caaa02..7d0e919 100644
--- a/res/drawable/top_round_rect_primary.xml
+++ b/res/drawable/drop_target_frame_hover.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (C) 2018 The Android Open Source Project
+ Copyright (C) 2021 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.
@@ -15,12 +15,7 @@
limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <solid android:color="?android:attr/colorPrimary" />
- <corners
- android:topLeftRadius="@dimen/bg_round_rect_radius"
- android:topRightRadius="@dimen/bg_round_rect_radius"
- android:bottomLeftRadius="0dp"
- android:bottomRightRadius="0dp"
- />
-</shape>
+ android:shape="rectangle">
+ <solid android:color="?android:attr/colorAccent" />
+ <corners android:radius="28dp" />
+</shape>
\ No newline at end of file
diff --git a/res/drawable/ic_block_no_shadow.xml b/res/drawable/ic_block_no_shadow.xml
index edeb4c6..be9aa07 100644
--- a/res/drawable/ic_block_no_shadow.xml
+++ b/res/drawable/ic_block_no_shadow.xml
@@ -14,10 +14,10 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
- android:viewportHeight="24.0"
- android:viewportWidth="24.0"
+ android:width="20dp"
+ android:height="20dp"
+ android:viewportHeight="20.0"
+ android:viewportWidth="20.0"
android:tint="?android:attr/textColorPrimary">
<path
android:fillColor="@android:color/white"
diff --git a/res/drawable/ic_conversations_widget_category.xml b/res/drawable/ic_conversations_widget_category.xml
new file mode 100644
index 0000000..7b13b23
--- /dev/null
+++ b/res/drawable/ic_conversations_widget_category.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="48dp"
+ android:height="48dp"
+ android:viewportWidth="48"
+ android:viewportHeight="48">
+ <path
+ android:pathData="M24,24m-24,0a24,24 0,1 1,48 0a24,24 0,1 1,-48 0"
+ android:fillColor="#81C995"/>
+ <path
+ android:pathData="M27,34C23.134,34 20,30.866 20,27C20,23.134 23.134,20 27,20C30.866,20 34,23.134 34,27C34,28.4872 33.5362,29.8662 32.7453,31"
+ android:strokeWidth="2"
+ android:fillColor="#00000000"
+ android:strokeColor="#3C4043"/>
+ <path
+ android:pathData="M35,33l-8,0l-0,2l8,0z"
+ android:fillColor="#3C4043"/>
+ <path
+ android:pathData="M21,21m-6,0a6,6 0,1 1,12 0a6,6 0,1 1,-12 0"
+ android:fillColor="#81C995"/>
+ <path
+ android:pathData="M16,25h5v2h-5z"
+ android:fillColor="#81C995"/>
+ <path
+ android:pathData="M21,28C24.866,28 28,24.866 28,21C28,17.134 24.866,14 21,14C17.134,14 14,17.134 14,21C14,22.4872 14.4638,23.8662 15.2547,25"
+ android:strokeWidth="2"
+ android:fillColor="#00000000"
+ android:strokeColor="#ffffff"/>
+ <path
+ android:pathData="M13,27h8v2h-8z"
+ android:fillColor="#ffffff"/>
+</vector>
diff --git a/res/drawable/ic_remove_no_shadow.xml b/res/drawable/ic_remove_no_shadow.xml
index 2c706db..10f1e43 100644
--- a/res/drawable/ic_remove_no_shadow.xml
+++ b/res/drawable/ic_remove_no_shadow.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
+ android:width="20dp"
+ android:height="20dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0"
android:tint="?android:attr/textColorPrimary">
diff --git a/res/drawable/ic_uninstall_no_shadow.xml b/res/drawable/ic_uninstall_no_shadow.xml
index 6aff102..14cecac 100644
--- a/res/drawable/ic_uninstall_no_shadow.xml
+++ b/res/drawable/ic_uninstall_no_shadow.xml
@@ -14,10 +14,10 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0"
+ android:width="20dp"
+ android:height="20dp"
+ android:viewportWidth="20.0"
+ android:viewportHeight="20.0"
android:tint="?android:attr/textColorPrimary" >
<path
android:fillColor="@android:color/white"
diff --git a/res/drawable/top_round_rect_primary.xml b/res/drawable/widgets_bottom_sheet_background.xml
similarity index 85%
rename from res/drawable/top_round_rect_primary.xml
rename to res/drawable/widgets_bottom_sheet_background.xml
index 1caaa02..faa414c 100644
--- a/res/drawable/top_round_rect_primary.xml
+++ b/res/drawable/widgets_bottom_sheet_background.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (C) 2018 The Android Open Source Project
+ Copyright (C) 2021 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.
@@ -15,12 +15,12 @@
limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <solid android:color="?android:attr/colorPrimary" />
+ android:shape="rectangle">
+ <solid android:color="@color/widgets_picker_surface" />
<corners
android:topLeftRadius="@dimen/bg_round_rect_radius"
android:topRightRadius="@dimen/bg_round_rect_radius"
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"
/>
-</shape>
+</shape>
\ No newline at end of file
diff --git a/res/layout/add_item_confirmation_activity.xml b/res/layout/add_item_confirmation_activity.xml
index d5e7333..7c2f25b 100644
--- a/res/layout/add_item_confirmation_activity.xml
+++ b/res/layout/add_item_confirmation_activity.xml
@@ -36,6 +36,15 @@
android:singleLine="true"
android:maxLines="1" />
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_horizontal"
+ android:paddingVertical="8dp"
+ android:text="@string/add_item_request_drag_hint"
+ android:textSize="14sp"
+ android:importantForAccessibility="no"/>
+
<include layout="@layout/widget_cell"
android:id="@+id/widget_cell"
android:layout_width="match_parent"
@@ -53,6 +62,7 @@
style="@style/Widget.DeviceDefault.Button.Rounded.Colored"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:paddingHorizontal="16dp"
android:onClick="onCancelClick"
android:text="@android:string/cancel" />
@@ -64,7 +74,8 @@
style="@style/Widget.DeviceDefault.Button.Rounded.Colored"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:paddingHorizontal="16dp"
android:onClick="onPlaceAutomaticallyClick"
- android:text="@string/place_automatically" />
+ android:text="@string/add_to_home_screen" />
</LinearLayout>
</LinearLayout>
diff --git a/res/layout/arrow_toast.xml b/res/layout/arrow_toast.xml
index 0ec9981..ae60e1b 100644
--- a/res/layout/arrow_toast.xml
+++ b/res/layout/arrow_toast.xml
@@ -16,6 +16,7 @@
<merge
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_height="wrap_content"
android:layout_width="wrap_content">
@@ -38,7 +39,7 @@
android:paddingBottom="5dp"
android:gravity="center"
android:layout_gravity="center_vertical"
- android:textColor="@android:color/white"
+ android:textColor="@color/arrow_tip_view_content"
android:textSize="16sp"/>
<ImageView
android:id="@+id/dismiss"
@@ -50,7 +51,7 @@
android:layout_marginEnd="2dp"
android:alpha="0.7"
android:src="@drawable/ic_remove_no_shadow"
- android:tint="@android:color/white"
+ android:tint="@color/arrow_tip_view_content"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/accessibility_close"/>
</LinearLayout>
diff --git a/res/layout/launcher.xml b/res/layout/launcher.xml
index f34e685..039d8d3 100644
--- a/res/layout/launcher.xml
+++ b/res/layout/launcher.xml
@@ -66,8 +66,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/scrim_view"
- android:background="?attr/allAppsScrimColor"
- android:alpha="0" />
+ android:background="@android:color/transparent" />
<include
android:id="@+id/apps_view"
diff --git a/res/layout/widgets_bottom_sheet.xml b/res/layout/widgets_bottom_sheet.xml
index 8002d1d..08635c6 100644
--- a/res/layout/widgets_bottom_sheet.xml
+++ b/res/layout/widgets_bottom_sheet.xml
@@ -20,7 +20,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="16dp"
- android:background="@drawable/top_round_rect_primary"
+ android:background="@drawable/widgets_bottom_sheet_background"
android:elevation="@dimen/deep_shortcuts_elevation"
android:layout_gravity="bottom"
android:theme="?attr/widgetsTheme">
diff --git a/res/layout/widgets_list_row_header.xml b/res/layout/widgets_list_row_header.xml
index f4b4130..f20af87 100644
--- a/res/layout/widgets_list_row_header.xml
+++ b/res/layout/widgets_list_row_header.xml
@@ -35,6 +35,7 @@
tools:src="@drawable/ic_corp"/>
<LinearLayout
+ android:id="@+id/app_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
diff --git a/res/layout/widgets_search_bar.xml b/res/layout/widgets_search_bar.xml
index c3dd19e..2467156 100644
--- a/res/layout/widgets_search_bar.xml
+++ b/res/layout/widgets_search_bar.xml
@@ -6,6 +6,7 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="16dp"
+ android:layout_marginBottom="1dp"
android:background="@drawable/bg_widgets_searchbox"
android:elevation="2dp">
@@ -24,8 +25,8 @@
android:layout_weight="1"
android:inputType="text"
android:imeOptions="actionSearch"
- android:textColor="?android:attr/textColorSecondary"
- android:textColorHint="?android:attr/textColorTertiary"/>
+ android:textColor="?android:attr/textColorPrimary"
+ android:textColorHint="?android:attr/textColorSecondary"/>
<ImageButton
android:id="@+id/widgets_search_cancel_button"
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index 6894e3c..e516468 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Dubbeltik en hou om \'n legstuk te skuif of gebruik gepasmaakte handelinge."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d breed by %2$d hoog"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Raak en hou om self te plaas"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Voeg outomaties by"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> legstukke</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> legstuk</item>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index 8097ba1..5241acd 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"ምግብርን ለማንቀሳቀስ ወይም ብጁ እርምጃዎችን ለመጠቀም ሁለቴ መታ ያድርጉ እና ይያዙ።"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d ስፋት በ%2$d ከፍታ"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"ራስዎ ለማስቀመጥ ነክተው ይያዙት"</string>
- <string name="place_automatically" msgid="8064208734425456485">"በራስ-ሰር አክል"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> ንዑስ ፕሮግራሞች</item>
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> ንዑስ ፕሮግራሞች</item>
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index b5115e2..669aa91 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"انقر مرتين مع تثبيت إصبعك لنقل أداة أو استخدام الإجراءات المخصّصة."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"العرض %1$d الطول %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"انقر مع الاستمرار لإضافة العنصر يدويًا"</string>
- <string name="place_automatically" msgid="8064208734425456485">"الإضافة تلقائيًا"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="zero"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> أداة</item>
<item quantity="two">أداتان (<xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g>)</item>
diff --git a/res/values-as/strings.xml b/res/values-as/strings.xml
index 31ac27f..931b3ab 100644
--- a/res/values-as/strings.xml
+++ b/res/values-as/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"কোনো ৱিজেট স্থানান্তৰ কৰিবলৈ দুবাৰ টিপি ধৰি ৰাখক অথবা কাষ্টম কাৰ্য ব্যৱহাৰ কৰক।"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d বহল x %2$d ওখ"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"মেনুৱেলভাৱে ৰাখিবলৈ স্পৰ্শ কৰি থাকক"</string>
- <string name="place_automatically" msgid="8064208734425456485">"স্বয়ংক্ৰিয়ভাবে যোগ কৰক"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> টা ৱিজেট</item>
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> টা ৱিজেট</item>
diff --git a/res/values-az/strings.xml b/res/values-az/strings.xml
index bc0717d..8b525f2 100644
--- a/res/values-az/strings.xml
+++ b/res/values-az/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Vidceti daşımaq üçün iki dəfə toxunub saxlayın və ya fərdi əməliyyatlardan istifadə edin."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%2$d hündürlük %1$d enində"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Manual olaraq yerləşdirmək üçün toxunaraq basıb saxlayın"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Avtomatik əlavə edin"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> vidcet</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> vidcet</item>
diff --git a/res/values-b+sr+Latn/strings.xml b/res/values-b+sr+Latn/strings.xml
index ed08ca2..d4f013a 100644
--- a/res/values-b+sr+Latn/strings.xml
+++ b/res/values-b+sr+Latn/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Dvaput dodirnite i zadržite da biste pomerali vidžet ili koristite prilagođene radnje."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d×%2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"širina od %1$d i visina od %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Dodirnite i zadržite da biste postavili ručno"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Automatski dodaj"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> vidžet</item>
<item quantity="few"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> vidžeta</item>
diff --git a/res/values-be/strings.xml b/res/values-be/strings.xml
index c2d9946..cf02d48 100644
--- a/res/values-be/strings.xml
+++ b/res/values-be/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Дакраніцеся двойчы і ўтрымлівайце, каб перамясціць віджэт або выкарыстоўваць спецыяльныя дзеянні."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"Шырына: %1$d, вышыня: %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Каб размясціць уручную, дакраніцеся і ўтрымлівайце"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Дадаць аўтаматычна"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> віджэт</item>
<item quantity="few"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> віджэты</item>
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index 390a8f8..b3c5ca4 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Докоснете двукратно и задръжте за преместване на приспособление или използвайте персонал. действия."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"Ширина %1$d и височина %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Докоснете и задръжте, за да поставите ръчно"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Автоматично добавяне"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> приспособления</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> приспособление</item>
diff --git a/res/values-bn/strings.xml b/res/values-bn/strings.xml
index 4c45b29..283ac70 100644
--- a/res/values-bn/strings.xml
+++ b/res/values-bn/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"একটি উইজেট সরাতে বা কাস্টম অ্যাকশন ব্যবহার করতে ডবল ট্যাপ করে ধরে রাখুন।"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%2$d উচ্চতা অনুযায়ী %1$d প্রস্থ"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"নিজে যোগ করতে টাচ করে ধরে রাখুন"</string>
- <string name="place_automatically" msgid="8064208734425456485">"স্বয়ংক্রিয়ভাবে যোগ করুন"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g>টি উইজেট</item>
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g>টি উইজেট</item>
diff --git a/res/values-bs/strings.xml b/res/values-bs/strings.xml
index ae46d5b..fcd6f3f 100644
--- a/res/values-bs/strings.xml
+++ b/res/values-bs/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Dvaput dodirnite i zadržite da pomjerite vidžet ili da koristite prilagođene radnje."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"Širina %1$d, visina %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Dodirnite i držite da postavite ručno"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Dodaj automatski"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> vidžet</item>
<item quantity="few"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> vidžeta</item>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index c49dce5..d54670b 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Fes doble toc i mantén premut per moure un widget o per utilitzar accions personalitzades."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d d\'amplada per %2$d d\'alçada"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Mantén-lo premut per afegir-lo manualment"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Afegeix automàticament"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgets</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> widget</item>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index a7f9908..a9ea587 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Dvojitým klepnutím a podržením přesunete widget, případně použijte vlastní akce."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"šířka %1$d, výška %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Chcete-li položku umístit ručně, klepněte na ni a podržte ji"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Přidat automaticky"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="few"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgety</item>
<item quantity="many"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgetu</item>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index c6496fa..e5dacac 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Tryk to gange, og hold en widget nede for at flytte den eller bruge tilpassede handlinger."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d i bredden og %2$d i højden"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Tryk og hold for at placere manuelt"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Tilføj automatisk"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widget</item>
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgets</item>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 77ddc86..31b9b20 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Doppeltippen und halten, um ein Widget zu bewegen oder benutzerdefinierte Aktionen zu nutzen."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d breit und %2$d hoch"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Zum manuellen Hinzufügen gedrückt halten"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Automatisch hinzufügen"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> Widgets</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> Widget</item>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index c81b96a..a9deedb 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Πατήστε δύο φορές παρατεταμένα για μετακίνηση γραφικού στοιχείου ή χρήση προσαρμοσμένων ενεργειών."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"Πλάτος %1$d επί ύψος %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Αγγίξτε παρατεταμένα για μη αυτόματη τοποθέτηση"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Αυτόματη προσθήκη"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> γραφικά στοιχεία</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> γραφικό στοιχείο</item>
diff --git a/res/values-en-rAU/strings.xml b/res/values-en-rAU/strings.xml
index f26f284..d6b9296 100644
--- a/res/values-en-rAU/strings.xml
+++ b/res/values-en-rAU/strings.xml
@@ -32,8 +32,8 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Double-tap & hold to move a widget or use custom actions."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d wide by %2$d high"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Touch and hold to place manually"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Add automatically"</string>
+ <string name="add_item_request_drag_hint" msgid="5653291305078645405">"Touch & hold the widget to move it around the home screen"</string>
+ <string name="add_to_home_screen" msgid="8631549138215492708">"Add to home screen"</string>
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgets</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> widget</item>
diff --git a/res/values-en-rCA/strings.xml b/res/values-en-rCA/strings.xml
index f26f284..d6b9296 100644
--- a/res/values-en-rCA/strings.xml
+++ b/res/values-en-rCA/strings.xml
@@ -32,8 +32,8 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Double-tap & hold to move a widget or use custom actions."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d wide by %2$d high"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Touch and hold to place manually"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Add automatically"</string>
+ <string name="add_item_request_drag_hint" msgid="5653291305078645405">"Touch & hold the widget to move it around the home screen"</string>
+ <string name="add_to_home_screen" msgid="8631549138215492708">"Add to home screen"</string>
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgets</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> widget</item>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index f26f284..d6b9296 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -32,8 +32,8 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Double-tap & hold to move a widget or use custom actions."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d wide by %2$d high"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Touch and hold to place manually"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Add automatically"</string>
+ <string name="add_item_request_drag_hint" msgid="5653291305078645405">"Touch & hold the widget to move it around the home screen"</string>
+ <string name="add_to_home_screen" msgid="8631549138215492708">"Add to home screen"</string>
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgets</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> widget</item>
diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml
index f26f284..d6b9296 100644
--- a/res/values-en-rIN/strings.xml
+++ b/res/values-en-rIN/strings.xml
@@ -32,8 +32,8 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Double-tap & hold to move a widget or use custom actions."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d wide by %2$d high"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Touch and hold to place manually"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Add automatically"</string>
+ <string name="add_item_request_drag_hint" msgid="5653291305078645405">"Touch & hold the widget to move it around the home screen"</string>
+ <string name="add_to_home_screen" msgid="8631549138215492708">"Add to home screen"</string>
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgets</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> widget</item>
diff --git a/res/values-en-rXC/strings.xml b/res/values-en-rXC/strings.xml
index b700502..9fff023 100644
--- a/res/values-en-rXC/strings.xml
+++ b/res/values-en-rXC/strings.xml
@@ -32,8 +32,8 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Double-tap & hold to move a widget or use custom actions."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d wide by %2$d high"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Touch & hold to place manually"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Add automatically"</string>
+ <string name="add_item_request_drag_hint" msgid="5653291305078645405">"Touch & hold the widget to move it around the Home screen"</string>
+ <string name="add_to_home_screen" msgid="8631549138215492708">"Add to Home screen"</string>
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgets</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> widget</item>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index acd4a4f..0330795 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Presiona dos veces y mantén presionado para mover un widget o usar acciones personalizadas."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d de ancho por %2$d de alto"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Mantén presionado para ubicarlo manualmente"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Agregar automáticamente"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgets</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> widget</item>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 8b9ab0c..888436f 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Toca dos veces y mantén pulsado un widget para moverlo o usar acciones personalizadas."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d de ancho por %2$d de alto"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Mantenlo pulsado para añadirlo manualmente"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Añadir automáticamente"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other">Widgets: <xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g></item>
<item quantity="one">Widget: <xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g></item>
diff --git a/res/values-et/strings.xml b/res/values-et/strings.xml
index 08714ad..15b6177 100644
--- a/res/values-et/strings.xml
+++ b/res/values-et/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Vidina teisaldamiseks või kohandatud toimingute kasutamiseks topeltpuudutage ja hoidke all."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d lai ja %2$d kõrge"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Puudutage pikalt, et käsitsi asetada"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Lisa automaatselt"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> vidinat</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> vidin</item>
diff --git a/res/values-eu/strings.xml b/res/values-eu/strings.xml
index a485a14..5309052 100644
--- a/res/values-eu/strings.xml
+++ b/res/values-eu/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Sakatu birritan eta eduki sakatuta widget bat mugitzeko edo ekintza pertsonalizatuak erabiltzeko."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d zabal eta %2$d luze"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Eduki sakatuta eskuz gehitzeko"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Gehitu automatikoki"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widget</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> widget</item>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index 0b3e7b0..b0c300c 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"برای جابهجا کردن ابزارک یا استفاده از کنشهای سفارشی، دوضربه بزنید و نگه دارید."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d عرض در %2$d طول"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"آن را لمس کنید و بکشید تا بهصورت دستی اضافه شود"</string>
- <string name="place_automatically" msgid="8064208734425456485">"افزودن خودکار"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> ابزارک</item>
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> ابزارک</item>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index 34ed9e0..47466cf 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Kaksoisnapauta ja paina pitkään, niin voit siirtää widgetiä tai käyttää muokattuja toimintoja."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"Leveys: %1$d, korkeus: %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Sijoita manuaalisesti koskettamalla pitkään"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Lisää automaattisesti"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgetiä</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> widget</item>
diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml
index 34fcb36..f50d837 100644
--- a/res/values-fr-rCA/strings.xml
+++ b/res/values-fr-rCA/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Touchez 2x un widget et maintenez le doigt dessus pour le déplacer ou utiliser des actions personnalisées."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d de largeur sur %2$d de hauteur"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Maintenez le doigt sur l\'élément pour le placer manuellement"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Ajouter automatiquement"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widget</item>
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgets</item>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index f336031..f51c3d9 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Appuyez deux fois et maintenez la pression pour déplacer widget ou utiliser actions personnalisées."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d x %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d de largeur et %2$d de hauteur"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Appuyez de manière prolongée pour placer l\'élément manuellement."</string>
- <string name="place_automatically" msgid="8064208734425456485">"Ajouter automatiquement"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widget</item>
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgets</item>
diff --git a/res/values-gl/strings.xml b/res/values-gl/strings.xml
index 382f6ff..c3e3596 100644
--- a/res/values-gl/strings.xml
+++ b/res/values-gl/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Toca dúas veces un widget e manteno premido para movelo ou utiliza accións personalizadas."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d de largo por %2$d de alto"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Mantén premido o elemento para colocalo manualmente"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Engadir automaticamente"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgets</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> widget</item>
diff --git a/res/values-gu/strings.xml b/res/values-gu/strings.xml
index c7f8042..0882d64 100644
--- a/res/values-gu/strings.xml
+++ b/res/values-gu/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"વિજેટ ખસેડવા બે વાર ટૅપ કરીને દબાવી રાખો અથવા કસ્ટમ ક્રિયાઓનો ઉપયોગ કરો."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d પહોળાઈ X %2$d ઊંચાઈ"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"મેન્યુઅલી મૂકવા માટે ટચ કરી દબાવી રાખો"</string>
- <string name="place_automatically" msgid="8064208734425456485">"ઑટોમૅટિક રીતે ઉમેરો"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> વિજેટ</item>
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> વિજેટ</item>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index 478d87e..61776d6 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"किसी विजेट को एक से दूसरी जगह ले जाने के लिए, उस पर दो बार टैप करके दबाकर रखें या पसंद के मुताबिक कार्रवाइयां इस्तेमाल करें."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d चौड़ाई गुणा %2$d ऊंचाई"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"खुद जोड़ने के लिए दबाकर रखें"</string>
- <string name="place_automatically" msgid="8064208734425456485">"अपने-आप जुड़ जाए"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> विजेट</item>
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> विजेट</item>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index 8ebc33f..171f5d0 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Dvaput dodirnite i zadržite pritisak da biste premjestili widget ili upotrijebite prilagođene radnje"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d širine i %2$d visine"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Dodirnite i zadržite stavku da biste je postavili ručno"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Dodaj automatski"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widget</item>
<item quantity="few"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgeta</item>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index d0aea22..bbb24e9 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Modul áthelyezéséhez koppintson duplán, tartsa nyomva az ujját, vagy használjon egyéni műveleteket."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d széles és %2$d magas"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Tartsd lenyomva a manuális hozzáadáshoz"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Automatikus hozzáadás"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> modul</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> modul</item>
diff --git a/res/values-hy/strings.xml b/res/values-hy/strings.xml
index fbbcf1c..ff8b895 100644
--- a/res/values-hy/strings.xml
+++ b/res/values-hy/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Կրկնակի հպեք և պահեք՝ վիջեթ տեղափոխելու համար, կամ օգտվեք հատուկ գործողություններից։"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"Լայնությունը՝ %1$d, բարձրությունը՝ %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Հպեք և պահեք՝ ձեռքով տեղադրելու համար"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Ավելացնել ավտոմատ կերպով"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> վիջեթ</item>
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> վիջեթ</item>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index 7bc91c2..c1889ff 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Ketuk dua kali & tahan untuk memindahkan widget atau gunakan tindakan khusus."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"lebar %1$d x tinggi %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Sentuh lama untuk menempatkan secara manual"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Tambahkan otomatis"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widget</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> widget</item>
diff --git a/res/values-is/strings.xml b/res/values-is/strings.xml
index 104b4ac..1dce7c7 100644
--- a/res/values-is/strings.xml
+++ b/res/values-is/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Ýttu tvisvar og haltu fingri á græju til að færa hana eða notaðu sérsniðnar aðgerðir."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d á breidd og %2$d á hæð"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Haltu inni til að staðsetja handvirkt"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Bæta sjálfkrafa við"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> græja</item>
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> græjur</item>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 9e13576..3d1cb5b 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Tocca due volte e tieni premuto per spostare un widget o per usare le azioni personalizzate."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d di larghezza per %2$d di altezza"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Tieni premuto per posizionare l\'elemento manualmente"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Aggiungi automaticamente"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widget</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> widget</item>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index 639aa86..4cf0eb2 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"כדי להעביר ווידג\'ט למקום אחר או להשתמש בפעולות מותאמות אישית, יש ללחוץ פעמיים ולא להרפות."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"רוחב %1$d על גובה %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"יש ללחוץ לחיצה ארוכה כדי להוסיף ידנית"</string>
- <string name="place_automatically" msgid="8064208734425456485">"הוספה אוטומטית"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="two"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> ווידג\'טים</item>
<item quantity="many"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> ווידג\'טים</item>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index dc92748..77efbad 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"ウィジェットをダブルタップして長押ししながら移動するか、カスタム操作を使用してください。"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$dx%2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"幅 %1$d、高さ %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"長押しすると、手動で追加できます"</string>
- <string name="place_automatically" msgid="8064208734425456485">"自動的に追加"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> 件のウィジェット</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> 件のウィジェット</item>
diff --git a/res/values-ka/strings.xml b/res/values-ka/strings.xml
index 7a0ec8d..e3be57f 100644
--- a/res/values-ka/strings.xml
+++ b/res/values-ka/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"ორმაგი შეხებით აირჩიეთ და გეჭიროთ ვიჯეტის გადასაადგილებლად ან მორგებული მოქმედებების გამოსაყენებლად."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"სიგრძე: %1$d, სიგანე: %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"ხანგრძლივად შეეხეთ ხელით განსათავსებლად"</string>
- <string name="place_automatically" msgid="8064208734425456485">"ავტომატურად დამატება"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> ვიჯეტი</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> ვიჯეტი</item>
diff --git a/res/values-kk/strings.xml b/res/values-kk/strings.xml
index dff1311..392dc8b 100644
--- a/res/values-kk/strings.xml
+++ b/res/values-kk/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Виджетті жылжыту үшін екі рет түртіңіз де, ұстап тұрыңыз немесе арнаулы әрекеттерді пайдаланыңыз."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"Ені: %1$d, биіктігі: %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Қолмен қою үшін басып тұрыңыз"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Автоматты қосу"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> виджет</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> виджет</item>
diff --git a/res/values-km/strings.xml b/res/values-km/strings.xml
index f460512..dd04c01 100644
--- a/res/values-km/strings.xml
+++ b/res/values-km/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"ចុចពីរដង រួចសង្កត់ឱ្យជាប់ ដើម្បីផ្លាស់ទីធាតុក្រាហ្វិក ឬប្រើសកម្មភាពតាមបំណង។"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"ទទឺង %1$d គុណនឹងកម្ពស់ %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"ចុចឲ្យជាប់ដើម្បីបញ្ចូលវាដោយផ្ទាល់"</string>
- <string name="place_automatically" msgid="8064208734425456485">"បញ្ចូលដោយស្វ័យប្រវត្តិ"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other">ធាតុក្រាហ្វិក <xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g></item>
<item quantity="one">ធាតុក្រាហ្វិក <xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g></item>
diff --git a/res/values-kn/strings.xml b/res/values-kn/strings.xml
index b12c631..73e2255 100644
--- a/res/values-kn/strings.xml
+++ b/res/values-kn/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"ವಿಜೆಟ್ ಸರಿಸಲು ಅಥವಾ ಕಸ್ಟಮ್ ಕ್ರಿಯೆಗಳನ್ನು ಬಳಸಲು ಡಬಲ್-ಟ್ಯಾಪ್ ಮಾಡಿ ಮತ್ತು ಹಿಡಿದುಕೊಳ್ಳಿ."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d ಅಗಲ ಮತ್ತು %2$d ಎತ್ತರ"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"ಹಸ್ತಚಾಲಿತವಾಗಿ ಸೇರಿಸಲು ಸ್ಪರ್ಶಿಸಿ ಮತ್ತು ಹೋಲ್ಡ್ ಮಾಡಿ"</string>
- <string name="place_automatically" msgid="8064208734425456485">"ಸ್ವಯಂಚಾಲಿತವಾಗಿ ಸೇರಿಸಿ"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> ವಿಜೆಟ್ಗಳು</item>
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> ವಿಜೆಟ್ಗಳು</item>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 81285ca..7e24dc3 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"두 번 탭한 다음 길게 터치하여 위젯을 이동하거나 맞춤 작업을 사용하세요."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d×%2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"너비 %1$d, 높이 %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"길게 터치하여 직접 추가하세요."</string>
- <string name="place_automatically" msgid="8064208734425456485">"자동으로 추가"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other">위젯 <xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g>개</item>
<item quantity="one">위젯 <xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g>개</item>
diff --git a/res/values-ky/strings.xml b/res/values-ky/strings.xml
index 50c36d5..a4f54bf 100644
--- a/res/values-ky/strings.xml
+++ b/res/values-ky/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Виджетти жылдыруу үчүн эки жолу таптап, кармап туруңуз же ыңгайлаштырылган аракеттерди колдонуңуз."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"Туурасы: %1$d, бийиктиги: %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Кол менен кошуу үчүн кое бербей басып туруңуз"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Автоматтык түрдө кошуу"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> виджет</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> виджет</item>
diff --git a/res/values-lo/strings.xml b/res/values-lo/strings.xml
index 3ce2c20..a7c2f68 100644
--- a/res/values-lo/strings.xml
+++ b/res/values-lo/strings.xml
@@ -32,8 +32,8 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"ແຕະສອງເທື່ອຄ້າງໄວ້ເພື່ອຍ້າຍວິດເຈັດ ຫຼື ໃຊ້ຄຳສັ່ງກຳນົດເອງ."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"ກວ້າງ %1$d ຄູນສູງ %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"ແຕະຄ້າງໄວ້ເພື່ອວາງດ້ວຍຕົນເອງ"</string>
- <string name="place_automatically" msgid="8064208734425456485">"ເພີ່ມໂດຍອັດຕະໂນມັດ"</string>
+ <string name="add_item_request_drag_hint" msgid="5653291305078645405">"ແຕະວິດເຈັດຄ້າງໄວ້ເພື່ອຍ້າຍມັນໄປມາຢູ່ໂຮມສະກຣີນ"</string>
+ <string name="add_to_home_screen" msgid="8631549138215492708">"ເພີ່ມໄປໃສ່ໂຮມສະກຣີນ"</string>
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> ວິດເຈັດ</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> ວິດເຈັດ</item>
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index c75afbc..43055a5 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Dukart palieskite ir palaikykite, kad perkeltumėte valdiklį ar naudotumėte tinkintus veiksmus."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d plotis ir %2$d aukštis"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Palieskite ir palaikykite, kad padėtumėte patys"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Pridėti automatiškai"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> valdiklis</item>
<item quantity="few"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> valdikliai</item>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index dc2117f..8bcf250 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Lai pārvietotu logrīku, uz tā veiciet dubultskārienu un turiet. Varat arī veikt pielāgotas darbības."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d plats un %2$d augsts"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Pieskarieties un turiet, lai manuāli pievienotu"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Pievienot automātiski"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="zero"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> logrīku</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> logrīks</item>
diff --git a/res/values-mk/strings.xml b/res/values-mk/strings.xml
index ce79bde..c4349e6 100644
--- a/res/values-mk/strings.xml
+++ b/res/values-mk/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Допрете двапати и задржете за да преместите виџет или користете приспособени дејства."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d широк на %2$d висок"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Допрете и задржете за рачно поставување"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Додај автоматски"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> виџет</item>
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> виџети</item>
diff --git a/res/values-ml/strings.xml b/res/values-ml/strings.xml
index 3ab0b35..c0cb36b 100644
--- a/res/values-ml/strings.xml
+++ b/res/values-ml/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"വിജറ്റ് നീക്കാൻ ഡബിൾ ടാപ്പ് ചെയ്യൂ, ഹോൾഡ് ചെയ്യൂ അല്ലെങ്കിൽ ഇഷ്ടാനുസൃത പ്രവർത്തനങ്ങൾ ഉപയോഗിക്കൂ."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d വീതിയും %2$d ഉയരവും"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"നേരിട്ട് സ്ഥാപിക്കുന്നതിന് സ്പർശിച്ചുപിടിക്കുക"</string>
- <string name="place_automatically" msgid="8064208734425456485">"സ്വയമേവ ചേർക്കുക"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> വിജറ്റുകൾ</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> വിജറ്റ്</item>
diff --git a/res/values-mn/strings.xml b/res/values-mn/strings.xml
index b93c535..b512dc2 100644
--- a/res/values-mn/strings.xml
+++ b/res/values-mn/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Жижиг хэрэгслийг зөөх эсвэл захиалгат үйлдлийг ашиглахын тулд хоёр товшоод, удаан дарна уу."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d өргөн %2$d өндөр"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Гараар байршуулахын тулд дараад хүлээнэ үү"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Автоматаар нэмэх"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> жижиг хэрэгсэл</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> жижиг хэрэгсэл</item>
diff --git a/res/values-mr/strings.xml b/res/values-mr/strings.xml
index 7fc330e..7bf6c6c 100644
--- a/res/values-mr/strings.xml
+++ b/res/values-mr/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"विजेट हलवण्यासाठी किंवा कस्टम कृती वापरण्यासाठी दोनदा टॅप करा आणि धरून ठेवा."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d रूंद बाय %2$d उंच"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"स्वतः ठेवण्यासाठी स्पर्श करा आणि धरून ठेवा"</string>
- <string name="place_automatically" msgid="8064208734425456485">"आपोआप जोडा"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> विजेट</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> विजेट</item>
diff --git a/res/values-ms/strings.xml b/res/values-ms/strings.xml
index e54c6fe..91f2a4d 100644
--- a/res/values-ms/strings.xml
+++ b/res/values-ms/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Ketik dua kali & tahan untuk menggerakkan widget atau menggunakan tindakan tersuai."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"Lebar %1$d kali tinggi %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Sentuh & tahan untuk meletakkan widget/ikon secara manual"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Tambahkan secara automatik"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widget</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> widget</item>
diff --git a/res/values-my/strings.xml b/res/values-my/strings.xml
index b429602..f042629 100644
--- a/res/values-my/strings.xml
+++ b/res/values-my/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"ဝိဂျက်ကို ရွှေ့ရန် (သို့) စိတ်ကြိုက်လုပ်ဆောင်ချက်များကို သုံးရန် နှစ်ချက်တို့ပြီး ဖိထားပါ။"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"အလျား %1$d နှင့် အမြင့် %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"ကိုယ်တိုင်ထည့်ရန် ထိထားပါ"</string>
- <string name="place_automatically" msgid="8064208734425456485">"အလိုအလျောက် ထည့်ရန်"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other">ဝိဂျက် <xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> ခု</item>
<item quantity="one">ဝိဂျက် <xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> ခု</item>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 8245608..540d726 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Dobbelttrykk og hold inne for å flytte en modul eller bruke tilpassede handlinger."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d bredde x %2$d høyde"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Trykk og hold for å plassere manuelt"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Legg til automatisk"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> moduler</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> modul</item>
diff --git a/res/values-ne/strings.xml b/res/values-ne/strings.xml
index 9c348e3..0cdeae0 100644
--- a/res/values-ne/strings.xml
+++ b/res/values-ne/strings.xml
@@ -26,47 +26,41 @@
<string name="safemode_shortcut_error" msgid="9160126848219158407">"सुरक्षित मोडमा डाउनलोड गरेको एप अक्षम गरिएको छ"</string>
<string name="safemode_widget_error" msgid="4863470563535682004">"सुरक्षित मोडमा विगेटहरू अक्षम गरियो"</string>
<string name="shortcut_not_available" msgid="2536503539825726397">"सर्टकट उपलब्ध छैन"</string>
- <!-- no translation found for home_screen (5629429142036709174) -->
- <skip />
- <!-- no translation found for recent_task_option_split_screen (6690461455618725183) -->
- <skip />
- <!-- no translation found for long_press_widget_to_add (3587712543577675817) -->
- <skip />
- <!-- no translation found for long_accessible_way_to_add (2733588281439571974) -->
- <skip />
+ <string name="home_screen" msgid="5629429142036709174">"होम"</string>
+ <string name="recent_task_option_split_screen" msgid="6690461455618725183">"स्प्लिट स्क्रिन"</string>
+ <string name="long_press_widget_to_add" msgid="3587712543577675817">"कुनै विजेट सार्न डबल ट्याप गरेर छोइराख्नुहोस्।"</string>
+ <string name="long_accessible_way_to_add" msgid="2733588281439571974">"कुनै विजेट सार्न वा आफ्नो रोजाइका कारबाही प्रयोग गर्न डबल ट्याप गरेर छोइराख्नुहोस्।"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d चौडाइ गुणा %2$d उचाइ"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"थप्न टच एण्ड होल्ड गर्नुहोस्"</string>
- <string name="place_automatically" msgid="8064208734425456485">"स्वतः थप्नुहोस्"</string>
- <!-- no translation found for widgets_count (656794749266073027) -->
- <!-- no translation found for shortcuts_count (8080294865447938455) -->
- <!-- no translation found for widgets_and_shortcuts_count (7209136747878365116) -->
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
<skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
+ <plurals name="widgets_count" formatted="false" msgid="656794749266073027">
+ <item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> वटा विजेट</item>
+ <item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> वटा विजेट</item>
+ </plurals>
+ <plurals name="shortcuts_count" formatted="false" msgid="8080294865447938455">
+ <item quantity="other"><xliff:g id="SHORTCUTS_COUNT_1">%1$d</xliff:g> वटा सर्टकट</item>
+ <item quantity="one"><xliff:g id="SHORTCUTS_COUNT_0">%1$d</xliff:g> वटा सर्टकट</item>
+ </plurals>
+ <string name="widgets_and_shortcuts_count" msgid="7209136747878365116">"<xliff:g id="WIDGETS_COUNT">%1$s</xliff:g>, <xliff:g id="SHORTCUTS_COUNT">%2$s</xliff:g>"</string>
<string name="widget_button_text" msgid="2880537293434387943">"विजेटहरू"</string>
- <!-- no translation found for widgets_full_sheet_search_bar_hint (8484659090860596457) -->
- <skip />
- <!-- no translation found for widgets_full_sheet_cancel_button_description (5766167035728653605) -->
- <skip />
- <!-- no translation found for no_widgets_available (9140948620298620513) -->
- <skip />
- <!-- no translation found for no_search_results (6518732304311458580) -->
- <skip />
- <!-- no translation found for widgets_full_sheet_personal_tab (2743540105607120182) -->
- <skip />
- <!-- no translation found for widgets_full_sheet_work_tab (3767150027110633765) -->
- <skip />
- <!-- no translation found for widget_category_conversations (8894438636213590446) -->
- <skip />
+ <string name="widgets_full_sheet_search_bar_hint" msgid="8484659090860596457">"खोज्नुहोस्"</string>
+ <string name="widgets_full_sheet_cancel_button_description" msgid="5766167035728653605">"खोज बाकसमा भएको पाठ हटाउनुहोस्"</string>
+ <string name="no_widgets_available" msgid="9140948620298620513">"कुनै पनि विजेट उपलब्ध छैन"</string>
+ <string name="no_search_results" msgid="6518732304311458580">"कुनै पनि खोज परिणाम भेटिएन"</string>
+ <string name="widgets_full_sheet_personal_tab" msgid="2743540105607120182">"व्यक्तिगत"</string>
+ <string name="widgets_full_sheet_work_tab" msgid="3767150027110633765">"कामसम्बन्धी"</string>
+ <string name="widget_category_conversations" msgid="8894438636213590446">"वार्तालापहरू"</string>
<string name="all_apps_search_bar_hint" msgid="1390553134053255246">"खोजसम्बन्धी एपहरू"</string>
<string name="all_apps_loading_message" msgid="5813968043155271636">"एपहरू लोड गर्दै…"</string>
<string name="all_apps_no_search_results" msgid="3200346862396363786">"\"<xliff:g id="QUERY">%1$s</xliff:g>\" सँग मिल्दो कुनै एप भेटिएन"</string>
<string name="all_apps_search_market_message" msgid="1366263386197059176">"थप एपहरू खोज्नुहोस्"</string>
<string name="label_application" msgid="8531721983832654978">"एप"</string>
<string name="notifications_header" msgid="1404149926117359025">"सूचनाहरू"</string>
- <!-- no translation found for long_press_shortcut_to_add (5405328730817637737) -->
- <skip />
- <!-- no translation found for long_accessible_way_to_add_shortcut (2199537273817090740) -->
- <skip />
+ <string name="long_press_shortcut_to_add" msgid="5405328730817637737">"कुनै सर्टकट सार्न डबल ट्याप गरेर छोइराख्नुहोस्।"</string>
+ <string name="long_accessible_way_to_add_shortcut" msgid="2199537273817090740">"कुनै सर्टकट सार्न वा आफ्नो रोजाइका कारबाही प्रयोग गर्न डबल ट्याप गरेर छोइराख्नुहोस्।"</string>
<string name="out_of_space" msgid="4691004494942118364">"यो गृह स्क्रिनमा कुनै थप ठाउँ छैन।"</string>
<string name="hotseat_out_of_space" msgid="7448809638125333693">"मन पर्ने ट्रे अब कुनै ठाँउ छैन"</string>
<string name="all_apps_button_label" msgid="8130441508702294465">"एपको सूची"</string>
@@ -124,8 +118,7 @@
<string name="abandoned_search" msgid="891119232568284442">"खोजी गर्नुहोस्"</string>
<string name="abandoned_promises_title" msgid="7096178467971716750">"यो एप स्थापित छैन"</string>
<string name="abandoned_promise_explanation" msgid="3990027586878167529">"यो प्रतिमाका लागि एपलाई स्थापना गरिएको छैन। तपाईं यसलाई हटाउन, वा एप खोजी र स्वयं यो स्थापित गर्न सक्नुहुन्छ।"</string>
- <!-- no translation found for app_installing_title (5864044122733792085) -->
- <skip />
+ <string name="app_installing_title" msgid="5864044122733792085">"<xliff:g id="NAME">%1$s</xliff:g> इन्स्टल गरिँदै छ, <xliff:g id="PROGRESS">%2$s</xliff:g> पूरा भयो"</string>
<string name="app_downloading_title" msgid="8336702962104482644">"<xliff:g id="NAME">%1$s</xliff:g> डाउनलोड गर्दै, <xliff:g id="PROGRESS">%2$s</xliff:g> सम्पन्न"</string>
<string name="app_waiting_download_title" msgid="7053938513995617849">"<xliff:g id="NAME">%1$s</xliff:g> स्थापना गर्न प्रतीक्षा गर्दै"</string>
<string name="widgets_list" msgid="796804551140113767">"विजेटहरूको सूची"</string>
@@ -165,20 +158,13 @@
<string name="work_profile_edu_next" msgid="8783418929296503629">"अर्को"</string>
<string name="work_profile_edu_accept" msgid="6069788082535149071">"बुझेँ"</string>
<string name="work_apps_paused_title" msgid="2389865654362803723">"कार्यालयको प्रोफाइल अस्थायी रूपमा रोक्का गरिएको छ"</string>
- <!-- no translation found for work_apps_paused_body (4209084728264328628) -->
- <skip />
- <!-- no translation found for work_apps_paused_content_description (4473292417145736203) -->
- <skip />
- <!-- no translation found for work_apps_paused_edu_banner (8872412121608402058) -->
- <skip />
- <!-- no translation found for work_apps_paused_edu_accept (6377476824357318532) -->
- <skip />
- <!-- no translation found for work_apps_pause_btn_text (4669288269140620646) -->
- <skip />
- <!-- no translation found for work_apps_enable_btn_text (82111102541971856) -->
- <skip />
- <!-- no translation found for developer_options_filter_hint (5896817443635989056) -->
- <skip />
+ <string name="work_apps_paused_body" msgid="4209084728264328628">"कामसम्बन्धी एपहरूले तपाईंलाई सूचना पठाउन, तपाईंको डिभाइसको ब्याट्री प्रयोग गर्न वा तपाईंको स्थान हेर्न सक्दैनन्"</string>
+ <string name="work_apps_paused_content_description" msgid="4473292417145736203">"कामसम्बन्धी प्रोफाइल अस्थायी रूपमा रोक्का गरिएको छ। कामसम्बन्धी एपहरूले तपाईंलाई सूचना पठाउन, तपाईंको डिभाइसको ब्याट्री प्रयोग गर्न वा तपाईंको स्थान हेर्न सक्दैनन्"</string>
+ <string name="work_apps_paused_edu_banner" msgid="8872412121608402058">"कामसम्बन्धी एपमा ब्याज अङ्कित हुन्छ र तपाईंका IT एड्मिन ती एप हेर्न सक्नुहुन्छ"</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="82111102541971856">"अन गर्नुहोस्"</string>
+ <string name="developer_options_filter_hint" msgid="5896817443635989056">"फिल्टर"</string>
<string name="work_switch_tip" msgid="808075064383839144">"कामसम्बन्धी एप र सूचनाहरू अस्थायी रूपमा रोक्का गर्नुहोस्"</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 5af9252..d4478b7 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Dubbeltik en houd vast om een widget te verplaatsen of aangepaste acties te gebruiken."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d breed en %2$d hoog"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Tik en houd vast om handmatig te plaatsen"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Automatisch toevoegen"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgets</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> widget</item>
diff --git a/res/values-or/strings.xml b/res/values-or/strings.xml
index 8505c8e..3595f33 100644
--- a/res/values-or/strings.xml
+++ b/res/values-or/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"ଏକ ୱିଜେଟକୁ ମୁଭ୍ କରିବା ପାଇଁ ଦୁଇଥର-ଟାପ୍ କରି ଧରି ରଖନ୍ତୁ କିମ୍ବା କଷ୍ଟମ୍ କାର୍ଯ୍ୟଗୁଡ଼ିକୁ ବ୍ୟବହାର କରନ୍ତୁ।"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d ଓସାର ଓ %2$d ଉଚ୍ଚ"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"ମାନୁଆଲ୍ ଭାବରେ ରଖିବାକୁ ସ୍ପର୍ଶ କରନ୍ତୁ ଏବଂ ଧରି ରଖନ୍ତୁ"</string>
- <string name="place_automatically" msgid="8064208734425456485">"ସ୍ୱଚାଳିତ ଭାବେ ଯୋଗ କରନ୍ତୁ"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g>ଟି ୱିଜେଟ୍</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g>ଟି ୱିଜେଟ୍</item>
diff --git a/res/values-pa/strings.xml b/res/values-pa/strings.xml
index f97f255..355e303 100644
--- a/res/values-pa/strings.xml
+++ b/res/values-pa/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"ਵਿਜੇਟ ਲਿਜਾਉਣ ਲਈ ਜਾਂ ਵਿਉਂਂਤੀਆਂ ਕਾਰਵਾਈਆਂ ਵਰਤਣ ਲਈ ਦੋ ਵਾਰ ਟੈਪ ਕਰਕੇ ਦਬਾ ਕੇ ਰੱਖੋ।"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d ਚੌੜਾਈ ਅਤੇ %2$d ਲੰਬਾਈ"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"ਹੱਥੀਂ ਰੱਖਣ ਲਈ ਸਪਰਸ਼ ਕਰਕੇ ਰੱਖੋ"</string>
- <string name="place_automatically" msgid="8064208734425456485">"ਸਵੈਚਲਿਤ ਤੌਰ \'ਤੇ ਸ਼ਾਮਲ ਕਰੋ"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> ਵਿਜੇਟ</item>
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> ਵਿਜੇਟ</item>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 06074e0..306a9a0 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Naciśnij dwukrotnie i przytrzymaj, aby przenieść widżet lub użyć działań niestandardowych."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"Szerokość %1$d, wysokość %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Kliknij i przytrzymaj, by umieścić ręcznie"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Dodaj automatycznie"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="few"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widżety</item>
<item quantity="many"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widżetów</item>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index fa2a50e..a104931 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Toque duas vezes sem soltar para mover um widget ou utilizar ações personalizadas."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d de largura por %2$d de altura"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Toque sem soltar para colocar manualmente"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Adicionar automaticamente"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgets</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> widget</item>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 165a013..35d1e5d 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Toque duas vezes e mantenha a tela pressionada para mover um widget ou usar ações personalizadas."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d de largura por %2$d de altura"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Toque e mantenha pressionado para mover manualmente"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Adicionar automaticamente"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widget</item>
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgets</item>
@@ -51,7 +53,7 @@
<string name="widgets_full_sheet_personal_tab" msgid="2743540105607120182">"Pessoal"</string>
<string name="widgets_full_sheet_work_tab" msgid="3767150027110633765">"Trabalho"</string>
<string name="widget_category_conversations" msgid="8894438636213590446">"Conversas"</string>
- <string name="all_apps_search_bar_hint" msgid="1390553134053255246">"Apps de pesquisa"</string>
+ <string name="all_apps_search_bar_hint" msgid="1390553134053255246">"Pesquisar apps"</string>
<string name="all_apps_loading_message" msgid="5813968043155271636">"Carregando apps…"</string>
<string name="all_apps_no_search_results" msgid="3200346862396363786">"Nenhum app encontrado que corresponda a \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
<string name="all_apps_search_market_message" msgid="1366263386197059176">"Pesquisar mais apps"</string>
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index 20b3353..f614b18 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Atingeți de două ori și țineți apăsat pentru a muta un widget sau folosiți acțiuni personalizate."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d lățime și %2$d înălțime"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Atingeți lung pentru a plasa manual"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Adăugați automat"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="few"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgeturi</item>
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> de widgeturi</item>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 24aabc5..3336b0b 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Чтобы использовать специальные действия или перенести виджет, нажмите на него дважды и удерживайте."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d x %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"Ширина %1$d, высота %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Нажмите и удерживайте, чтобы добавить вручную."</string>
- <string name="place_automatically" msgid="8064208734425456485">"Добавить автоматически"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> виджет</item>
<item quantity="few"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> виджета</item>
diff --git a/res/values-si/strings.xml b/res/values-si/strings.xml
index 22baa2a..fa3287d 100644
--- a/res/values-si/strings.xml
+++ b/res/values-si/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"විජට් එකක් ගෙන යාමට හෝ අභිරුචි ක්රියා භාවිත කිරීමට දෙවරක් තට්ටු කර අල්ලා ගෙන සිටින්න."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"පළල %1$d උස %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"අතින් ස්ථානගත කිරීමට ස්පර්ශ කර අල්ලාගෙන සිටින්න"</string>
- <string name="place_automatically" msgid="8064208734425456485">"ස්වයංක්රියව එක් කරන්න"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one">විජට් <xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g></item>
<item quantity="other">විජට් <xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g></item>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index 1bcf528..bd90155 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Dvojitým klepnutím a pridržaním presuňte miniaplikáciu alebo použite vlastné akcie."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"šírka %1$d, výška %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Ak chcete položku umiestniť ručne, pridržte ju"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Pridať automaticky"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="few"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> miniaplikácie</item>
<item quantity="many"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgets</item>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index 9e60efb..df1db7e 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Dvakrat se dotaknite pripomočka in ga pridržite, da ga premaknete, ali pa uporabite dejanja po meri."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"Širina %1$d, višina %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Dotaknite se elementa in ga pridržite, da ga ročno dodate"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Samodejno dodaj"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> pripomoček</item>
<item quantity="two"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> pripomočka</item>
diff --git a/res/values-sq/strings.xml b/res/values-sq/strings.xml
index 1ed8070..4d97676 100644
--- a/res/values-sq/strings.xml
+++ b/res/values-sq/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Trokit dy herë dhe mbaje shtypur një miniapliikacion për ta zhvendosur atë ose për të përdorur veprimet e personalizuara."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d i gjerë me %2$d i lartë"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Prek dhe mbaj të shtypur për të vendosur në mënyrë manuale"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Shto automatikisht"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> miniaplikacione</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> miniaplikacion</item>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index 4809087..4103b00 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Двапут додирните и задржите да бисте померали виџет или користите прилагођене радње."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d×%2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"ширина од %1$d и висина од %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Додирните и задржите да бисте поставили ручно"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Аутоматски додај"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> виџет</item>
<item quantity="few"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> виџета</item>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index aad4e4e..fb3e8c1 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Tryck snabbt två gånger och håll kvar för att flytta en widget eller använda anpassade åtgärder."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d bred gånger %2$d hög"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Placera manuellt genom att trycka länge"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Lägg till automatiskt"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widgetar</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> widget</item>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index 3ff05e1..6caadaa 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Gusa mara mbili na ushikilie ili usogeze wijeti au utumie vitendo maalum."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"Upana wa %1$d na kimo cha %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Gusa na ushikilie ili uweke mwenyewe"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Ongeza kiotomatiki"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other">Wijeti <xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g></item>
<item quantity="one">Wijeti <xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g></item>
diff --git a/res/values-ta/strings.xml b/res/values-ta/strings.xml
index 9d565aa..a2bc2c5 100644
--- a/res/values-ta/strings.xml
+++ b/res/values-ta/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"விட்ஜெட்டை நகர்த்த இருமுறை தட்டிப் பிடிக்கவும் அல்லது பிரத்தியேகச் செயல்களைப் பயன்படுத்தவும்."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d அகலத்திற்கு %2$d உயரம்"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"நீங்களே சேர்க்க, தொட்டுப் பிடித்திருக்கவும்"</string>
- <string name="place_automatically" msgid="8064208734425456485">"தானாகவே சேர்"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> விட்ஜெட்டுகள்</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> விட்ஜெட்</item>
diff --git a/res/values-te/strings.xml b/res/values-te/strings.xml
index 344f455..478bd02 100644
--- a/res/values-te/strings.xml
+++ b/res/values-te/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"విడ్జెట్ను తరలించడానికి లేదా అనుకూల చర్యలను ఉపయోగించడానికి రెండుసార్లు నొక్కండి & హోల్డ్ చేయి."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d వెడల్పు X %2$d ఎత్తు"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"మాన్యువల్గా ఉంచడానికి నొక్కి, పట్టుకోండి"</string>
- <string name="place_automatically" msgid="8064208734425456485">"ఆటోమేటిక్గా జోడించు"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> విడ్జెట్లు</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> విడ్జెట్</item>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index ea6a7c2..1b79b9c 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"แตะสองครั้งค้างไว้เพื่อย้ายวิดเจ็ตหรือใช้การดำเนินการที่กำหนดเอง"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"กว้าง %1$d x สูง %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"แตะค้างไว้เพื่อวางด้วยตัวเอง"</string>
- <string name="place_automatically" msgid="8064208734425456485">"เพิ่มโดยอัตโนมัติ"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other">วิดเจ็ต <xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> รายการ</item>
<item quantity="one">วิดเจ็ต <xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> รายการ</item>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index f112ec9..58e8c8a 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"I-double tap at pindutin nang matagal para ilipat ang widget o gumamit ng mga custom na pagkilos."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d ang lapad at %2$d ang taas"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Pindutin nang matagal para manual na ilagay"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Awtomatikong idagdag"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widget</item>
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> na widget</item>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 9936538..bc6ad44 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Widget\'ı taşımak veya özel işlemleri kullanmak için iki kez dokunup basılı tutun."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"genişlik: %1$d, yükseklik: %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Manuel olarak yerleştirmek için dokunun ve basılı tutun"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Otomatik olarak ekle"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> widget</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> widget</item>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index 87ae581..fdba5e61 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Двічі натисніть і втримуйте віджет, щоб перемістити його або виконати інші дії."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"Ширина – %1$d, висота – %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Натисніть і утримуйте, щоб додати вручну"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Додати автоматично"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> віджет</item>
<item quantity="few"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> віджети</item>
diff --git a/res/values-ur/strings.xml b/res/values-ur/strings.xml
index 2ee66b0..8cc578c 100644
--- a/res/values-ur/strings.xml
+++ b/res/values-ur/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"ویجیٹ کو منتقل کرنے یا حسب ضرورت کارروائیاں استعمال کرنے کے لیے دوبار تھپتھپائیں اور پکڑ کر رکھیں۔"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d چوڑا اور %2$d اونچا"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"دستی طور پر رکھنے کیلئے ٹچ کر کے دبائے رکھیں"</string>
- <string name="place_automatically" msgid="8064208734425456485">"خود کار طور پر شامل کریں"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> ویجیٹس</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> ویجیٹ</item>
diff --git a/res/values-uz/strings.xml b/res/values-uz/strings.xml
index d31aea9..1ab449d 100644
--- a/res/values-uz/strings.xml
+++ b/res/values-uz/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Ikki marta bosib va bosib turgan holatda vidjetni tanlang yoki maxsus amaldan foydalaning."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"Eni %1$d, bo‘yi %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Joylash uchun bosib turing"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Avtomatik chiqarish"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> ta vidjet</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> ta vidjet</item>
diff --git a/res/values-v31/colors.xml b/res/values-v31/colors.xml
index 87afd6b..7f27bf8 100644
--- a/res/values-v31/colors.xml
+++ b/res/values-v31/colors.xml
@@ -32,4 +32,7 @@
<color name="text_color_primary_dark">@android:color/system_neutral1_50</color>
<color name="text_color_secondary_dark">@android:color/system_neutral2_200</color>
<color name="text_color_tertiary_dark">@android:color/system_neutral2_400</color>
+
+ <color name="wallpaper_popup_scrim">@android:color/system_neutral1_900</color>
+
</resources>
\ No newline at end of file
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index 318d453..acb101b 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Nhấn đúp và giữ để di chuyển một tiện ích hoặc sử dụng các thao tác tùy chỉnh."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"Rộng %1$d x cao %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Chạm và giữ để thêm theo cách thủ công"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Tự động thêm"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> tiện ích</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> tiện ích</item>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index f9628b2..d79f181 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"点按两次并按住微件即可移动该微件或使用自定义操作。"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"宽 %1$d,高 %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"轻触并按住即可手动放置"</string>
- <string name="place_automatically" msgid="8064208734425456485">"自动添加"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> 个微件</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> 个微件</item>
diff --git a/res/values-zh-rHK/strings.xml b/res/values-zh-rHK/strings.xml
index 8929aa8..5b06896 100644
--- a/res/values-zh-rHK/strings.xml
+++ b/res/values-zh-rHK/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"㩒兩下之後㩒住,就可以郁小工具或者用自訂操作。"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d 闊,%2$d 高"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"按住即可手動新增"</string>
- <string name="place_automatically" msgid="8064208734425456485">"自動新增"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> 個小工具</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> 個小工具</item>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index c6f933c..9566a8c 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"輕觸兩下並按住即可移動小工具或使用自訂操作。"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"寬度為 %1$d,高度為 %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"按住圖示即可手動新增"</string>
- <string name="place_automatically" msgid="8064208734425456485">"自動新增"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> 項小工具</item>
<item quantity="one"><xliff:g id="WIDGETS_COUNT_0">%1$d</xliff:g> 項小工具</item>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index 8296853..0da9ed7 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -32,8 +32,10 @@
<string name="long_accessible_way_to_add" msgid="2733588281439571974">"Thepha kabili uphinde ubambe ukuze uhambise iwijethi noma usebenzise izindlela ezingokwezifiso."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d ububanzi ngokungu-%2$d ukuya phezulu"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Thinta futhi ubambe ukuze ubeke ngokwenza"</string>
- <string name="place_automatically" msgid="8064208734425456485">"Engeza ngokuzenzakalelayo"</string>
+ <!-- no translation found for add_item_request_drag_hint (5653291305078645405) -->
+ <skip />
+ <!-- no translation found for add_to_home_screen (8631549138215492708) -->
+ <skip />
<plurals name="widgets_count" formatted="false" msgid="656794749266073027">
<item quantity="one">Amawijethi angu-<xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g></item>
<item quantity="other">Amawijethi angu-<xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g></item>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 7fe53d5..93d88c2 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -19,7 +19,6 @@
<!-- Attributes used for launcher theme -->
<attr name="allAppsScrimColor" format="color" />
- <attr name="allAppsInterimScrimAlpha" format="integer" />
<attr name="allAppsNavBarScrimColor" format="color" />
<attr name="allAppsTheme" format="reference" />
<attr name="popupColorNeutral" format="color" />
@@ -36,6 +35,7 @@
<attr name="widgetsTheme" format="reference" />
<attr name="iconOnlyShortcutColor" format="color" />
<attr name="eduHalfSheetBGColor" format="color" />
+ <attr name="overviewScrimColor" format="color" />
<attr name="folderDotColor" format="color" />
<attr name="folderFillColor" format="color" />
@@ -80,7 +80,8 @@
<attr name="ambientShadowBlur" format="dimension" />
<attr name="keyShadowColor" format="color" />
<attr name="keyShadowBlur" format="dimension" />
- <attr name="keyShadowOffset" format="dimension" />
+ <attr name="keyShadowOffsetX" format="dimension" />
+ <attr name="keyShadowOffsetY" format="dimension" />
</declare-styleable>
<!-- PagedView specific attributes. These attributes are used to customize
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 8a2cada..83d2deb 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -57,4 +57,6 @@
<color name="text_color_secondary_dark">#FFFFFFFF</color>
<color name="text_color_tertiary_dark">#CCFFFFFF</color>
+ <color name="wallpaper_popup_scrim">?android:attr/colorAccent</color>
+
</resources>
diff --git a/res/values/config.xml b/res/values/config.xml
index b75af7f..1e78373 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -35,7 +35,7 @@
<!-- Workspace -->
<!-- The duration (in ms) of the fade animation on the object outlines, used when
we are dragging objects around on the home screen. -->
- <integer name="config_dragOutlineFadeTime">900</integer>
+ <integer name="config_dragOutlineFadeTime">500</integer>
<!-- The alpha value at which to show the most recent drop visualization outline. -->
<integer name="config_dragOutlineMaxAlpha">255</integer>
@@ -216,9 +216,6 @@
<item>@dimen/c2_d</item>
</array>
- <string-array name="live_wallpapers_remove_sysui_scrims">
- </string-array>
-
<string-array name="filtered_components" ></string-array>
<!-- Name of the class used to generate colors from the wallpaper colors. Must be implementing the LauncherAppWidgetHostView.ColorGenerator interface. -->
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 600a550..a57ccde 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -158,7 +158,7 @@
<!-- Dragging -->
<!-- Drag padding to add to the bottom of drop targets -->
<dimen name="drop_target_drag_padding">14dp</dimen>
- <dimen name="drop_target_text_size">14sp</dimen>
+ <dimen name="drop_target_text_size">20sp</dimen>
<dimen name="drop_target_shadow_elevation">2dp</dimen>
<!-- the distance an icon must be dragged before button drop targets accept it -->
@@ -293,7 +293,7 @@
<dimen name="overview_task_margin">0dp</dimen>
<!-- Workspace grid visualization parameters -->
- <dimen name="grid_visualization_rounding_radius">28dp</dimen>
+ <dimen name="grid_visualization_rounding_radius">22dp</dimen>
<dimen name="grid_visualization_cell_spacing">6dp</dimen>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 0f937fa..d6936ab 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -55,10 +55,11 @@
<string name="widget_dims_format">%1$d \u00d7 %2$d</string>
<!-- Accessibility spoken message format for the dimensions of a widget in the drawer -->
<string name="widget_accessible_dims_format">%1$d wide by %2$d high</string>
- <!-- Message to tell the user to press and hold a widget/icon to add it -->
- <string name="add_item_request_drag_hint">Touch & hold to place manually</string>
- <!-- Button label to automatically add icon on home screen [CHAR_LIMIT=50] -->
- <string name="place_automatically">Add automatically</string>
+ <!-- Message to tell the user to press and hold a widget/icon to add it to the home screen.
+ [CHAR LIMIT=NONE] -->
+ <string name="add_item_request_drag_hint">Touch & hold the widget to move it around the Home screen</string>
+ <!-- Button label to automatically add a widget to home screen [CHAR_LIMIT=50] -->
+ <string name="add_to_home_screen">Add to Home screen</string>
<!-- Label for showing the number of widgets an app has in the full widgets picker.
[CHAR_LIMIT=25] -->
<plurals name="widgets_count">
diff --git a/res/values/styles.xml b/res/values/styles.xml
index bae1485..97a5760 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -32,7 +32,6 @@
<style name="LauncherTheme" parent="@style/BaseLauncherTheme">
<item name="android:textColorSecondary">#DE000000</item>
<item name="allAppsScrimColor">?android:attr/colorBackgroundFloating</item>
- <item name="allAppsInterimScrimAlpha">46</item>
<item name="allAppsNavBarScrimColor">#66FFFFFF</item>
<item name="allAppsTheme">@style/AllAppsTheme</item>
<item name="popupColorNeutral">@color/popup_color_neutral_light</item>
@@ -43,8 +42,8 @@
<item name="isWorkspaceDarkText">false</item>
<item name="workspaceTextColor">@color/workspace_text_color_light</item>
<item name="workspaceShadowColor">#B0000000</item>
- <item name="workspaceAmbientShadowColor">#33000000</item>
- <item name="workspaceKeyShadowColor">#44000000</item>
+ <item name="workspaceAmbientShadowColor">#00000000</item>
+ <item name="workspaceKeyShadowColor">#89000000</item>
<item name="workspaceStatusBarScrim">@drawable/workspace_bg</item>
<item name="widgetsTheme">@style/WidgetContainerTheme</item>
<item name="folderDotColor">?android:attr/colorPrimary</item>
@@ -58,6 +57,7 @@
<item name="eduHalfSheetBGColor">?android:attr/colorAccent</item>
<item name="disabledIconAlpha">.54</item>
<item name="gridColor">?android:attr/colorAccent</item>
+ <item name="overviewScrimColor">@color/overview_scrim</item>
<item name="android:windowTranslucentStatus">false</item>
<item name="android:windowTranslucentNavigation">false</item>
@@ -77,7 +77,6 @@
<style name="LauncherTheme.DarkText" parent="@style/LauncherTheme">
<item name="workspaceTextColor">@color/workspace_text_color_dark</item>
- <item name="allAppsInterimScrimAlpha">128</item>
<item name="workspaceShadowColor">@android:color/transparent</item>
<item name="workspaceAmbientShadowColor">@android:color/transparent</item>
<item name="workspaceKeyShadowColor">@android:color/transparent</item>
@@ -97,7 +96,6 @@
<item name="android:colorControlHighlight">#A0FFFFFF</item>
<item name="android:colorPrimary">#FF212121</item>
<item name="allAppsScrimColor">?android:attr/colorBackgroundFloating</item>
- <item name="allAppsInterimScrimAlpha">102</item>
<item name="allAppsNavBarScrimColor">#80000000</item>
<item name="allAppsTheme">@style/AllAppsTheme.Dark</item>
<item name="popupColorNeutral">@color/popup_color_neutral_dark</item>
@@ -115,6 +113,7 @@
<item name="iconOnlyShortcutColor">#B3FFFFFF</item>
<item name="workProfileOverlayTextColor">@android:color/white</item>
<item name="eduHalfSheetBGColor">#DD000000</item>
+ <item name="overviewScrimColor">@color/overview_scrim_dark</item>
</style>
<style name="LauncherTheme.Dark.DarkMainColor" parent="@style/LauncherTheme.Dark">
@@ -125,7 +124,6 @@
<style name="LauncherTheme.Dark.DarkText" parent="@style/LauncherTheme.Dark">
<item name="android:colorControlHighlight">#75212121</item>
- <item name="allAppsInterimScrimAlpha">25</item>
<item name="folderFillColor">#CDFFFFFF</item>
<item name="folderTextColor">?attr/workspaceTextColor</item>
<item name="workspaceTextColor">@color/workspace_text_color_dark</item>
@@ -245,8 +243,9 @@
<item name="ambientShadowColor">?attr/workspaceAmbientShadowColor</item>
<item name="ambientShadowBlur">2.5dp</item>
<item name="keyShadowColor">?attr/workspaceKeyShadowColor</item>
- <item name="keyShadowBlur">1dp</item>
- <item name="keyShadowOffset">.5dp</item>
+ <item name="keyShadowBlur">.5dp</item>
+ <item name="keyShadowOffsetX">.5dp</item>
+ <item name="keyShadowOffsetY">.5dp</item>
</style>
<!-- Theme for the popup container -->
@@ -259,14 +258,11 @@
<item name="android:drawablePadding">7.5dp</item>
<item name="android:paddingLeft">16dp</item>
<item name="android:paddingRight">16dp</item>
- <item name="android:textColor">?attr/workspaceTextColor</item>
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">@dimen/drop_target_text_size</item>
<item name="android:singleLine">true</item>
<item name="android:ellipsize">end</item>
- <item name="android:shadowColor">?attr/workspaceShadowColor</item>
- <item name="android:shadowDx">0.0</item>
- <item name="android:shadowDy">1.0</item>
- <item name="android:shadowRadius">4.0</item>
+ <item name="android:background">@drawable/drop_target_frame</item>
</style>
<style name="DropTargetButton" parent="DropTargetButtonBase" />
diff --git a/src/com/android/launcher3/BaseActivity.java b/src/com/android/launcher3/BaseActivity.java
index f77f7e8..f64ce5c 100644
--- a/src/com/android/launcher3/BaseActivity.java
+++ b/src/com/android/launcher3/BaseActivity.java
@@ -17,7 +17,7 @@
package com.android.launcher3;
import static com.android.launcher3.model.WidgetsModel.GO_DISABLE_WIDGETS;
-import static com.android.launcher3.util.SystemUiController.UI_STATE_OVERVIEW;
+import static com.android.launcher3.util.SystemUiController.UI_STATE_FULLSCREEN_TASK;
import static java.lang.annotation.RetentionPolicy.SOURCE;
@@ -39,6 +39,7 @@
import com.android.launcher3.util.SystemUiController;
import com.android.launcher3.util.ViewCache;
import com.android.launcher3.views.ActivityContext;
+import com.android.launcher3.views.ScrimView;
import java.io.PrintWriter;
import java.lang.annotation.Retention;
@@ -157,6 +158,10 @@
return mSystemUiController;
}
+ public ScrimView getScrimView() {
+ return null;
+ }
+
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
@@ -197,7 +202,7 @@
// Reset the overridden sysui flags used for the task-swipe launch animation, this is a
// catch all for if we do not get resumed (and therefore not paused below)
- getSystemUiController().updateUiState(UI_STATE_OVERVIEW, 0);
+ getSystemUiController().updateUiState(UI_STATE_FULLSCREEN_TASK, 0);
}
@Override
@@ -209,7 +214,7 @@
// here instead of at the end of the animation because the start of the new activity does
// not happen immediately, which would cause us to reset to launcher's sysui flags and then
// back to the new app (causing a flash)
- getSystemUiController().updateUiState(UI_STATE_OVERVIEW, 0);
+ getSystemUiController().updateUiState(UI_STATE_FULLSCREEN_TASK, 0);
}
@Override
diff --git a/src/com/android/launcher3/BaseDraggingActivity.java b/src/com/android/launcher3/BaseDraggingActivity.java
index 4c5f9f2..2c76e52 100644
--- a/src/com/android/launcher3/BaseDraggingActivity.java
+++ b/src/com/android/launcher3/BaseDraggingActivity.java
@@ -18,8 +18,12 @@
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_APP_LAUNCH_TAP;
import static com.android.launcher3.util.DisplayController.CHANGE_ROTATION;
+import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import android.app.ActivityOptions;
+import android.app.WallpaperColors;
+import android.app.WallpaperManager;
+import android.app.WallpaperManager.OnColorsChangedListener;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
@@ -54,7 +58,6 @@
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.touch.ItemClickHandler;
-import com.android.launcher3.uioverrides.WallpaperColorInfo;
import com.android.launcher3.util.ActivityOptionsWrapper;
import com.android.launcher3.util.DisplayController;
import com.android.launcher3.util.DisplayController.DisplayInfoChangeListener;
@@ -68,8 +71,9 @@
/**
* Extension of BaseActivity allowing support for drag-n-drop
*/
+@SuppressWarnings("NewApi")
public abstract class BaseDraggingActivity extends BaseActivity
- implements WallpaperColorInfo.OnChangeListener, DisplayInfoChangeListener {
+ implements OnColorsChangedListener, DisplayInfoChangeListener {
private static final String TAG = "BaseDraggingActivity";
@@ -89,13 +93,15 @@
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
-
mIsSafeModeEnabled = TraceHelper.allowIpcs("isSafeMode",
() -> getPackageManager().isSafeMode());
DisplayController.INSTANCE.get(this).addChangeListener(this);
// Update theme
- WallpaperColorInfo.INSTANCE.get(this).addOnChangeListener(this);
+ if (Utilities.ATLEAST_P) {
+ getSystemService(WallpaperManager.class)
+ .addOnColorsChangedListener(this, MAIN_EXECUTOR.getHandler());
+ }
int themeRes = Themes.getActivityThemeRes(this);
if (themeRes != mThemeRes) {
mThemeRes = themeRes;
@@ -114,7 +120,7 @@
}
@Override
- public void onExtractedColorsChanged(WallpaperColorInfo wallpaperColorInfo) {
+ public void onColorsChanged(WallpaperColors wallpaperColors, int which) {
updateTheme();
}
@@ -278,7 +284,9 @@
@Override
protected void onDestroy() {
super.onDestroy();
- WallpaperColorInfo.INSTANCE.get(this).removeOnChangeListener(this);
+ if (Utilities.ATLEAST_P) {
+ getSystemService(WallpaperManager.class).removeOnColorsChangedListener(this);
+ }
DisplayController.INSTANCE.get(this).removeChangeListener(this);
}
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java
index 2ace796..3d044d6 100644
--- a/src/com/android/launcher3/BubbleTextView.java
+++ b/src/com/android/launcher3/BubbleTextView.java
@@ -317,7 +317,8 @@
@UiThread
protected void applyIconAndLabel(ItemInfoWithIcon info) {
- FastBitmapDrawable iconDrawable = info.newIcon(getContext());
+ boolean useTheme = mDisplay == DISPLAY_WORKSPACE || mDisplay == DISPLAY_FOLDER;
+ FastBitmapDrawable iconDrawable = info.newIcon(getContext(), useTheme);
mDotParams.color = IconPalette.getMutedColor(info.bitmap.color, 0.54f);
setIcon(iconDrawable);
diff --git a/src/com/android/launcher3/ButtonDropTarget.java b/src/com/android/launcher3/ButtonDropTarget.java
index a26217c..00317f7 100644
--- a/src/com/android/launcher3/ButtonDropTarget.java
+++ b/src/com/android/launcher3/ButtonDropTarget.java
@@ -36,6 +36,8 @@
import android.widget.PopupWindow;
import android.widget.TextView;
+import androidx.appcompat.content.res.AppCompatResources;
+
import com.android.launcher3.anim.Interpolators;
import com.android.launcher3.dragndrop.DragController;
import com.android.launcher3.dragndrop.DragLayer;
@@ -142,6 +144,11 @@
}
}
+ private void setBackgroundDrawable(int resId) {
+ Drawable bd = AppCompatResources.getDrawable(getContext(), resId);
+ setBackground(bd);
+ }
+
@Override
public final void onDragEnter(DragObject d) {
if (!mAccessibleDrag && !mTextVisible) {
@@ -167,6 +174,7 @@
}
d.dragView.setAlpha(DRAG_VIEW_HOVER_OVER_OPACITY);
+ setBackgroundDrawable(R.drawable.drop_target_frame_hover);
if (d.stateAnnouncer != null) {
d.stateAnnouncer.cancel();
}
@@ -184,6 +192,7 @@
if (!d.dragComplete) {
d.dragView.setAlpha(1f);
+ setBackgroundDrawable(R.drawable.drop_target_frame);
} else {
d.dragView.setAlpha(DRAG_VIEW_HOVER_OVER_OPACITY);
}
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index c3816cc..2f755e1 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -502,7 +502,7 @@
}
private void updateBgAlpha() {
- mBackground.setAlpha((int) (mSpringLoadedProgress * mScrollProgress * 255));
+ mBackground.setAlpha((int) (mSpringLoadedProgress * 255));
}
/**
@@ -525,9 +525,12 @@
}
protected void visualizeGrid(Canvas canvas) {
- mVisualizeGridRect.set(mGridVisualizationPadding, mGridVisualizationPadding,
- mCellWidth - mGridVisualizationPadding,
- mCellHeight - mGridVisualizationPadding);
+ DeviceProfile dp = mActivity.getDeviceProfile();
+ int paddingX = (int) Math.min((mCellWidth - dp.iconSizePx) / 2, mGridVisualizationPadding);
+ int paddingY = (int) Math.min((mCellHeight - dp.iconSizePx) / 2, mGridVisualizationPadding);
+ mVisualizeGridRect.set(paddingX, paddingY,
+ mCellWidth - paddingX,
+ mCellHeight - paddingY);
mVisualizeGridPaint.setStrokeWidth(8);
int paintAlpha = (int) (120 * mGridAlpha);
@@ -537,9 +540,9 @@
for (int i = 0; i < mCountX; i++) {
for (int j = 0; j < mCountY; j++) {
int transX = i * mCellWidth + (i * mBorderSpacing) + getPaddingLeft()
- + mGridVisualizationPadding;
+ + paddingX;
int transY = j * mCellHeight + (j * mBorderSpacing) + getPaddingTop()
- + mGridVisualizationPadding;
+ + paddingY;
mVisualizeGridRect.offsetTo(transX, transY);
mVisualizeGridPaint.setStyle(Paint.Style.FILL);
@@ -560,14 +563,14 @@
int spanX = mDragOutlines[i].cellHSpan;
int spanY = mDragOutlines[i].cellVSpan;
- mVisualizeGridRect.set(mGridVisualizationPadding, mGridVisualizationPadding,
- mCellWidth * spanX - mGridVisualizationPadding,
- mCellHeight * spanY - mGridVisualizationPadding);
+ mVisualizeGridRect.set(paddingX, paddingY,
+ mCellWidth * spanX - paddingX,
+ mCellHeight * spanY - paddingY);
int transX = x * mCellWidth + (x * mBorderSpacing)
- + getPaddingLeft() + mGridVisualizationPadding;
+ + getPaddingLeft() + paddingX;
int transY = y * mCellHeight + (y * mBorderSpacing)
- + getPaddingTop() + mGridVisualizationPadding;
+ + getPaddingTop() + paddingY;
mVisualizeGridRect.offsetTo(transX, transY);
diff --git a/src/com/android/launcher3/DeleteDropTarget.java b/src/com/android/launcher3/DeleteDropTarget.java
index e46aad2..80ec192 100644
--- a/src/com/android/launcher3/DeleteDropTarget.java
+++ b/src/com/android/launcher3/DeleteDropTarget.java
@@ -53,7 +53,7 @@
@Override
protected void onFinishInflate() {
super.onFinishInflate();
- setDrawable(R.drawable.ic_remove_shadow);
+ setDrawable(R.drawable.ic_remove_no_shadow);
}
@Override
diff --git a/src/com/android/launcher3/ExtendedEditText.java b/src/com/android/launcher3/ExtendedEditText.java
index c79dabe..4312939 100644
--- a/src/com/android/launcher3/ExtendedEditText.java
+++ b/src/com/android/launcher3/ExtendedEditText.java
@@ -99,7 +99,7 @@
}
public void hideKeyboard() {
- UiThreadHelper.hideKeyboardAsync(getContext(), getWindowToken());
+ UiThreadHelper.hideKeyboardAsync(Launcher.getLauncher(getContext()), getWindowToken());
}
private boolean showSoftInput() {
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index a54c791..f640118 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1426,6 +1426,7 @@
return mDropTargetBar;
}
+ @Override
public ScrimView getScrimView() {
return mScrimView;
}
diff --git a/src/com/android/launcher3/LauncherAnimUtils.java b/src/com/android/launcher3/LauncherAnimUtils.java
index 803f8d2..b56c012 100644
--- a/src/com/android/launcher3/LauncherAnimUtils.java
+++ b/src/com/android/launcher3/LauncherAnimUtils.java
@@ -19,6 +19,8 @@
import android.animation.Animator;
import android.animation.Animator.AnimatorListener;
import android.animation.AnimatorListenerAdapter;
+import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.util.FloatProperty;
import android.util.IntProperty;
@@ -135,6 +137,22 @@
}
};
+ public static final IntProperty<View> VIEW_BACKGROUND_COLOR =
+ new IntProperty<View>("backgroundColor") {
+ @Override
+ public void setValue(View view, int color) {
+ view.setBackgroundColor(color);
+ }
+
+ @Override
+ public Integer get(View view) {
+ if (!(view.getBackground() instanceof ColorDrawable)) {
+ return Color.TRANSPARENT;
+ }
+ return ((ColorDrawable) view.getBackground()).getColor();
+ }
+ };
+
/**
* Utility method to create an {@link AnimatorListener} which executes a callback on animation
* cancel.
diff --git a/src/com/android/launcher3/LauncherRootView.java b/src/com/android/launcher3/LauncherRootView.java
index 83ddf64..f26cfe8 100644
--- a/src/com/android/launcher3/LauncherRootView.java
+++ b/src/com/android/launcher3/LauncherRootView.java
@@ -33,11 +33,12 @@
@ViewDebug.ExportedProperty(category = "launcher")
private boolean mForceHideBackArrow;
- private SysUiScrim mSysUiScrim;
+ private final SysUiScrim mSysUiScrim;
public LauncherRootView(Context context, AttributeSet attrs) {
super(context, attrs);
mActivity = StatefulActivity.fromContext(context);
+ mSysUiScrim = new SysUiScrim(this);
}
private void handleSystemWindowInsets(Rect insets) {
@@ -72,6 +73,7 @@
// modifying child layout params.
if (!insets.equals(mInsets)) {
super.setInsets(insets);
+ mSysUiScrim.onInsetsChanged(insets);
}
}
@@ -100,15 +102,9 @@
}
}
- public void setSysUiScrim(SysUiScrim scrim) {
- mSysUiScrim = scrim;
- }
-
@Override
protected void dispatchDraw(Canvas canvas) {
- if (mSysUiScrim != null) {
- mSysUiScrim.draw(canvas);
- }
+ mSysUiScrim.draw(canvas);
super.dispatchDraw(canvas);
}
@@ -117,6 +113,7 @@
super.onLayout(changed, l, t, r, b);
SYSTEM_GESTURE_EXCLUSION_RECT.get(0).set(l, t, r, b);
setDisallowBackGesture(mDisallowBackGesture);
+ mSysUiScrim.setSize(r - l, b - t);
}
@TargetApi(Build.VERSION_CODES.Q)
@@ -136,6 +133,10 @@
: Collections.emptyList());
}
+ public SysUiScrim getSysUiScrim() {
+ return mSysUiScrim;
+ }
+
public interface WindowStateListener {
void onWindowFocusChanged(boolean hasFocus);
diff --git a/src/com/android/launcher3/LauncherState.java b/src/com/android/launcher3/LauncherState.java
index 58df9c8..4c11725 100644
--- a/src/com/android/launcher3/LauncherState.java
+++ b/src/com/android/launcher3/LauncherState.java
@@ -30,6 +30,7 @@
import static com.android.launcher3.testing.TestProtocol.SPRING_LOADED_STATE_ORDINAL;
import android.content.Context;
+import android.graphics.Color;
import android.view.animation.Interpolator;
import com.android.launcher3.statemanager.BaseState;
@@ -217,8 +218,12 @@
return 0;
}
- public float getWorkspaceScrimAlpha(Launcher launcher) {
- return 0;
+ /**
+ * What color should the workspace scrim be in when at rest in this state.
+ * Return {@link Color#TRANSPARENT} for no scrim.
+ */
+ public int getWorkspaceScrimColor(Launcher launcher) {
+ return Color.TRANSPARENT;
}
/**
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index c9cc372..fb21698 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -388,12 +388,19 @@
}
protected void pageEndTransition() {
- if (mIsPageInTransition) {
+ if (mIsPageInTransition && !mIsBeingDragged && mScroller.isFinished()
+ && (!isShown() || (mEdgeGlowLeft.isFinished() && mEdgeGlowRight.isFinished()))) {
mIsPageInTransition = false;
onPageEndTransition();
}
}
+ @Override
+ public void onVisibilityAggregated(boolean isVisible) {
+ pageEndTransition();
+ super.onVisibilityAggregated(isVisible);
+ }
+
protected boolean isPageInTransition() {
return mIsPageInTransition;
}
@@ -1740,6 +1747,7 @@
public void draw(Canvas canvas) {
super.draw(canvas);
drawEdgeEffect(canvas);
+ pageEndTransition();
}
protected void drawEdgeEffect(Canvas canvas) {
diff --git a/src/com/android/launcher3/SecondaryDropTarget.java b/src/com/android/launcher3/SecondaryDropTarget.java
index 858b72e..05cef38 100644
--- a/src/com/android/launcher3/SecondaryDropTarget.java
+++ b/src/com/android/launcher3/SecondaryDropTarget.java
@@ -108,13 +108,13 @@
mCurrentAccessibilityAction = action;
if (action == UNINSTALL) {
- setDrawable(R.drawable.ic_uninstall_shadow);
+ setDrawable(R.drawable.ic_uninstall_no_shadow);
updateText(R.string.uninstall_drop_target_label);
} else if (action == DISMISS_PREDICTION) {
- setDrawable(R.drawable.ic_block_shadow);
+ setDrawable(R.drawable.ic_block_no_shadow);
updateText(R.string.dismiss_prediction_label);
} else if (action == RECONFIGURE) {
- setDrawable(R.drawable.ic_setup_shadow);
+ setDrawable(R.drawable.ic_setting);
updateText(R.string.gadget_setup_text);
}
}
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java
index 3312915..be5463e 100644
--- a/src/com/android/launcher3/Utilities.java
+++ b/src/com/android/launcher3/Utilities.java
@@ -65,6 +65,7 @@
import android.view.View;
import android.view.ViewConfiguration;
import android.view.animation.Interpolator;
+import android.widget.LinearLayout;
import androidx.core.graphics.ColorUtils;
import androidx.core.os.BuildCompat;
@@ -73,9 +74,9 @@
import com.android.launcher3.graphics.GridCustomizationsProvider;
import com.android.launcher3.graphics.TintedDrawableSpan;
import com.android.launcher3.icons.FastBitmapDrawable;
-import com.android.launcher3.icons.IconProvider;
import com.android.launcher3.icons.LauncherIcons;
import com.android.launcher3.icons.ShortcutCachingLogic;
+import com.android.launcher3.icons.ThemedIconDrawable.ThemedAdaptiveIcon;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.ItemInfoWithIcon;
import com.android.launcher3.pm.ShortcutConfigActivityInfo;
@@ -595,13 +596,23 @@
*/
public static Drawable getFullDrawable(Launcher launcher, ItemInfo info, int width, int height,
Object[] outObj) {
+ Drawable icon = loadFullDrawableWithoutTheme(launcher, info, width, height, outObj);
+ if (icon instanceof ThemedAdaptiveIcon) {
+ icon = ((ThemedAdaptiveIcon) icon).getThemedDrawable(launcher);
+ }
+ return icon;
+ }
+
+ private static Drawable loadFullDrawableWithoutTheme(Launcher launcher, ItemInfo info,
+ int width, int height, Object[] outObj) {
LauncherAppState appState = LauncherAppState.getInstance(launcher);
if (info.itemType == LauncherSettings.Favorites.ITEM_TYPE_APPLICATION) {
LauncherActivityInfo activityInfo = launcher.getSystemService(LauncherApps.class)
.resolveActivity(info.getIntent(), info.user);
outObj[0] = activityInfo;
- return activityInfo == null ? null : new IconProvider(launcher).getIcon(
- activityInfo, launcher.getDeviceProfile().inv.fillResIconDpi);
+ return activityInfo == null ? null : LauncherAppState.getInstance(launcher)
+ .getIconCache().getIconProvider().getIcon(
+ activityInfo, launcher.getDeviceProfile().inv.fillResIconDpi);
} else if (info.itemType == LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT) {
if (info instanceof PendingAddShortcutInfo) {
ShortcutConfigActivityInfo activityInfo =
@@ -752,6 +763,16 @@
ColorUtils.blendARGB(0, color, tintAmount));
}
+ /**
+ * Sets start margin on the provided {@param view} to be {@param margin}.
+ * Assumes {@param view} is a child of {@link LinearLayout}
+ */
+ public static void setStartMarginForView(View view, int margin) {
+ LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) view.getLayoutParams();
+ lp.setMarginStart(margin);
+ view.setLayoutParams(lp);
+ }
+
private static class FixedSizeEmptyDrawable extends ColorDrawable {
private final int mSize;
diff --git a/src/com/android/launcher3/WidgetPreviewLoader.java b/src/com/android/launcher3/WidgetPreviewLoader.java
index f43452c..75d25d7 100644
--- a/src/com/android/launcher3/WidgetPreviewLoader.java
+++ b/src/com/android/launcher3/WidgetPreviewLoader.java
@@ -457,10 +457,24 @@
drawable.setBounds(x, 0, x + previewWidth, previewHeight);
drawable.draw(c);
} else {
- RectF boxRect = drawBoxWithShadow(c, previewWidth, previewHeight);
+ RectF boxRect;
// Draw horizontal and vertical lines to represent individual columns.
final Paint p = new Paint(Paint.ANTI_ALIAS_FLAG);
+
+ if (Utilities.ATLEAST_S) {
+ boxRect = new RectF(/* left= */ 0, /* top= */ 0, /* right= */
+ previewWidth, /* bottom= */ previewHeight);
+
+ p.setStyle(Paint.Style.FILL);
+ p.setColor(Color.WHITE);
+ float roundedCorner = mContext.getResources().getDimension(
+ android.R.dimen.system_app_widget_background_radius);
+ c.drawRoundRect(boxRect, roundedCorner, roundedCorner, p);
+ } else {
+ boxRect = drawBoxWithShadow(c, previewWidth, previewHeight);
+ }
+
p.setStyle(Paint.Style.STROKE);
p.setStrokeWidth(mContext.getResources()
.getDimension(R.dimen.widget_preview_cell_divider_width));
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 0c3a356..05d6e04 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -2066,9 +2066,6 @@
if (mDragOverlappingLayout != null) {
mDragOverlappingLayout.setIsDragOverlapping(true);
}
- // Invalidating the scrim will also force this CellLayout
- // to be invalidated so that it is highlighted if necessary.
- mLauncher.getDragLayer().getWorkspaceDragScrim().invalidate();
}
public CellLayout getCurrentDragOverlappingLayout() {
diff --git a/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java b/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java
index ed854dc..c771e3e 100644
--- a/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java
+++ b/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java
@@ -34,9 +34,9 @@
import static com.android.launcher3.graphics.SysUiScrim.SYSUI_PROGRESS;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_HOTSEAT_SCALE;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_HOTSEAT_TRANSLATE;
+import static com.android.launcher3.states.StateAnimationConfig.ANIM_SCRIM_FADE;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_FADE;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_SCALE;
-import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_SCRIM_FADE;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_TRANSLATE;
import static com.android.launcher3.states.StateAnimationConfig.SKIP_SCRIM;
@@ -162,13 +162,13 @@
propertySetter.setFloat(workspaceDragScrim, SCRIM_PROGRESS,
state.getWorkspaceBackgroundAlpha(mLauncher), LINEAR);
- SysUiScrim sysUiScrim = mLauncher.getDragLayer().getSysUiScrim();
+ SysUiScrim sysUiScrim = mLauncher.getRootView().getSysUiScrim();
propertySetter.setFloat(sysUiScrim, SYSUI_PROGRESS,
state.hasFlag(FLAG_HAS_SYS_UI_SCRIM) ? 1 : 0, LINEAR);
- propertySetter.setViewAlpha(mLauncher.getScrimView(),
- state.getWorkspaceScrimAlpha(mLauncher),
- config.getInterpolator(ANIM_WORKSPACE_SCRIM_FADE, LINEAR));
+ propertySetter.setViewBackgroundColor(mLauncher.getScrimView(),
+ state.getWorkspaceScrimColor(mLauncher),
+ config.getInterpolator(ANIM_SCRIM_FADE, LINEAR));
}
public void applyChildState(LauncherState state, CellLayout cl, int childIndex) {
diff --git a/src/com/android/launcher3/anim/PendingAnimation.java b/src/com/android/launcher3/anim/PendingAnimation.java
index 9068331..8057475 100644
--- a/src/com/android/launcher3/anim/PendingAnimation.java
+++ b/src/com/android/launcher3/anim/PendingAnimation.java
@@ -16,6 +16,7 @@
package com.android.launcher3.anim;
import static com.android.launcher3.LauncherAnimUtils.SUCCESS_TRANSITION_PROGRESS;
+import static com.android.launcher3.LauncherAnimUtils.VIEW_BACKGROUND_COLOR;
import static com.android.launcher3.anim.AnimatorPlaybackController.addAnimationHoldersRecur;
import android.animation.Animator;
@@ -25,6 +26,7 @@
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;
@@ -85,6 +87,17 @@
}
@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) {
diff --git a/src/com/android/launcher3/anim/PropertySetter.java b/src/com/android/launcher3/anim/PropertySetter.java
index 2ce620b..729523f 100644
--- a/src/com/android/launcher3/anim/PropertySetter.java
+++ b/src/com/android/launcher3/anim/PropertySetter.java
@@ -41,6 +41,15 @@
}
/**
+ * Sets the background color of the provided view using the provided interpolator.
+ */
+ default void setViewBackgroundColor(View view, int color, TimeInterpolator interpolator) {
+ if (view != null) {
+ view.setBackgroundColor(color);
+ }
+ }
+
+ /**
* Updates the float property of the target using the provided interpolator
*/
default <T> void setFloat(T target, FloatProperty<T> property, float value,
diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java
index 1981a9c..d935032 100644
--- a/src/com/android/launcher3/config/FeatureFlags.java
+++ b/src/com/android/launcher3/config/FeatureFlags.java
@@ -141,8 +141,8 @@
public static final BooleanFlag MULTI_DB_GRID_MIRATION_ALGO = getDebugFlag(
"MULTI_DB_GRID_MIRATION_ALGO", true, "Use the multi-db grid migration algorithm");
- public static final BooleanFlag ENABLE_LAUNCHER_PREVIEW_IN_GRID_PICKER = getDebugFlag(
- "ENABLE_LAUNCHER_PREVIEW_IN_GRID_PICKER", true, "Show launcher preview in grid picker");
+ public static final BooleanFlag ENABLE_THEMED_ICONS = getDebugFlag(
+ "ENABLE_THEMED_ICONS", false, "Enable themed icons on workspace");
// Keep as DeviceFlag for remote disable in emergency.
public static final BooleanFlag ENABLE_OVERVIEW_SELECTIONS = new DeviceFlag(
@@ -155,7 +155,7 @@
"ENABLE_OVERVIEW_SHARE", false, "Show Share button in Overview Actions");
public static final BooleanFlag ENABLE_OVERVIEW_SHARING_TO_PEOPLE = getDebugFlag(
- "ENABLE_OVERVIEW_SHARING_TO_PEOPLE", false,
+ "ENABLE_OVERVIEW_SHARING_TO_PEOPLE", true,
"Show indicators for content on Overview to share with top people. ");
public static final BooleanFlag ENABLE_OVERVIEW_CONTENT_PUSH = getDebugFlag(
diff --git a/src/com/android/launcher3/dragndrop/DragController.java b/src/com/android/launcher3/dragndrop/DragController.java
index d7f6cdb..575b8fd 100644
--- a/src/com/android/launcher3/dragndrop/DragController.java
+++ b/src/com/android/launcher3/dragndrop/DragController.java
@@ -22,7 +22,6 @@
import static com.android.launcher3.Utilities.ATLEAST_Q;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
-import android.animation.ValueAnimator;
import android.content.ComponentName;
import android.content.res.Resources;
import android.graphics.Point;
@@ -307,17 +306,12 @@
mOptions.preDragCondition.onPreDragEnd(mDragObject, true /* dragStarted*/);
}
mIsInPreDrag = false;
+ mDragObject.dragView.onDragStart();
for (DragListener listener : new ArrayList<>(mListeners)) {
listener.onDragStart(mDragObject, mOptions);
}
}
- public void addFirstFrameAnimationHelper(ValueAnimator anim) {
- if (mDragObject != null && mDragObject.dragView != null) {
- mDragObject.dragView.mFirstFrameAnimatorHelper.addTo(anim);
- }
- }
-
public Optional<InstanceId> getLogInstanceId() {
return Optional.ofNullable(mDragObject)
.map(dragObject -> dragObject.logInstanceId);
diff --git a/src/com/android/launcher3/dragndrop/DragLayer.java b/src/com/android/launcher3/dragndrop/DragLayer.java
index 274e033..c2f609c 100644
--- a/src/com/android/launcher3/dragndrop/DragLayer.java
+++ b/src/com/android/launcher3/dragndrop/DragLayer.java
@@ -41,13 +41,11 @@
import com.android.launcher3.CellLayout;
import com.android.launcher3.DropTargetBar;
import com.android.launcher3.Launcher;
-import com.android.launcher3.LauncherRootView;
import com.android.launcher3.R;
import com.android.launcher3.ShortcutAndWidgetContainer;
import com.android.launcher3.Workspace;
import com.android.launcher3.folder.Folder;
import com.android.launcher3.graphics.Scrim;
-import com.android.launcher3.graphics.SysUiScrim;
import com.android.launcher3.keyboard.ViewGroupFocusHelper;
import com.android.launcher3.util.Thunk;
import com.android.launcher3.views.BaseDragLayer;
@@ -84,8 +82,6 @@
// Related to adjacent page hints
private final ViewGroupFocusHelper mFocusIndicatorHelper;
private Scrim mWorkspaceDragScrim;
- private SysUiScrim mSysUiScrim;
- private LauncherRootView mRootView;
/**
* Used to create a new DragLayer from XML.
@@ -107,12 +103,6 @@
mDragController = dragController;
recreateControllers();
mWorkspaceDragScrim = new Scrim(this);
-
- // We delegate drawing of the workspace scrim to LauncherRootView (one level up), so as
- // to avoid artifacts when translating the entire drag layer in the -1 transition.
- mRootView = (LauncherRootView) getParent();
- mSysUiScrim = new SysUiScrim(mRootView);
- mRootView.setSysUiScrim(mSysUiScrim);
}
@Override
@@ -526,23 +516,7 @@
super.dispatchDraw(canvas);
}
- @Override
- protected void onSizeChanged(int w, int h, int oldw, int oldh) {
- super.onSizeChanged(w, h, oldw, oldh);
- mSysUiScrim.setSize(w, h);
- }
-
- @Override
- public void setInsets(Rect insets) {
- super.setInsets(insets);
- mSysUiScrim.onInsetsChanged(insets, mAllowSysuiScrims);
- }
-
public Scrim getWorkspaceDragScrim() {
return mWorkspaceDragScrim;
}
-
- public SysUiScrim getSysUiScrim() {
- return mSysUiScrim;
- }
}
diff --git a/src/com/android/launcher3/dragndrop/DragView.java b/src/com/android/launcher3/dragndrop/DragView.java
index 68a8af2..30ee9ec 100644
--- a/src/com/android/launcher3/dragndrop/DragView.java
+++ b/src/com/android/launcher3/dragndrop/DragView.java
@@ -51,7 +51,6 @@
import androidx.dynamicanimation.animation.SpringAnimation;
import androidx.dynamicanimation.animation.SpringForce;
-import com.android.launcher3.FirstFrameAnimatorHelper;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.LauncherState;
@@ -62,6 +61,7 @@
import com.android.launcher3.icons.LauncherIcons;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.statemanager.StateManager.StateListener;
+import com.android.launcher3.util.RunnableList;
import com.android.launcher3.util.Thunk;
import com.android.launcher3.views.BaseDragLayer;
@@ -85,12 +85,13 @@
private final float mScaleOnDrop;
private final int[] mTempLoc = new int[2];
+ private final RunnableList mOnDragStartCallback = new RunnableList();
+
private Point mDragVisualizeOffset = null;
private Rect mDragRegion = null;
private final Launcher mLauncher;
private final DragLayer mDragLayer;
@Thunk final DragController mDragController;
- final FirstFrameAnimatorHelper mFirstFrameAnimatorHelper;
private boolean mHasDrawn = false;
final ValueAnimator mAnim;
@@ -136,7 +137,6 @@
mLauncher = launcher;
mDragLayer = launcher.getDragLayer();
mDragController = launcher.getDragController();
- mFirstFrameAnimatorHelper = new FirstFrameAnimatorHelper(this);
mContent = content;
mWidth = width;
@@ -276,7 +276,8 @@
}
mFgSpringDrawable.setBounds(bounds);
- new Handler(Looper.getMainLooper()).post(() -> {
+ new Handler(Looper.getMainLooper()).post(() -> mOnDragStartCallback.add(() -> {
+ // TODO: Consider fade-in animation
// Assign the variable on the UI thread to avoid race conditions.
mScaledMaskPath = mask;
// Avoid relayout as we do not care about children affecting layout
@@ -290,11 +291,18 @@
mBadge.setColorFilter(d.getColorFilter());
}
invalidate();
- });
+ }));
}
});
}
+ /**
+ * Called when pre-drag finishes for an icon
+ */
+ public void onDragStart() {
+ mOnDragStartCallback.executeAllAndDestroy();
+ }
+
// TODO(b/183609936): This is only for LauncherAppWidgetHostView that is rendered in a drawable.
// Once LauncherAppWidgetHostView is directly rendered in this view, removes this method.
@Override
diff --git a/src/com/android/launcher3/folder/PreviewBackground.java b/src/com/android/launcher3/folder/PreviewBackground.java
index 767fffe..5ddf84f 100644
--- a/src/com/android/launcher3/folder/PreviewBackground.java
+++ b/src/com/android/launcher3/folder/PreviewBackground.java
@@ -50,6 +50,8 @@
*/
public class PreviewBackground extends CellLayout.DelegatedCellDrawing {
+ private static final boolean DRAW_SHADOW = false;
+
private static final int CONSUMPTION_ANIMATION_DURATION = 100;
private final PorterDuffXfermode mShadowPorterDuffXfermode
@@ -163,13 +165,15 @@
// Stroke width is 1dp
mStrokeWidth = context.getResources().getDisplayMetrics().density;
- float radius = getScaledRadius();
- float shadowRadius = radius + mStrokeWidth;
- int shadowColor = Color.argb(SHADOW_OPACITY, 0, 0, 0);
- mShadowShader = new RadialGradient(0, 0, 1,
- new int[] {shadowColor, Color.TRANSPARENT},
- new float[] {radius / shadowRadius, 1},
- Shader.TileMode.CLAMP);
+ if (DRAW_SHADOW) {
+ float radius = getScaledRadius();
+ float shadowRadius = radius + mStrokeWidth;
+ int shadowColor = Color.argb(SHADOW_OPACITY, 0, 0, 0);
+ mShadowShader = new RadialGradient(0, 0, 1,
+ new int[]{shadowColor, Color.TRANSPARENT},
+ new float[]{radius / shadowRadius, 1},
+ Shader.TileMode.CLAMP);
+ }
invalidate();
}
@@ -239,6 +243,9 @@
}
public void drawShadow(Canvas canvas) {
+ if (!DRAW_SHADOW) {
+ return;
+ }
if (mShadowShader == null) {
return;
}
@@ -277,6 +284,9 @@
}
public void fadeInBackgroundShadow() {
+ if (!DRAW_SHADOW) {
+ return;
+ }
if (mShadowAnimator != null) {
mShadowAnimator.cancel();
}
diff --git a/src/com/android/launcher3/folder/PreviewItemManager.java b/src/com/android/launcher3/folder/PreviewItemManager.java
index 8244f01..6adef01 100644
--- a/src/com/android/launcher3/folder/PreviewItemManager.java
+++ b/src/com/android/launcher3/folder/PreviewItemManager.java
@@ -400,7 +400,7 @@
drawable.setLevel(item.getProgressLevel());
p.drawable = drawable;
} else {
- p.drawable = item.newIcon(mContext);
+ p.drawable = item.newIcon(mContext, true);
}
p.drawable.setBounds(0, 0, mIconSize, mIconSize);
p.item = item;
diff --git a/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java b/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java
index 31764c5..acfeeac 100644
--- a/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java
+++ b/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java
@@ -20,7 +20,6 @@
import static android.view.View.VISIBLE;
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_HOTSEAT_PREDICTION;
-import static com.android.launcher3.config.FeatureFlags.ENABLE_LAUNCHER_PREVIEW_IN_GRID_PICKER;
import static com.android.launcher3.model.ModelUtils.filterCurrentWorkspaceItems;
import static com.android.launcher3.model.ModelUtils.getMissingHotseatRanks;
import static com.android.launcher3.model.ModelUtils.sortWorkspaceItemsSpatially;
@@ -118,7 +117,7 @@
* 4) Measure and draw the view on a canvas
*/
@TargetApi(Build.VERSION_CODES.O)
-public class LauncherPreviewRenderer extends ContextThemeWrapper
+public class LauncherPreviewRenderer extends ContextWrapper
implements ActivityContext, WorkspaceLayoutManager, LayoutInflater.Factory2 {
private static final String TAG = "LauncherPreviewRenderer";
@@ -220,7 +219,7 @@
private final CellLayout mWorkspace;
public LauncherPreviewRenderer(Context context, InvariantDeviceProfile idp, boolean migrated) {
- super(context, R.style.AppTheme);
+ super(context);
mUiHandler = new Handler(Looper.getMainLooper());
mContext = context;
mIdp = idp;
@@ -271,14 +270,6 @@
return mRootView;
}
- public boolean shouldShowRealLauncherPreview() {
- return ENABLE_LAUNCHER_PREVIEW_IN_GRID_PICKER.get();
- }
-
- public boolean shouldShowQsb() {
- return FeatureFlags.QSB_ON_FIRST_SCREEN;
- }
-
@Override
public View onCreateView(View parent, String name, Context context, AttributeSet attrs) {
if ("TextClock".equals(name)) {
@@ -402,107 +393,88 @@
}
private void populate() {
- if (shouldShowRealLauncherPreview()) {
- WorkspaceFetcher fetcher;
- PreviewContext previewContext = null;
- if (mMigrated) {
- previewContext = new PreviewContext(mContext, mIdp);
- LauncherAppState appForPreview = new LauncherAppState(
- previewContext, null /* iconCacheFileName */);
- fetcher = new WorkspaceItemsInfoFromPreviewFetcher(appForPreview);
- MODEL_EXECUTOR.execute(fetcher);
- } else {
- fetcher = new WorkspaceItemsInfoFetcher();
- LauncherAppState.getInstance(mContext).getModel().enqueueModelUpdateTask(
- (LauncherModel.ModelUpdateTask) fetcher);
- }
- WorkspaceResult workspaceResult = fetcher.get();
- if (previewContext != null) {
- previewContext.onDestroy();
- }
-
- if (workspaceResult == null) {
- return;
- }
-
- // Separate the items that are on the current screen, and the other remaining items.
- ArrayList<ItemInfo> currentWorkspaceItems = new ArrayList<>();
- ArrayList<ItemInfo> otherWorkspaceItems = new ArrayList<>();
- ArrayList<LauncherAppWidgetInfo> currentAppWidgets = new ArrayList<>();
- ArrayList<LauncherAppWidgetInfo> otherAppWidgets = new ArrayList<>();
- filterCurrentWorkspaceItems(0 /* currentScreenId */,
- workspaceResult.mWorkspaceItems, currentWorkspaceItems,
- otherWorkspaceItems);
- filterCurrentWorkspaceItems(0 /* currentScreenId */, workspaceResult.mAppWidgets,
- currentAppWidgets, otherAppWidgets);
- sortWorkspaceItemsSpatially(mIdp, currentWorkspaceItems);
- for (ItemInfo itemInfo : currentWorkspaceItems) {
- switch (itemInfo.itemType) {
- case Favorites.ITEM_TYPE_APPLICATION:
- case Favorites.ITEM_TYPE_SHORTCUT:
- case Favorites.ITEM_TYPE_DEEP_SHORTCUT:
- inflateAndAddIcon((WorkspaceItemInfo) itemInfo);
- break;
- case Favorites.ITEM_TYPE_FOLDER:
- inflateAndAddFolder((FolderInfo) itemInfo);
- break;
- default:
- break;
- }
- }
- for (ItemInfo itemInfo : currentAppWidgets) {
- switch (itemInfo.itemType) {
- case Favorites.ITEM_TYPE_APPWIDGET:
- case Favorites.ITEM_TYPE_CUSTOM_APPWIDGET:
- if (mMigrated) {
- inflateAndAddWidgets((LauncherAppWidgetInfo) itemInfo,
- workspaceResult.mWidgetProvidersMap);
- } else {
- inflateAndAddWidgets((LauncherAppWidgetInfo) itemInfo,
- workspaceResult.mWidgetsModel);
- }
- break;
- default:
- break;
- }
- }
- IntArray ranks = getMissingHotseatRanks(currentWorkspaceItems,
- mDp.numShownHotseatIcons);
- List<ItemInfo> predictions = workspaceResult.mHotseatPredictions == null
- ? Collections.emptyList() : workspaceResult.mHotseatPredictions.items;
- int count = Math.min(ranks.size(), predictions.size());
- for (int i = 0; i < count; i++) {
- int rank = ranks.get(i);
- WorkspaceItemInfo itemInfo =
- new WorkspaceItemInfo((WorkspaceItemInfo) predictions.get(i));
- itemInfo.container = CONTAINER_HOTSEAT_PREDICTION;
- itemInfo.rank = rank;
- itemInfo.cellX = mHotseat.getCellXFromOrder(rank);
- itemInfo.cellY = mHotseat.getCellYFromOrder(rank);
- itemInfo.screenId = rank;
- inflateAndAddPredictedIcon(itemInfo);
- }
+ WorkspaceFetcher fetcher;
+ PreviewContext previewContext = null;
+ if (mMigrated) {
+ previewContext = new PreviewContext(mContext, mIdp);
+ LauncherAppState appForPreview = new LauncherAppState(
+ previewContext, null /* iconCacheFileName */);
+ fetcher = new WorkspaceItemsInfoFromPreviewFetcher(appForPreview);
+ MODEL_EXECUTOR.execute(fetcher);
} else {
- // Add hotseat icons
- for (int i = 0; i < mDp.numShownHotseatIcons; i++) {
- WorkspaceItemInfo info = new WorkspaceItemInfo(mWorkspaceItemInfo);
- info.container = Favorites.CONTAINER_HOTSEAT;
- info.screenId = i;
- inflateAndAddIcon(info);
+ fetcher = new WorkspaceItemsInfoFetcher();
+ LauncherAppState.getInstance(mContext).getModel().enqueueModelUpdateTask(
+ (LauncherModel.ModelUpdateTask) fetcher);
+ }
+ WorkspaceResult workspaceResult = fetcher.get();
+ if (previewContext != null) {
+ previewContext.onDestroy();
+ }
+
+ if (workspaceResult == null) {
+ return;
+ }
+
+ // Separate the items that are on the current screen, and the other remaining items.
+ ArrayList<ItemInfo> currentWorkspaceItems = new ArrayList<>();
+ ArrayList<ItemInfo> otherWorkspaceItems = new ArrayList<>();
+ ArrayList<LauncherAppWidgetInfo> currentAppWidgets = new ArrayList<>();
+ ArrayList<LauncherAppWidgetInfo> otherAppWidgets = new ArrayList<>();
+ filterCurrentWorkspaceItems(0 /* currentScreenId */,
+ workspaceResult.mWorkspaceItems, currentWorkspaceItems,
+ otherWorkspaceItems);
+ filterCurrentWorkspaceItems(0 /* currentScreenId */, workspaceResult.mAppWidgets,
+ currentAppWidgets, otherAppWidgets);
+ sortWorkspaceItemsSpatially(mIdp, currentWorkspaceItems);
+ for (ItemInfo itemInfo : currentWorkspaceItems) {
+ switch (itemInfo.itemType) {
+ case Favorites.ITEM_TYPE_APPLICATION:
+ case Favorites.ITEM_TYPE_SHORTCUT:
+ case Favorites.ITEM_TYPE_DEEP_SHORTCUT:
+ inflateAndAddIcon((WorkspaceItemInfo) itemInfo);
+ break;
+ case Favorites.ITEM_TYPE_FOLDER:
+ inflateAndAddFolder((FolderInfo) itemInfo);
+ break;
+ default:
+ break;
}
- // Add workspace icons
- for (int i = 0; i < mIdp.numColumns; i++) {
- WorkspaceItemInfo info = new WorkspaceItemInfo(mWorkspaceItemInfo);
- info.container = Favorites.CONTAINER_DESKTOP;
- info.screenId = 0;
- info.cellX = i;
- info.cellY = mIdp.numRows - 1;
- inflateAndAddIcon(info);
+ }
+ for (ItemInfo itemInfo : currentAppWidgets) {
+ switch (itemInfo.itemType) {
+ case Favorites.ITEM_TYPE_APPWIDGET:
+ case Favorites.ITEM_TYPE_CUSTOM_APPWIDGET:
+ if (mMigrated) {
+ inflateAndAddWidgets((LauncherAppWidgetInfo) itemInfo,
+ workspaceResult.mWidgetProvidersMap);
+ } else {
+ inflateAndAddWidgets((LauncherAppWidgetInfo) itemInfo,
+ workspaceResult.mWidgetsModel);
+ }
+ break;
+ default:
+ break;
}
}
+ IntArray ranks = getMissingHotseatRanks(currentWorkspaceItems,
+ mDp.numShownHotseatIcons);
+ List<ItemInfo> predictions = workspaceResult.mHotseatPredictions == null
+ ? Collections.emptyList() : workspaceResult.mHotseatPredictions.items;
+ int count = Math.min(ranks.size(), predictions.size());
+ for (int i = 0; i < count; i++) {
+ int rank = ranks.get(i);
+ WorkspaceItemInfo itemInfo =
+ new WorkspaceItemInfo((WorkspaceItemInfo) predictions.get(i));
+ itemInfo.container = CONTAINER_HOTSEAT_PREDICTION;
+ itemInfo.rank = rank;
+ itemInfo.cellX = mHotseat.getCellXFromOrder(rank);
+ itemInfo.cellY = mHotseat.getCellYFromOrder(rank);
+ itemInfo.screenId = rank;
+ inflateAndAddPredictedIcon(itemInfo);
+ }
// Add first page QSB
- if (shouldShowQsb()) {
+ if (FeatureFlags.QSB_ON_FIRST_SCREEN) {
View qsb = mHomeElementInflater.inflate(
R.layout.search_container_workspace, mWorkspace, false);
CellLayout.LayoutParams lp =
diff --git a/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java b/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java
index fdc3a94..6193570 100644
--- a/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java
+++ b/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java
@@ -20,6 +20,7 @@
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import static com.android.launcher3.util.Executors.MODEL_EXECUTOR;
+import android.app.WallpaperColors;
import android.content.Context;
import android.hardware.display.DisplayManager;
import android.os.Bundle;
@@ -28,18 +29,23 @@
import android.os.Looper;
import android.os.Message;
import android.os.Messenger;
+import android.view.ContextThemeWrapper;
import android.view.Display;
import android.view.SurfaceControlViewHost;
import android.view.View;
import android.view.animation.AccelerateDecelerateInterpolator;
import com.android.launcher3.InvariantDeviceProfile;
+import com.android.launcher3.R;
import com.android.launcher3.model.GridSizeMigrationTask;
import com.android.launcher3.model.GridSizeMigrationTaskV2;
+import com.android.launcher3.util.Themes;
+import com.android.launcher3.widget.LocalColorExtractor;
import java.util.concurrent.TimeUnit;
/** Render preview using surface view. */
+@SuppressWarnings("NewApi")
public class PreviewSurfaceRenderer implements IBinder.DeathRecipient {
private static final int FADE_IN_ANIMATION_DURATION = 200;
@@ -50,6 +56,7 @@
private static final String KEY_DISPLAY_ID = "display_id";
private static final String KEY_SURFACE_PACKAGE = "surface_package";
private static final String KEY_CALLBACK = "callback";
+ private static final String KEY_COLORS = "wallpaper_colors";
private final Context mContext;
private final InvariantDeviceProfile mIdp;
@@ -57,6 +64,7 @@
private final int mWidth;
private final int mHeight;
private final Display mDisplay;
+ private final WallpaperColors mWallpaperColors;
private SurfaceControlViewHost mSurfaceControlViewHost;
@@ -68,6 +76,8 @@
if (gridName == null) {
gridName = InvariantDeviceProfile.getCurrentGridName(context);
}
+ mWallpaperColors = bundle.getParcelable(KEY_COLORS);
+
mIdp = new InvariantDeviceProfile(context, gridName);
mHostToken = bundle.getBinder(KEY_HOST_TOKEN);
@@ -100,6 +110,19 @@
MODEL_EXECUTOR.post(() -> {
final boolean success = doGridMigrationIfNecessary();
+ final Context inflationContext;
+ if (mWallpaperColors != null) {
+ // Workaround to create a themed context
+ Context context = mContext.createDisplayContext(mDisplay);
+ LocalColorExtractor.newInstance(mContext)
+ .applyColorsOverride(context, mWallpaperColors);
+
+ inflationContext = new ContextThemeWrapper(context,
+ Themes.getActivityThemeRes(context, mWallpaperColors.getColorHints()));
+ } else {
+ inflationContext = new ContextThemeWrapper(mContext, R.style.AppTheme);
+ }
+
MAIN_EXECUTOR.post(() -> {
// If mSurfaceControlViewHost is null due to any reason (e.g. binder died,
// happening when user leaves the preview screen before preview rendering finishes),
@@ -109,7 +132,8 @@
return;
}
- View view = new LauncherPreviewRenderer(mContext, mIdp, success).getRenderedView();
+ View view = new LauncherPreviewRenderer(inflationContext, mIdp, success)
+ .getRenderedView();
// This aspect scales the view to fit in the surface and centers it
final float scale = Math.min(mWidth / (float) view.getMeasuredWidth(),
mHeight / (float) view.getMeasuredHeight());
diff --git a/src/com/android/launcher3/graphics/Scrim.java b/src/com/android/launcher3/graphics/Scrim.java
index a151cba..a77e058 100644
--- a/src/com/android/launcher3/graphics/Scrim.java
+++ b/src/com/android/launcher3/graphics/Scrim.java
@@ -22,14 +22,12 @@
import android.util.FloatProperty;
import android.view.View;
-import com.android.launcher3.Launcher;
-import com.android.launcher3.uioverrides.WallpaperColorInfo;
+import com.android.launcher3.R;
/**
* Contains general scrim properties such as wallpaper-extracted color that subclasses can use.
*/
-public class Scrim implements View.OnAttachStateChangeListener,
- WallpaperColorInfo.OnChangeListener {
+public class Scrim {
public static final FloatProperty<Scrim> SCRIM_PROGRESS =
new FloatProperty<Scrim>("scrimProgress") {
@@ -44,8 +42,6 @@
}
};
- protected final Launcher mLauncher;
- protected final WallpaperColorInfo mWallpaperColorInfo;
protected final View mRoot;
protected float mScrimProgress;
@@ -54,48 +50,18 @@
public Scrim(View view) {
mRoot = view;
- mLauncher = Launcher.getLauncher(view.getContext());
- mWallpaperColorInfo = WallpaperColorInfo.INSTANCE.get(mLauncher);
-
- view.addOnAttachStateChangeListener(this);
+ mScrimColor = mRoot.getContext().getColor(R.color.wallpaper_popup_scrim);
}
public void draw(Canvas canvas) {
- canvas.drawColor(setColorAlphaBound(mScrimColor, getScrimAlpha()));
- }
-
- protected int getScrimAlpha() {
- return mScrimAlpha;
+ canvas.drawColor(setColorAlphaBound(mScrimColor, mScrimAlpha));
}
private void setScrimProgress(float progress) {
if (mScrimProgress != progress) {
mScrimProgress = progress;
mScrimAlpha = Math.round(255 * mScrimProgress);
- invalidate();
+ mRoot.invalidate();
}
}
-
- @Override
- public void onViewAttachedToWindow(View view) {
- mWallpaperColorInfo.addOnChangeListener(this);
- onExtractedColorsChanged(mWallpaperColorInfo);
- }
-
- @Override
- public void onViewDetachedFromWindow(View view) {
- mWallpaperColorInfo.removeOnChangeListener(this);
- }
-
- @Override
- public void onExtractedColorsChanged(WallpaperColorInfo wallpaperColorInfo) {
- mScrimColor = wallpaperColorInfo.getMainColor();
- if (mScrimAlpha > 0) {
- invalidate();
- }
- }
-
- public void invalidate() {
- mRoot.invalidate();
- }
}
diff --git a/src/com/android/launcher3/graphics/SysUiScrim.java b/src/com/android/launcher3/graphics/SysUiScrim.java
index d9c648b..c09dac8 100644
--- a/src/com/android/launcher3/graphics/SysUiScrim.java
+++ b/src/com/android/launcher3/graphics/SysUiScrim.java
@@ -41,18 +41,16 @@
import android.view.View;
import android.view.WindowInsets;
-import androidx.core.graphics.ColorUtils;
-
+import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.R;
import com.android.launcher3.ResourceUtils;
import com.android.launcher3.Utilities;
-import com.android.launcher3.uioverrides.WallpaperColorInfo;
import com.android.launcher3.util.Themes;
/**
* View scrim which draws behind hotseat and workspace
*/
-public class SysUiScrim extends Scrim {
+public class SysUiScrim implements View.OnAttachStateChangeListener {
public static final FloatProperty<SysUiScrim> SYSUI_PROGRESS =
new FloatProperty<SysUiScrim>("sysUiProgress") {
@@ -83,7 +81,6 @@
/**
* Receiver used to get a signal that the user unlocked their device.
- * @see KEYGUARD_ANIMATION For proper signal.
*/
private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
@Override
@@ -99,7 +96,6 @@
}
};
- private static final int DARK_SCRIM_COLOR = 0x55000000;
private static final int MAX_HOTSEAT_SCRIM_ALPHA = 100;
private static final int ALPHA_MASK_HEIGHT_DP = 500;
private static final int ALPHA_MASK_BITMAP_DP = 200;
@@ -112,6 +108,8 @@
private final Bitmap mBottomMask;
private final int mMaskHeight;
+ private final View mRoot;
+ private final BaseDraggingActivity mActivity;
private final Drawable mTopScrim;
private float mSysUiProgress = 1;
@@ -121,14 +119,15 @@
private float mSysUiAnimMultiplier = 1;
public SysUiScrim(View view) {
- super(view);
+ mRoot = view;
+ mActivity = BaseDraggingActivity.fromContext(view.getContext());
mMaskHeight = ResourceUtils.pxFromDp(ALPHA_MASK_BITMAP_DP,
view.getResources().getDisplayMetrics());
mTopScrim = Themes.getAttrDrawable(view.getContext(), R.attr.workspaceStatusBarScrim);
mBottomMask = mTopScrim == null ? null : createDitheredAlphaMask();
mHideSysUiScrim = mTopScrim == null;
- onExtractedColorsChanged(mWallpaperColorInfo);
+ view.addOnAttachStateChangeListener(this);
}
/**
@@ -147,7 +146,7 @@
ObjectAnimator oa = createSysuiMultiplierAnim(1);
oa.setDuration(600);
- oa.setStartDelay(mLauncher.getWindow().getTransitionBackgroundFadeDuration());
+ oa.setStartDelay(mActivity.getWindow().getTransitionBackgroundFadeDuration());
oa.start();
mAnimateScrimOnNextDraw = false;
}
@@ -173,20 +172,17 @@
/**
* Determines whether to draw the top and/or bottom scrim based on new insets.
*/
- public void onInsetsChanged(Rect insets, boolean allowSysuiScrims) {
- mDrawTopScrim = allowSysuiScrims
- && mTopScrim != null
- && insets.top > 0;
- mDrawBottomScrim = allowSysuiScrims
- && mBottomMask != null
- && !mLauncher.getDeviceProfile().isVerticalBarLayout()
+ public void onInsetsChanged(Rect insets) {
+ mDrawTopScrim = mTopScrim != null && insets.top > 0;
+ mDrawBottomScrim = mBottomMask != null
+ && !mActivity.getDeviceProfile().isVerticalBarLayout()
&& hasBottomNavButtons();
}
private boolean hasBottomNavButtons() {
- if (Utilities.ATLEAST_Q && mLauncher.getRootView() != null
- && mLauncher.getRootView().getRootWindowInsets() != null) {
- WindowInsets windowInsets = mLauncher.getRootView().getRootWindowInsets();
+ if (Utilities.ATLEAST_Q && mActivity.getRootView() != null
+ && mActivity.getRootView().getRootWindowInsets() != null) {
+ WindowInsets windowInsets = mActivity.getRootView().getRootWindowInsets();
return windowInsets.getTappableElementInsets().bottom > 0;
}
return true;
@@ -194,8 +190,6 @@
@Override
public void onViewAttachedToWindow(View view) {
- super.onViewAttachedToWindow(view);
-
if (!KEYGUARD_ANIMATION.get() && mTopScrim != null) {
IntentFilter filter = new IntentFilter(ACTION_SCREEN_OFF);
filter.addAction(ACTION_USER_PRESENT); // When the device wakes up + keyguard is gone
@@ -205,22 +199,11 @@
@Override
public void onViewDetachedFromWindow(View view) {
- super.onViewDetachedFromWindow(view);
if (!KEYGUARD_ANIMATION.get() && mTopScrim != null) {
mRoot.getContext().unregisterReceiver(mReceiver);
}
}
- @Override
- public void onExtractedColorsChanged(WallpaperColorInfo wallpaperColorInfo) {
- // for super light wallpaper it needs to be darken for contrast to workspace
- // for dark wallpapers the text is white so darkening works as well
- mBottomMaskPaint.setColor(ColorUtils.compositeColors(DARK_SCRIM_COLOR,
- wallpaperColorInfo.getMainColor()));
- reapplySysUiAlpha();
- super.onExtractedColorsChanged(wallpaperColorInfo);
- }
-
/**
* Set the width and height of the view being scrimmed
* @param w
@@ -243,7 +226,7 @@
private void reapplySysUiAlpha() {
reapplySysUiAlphaNoInvalidate();
if (!mHideSysUiScrim) {
- invalidate();
+ mRoot.invalidate();
}
}
@@ -256,7 +239,7 @@
}
private Bitmap createDitheredAlphaMask() {
- DisplayMetrics dm = mLauncher.getResources().getDisplayMetrics();
+ DisplayMetrics dm = mActivity.getResources().getDisplayMetrics();
int width = ResourceUtils.pxFromDp(ALPHA_MASK_WIDTH_DP, dm);
int gradientHeight = ResourceUtils.pxFromDp(ALPHA_MASK_HEIGHT_DP, dm);
Bitmap dst = Bitmap.createBitmap(width, mMaskHeight, Bitmap.Config.ALPHA_8);
diff --git a/src/com/android/launcher3/icons/IconCache.java b/src/com/android/launcher3/icons/IconCache.java
index a2c0f5c..bc93a1e 100644
--- a/src/com/android/launcher3/icons/IconCache.java
+++ b/src/com/android/launcher3/icons/IconCache.java
@@ -52,7 +52,6 @@
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.pm.UserCache;
import com.android.launcher3.shortcuts.ShortcutKey;
-import com.android.launcher3.util.ComponentKey;
import com.android.launcher3.util.InstantAppResolver;
import com.android.launcher3.util.PackageUserKey;
import com.android.launcher3.util.Preconditions;
@@ -94,7 +93,7 @@
mLauncherApps = mContext.getSystemService(LauncherApps.class);
mUserManager = UserCache.INSTANCE.get(mContext);
mInstantAppResolver = InstantAppResolver.newInstance(mContext);
- mIconProvider = new IconProvider(context);
+ mIconProvider = new IconProvider(context, true /* supportsIconTheme */);
}
@Override
@@ -107,8 +106,12 @@
return mInstantAppResolver.isInstantApp(info);
}
+ public IconProvider getIconProvider() {
+ return mIconProvider;
+ }
+
@Override
- protected BaseIconFactory getIconFactory() {
+ public BaseIconFactory getIconFactory() {
return LauncherIcons.obtain(mContext);
}
@@ -333,15 +336,6 @@
+ ",flags_asi:" + FeatureFlags.APP_SEARCH_IMPROVEMENTS.get();
}
- @Override
- protected boolean getEntryFromDB(ComponentKey cacheKey, CacheEntry entry, boolean lowRes) {
- if (mIconProvider.isClockIcon(cacheKey)) {
- // For clock icon, we always load the dynamic icon
- return false;
- }
- return super.getEntryFromDB(cacheKey, entry, lowRes);
- }
-
/**
* Interface for receiving itemInfo with high-res icon.
*/
diff --git a/src/com/android/launcher3/icons/LauncherActivityCachingLogic.java b/src/com/android/launcher3/icons/LauncherActivityCachingLogic.java
index 93de35a..8fc3977 100644
--- a/src/com/android/launcher3/icons/LauncherActivityCachingLogic.java
+++ b/src/com/android/launcher3/icons/LauncherActivityCachingLogic.java
@@ -20,6 +20,7 @@
import android.content.pm.LauncherActivityInfo;
import android.os.UserHandle;
+import com.android.launcher3.LauncherAppState;
import com.android.launcher3.R;
import com.android.launcher3.icons.cache.CachingLogic;
import com.android.launcher3.util.ResourceBasedOverride;
@@ -56,8 +57,8 @@
@Override
public BitmapInfo loadIcon(Context context, LauncherActivityInfo object) {
try (LauncherIcons li = LauncherIcons.obtain(context)) {
- return li.createBadgedIconBitmap(new IconProvider(context)
- .getIcon(object, li.mFillResIconDpi),
+ return li.createBadgedIconBitmap(LauncherAppState.getInstance(context)
+ .getIconCache().getIconProvider().getIcon(object, li.mFillResIconDpi),
object.getUser(), object.getApplicationInfo().targetSdkVersion);
}
}
diff --git a/src/com/android/launcher3/model/data/ItemInfo.java b/src/com/android/launcher3/model/data/ItemInfo.java
index 05fd77d..e388965 100644
--- a/src/com/android/launcher3/model/data/ItemInfo.java
+++ b/src/com/android/launcher3/model/data/ItemInfo.java
@@ -366,7 +366,7 @@
return itemBuilder.build();
}
- LauncherAtom.ItemInfo.Builder getDefaultItemInfoBuilder() {
+ protected LauncherAtom.ItemInfo.Builder getDefaultItemInfoBuilder() {
LauncherAtom.ItemInfo.Builder itemBuilder = LauncherAtom.ItemInfo.newBuilder();
itemBuilder.setIsWork(user != Process.myUserHandle());
return itemBuilder;
diff --git a/src/com/android/launcher3/model/data/ItemInfoWithIcon.java b/src/com/android/launcher3/model/data/ItemInfoWithIcon.java
index 76b2ab0..0754c29 100644
--- a/src/com/android/launcher3/model/data/ItemInfoWithIcon.java
+++ b/src/com/android/launcher3/model/data/ItemInfoWithIcon.java
@@ -16,6 +16,8 @@
package com.android.launcher3.model.data;
+import static com.android.launcher3.config.FeatureFlags.ENABLE_THEMED_ICONS;
+
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -223,7 +225,15 @@
* Returns a FastBitmapDrawable with the icon.
*/
public FastBitmapDrawable newIcon(Context context) {
- FastBitmapDrawable drawable = bitmap.newIcon(context);
+ return newIcon(context, false);
+ }
+
+ /**
+ * Returns a FastBitmapDrawable with the icon and context theme applied
+ */
+ public FastBitmapDrawable newIcon(Context context, boolean applyTheme) {
+ FastBitmapDrawable drawable = applyTheme && ENABLE_THEMED_ICONS.get()
+ ? bitmap.newThemedIcon(context) : bitmap.newIcon(context);
drawable.setIsDisabled(isDisabled());
return drawable;
}
diff --git a/src/com/android/launcher3/pageindicators/WorkspacePageIndicator.java b/src/com/android/launcher3/pageindicators/WorkspacePageIndicator.java
index a7cd10d..f73d782 100644
--- a/src/com/android/launcher3/pageindicators/WorkspacePageIndicator.java
+++ b/src/com/android/launcher3/pageindicators/WorkspacePageIndicator.java
@@ -24,7 +24,7 @@
import com.android.launcher3.Launcher;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
-import com.android.launcher3.uioverrides.WallpaperColorInfo;
+import com.android.launcher3.util.Themes;
/**
* A PageIndicator that briefly shows a fraction of a line when moving between pages
@@ -123,7 +123,7 @@
mLauncher = Launcher.getLauncher(context);
mLineHeight = res.getDimensionPixelSize(R.dimen.workspace_page_indicator_line_height);
- boolean darkText = WallpaperColorInfo.INSTANCE.get(context).supportsDarkText();
+ boolean darkText = Themes.getAttrBoolean(mLauncher, R.attr.isWorkspaceDarkText);
mActiveAlpha = darkText ? BLACK_ALPHA : WHITE_ALPHA;
mLinePaint.setColor(darkText ? Color.BLACK : Color.WHITE);
}
diff --git a/src/com/android/launcher3/states/HintState.java b/src/com/android/launcher3/states/HintState.java
index 22c9d5b..8b52016 100644
--- a/src/com/android/launcher3/states/HintState.java
+++ b/src/com/android/launcher3/states/HintState.java
@@ -19,8 +19,12 @@
import android.content.Context;
+import androidx.core.graphics.ColorUtils;
+
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherState;
+import com.android.launcher3.R;
+import com.android.launcher3.util.Themes;
/**
* Scale down workspace/hotseat to hint at going to either overview (on pause) or first home screen.
@@ -49,8 +53,9 @@
}
@Override
- public float getWorkspaceScrimAlpha(Launcher launcher) {
- return 0.4f;
+ public int getWorkspaceScrimColor(Launcher launcher) {
+ return ColorUtils.setAlphaComponent(
+ Themes.getAttrColor(launcher, R.attr.overviewScrimColor), 100);
}
@Override
diff --git a/src/com/android/launcher3/states/SpringLoadedState.java b/src/com/android/launcher3/states/SpringLoadedState.java
index 39bcdc5..8db1dbe 100644
--- a/src/com/android/launcher3/states/SpringLoadedState.java
+++ b/src/com/android/launcher3/states/SpringLoadedState.java
@@ -89,7 +89,7 @@
@Override
public float getWorkspaceBackgroundAlpha(Launcher launcher) {
- return 0.3f;
+ return 0.2f;
}
@Override
diff --git a/src/com/android/launcher3/states/StateAnimationConfig.java b/src/com/android/launcher3/states/StateAnimationConfig.java
index 2f26b4f..bd6f7d3 100644
--- a/src/com/android/launcher3/states/StateAnimationConfig.java
+++ b/src/com/android/launcher3/states/StateAnimationConfig.java
@@ -58,8 +58,7 @@
ANIM_OVERVIEW_TRANSLATE_Y,
ANIM_OVERVIEW_FADE,
ANIM_ALL_APPS_FADE,
- ANIM_WORKSPACE_SCRIM_FADE,
- ANIM_ALL_APPS_HEADER_FADE,
+ ANIM_SCRIM_FADE,
ANIM_OVERVIEW_MODAL,
ANIM_DEPTH,
ANIM_OVERVIEW_ACTIONS_FADE,
@@ -77,13 +76,12 @@
public static final int ANIM_OVERVIEW_TRANSLATE_Y = 8;
public static final int ANIM_OVERVIEW_FADE = 9;
public static final int ANIM_ALL_APPS_FADE = 10;
- public static final int ANIM_WORKSPACE_SCRIM_FADE = 11;
- public static final int ANIM_ALL_APPS_HEADER_FADE = 12; // e.g. predictions
- public static final int ANIM_OVERVIEW_MODAL = 13;
- public static final int ANIM_DEPTH = 14;
- public static final int ANIM_OVERVIEW_ACTIONS_FADE = 15;
+ public static final int ANIM_SCRIM_FADE = 11;
+ public static final int ANIM_OVERVIEW_MODAL = 12;
+ public static final int ANIM_DEPTH = 13;
+ public static final int ANIM_OVERVIEW_ACTIONS_FADE = 14;
- private static final int ANIM_TYPES_COUNT = 16;
+ private static final int ANIM_TYPES_COUNT = 15;
protected final Interpolator[] mInterpolators = new Interpolator[ANIM_TYPES_COUNT];
diff --git a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
index a437293..d092f11 100644
--- a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
+++ b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
@@ -352,7 +352,7 @@
// case the user started interacting with it before the animation finished.
mLauncher.getStateManager().goToState(targetState, false /* animated */);
}
- mLauncher.getDragLayer().getSysUiScrim().createSysuiMultiplierAnim(
+ mLauncher.getRootView().getSysUiScrim().createSysuiMultiplierAnim(
1f).setDuration(0).start();
}
diff --git a/src/com/android/launcher3/touch/LandscapePagedViewHandler.java b/src/com/android/launcher3/touch/LandscapePagedViewHandler.java
index 2254ab3..2fd5efc 100644
--- a/src/com/android/launcher3/touch/LandscapePagedViewHandler.java
+++ b/src/com/android/launcher3/touch/LandscapePagedViewHandler.java
@@ -254,16 +254,21 @@
}
@Override
- public int getTaskMenuLayoutOrientation(boolean canRecentsActivityRotate,
+ public void setTaskMenuLayoutOrientation(DeviceProfile deviceProfile,
LinearLayout taskMenuLayout) {
- return LinearLayout.HORIZONTAL;
+ taskMenuLayout.setOrientation(LinearLayout.HORIZONTAL);
}
@Override
- public void setLayoutParamsForTaskMenuOptionItem(LinearLayout.LayoutParams lp) {
+ public void setLayoutParamsForTaskMenuOptionItem(LinearLayout.LayoutParams lp,
+ LinearLayout viewGroup, DeviceProfile deviceProfile) {
+ // Phone fake landscape
+ viewGroup.setOrientation(LinearLayout.VERTICAL);
lp.width = 0;
lp.height = WRAP_CONTENT;
lp.weight = 1;
+ Utilities.setStartMarginForView(viewGroup.findViewById(R.id.text), 0);
+ Utilities.setStartMarginForView(viewGroup.findViewById(R.id.icon), 0);
}
/* ---------- The following are only used by TaskViewTouchHandler. ---------- */
diff --git a/src/com/android/launcher3/touch/PagedOrientationHandler.java b/src/com/android/launcher3/touch/PagedOrientationHandler.java
index c9149ff..6c2f17e 100644
--- a/src/com/android/launcher3/touch/PagedOrientationHandler.java
+++ b/src/com/android/launcher3/touch/PagedOrientationHandler.java
@@ -101,8 +101,9 @@
float getTaskMenuX(float x, View thumbnailView, int overScroll);
float getTaskMenuY(float y, View thumbnailView, int overScroll);
int getTaskMenuWidth(View view);
- int getTaskMenuLayoutOrientation(boolean canRecentsActivityRotate, LinearLayout taskMenuLayout);
- void setLayoutParamsForTaskMenuOptionItem(LinearLayout.LayoutParams lp);
+ void setTaskMenuLayoutOrientation(DeviceProfile deviceProfile, LinearLayout taskMenuLayout);
+ void setLayoutParamsForTaskMenuOptionItem(LinearLayout.LayoutParams lp,
+ LinearLayout viewGroup, DeviceProfile deviceProfile);
int getDistanceToBottomOfRect(DeviceProfile dp, Rect rect);
List<SplitPositionOption> getSplitPositionOptions(DeviceProfile dp);
FloatProperty getSplitSelectTaskOffset(FloatProperty primary, FloatProperty secondary,
diff --git a/src/com/android/launcher3/touch/PortraitPagedViewHandler.java b/src/com/android/launcher3/touch/PortraitPagedViewHandler.java
index 31586e7..f6a6448 100644
--- a/src/com/android/launcher3/touch/PortraitPagedViewHandler.java
+++ b/src/com/android/launcher3/touch/PortraitPagedViewHandler.java
@@ -253,14 +253,34 @@
}
@Override
- public int getTaskMenuLayoutOrientation(boolean canRecentsActivityRotate,
+ public void setTaskMenuLayoutOrientation(DeviceProfile deviceProfile,
LinearLayout taskMenuLayout) {
- return canRecentsActivityRotate ? taskMenuLayout.getOrientation() : LinearLayout.VERTICAL;
+ if (deviceProfile.isLandscape && !deviceProfile.isTablet) {
+ // Phone landscape
+ taskMenuLayout.setOrientation(LinearLayout.HORIZONTAL);
+ } else {
+ // Phone Portrait, LargeScreen Landscape/Portrait
+ taskMenuLayout.setOrientation(LinearLayout.VERTICAL);
+ }
}
@Override
- public void setLayoutParamsForTaskMenuOptionItem(LinearLayout.LayoutParams lp) {
- // no-op, defaults are fine
+ public void setLayoutParamsForTaskMenuOptionItem(LinearLayout.LayoutParams lp,
+ LinearLayout viewGroup, DeviceProfile deviceProfile) {
+ if (deviceProfile.isLandscape && !deviceProfile.isTablet) {
+ // Phone landscape
+ viewGroup.setOrientation(LinearLayout.VERTICAL);
+ lp.width = 0;
+ lp.weight = 1;
+ Utilities.setStartMarginForView(viewGroup.findViewById(R.id.text), 0);
+ Utilities.setStartMarginForView(viewGroup.findViewById(R.id.icon), 0);
+ } else {
+ // Phone Portrait, LargeScreen Landscape/Portrait
+ viewGroup.setOrientation(LinearLayout.HORIZONTAL);
+ lp.width = LinearLayout.LayoutParams.WRAP_CONTENT;
+ }
+
+ lp.height = LinearLayout.LayoutParams.WRAP_CONTENT;
}
/* ---------- The following are only used by TaskViewTouchHandler. ---------- */
diff --git a/src/com/android/launcher3/util/RunnableList.java b/src/com/android/launcher3/util/RunnableList.java
index 55add14..644537b 100644
--- a/src/com/android/launcher3/util/RunnableList.java
+++ b/src/com/android/launcher3/util/RunnableList.java
@@ -29,6 +29,9 @@
* Ads a runnable to this list
*/
public void add(Runnable runnable) {
+ if (runnable == null) {
+ return;
+ }
if (mDestroyed) {
runnable.run();
return;
diff --git a/src/com/android/launcher3/util/SystemUiController.java b/src/com/android/launcher3/util/SystemUiController.java
index 50166c3..630df7e 100644
--- a/src/com/android/launcher3/util/SystemUiController.java
+++ b/src/com/android/launcher3/util/SystemUiController.java
@@ -30,7 +30,7 @@
public static final int UI_STATE_BASE_WINDOW = 0;
public static final int UI_STATE_SCRIM_VIEW = 1;
public static final int UI_STATE_WIDGET_BOTTOM_SHEET = 2;
- public static final int UI_STATE_OVERVIEW = 3;
+ public static final int UI_STATE_FULLSCREEN_TASK = 3;
public static final int UI_STATE_ALLAPPS = 4;
public static final int FLAG_LIGHT_NAV = 1 << 0;
diff --git a/src/com/android/launcher3/util/Themes.java b/src/com/android/launcher3/util/Themes.java
index e8a0635..99942aa 100644
--- a/src/com/android/launcher3/util/Themes.java
+++ b/src/com/android/launcher3/util/Themes.java
@@ -16,6 +16,11 @@
package com.android.launcher3.util;
+import static android.app.WallpaperColors.HINT_SUPPORTS_DARK_TEXT;
+import static android.app.WallpaperColors.HINT_SUPPORTS_DARK_THEME;
+
+import android.app.WallpaperColors;
+import android.app.WallpaperManager;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.TypedArray;
@@ -29,35 +34,45 @@
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.icons.GraphicsUtils;
-import com.android.launcher3.uioverrides.WallpaperColorInfo;
/**
* Various utility methods associated with theming.
*/
+@SuppressWarnings("NewApi")
public class Themes {
public static int getActivityThemeRes(Context context) {
- WallpaperColorInfo wallpaperColorInfo = WallpaperColorInfo.INSTANCE.get(context);
- boolean darkTheme;
- if (Utilities.ATLEAST_Q) {
- Configuration configuration = context.getResources().getConfiguration();
- int nightMode = configuration.uiMode & Configuration.UI_MODE_NIGHT_MASK;
- darkTheme = nightMode == Configuration.UI_MODE_NIGHT_YES;
+ final int colorHints;
+ if (Utilities.ATLEAST_P) {
+ WallpaperColors colors = context.getSystemService(WallpaperManager.class)
+ .getWallpaperColors(WallpaperManager.FLAG_SYSTEM);
+ colorHints = colors == null ? 0 : colors.getColorHints();
} else {
- darkTheme = wallpaperColorInfo.isDark();
+ colorHints = 0;
}
+ return getActivityThemeRes(context, colorHints);
+ }
+
+ public static int getActivityThemeRes(Context context, int wallpaperColorHints) {
+ Configuration configuration = context.getResources().getConfiguration();
+ int nightMode = configuration.uiMode & Configuration.UI_MODE_NIGHT_MASK;
+ boolean darkTheme = nightMode == Configuration.UI_MODE_NIGHT_YES;
+
+ boolean supportsDarkText = Utilities.ATLEAST_S
+ && (wallpaperColorHints & HINT_SUPPORTS_DARK_TEXT) != 0;
+ boolean isMainColorDark = Utilities.ATLEAST_S
+ && (wallpaperColorHints & HINT_SUPPORTS_DARK_THEME) != 0;
if (darkTheme) {
- return wallpaperColorInfo.supportsDarkText() ?
- R.style.AppTheme_Dark_DarkText : wallpaperColorInfo.isMainColorDark() ?
- R.style.AppTheme_Dark_DarkMainColor : R.style.AppTheme_Dark;
+ return supportsDarkText ? R.style.AppTheme_Dark_DarkText
+ : isMainColorDark ? R.style.AppTheme_Dark_DarkMainColor : R.style.AppTheme_Dark;
} else {
- return wallpaperColorInfo.supportsDarkText() ?
- R.style.AppTheme_DarkText : wallpaperColorInfo.isMainColorDark() ?
- R.style.AppTheme_DarkMainColor : R.style.AppTheme;
+ return supportsDarkText ? R.style.AppTheme_DarkText
+ : isMainColorDark ? R.style.AppTheme_DarkMainColor : R.style.AppTheme;
}
}
+
public static String getDefaultBodyFont(Context context) {
TypedArray ta = context.obtainStyledAttributes(android.R.style.TextAppearance_DeviceDefault,
new int[]{android.R.attr.fontFamily});
diff --git a/src/com/android/launcher3/util/UiThreadHelper.java b/src/com/android/launcher3/util/UiThreadHelper.java
index 0498052..be14e01 100644
--- a/src/com/android/launcher3/util/UiThreadHelper.java
+++ b/src/com/android/launcher3/util/UiThreadHelper.java
@@ -17,13 +17,18 @@
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
+import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
+import android.view.WindowInsets;
import android.view.inputmethod.InputMethodManager;
+import com.android.launcher3.Launcher;
+import com.android.launcher3.Utilities;
+
/**
* Utility class for offloading some class from UI thread
*/
@@ -37,8 +42,16 @@
private static final int MSG_SET_ORIENTATION = 2;
private static final int MSG_RUN_COMMAND = 3;
- public static void hideKeyboardAsync(Context context, IBinder token) {
- Message.obtain(HANDLER.get(context), MSG_HIDE_KEYBOARD, token).sendToTarget();
+ @SuppressLint("NewApi")
+ public static void hideKeyboardAsync(Launcher launcher, IBinder token) {
+ if (Utilities.ATLEAST_R) {
+ WindowInsets rootInsets = launcher.getRootView().getRootWindowInsets();
+ boolean isImeShown = rootInsets != null && rootInsets.isVisible(
+ WindowInsets.Type.ime());
+ if (!isImeShown) return;
+ }
+
+ Message.obtain(HANDLER.get(launcher), MSG_HIDE_KEYBOARD, token).sendToTarget();
}
public static void setOrientationAsync(Activity activity, int orientation) {
diff --git a/src/com/android/launcher3/views/ArrowTipView.java b/src/com/android/launcher3/views/ArrowTipView.java
index 89ff821..a6f2b42 100644
--- a/src/com/android/launcher3/views/ArrowTipView.java
+++ b/src/com/android/launcher3/views/ArrowTipView.java
@@ -22,7 +22,6 @@
import android.graphics.drawable.ShapeDrawable;
import android.os.Handler;
import android.util.Log;
-import android.util.TypedValue;
import android.view.Gravity;
import android.view.MotionEvent;
import android.view.View;
@@ -108,10 +107,7 @@
ShapeDrawable arrowDrawable = new ShapeDrawable(TriangleShape.create(
arrowLp.width, arrowLp.height, false));
Paint arrowPaint = arrowDrawable.getPaint();
- TypedValue typedValue = new TypedValue();
- context.getTheme()
- .resolveAttribute(android.R.attr.colorAccent, typedValue, true);
- arrowPaint.setColor(ContextCompat.getColor(getContext(), typedValue.resourceId));
+ arrowPaint.setColor(ContextCompat.getColor(getContext(), R.color.arrow_tip_view_bg));
// The corner path effect won't be reflected in the shadow, but shouldn't be noticeable.
arrowPaint.setPathEffect(new CornerPathEffect(
context.getResources().getDimension(R.dimen.arrow_toast_corner_radius)));
@@ -148,6 +144,10 @@
LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) findViewById(
R.id.arrow).getLayoutParams();
lp.gravity = gravity;
+
+ if (parent.getLayoutDirection() == LAYOUT_DIRECTION_RTL) {
+ arrowMarginStart = parent.getMeasuredWidth() - arrowMarginStart;
+ }
if (gravity == Gravity.END) {
lp.setMarginEnd(parent.getMeasuredWidth() - arrowMarginStart);
} else if (gravity == Gravity.START) {
diff --git a/src/com/android/launcher3/views/BaseDragLayer.java b/src/com/android/launcher3/views/BaseDragLayer.java
index 1939d15..01c0b56 100644
--- a/src/com/android/launcher3/views/BaseDragLayer.java
+++ b/src/com/android/launcher3/views/BaseDragLayer.java
@@ -23,11 +23,8 @@
import static com.android.launcher3.util.DisplayController.getSingleFrameMs;
import android.annotation.TargetApi;
-import android.app.WallpaperInfo;
import android.app.WallpaperManager;
-import android.content.ComponentName;
import android.content.Context;
-import android.content.Intent;
import android.graphics.Insets;
import android.graphics.Rect;
import android.graphics.RectF;
@@ -42,15 +39,11 @@
import android.view.accessibility.AccessibilityEvent;
import android.widget.FrameLayout;
-import androidx.annotation.Nullable;
-
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.InsettableFrameLayout;
-import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.util.MultiValueAlpha;
import com.android.launcher3.util.MultiValueAlpha.AlphaProperty;
-import com.android.launcher3.util.SimpleBroadcastReceiver;
import com.android.launcher3.util.TouchController;
import java.io.PrintWriter;
@@ -117,9 +110,6 @@
protected final T mActivity;
private final MultiValueAlpha mMultiValueAlpha;
private final WallpaperManager mWallpaperManager;
- private final SimpleBroadcastReceiver mWallpaperChangeReceiver =
- new SimpleBroadcastReceiver(this::onWallpaperChanged);
- private final String[] mWallpapersWithoutSysuiScrims;
// All the touch controllers for the view
protected TouchController[] mControllers;
@@ -130,15 +120,11 @@
private TouchCompleteListener mTouchCompleteListener;
- protected boolean mAllowSysuiScrims = true;
-
public BaseDragLayer(Context context, AttributeSet attrs, int alphaChannelCount) {
super(context, attrs);
mActivity = (T) ActivityContext.lookupContext(context);
mMultiValueAlpha = new MultiValueAlpha(this, alphaChannelCount);
mWallpaperManager = context.getSystemService(WallpaperManager.class);
- mWallpapersWithoutSysuiScrims = getResources().getStringArray(
- R.array.live_wallpapers_remove_sysui_scrims);
}
/**
@@ -562,46 +548,4 @@
}
return super.dispatchApplyWindowInsets(insets);
}
-
- @Override
- protected void onAttachedToWindow() {
- super.onAttachedToWindow();
- mWallpaperChangeReceiver.register(mActivity, Intent.ACTION_WALLPAPER_CHANGED);
- onWallpaperChanged(null);
- }
-
- @Override
- protected void onDetachedFromWindow() {
- super.onDetachedFromWindow();
- mActivity.unregisterReceiver(mWallpaperChangeReceiver);
- }
-
- private void onWallpaperChanged(Intent unusedBroadcastIntent) {
- WallpaperInfo newWallpaperInfo = mWallpaperManager.getWallpaperInfo();
- boolean oldAllowSysuiScrims = mAllowSysuiScrims;
- mAllowSysuiScrims = computeAllowSysuiScrims(newWallpaperInfo);
- if (mAllowSysuiScrims != oldAllowSysuiScrims) {
- // Reapply insets so scrim can be removed or re-added if necessary.
- setInsets(mInsets);
- }
- }
-
- /**
- * Determines whether we can scrim the status bar and nav bar for the given wallpaper by
- * checking against a list of live wallpapers that we don't show the scrims on.
- */
- private boolean computeAllowSysuiScrims(@Nullable WallpaperInfo newWallpaperInfo) {
- if (newWallpaperInfo == null) {
- // Static wallpapers need scrim unless determined otherwise by wallpaperColors.
- return true;
- }
- ComponentName newWallpaper = newWallpaperInfo.getComponent();
- for (String wallpaperWithoutScrim : mWallpapersWithoutSysuiScrims) {
- if (newWallpaper.equals(ComponentName.unflattenFromString(wallpaperWithoutScrim))) {
- // New wallpaper does not need a scrim.
- return false;
- }
- }
- return true;
- }
}
diff --git a/src/com/android/launcher3/views/DoubleShadowBubbleTextView.java b/src/com/android/launcher3/views/DoubleShadowBubbleTextView.java
index d89e7f8..a309e6e 100644
--- a/src/com/android/launcher3/views/DoubleShadowBubbleTextView.java
+++ b/src/com/android/launcher3/views/DoubleShadowBubbleTextView.java
@@ -60,7 +60,7 @@
// We enhance the shadow by drawing the shadow twice
getPaint().setShadowLayer(mShadowInfo.ambientShadowBlur, 0, 0,
- setColorAlphaBound(mShadowInfo.ambientShadowColor, alpha));
+ getTextShadowColor(mShadowInfo.ambientShadowColor, alpha));
drawWithoutDot(canvas);
canvas.save();
@@ -68,8 +68,11 @@
getScrollX() + getWidth(),
getScrollY() + getHeight());
- getPaint().setShadowLayer(mShadowInfo.keyShadowBlur, 0.0f, mShadowInfo.keyShadowOffset,
- setColorAlphaBound(mShadowInfo.keyShadowColor, alpha));
+ getPaint().setShadowLayer(
+ mShadowInfo.keyShadowBlur,
+ mShadowInfo.keyShadowOffsetX,
+ mShadowInfo.keyShadowOffsetY,
+ getTextShadowColor(mShadowInfo.keyShadowColor, alpha));
drawWithoutDot(canvas);
canvas.restore();
@@ -81,7 +84,8 @@
public final int ambientShadowColor;
public final float keyShadowBlur;
- public final float keyShadowOffset;
+ public final float keyShadowOffsetX;
+ public final float keyShadowOffsetY;
public final int keyShadowColor;
public ShadowInfo(Context c, AttributeSet attrs, int defStyle) {
@@ -89,11 +93,13 @@
TypedArray a = c.obtainStyledAttributes(
attrs, R.styleable.ShadowInfo, defStyle, 0);
- ambientShadowBlur = a.getDimension(R.styleable.ShadowInfo_ambientShadowBlur, 0);
+ ambientShadowBlur = a.getDimensionPixelSize(
+ R.styleable.ShadowInfo_ambientShadowBlur, 0);
ambientShadowColor = a.getColor(R.styleable.ShadowInfo_ambientShadowColor, 0);
- keyShadowBlur = a.getDimension(R.styleable.ShadowInfo_keyShadowBlur, 0);
- keyShadowOffset = a.getDimension(R.styleable.ShadowInfo_keyShadowOffset, 0);
+ keyShadowBlur = a.getDimensionPixelSize(R.styleable.ShadowInfo_keyShadowBlur, 0);
+ keyShadowOffsetX = a.getDimensionPixelSize(R.styleable.ShadowInfo_keyShadowOffsetX, 0);
+ keyShadowOffsetY = a.getDimensionPixelSize(R.styleable.ShadowInfo_keyShadowOffsetY, 0);
keyShadowColor = a.getColor(R.styleable.ShadowInfo_keyShadowColor, 0);
a.recycle();
}
@@ -105,17 +111,26 @@
if (textAlpha == 0 || (keyShadowAlpha == 0 && ambientShadowAlpha == 0)) {
textView.getPaint().clearShadowLayer();
return true;
- } else if (ambientShadowAlpha > 0) {
+ } else if (ambientShadowAlpha > 0 && keyShadowAlpha == 0) {
textView.getPaint().setShadowLayer(ambientShadowBlur, 0, 0,
- setColorAlphaBound(ambientShadowColor, textAlpha));
+ getTextShadowColor(ambientShadowColor, textAlpha));
return true;
- } else if (keyShadowAlpha > 0) {
- textView.getPaint().setShadowLayer(keyShadowBlur, 0.0f, keyShadowOffset,
- setColorAlphaBound(keyShadowColor, textAlpha));
+ } else if (keyShadowAlpha > 0 && ambientShadowAlpha == 0) {
+ textView.getPaint().setShadowLayer(
+ keyShadowBlur,
+ keyShadowOffsetX,
+ keyShadowOffsetY,
+ getTextShadowColor(keyShadowColor, textAlpha));
return true;
} else {
return false;
}
}
}
+
+ // Multiplies the alpha of shadowColor by textAlpha.
+ private static int getTextShadowColor(int shadowColor, int textAlpha) {
+ return setColorAlphaBound(shadowColor,
+ Math.round(Color.alpha(shadowColor) * textAlpha / 255f));
+ }
}
diff --git a/src/com/android/launcher3/views/ScrimView.java b/src/com/android/launcher3/views/ScrimView.java
index c9424de..5387a3e 100644
--- a/src/com/android/launcher3/views/ScrimView.java
+++ b/src/com/android/launcher3/views/ScrimView.java
@@ -19,16 +19,15 @@
import android.content.Context;
import android.graphics.Rect;
+import android.graphics.drawable.ColorDrawable;
import android.util.AttributeSet;
import android.view.View;
import androidx.core.graphics.ColorUtils;
+import com.android.launcher3.BaseActivity;
import com.android.launcher3.Insettable;
-import com.android.launcher3.Launcher;
-import com.android.launcher3.R;
import com.android.launcher3.util.SystemUiController;
-import com.android.launcher3.util.Themes;
/**
* Simple scrim which draws a flat color
@@ -36,13 +35,10 @@
public class ScrimView extends View implements Insettable {
private static final float STATUS_BAR_COLOR_FORCE_UPDATE_THRESHOLD = 0.9f;
- private final boolean mIsScrimDark;
private SystemUiController mSystemUiController;
public ScrimView(Context context, AttributeSet attrs) {
super(context, attrs);
- mIsScrimDark = ColorUtils.calculateLuminance(
- Themes.getAttrColor(context, R.attr.allAppsScrimColor)) < 0.5f;
setFocusable(false);
}
@@ -61,6 +57,12 @@
}
@Override
+ public void setBackgroundColor(int color) {
+ updateSysUiColors();
+ super.setBackgroundColor(color);
+ }
+
+ @Override
protected void onVisibilityChanged(View changedView, int visibility) {
super.onVisibilityChanged(changedView, visibility);
updateSysUiColors();
@@ -72,7 +74,7 @@
boolean forceChange =
getVisibility() == VISIBLE && getAlpha() > STATUS_BAR_COLOR_FORCE_UPDATE_THRESHOLD;
if (forceChange) {
- getSystemUiController().updateUiState(UI_STATE_SCRIM_VIEW, !mIsScrimDark);
+ getSystemUiController().updateUiState(UI_STATE_SCRIM_VIEW, !isScrimDark());
} else {
getSystemUiController().updateUiState(UI_STATE_SCRIM_VIEW, 0);
}
@@ -80,8 +82,18 @@
private SystemUiController getSystemUiController() {
if (mSystemUiController == null) {
- mSystemUiController = Launcher.getLauncher(getContext()).getSystemUiController();
+ mSystemUiController = BaseActivity.fromContext(getContext()).getSystemUiController();
}
return mSystemUiController;
}
+
+ private boolean isScrimDark() {
+ if (!(getBackground() instanceof ColorDrawable)) {
+ throw new IllegalStateException(
+ "ScrimView must have a ColorDrawable background, this one has: "
+ + getBackground());
+ }
+ return ColorUtils.calculateLuminance(
+ ((ColorDrawable) getBackground()).getColor()) < 0.5f;
+ }
}
diff --git a/src/com/android/launcher3/widget/BaseWidgetSheet.java b/src/com/android/launcher3/widget/BaseWidgetSheet.java
index 415f48d..a7ecb07 100644
--- a/src/com/android/launcher3/widget/BaseWidgetSheet.java
+++ b/src/com/android/launcher3/widget/BaseWidgetSheet.java
@@ -35,7 +35,6 @@
import com.android.launcher3.testing.TestLogging;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.touch.ItemLongClickListener;
-import com.android.launcher3.uioverrides.WallpaperColorInfo;
import com.android.launcher3.util.SystemUiController;
import com.android.launcher3.util.Themes;
import com.android.launcher3.views.AbstractSlideInView;
@@ -56,9 +55,8 @@
}
protected int getScrimColor(Context context) {
- WallpaperColorInfo colors = WallpaperColorInfo.INSTANCE.get(context);
int alpha = context.getResources().getInteger(R.integer.extracted_color_gradient_alpha);
- return setColorAlphaBound(colors.getSecondaryColor(), alpha);
+ return setColorAlphaBound(context.getColor(R.color.wallpaper_popup_scrim), alpha);
}
@Override
diff --git a/src/com/android/launcher3/widget/LocalColorExtractor.java b/src/com/android/launcher3/widget/LocalColorExtractor.java
index 097158b..be4faea 100644
--- a/src/com/android/launcher3/widget/LocalColorExtractor.java
+++ b/src/com/android/launcher3/widget/LocalColorExtractor.java
@@ -16,6 +16,7 @@
package com.android.launcher3.widget;
+import android.app.WallpaperColors;
import android.appwidget.AppWidgetHostView;
import android.content.Context;
import android.graphics.RectF;
@@ -43,7 +44,10 @@
void onColorsChanged(RectF rect, SparseIntArray extractedColors);
}
- static LocalColorExtractor newInstance(Context context) {
+ /**
+ * Creates a new instance of LocalColorExtractor
+ */
+ public static LocalColorExtractor newInstance(Context context) {
return Overrides.getObject(LocalColorExtractor.class, context.getApplicationContext(),
R.string.local_colors_extraction_class);
}
@@ -62,4 +66,9 @@
public void removeLocations() {
// no-op
}
+
+ /**
+ * Updates the base context to contain the colors override
+ */
+ public void applyColorsOverride(Context base, WallpaperColors colors) { }
}
diff --git a/src/com/android/launcher3/widget/WidgetsBottomSheet.java b/src/com/android/launcher3/widget/WidgetsBottomSheet.java
index 155a285..f18b63e 100644
--- a/src/com/android/launcher3/widget/WidgetsBottomSheet.java
+++ b/src/com/android/launcher3/widget/WidgetsBottomSheet.java
@@ -20,6 +20,7 @@
import android.animation.PropertyValuesHolder;
import android.content.Context;
+import android.content.res.Configuration;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.util.IntProperty;
@@ -71,6 +72,7 @@
private Rect mInsets;
private final int mMaxTableHeight;
private int mMaxHorizontalSpan = 4;
+ private Configuration mCurrentConfiguration;
public WidgetsBottomSheet(Context context, AttributeSet attrs) {
this(context, attrs, 0);
@@ -85,6 +87,7 @@
// Set the max table height to 2 / 3 of the grid height so that the bottom picker won't
// take over the entire view vertically.
mMaxTableHeight = deviceProfile.inv.numRows * 2 / 3 * deviceProfile.cellHeightPx;
+ mCurrentConfiguration = new Configuration(getResources().getConfiguration());
}
@Override
@@ -212,6 +215,14 @@
}
@Override
+ protected void onConfigurationChanged(Configuration newConfig) {
+ if (mCurrentConfiguration.orientation != newConfig.orientation) {
+ mInsets.setEmpty();
+ }
+ mCurrentConfiguration.updateFrom(newConfig);
+ }
+
+ @Override
protected Pair<View, String> getAccessibilityTarget() {
return Pair.create(findViewById(R.id.title), getContext().getString(
mIsOpen ? R.string.widgets_list : R.string.widgets_list_closed));
diff --git a/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java b/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java
index 240958b..b4d4856 100644
--- a/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java
+++ b/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java
@@ -28,7 +28,6 @@
import android.os.Process;
import android.os.UserHandle;
import android.util.AttributeSet;
-import android.util.Log;
import android.util.Pair;
import android.util.SparseArray;
import android.view.LayoutInflater;
@@ -221,7 +220,7 @@
WidgetsRecyclerView currentRecyclerView =
mAdapters.get(currentActivePage).mWidgetsRecyclerView;
- updateNoWidgetsView(currentAdapterHolder);
+ updateRecyclerViewVisibility(currentAdapterHolder);
attachScrollbarToRecyclerView(currentRecyclerView);
resetExpandedHeaders();
}
@@ -232,22 +231,17 @@
reset();
}
- private void updateNoWidgetsView(AdapterHolder adapterHolder) {
+ private void updateRecyclerViewVisibility(AdapterHolder adapterHolder) {
boolean isWidgetAvailable = adapterHolder.mWidgetsListAdapter.getItemCount() > 0;
adapterHolder.mWidgetsRecyclerView.setVisibility(isWidgetAvailable ? VISIBLE : GONE);
- // Always resets the text in case this is updated by search.
- mNoWidgetsView.setText(R.string.no_widgets_available);
+ mNoWidgetsView.setText(
+ adapterHolder.mAdapterType == AdapterHolder.SEARCH
+ ? R.string.no_search_results
+ : R.string.no_widgets_available);
mNoWidgetsView.setVisibility(isWidgetAvailable ? GONE : VISIBLE);
}
- private void updateNoSearchResultsView(boolean isVisible) {
- mNoWidgetsView.setVisibility(isVisible ? VISIBLE : GONE);
- if (isVisible) {
- mNoWidgetsView.setText(R.string.no_search_results);
- }
- }
-
private void reset() {
mAdapters.get(AdapterHolder.PRIMARY).mWidgetsRecyclerView.scrollToTop();
if (mHasWorkProfile) {
@@ -394,16 +388,22 @@
@Override
public void onWidgetsBound() {
+ if (mIsInSearchMode) {
+ return;
+ }
List<WidgetsListBaseEntry> allWidgets = mLauncher.getPopupDataProvider().getAllWidgets();
AdapterHolder primaryUserAdapterHolder = mAdapters.get(AdapterHolder.PRIMARY);
primaryUserAdapterHolder.mWidgetsListAdapter.setWidgets(allWidgets);
- updateNoWidgetsView(primaryUserAdapterHolder);
if (mHasWorkProfile) {
+ mViewPager.setVisibility(VISIBLE);
+ mTabsView.setVisibility(VISIBLE);
AdapterHolder workUserAdapterHolder = mAdapters.get(AdapterHolder.WORK);
workUserAdapterHolder.mWidgetsListAdapter.setWidgets(allWidgets);
onActivePageChanged(mViewPager.getCurrentPage());
+ } else {
+ updateRecyclerViewVisibility(primaryUserAdapterHolder);
}
}
@@ -431,8 +431,7 @@
@Override
public void onSearchResults(List<WidgetsListBaseEntry> entries) {
mAdapters.get(AdapterHolder.SEARCH).mWidgetsListAdapter.setWidgetsOnSearch(entries);
- updateNoSearchResultsView(
- mAdapters.get(AdapterHolder.SEARCH).mWidgetsListAdapter.getItemCount() == 0);
+ updateRecyclerViewVisibility(mAdapters.get(AdapterHolder.SEARCH));
mAdapters.get(AdapterHolder.SEARCH).mWidgetsRecyclerView.scrollToTop();
}
@@ -440,19 +439,22 @@
mIsInSearchMode = isInSearchMode;
if (isInSearchMode) {
mSearchAndRecommendationViewHolder.mRecommendedWidgetsTable.setVisibility(GONE);
+ if (mHasWorkProfile) {
+ mViewPager.setVisibility(GONE);
+ mTabsView.setVisibility(GONE);
+ } else {
+ mAdapters.get(AdapterHolder.PRIMARY).mWidgetsRecyclerView.setVisibility(GONE);
+ }
+ updateRecyclerViewVisibility(mAdapters.get(AdapterHolder.SEARCH));
+ // Hide no search results view to prevent it from flashing on enter search.
+ mNoWidgetsView.setVisibility(GONE);
} else {
+ mAdapters.get(AdapterHolder.SEARCH).mWidgetsRecyclerView.setVisibility(GONE);
+ // Visibility of recommended widgets, recycler views and headers are handled in methods
+ // below.
onRecommendedWidgetsBound();
+ onWidgetsBound();
}
- if (mHasWorkProfile) {
- mViewPager.setVisibility(isInSearchMode ? GONE : VISIBLE);
- mTabsView.setVisibility(isInSearchMode ? GONE : VISIBLE);
- } else {
- mAdapters.get(AdapterHolder.PRIMARY).mWidgetsRecyclerView
- .setVisibility(isInSearchMode ? GONE : VISIBLE);
- }
- mAdapters.get(AdapterHolder.SEARCH).mWidgetsRecyclerView
- .setVisibility(mIsInSearchMode ? VISIBLE : GONE);
- mNoWidgetsView.setVisibility(GONE);
}
private void resetExpandedHeaders() {
@@ -462,15 +464,14 @@
@Override
public void onRecommendedWidgetsBound() {
+ if (mIsInSearchMode) {
+ return;
+ }
List<WidgetItem> recommendedWidgets =
mLauncher.getPopupDataProvider().getRecommendedWidgets();
WidgetsRecommendationTableLayout table =
mSearchAndRecommendationViewHolder.mRecommendedWidgetsTable;
- if (!mIsInSearchMode && recommendedWidgets.size() > 0) {
- // TODO(b/185508758): Revert the following log after debugging.
- if (getHeaderViewHeight() == 0) {
- Log.d(TAG, "Header view height is 0 when inflating recommended widgets");
- }
+ if (recommendedWidgets.size() > 0) {
float maxTableHeight =
(mLauncher.getDeviceProfile().availableHeightPx - mTabsHeight
- getHeaderViewHeight()) * RECOMMENDATION_TABLE_HEIGHT_RATIO;
diff --git a/src/com/android/launcher3/widget/picker/WidgetsListHeader.java b/src/com/android/launcher3/widget/picker/WidgetsListHeader.java
index 8794a4a..41aa437 100644
--- a/src/com/android/launcher3/widget/picker/WidgetsListHeader.java
+++ b/src/com/android/launcher3/widget/picker/WidgetsListHeader.java
@@ -19,7 +19,10 @@
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
+import android.os.Bundle;
import android.util.AttributeSet;
+import android.view.View;
+import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.LinearLayout;
@@ -32,7 +35,6 @@
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.R;
-import com.android.launcher3.icons.FastBitmapDrawable;
import com.android.launcher3.icons.IconCache.ItemInfoUpdateReceiver;
import com.android.launcher3.icons.PlaceHolderIconDrawable;
import com.android.launcher3.icons.cache.HandlerRunnable;
@@ -94,6 +96,32 @@
mTitle = findViewById(R.id.app_title);
mSubtitle = findViewById(R.id.app_subtitle);
mExpandToggle = findViewById(R.id.toggle);
+ findViewById(R.id.app_container).setAccessibilityDelegate(new AccessibilityDelegate() {
+
+ @Override
+ public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) {
+ if (mIsExpanded) {
+ info.removeAction(AccessibilityNodeInfo.ACTION_EXPAND);
+ info.addAction(AccessibilityNodeInfo.ACTION_COLLAPSE);
+ } else {
+ info.removeAction(AccessibilityNodeInfo.ACTION_COLLAPSE);
+ info.addAction(AccessibilityNodeInfo.ACTION_EXPAND);
+ }
+ super.onInitializeAccessibilityNodeInfo(host, info);
+ }
+
+ @Override
+ public boolean performAccessibilityAction(View host, int action, Bundle args) {
+ switch (action) {
+ case AccessibilityNodeInfo.ACTION_EXPAND:
+ case AccessibilityNodeInfo.ACTION_COLLAPSE:
+ callOnClick();
+ return true;
+ default:
+ return super.performAccessibilityAction(host, action, args);
+ }
+ }
+ });
}
/**
@@ -106,7 +134,9 @@
// Use the entire touch area of this view to expand / collapse an app widgets section.
setOnClickListener(view -> {
setExpanded(!mIsExpanded);
- onExpandChangeListener.onExpansionChange(mIsExpanded);
+ if (onExpandChangeListener != null) {
+ onExpandChangeListener.onExpansionChange(mIsExpanded);
+ }
});
}
@@ -143,7 +173,14 @@
}
private void setIcon(PackageItemInfo info) {
- FastBitmapDrawable icon = info.newIcon(getContext());
+ Drawable icon;
+ switch (info.category) {
+ case PackageItemInfo.CONVERSATIONS:
+ icon = getContext().getDrawable(R.drawable.ic_conversations_widget_category);
+ break;
+ default:
+ icon = info.newIcon(getContext());
+ }
applyDrawables(icon);
mIconDrawable = icon;
if (mIconDrawable != null) {
diff --git a/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java b/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java
index 2d3f1a0..62ef4ff 100644
--- a/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java
+++ b/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java
@@ -93,9 +93,6 @@
mRecommendationTableMaxHeight = recommendationTableMaxHeight;
RecommendationTableData data = fitRecommendedWidgetsToTableSpace(/* previewScale= */ 1f,
recommendedWidgets);
- // TODO(b/185508758): Revert the following logs after debugging.
- Log.d(TAG, "Recommended widgets section max height: " + recommendationTableMaxHeight);
- Log.d(TAG, "Recommended widget down scale: " + data.mPreviewScale);
bindData(data);
}
diff --git a/src_ui_overrides/com/android/launcher3/uioverrides/WallpaperColorInfo.java b/src_ui_overrides/com/android/launcher3/uioverrides/WallpaperColorInfo.java
deleted file mode 100644
index b3aa365..0000000
--- a/src_ui_overrides/com/android/launcher3/uioverrides/WallpaperColorInfo.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (C) 2018 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.uioverrides;
-
-import static android.app.WallpaperManager.FLAG_SYSTEM;
-
-import android.content.Context;
-import android.graphics.Color;
-import android.util.Pair;
-
-import com.android.launcher3.uioverrides.dynamicui.ColorExtractionAlgorithm;
-import com.android.launcher3.uioverrides.dynamicui.WallpaperColorsCompat;
-import com.android.launcher3.uioverrides.dynamicui.WallpaperManagerCompat;
-import com.android.launcher3.util.MainThreadInitializedObject;
-
-import java.util.ArrayList;
-
-public class WallpaperColorInfo implements WallpaperManagerCompat.OnColorsChangedListenerCompat {
-
- private static final int MAIN_COLOR_LIGHT = 0xffdadce0;
- private static final int MAIN_COLOR_DARK = 0xff202124;
- private static final int MAIN_COLOR_REGULAR = 0xff000000;
-
- private static final int FALLBACK_COLOR = Color.WHITE;
-
- public static final MainThreadInitializedObject<WallpaperColorInfo> INSTANCE =
- new MainThreadInitializedObject<>(WallpaperColorInfo::new);
-
- private final ArrayList<OnChangeListener> mListeners = new ArrayList<>();
- private final WallpaperManagerCompat mWallpaperManager;
- private final ColorExtractionAlgorithm mExtractionType;
- private int mMainColor;
- private int mSecondaryColor;
- private boolean mIsDark;
- private boolean mSupportsDarkText;
-
- private OnChangeListener[] mTempListeners;
-
- private WallpaperColorInfo(Context context) {
- mWallpaperManager = WallpaperManagerCompat.getInstance(context);
- mWallpaperManager.addOnColorsChangedListener(this);
- mExtractionType = new ColorExtractionAlgorithm();
- update(mWallpaperManager.getWallpaperColors(FLAG_SYSTEM));
- }
-
- public int getMainColor() {
- return mMainColor;
- }
-
- public int getSecondaryColor() {
- return mSecondaryColor;
- }
-
- public boolean isDark() {
- return mIsDark;
- }
-
- public boolean supportsDarkText() {
- return mSupportsDarkText;
- }
-
- public boolean isMainColorDark() {
- return mMainColor == MAIN_COLOR_DARK;
- }
-
- @Override
- public void onColorsChanged(WallpaperColorsCompat colors, int which) {
- if ((which & FLAG_SYSTEM) != 0) {
- update(colors);
- notifyChange();
- }
- }
-
- private void update(WallpaperColorsCompat wallpaperColors) {
- Pair<Integer, Integer> colors = mExtractionType.extractInto(wallpaperColors);
- if (colors != null) {
- mMainColor = colors.first;
- mSecondaryColor = colors.second;
- } else {
- mMainColor = FALLBACK_COLOR;
- mSecondaryColor = FALLBACK_COLOR;
- }
- mSupportsDarkText = wallpaperColors != null
- ? (wallpaperColors.getColorHints()
- & WallpaperColorsCompat.HINT_SUPPORTS_DARK_TEXT) > 0 : false;
- mIsDark = wallpaperColors != null
- ? (wallpaperColors.getColorHints()
- & WallpaperColorsCompat.HINT_SUPPORTS_DARK_THEME) > 0 : false;
- }
-
- public void addOnChangeListener(OnChangeListener listener) {
- mListeners.add(listener);
- }
-
- public void removeOnChangeListener(OnChangeListener listener) {
- mListeners.remove(listener);
- }
-
- private void notifyChange() {
- OnChangeListener[] copy =
- mTempListeners != null && mTempListeners.length == mListeners.size() ?
- mTempListeners : new OnChangeListener[mListeners.size()];
-
- // Create a new array to avoid concurrent modification when the activity destroys itself.
- mTempListeners = mListeners.toArray(copy);
- for (OnChangeListener listener : mTempListeners) {
- listener.onExtractedColorsChanged(this);
- }
- }
-
- public interface OnChangeListener {
- void onExtractedColorsChanged(WallpaperColorInfo wallpaperColorInfo);
- }
-}
\ No newline at end of file
diff --git a/src_ui_overrides/com/android/launcher3/uioverrides/dynamicui/ColorExtractionAlgorithm.java b/src_ui_overrides/com/android/launcher3/uioverrides/dynamicui/ColorExtractionAlgorithm.java
deleted file mode 100644
index 780a0f0..0000000
--- a/src_ui_overrides/com/android/launcher3/uioverrides/dynamicui/ColorExtractionAlgorithm.java
+++ /dev/null
@@ -1,795 +0,0 @@
-/*
- * Copyright (C) 2017 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.uioverrides.dynamicui;
-
-import android.graphics.Color;
-import android.util.Log;
-import android.util.Pair;
-import android.util.Range;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.core.graphics.ColorUtils;
-
-import com.android.launcher3.Utilities;
-
-import java.util.Arrays;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * Implementation of tonal color extraction
- **/
-public class ColorExtractionAlgorithm {
-
- private static final String TAG = "Tonal";
-
- // Used for tonal palette fitting
- private static final float FIT_WEIGHT_H = 1.0f;
- private static final float FIT_WEIGHT_S = 1.0f;
- private static final float FIT_WEIGHT_L = 10.0f;
-
- public static final int MAIN_COLOR_LIGHT = 0xffb0b0b0;
- public static final int SECONDARY_COLOR_LIGHT = 0xff9e9e9e;
- public static final int MAIN_COLOR_DARK = 0xff212121;
- public static final int SECONDARY_COLOR_DARK = 0xff000000;
-
- // Temporary variable to avoid allocations
- private float[] mTmpHSL = new float[3];
-
- public Pair<Integer, Integer> extractInto(WallpaperColorsCompat inWallpaperColors) {
- if (inWallpaperColors == null) {
- return applyFallback(inWallpaperColors);
- }
-
- final List<Integer> mainColors = getMainColors(inWallpaperColors);
- final int mainColorsSize = mainColors.size();
- final boolean supportsDarkText = (inWallpaperColors.getColorHints() &
- WallpaperColorsCompat.HINT_SUPPORTS_DARK_TEXT) != 0;
-
- if (mainColorsSize == 0) {
- return applyFallback(inWallpaperColors);
- }
- // Tonal is not really a sort, it takes a color from the extracted
- // palette and finds a best fit amongst a collection of pre-defined
- // palettes. The best fit is tweaked to be closer to the source color
- // and replaces the original palette
-
- // Get the most preeminent, non-disallowed color.
- Integer bestColor = 0;
- final float[] hsl = new float[3];
- for (int i = 0; i < mainColorsSize; i++) {
- final int colorValue = mainColors.get(i);
- ColorUtils.RGBToHSL(Color.red(colorValue), Color.green(colorValue),
- Color.blue(colorValue), hsl);
-
- // Stop when we find a color that meets our criteria
- if (!isDisallowed(hsl)) {
- bestColor = colorValue;
- break;
- }
- }
-
- // Fail if not found
- if (bestColor == null) {
- return applyFallback(inWallpaperColors);
- }
-
- int colorValue = bestColor;
- ColorUtils.RGBToHSL(Color.red(colorValue), Color.green(colorValue), Color.blue(colorValue),
- hsl);
-
- // The Android HSL definition requires the hue to go from 0 to 360 but
- // the Material Tonal Palette defines hues from 0 to 1.
- hsl[0] /= 360f;
-
- // Find the palette that contains the closest color
- TonalPalette palette = findTonalPalette(hsl[0], hsl[1]);
- if (palette == null) {
- Log.w(TAG, "Could not find a tonal palette!");
- return applyFallback(inWallpaperColors);
- }
-
- // Figure out what's the main color index in the optimal palette
- int fitIndex = bestFit(palette, hsl[0], hsl[1], hsl[2]);
- if (fitIndex == -1) {
- Log.w(TAG, "Could not find best fit!");
- return applyFallback(inWallpaperColors);
- }
-
- // Generate the 10 colors palette by offsetting each one of them
- float[] h = fit(palette.h, hsl[0], fitIndex,
- Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY);
- float[] s = fit(palette.s, hsl[1], fitIndex, 0.0f, 1.0f);
- float[] l = fit(palette.l, hsl[2], fitIndex, 0.0f, 1.0f);
-
- int primaryIndex = fitIndex;
- int mainColor = getColorInt(primaryIndex, h, s, l);
-
- // We might want use the fallback in case the extracted color is brighter than our
- // light fallback or darker than our dark fallback.
- ColorUtils.colorToHSL(mainColor, mTmpHSL);
- final float mainLuminosity = mTmpHSL[2];
- ColorUtils.colorToHSL(MAIN_COLOR_LIGHT, mTmpHSL);
- final float lightLuminosity = mTmpHSL[2];
- if (mainLuminosity > lightLuminosity) {
- return applyFallback(inWallpaperColors);
- }
- ColorUtils.colorToHSL(MAIN_COLOR_DARK, mTmpHSL);
- final float darkLuminosity = mTmpHSL[2];
- if (mainLuminosity < darkLuminosity) {
- return applyFallback(inWallpaperColors);
- }
-
- // Dark colors:
- // Stops at 4th color, only lighter if dark text is supported
- if (supportsDarkText) {
- primaryIndex = h.length - 1;
- } else if (fitIndex < 2) {
- primaryIndex = 0;
- } else {
- primaryIndex = Math.min(fitIndex, 3);
- }
- int secondaryIndex = primaryIndex + (primaryIndex >= 2 ? -2 : 2);
- int secondaryColor = getColorInt(secondaryIndex, h, s, l);
-
- return new Pair<>(mainColor, secondaryColor);
- }
-
- public static Pair<Integer, Integer> applyFallback(WallpaperColorsCompat inWallpaperColors) {
- boolean light = inWallpaperColors != null
- && (inWallpaperColors.getColorHints()
- & WallpaperColorsCompat.HINT_SUPPORTS_DARK_TEXT)!= 0;
- int innerColor = light ? MAIN_COLOR_LIGHT : MAIN_COLOR_DARK;
- int outerColor = light ? SECONDARY_COLOR_LIGHT : SECONDARY_COLOR_DARK;
- return new Pair<>(innerColor, outerColor);
- }
-
- private int getColorInt(int fitIndex, float[] h, float[] s, float[] l) {
- mTmpHSL[0] = fract(h[fitIndex]) * 360.0f;
- mTmpHSL[1] = s[fitIndex];
- mTmpHSL[2] = l[fitIndex];
- return ColorUtils.HSLToColor(mTmpHSL);
- }
-
- /**
- * Checks if a given color exists in the disallowed_colors list.
- * @param hsl float array with 3 components (H 0..360, S 0..1 and L 0..1)
- * @return true if color should be avoided
- */
- private boolean isDisallowed(float[] hsl) {
- for (ColorRange badRange: DISALLOWED_COLORS) {
- if (badRange.containsColor(hsl[0], hsl[1], hsl[2])) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Offsets all colors by a delta, clamping values that go beyond what's
- * supported on the color space.
- * @param data what you want to fit
- * @param v how big should be the offset
- * @param index which index to calculate the delta against
- * @param min minimum accepted value (clamp)
- * @param max maximum accepted value (clamp)
- * @return new shifted palette
- */
- private static float[] fit(float[] data, float v, int index, float min, float max) {
- float[] fitData = new float[data.length];
- float delta = v - data[index];
-
- for (int i = 0; i < data.length; i++) {
- fitData[i] = Utilities.boundToRange(data[i] + delta, min, max);
- }
-
- return fitData;
- }
-
- /**
- * Finds the closest color in a palette, given another HSL color
- *
- * @param palette where to search
- * @param h hue
- * @param s saturation
- * @param l lightness
- * @return closest index or -1 if palette is empty.
- */
- private static int bestFit(@NonNull TonalPalette palette, float h, float s, float l) {
- int minErrorIndex = -1;
- float minError = Float.POSITIVE_INFINITY;
-
- for (int i = 0; i < palette.h.length; i++) {
- float error =
- FIT_WEIGHT_H * Math.abs(h - palette.h[i])
- + FIT_WEIGHT_S * Math.abs(s - palette.s[i])
- + FIT_WEIGHT_L * Math.abs(l - palette.l[i]);
- if (error < minError) {
- minError = error;
- minErrorIndex = i;
- }
- }
-
- return minErrorIndex;
- }
-
- @Nullable
- private static TonalPalette findTonalPalette(float h, float s) {
- // Fallback to a grey palette if the color is too desaturated.
- // This avoids hue shifts.
- if (s < 0.05f) {
- return GREY_PALETTE;
- }
-
- TonalPalette best = null;
- float error = Float.POSITIVE_INFINITY;
-
- for (int i = 0; i < TONAL_PALETTES.length; i++) {
- final TonalPalette candidate = TONAL_PALETTES[i];
-
- if (h >= candidate.minHue && h <= candidate.maxHue) {
- best = candidate;
- break;
- }
-
- if (candidate.maxHue > 1.0f && h >= 0.0f && h <= fract(candidate.maxHue)) {
- best = candidate;
- break;
- }
-
- if (candidate.minHue < 0.0f && h >= fract(candidate.minHue) && h <= 1.0f) {
- best = candidate;
- break;
- }
-
- if (h <= candidate.minHue && candidate.minHue - h < error) {
- best = candidate;
- error = candidate.minHue - h;
- } else if (h >= candidate.maxHue && h - candidate.maxHue < error) {
- best = candidate;
- error = h - candidate.maxHue;
- } else if (candidate.maxHue > 1.0f && h >= fract(candidate.maxHue)
- && h - fract(candidate.maxHue) < error) {
- best = candidate;
- error = h - fract(candidate.maxHue);
- } else if (candidate.minHue < 0.0f && h <= fract(candidate.minHue)
- && fract(candidate.minHue) - h < error) {
- best = candidate;
- error = fract(candidate.minHue) - h;
- }
- }
-
- return best;
- }
-
- private static float fract(float v) {
- return v - (float) Math.floor(v);
- }
-
- static class TonalPalette {
- final float[] h;
- final float[] s;
- final float[] l;
- final float minHue;
- final float maxHue;
-
- TonalPalette(float[] h, float[] s, float[] l) {
- if (h.length != s.length || s.length != l.length) {
- throw new IllegalArgumentException("All arrays should have the same size. h: "
- + Arrays.toString(h) + " s: " + Arrays.toString(s) + " l: "
- + Arrays.toString(l));
- }
-
- this.h = h;
- this.s = s;
- this.l = l;
-
- float minHue = Float.POSITIVE_INFINITY;
- float maxHue = Float.NEGATIVE_INFINITY;
-
- for (float v : h) {
- minHue = Math.min(v, minHue);
- maxHue = Math.max(v, maxHue);
- }
-
- this.minHue = minHue;
- this.maxHue = maxHue;
- }
- }
-
- // Data definition of Material Design tonal palettes
- // When the sort type is set to TONAL, these palettes are used to find
- // a best fit. Each palette is defined as 22 HSL colors
- private static final TonalPalette[] TONAL_PALETTES = {
- new TonalPalette(
- new float[] {1f, 1f, 0.991f, 0.991f, 0.9833333333333333f, 0f, 0f, 0f,
- 0.01134380453752181f, 0.015625000000000003f, 0.024193548387096798f,
- 0.027397260273972573f, 0.017543859649122865f},
- new float[] {1f, 1f, 1f, 1f, 1f, 1f, 1f, 0.8434782608695652f, 1f, 1f, 1f, 1f,
- 1f},
- new float[] {0.04f, 0.09f, 0.14f, 0.2f, 0.27450980392156865f,
- 0.34901960784313724f, 0.4235294117647059f, 0.5490196078431373f,
- 0.6254901960784314f, 0.6862745098039216f, 0.7568627450980392f,
- 0.8568627450980393f, 0.9254901960784314f}
- ),
- new TonalPalette(
- new float[] {0.638f, 0.638f, 0.6385767790262171f, 0.6301169590643275f,
- 0.6223958333333334f, 0.6151079136690647f, 0.6065400843881856f,
- 0.5986964618249534f, 0.5910746812386157f, 0.5833333333333334f,
- 0.5748031496062993f, 0.5582010582010583f},
- new float[] {1f, 1f, 1f, 1f, 0.9014084507042253f, 0.8128654970760234f,
- 0.7979797979797981f, 0.7816593886462883f, 0.778723404255319f, 1f, 1f,
- 1f},
- new float[] {0.05f, 0.12f, 0.17450980392156862f, 0.2235294117647059f,
- 0.2784313725490196f, 0.3352941176470588f, 0.388235294117647f,
- 0.44901960784313727f, 0.5392156862745098f, 0.6509803921568628f,
- 0.7509803921568627f, 0.8764705882352941f}
- ),
- new TonalPalette(
- new float[] {0.563f, 0.569f, 0.5666f, 0.5669934640522876f, 0.5748031496062993f,
- 0.5595238095238095f, 0.5473118279569893f, 0.5393258426966292f,
- 0.5315955766192734f, 0.524031007751938f, 0.5154711673699016f,
- 0.508080808080808f, 0.5f},
- new float[] {1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 0.8847736625514403f, 1f, 1f,
- 1f},
- new float[] {0.07f, 0.12f, 0.16f, 0.2f, 0.24901960784313726f,
- 0.27450980392156865f, 0.30392156862745096f, 0.34901960784313724f,
- 0.4137254901960784f, 0.47647058823529415f, 0.5352941176470588f,
- 0.6764705882352942f, 0.8f}
- ),
- new TonalPalette(
- new float[] {0.508f, 0.511f, 0.508f, 0.508f, 0.5082304526748972f,
- 0.5069444444444444f, 0.5f, 0.5f, 0.5f, 0.48724954462659376f,
- 0.4800347222222222f, 0.4755134281200632f, 0.4724409448818897f,
- 0.4671052631578947f},
- new float[] {1f, 1f, 1f, 1f, 1f, 0.8888888888888887f, 0.9242424242424242f, 1f,
- 1f, 0.8133333333333332f, 0.7868852459016393f, 1f, 1f, 1f},
- new float[] {0.04f, 0.06f, 0.08f, 0.12f, 0.1588235294117647f,
- 0.21176470588235297f, 0.25882352941176473f, 0.3f, 0.34901960784313724f,
- 0.44117647058823534f, 0.5215686274509804f, 0.5862745098039216f,
- 0.7509803921568627f, 0.8509803921568627f}
- ),
- new TonalPalette(
- new float[] {0.333f, 0.333f, 0.333f, 0.3333333333333333f, 0.3333333333333333f,
- 0.34006734006734f, 0.34006734006734f, 0.34006734006734f,
- 0.34259259259259256f, 0.3475783475783476f, 0.34767025089605735f,
- 0.3467741935483871f, 0.3703703703703704f},
- new float[] {0.70f, 0.72f, 0.69f, 0.6703296703296703f, 0.728813559322034f,
- 0.5657142857142856f, 0.5076923076923077f, 0.3944223107569721f,
- 0.6206896551724138f, 0.8931297709923666f, 1f, 1f, 1f},
- new float[] {0.05f, 0.08f, 0.14f, 0.1784313725490196f, 0.23137254901960785f,
- 0.3431372549019608f, 0.38235294117647056f, 0.49215686274509807f,
- 0.6588235294117647f, 0.7431372549019608f, 0.8176470588235294f,
- 0.8784313725490196f, 0.9294117647058824f}
- ),
- new TonalPalette(
- new float[] {0.161f, 0.163f, 0.163f, 0.162280701754386f, 0.15032679738562088f,
- 0.15879265091863518f, 0.16236559139784948f, 0.17443868739205526f,
- 0.17824074074074076f, 0.18674698795180725f, 0.18692449355432778f,
- 0.1946778711484594f, 0.18604651162790695f},
- new float[] {1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f},
- new float[] {0.05f, 0.08f, 0.11f, 0.14901960784313725f, 0.2f,
- 0.24901960784313726f, 0.30392156862745096f, 0.3784313725490196f,
- 0.4235294117647059f, 0.48823529411764705f, 0.6450980392156863f,
- 0.7666666666666666f, 0.8313725490196078f}
- ),
- new TonalPalette(
- new float[] {0.108f, 0.105f, 0.105f, 0.105f, 0.10619469026548674f,
- 0.11924686192468618f, 0.13046448087431692f, 0.14248366013071895f,
- 0.1506024096385542f, 0.16220238095238093f, 0.16666666666666666f,
- 0.16666666666666666f, 0.162280701754386f, 0.15686274509803924f},
- new float[] {1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f},
- new float[] {0.17f, 0.22f, 0.28f, 0.35f, 0.44313725490196076f,
- 0.46862745098039216f, 0.47843137254901963f, 0.5f, 0.5117647058823529f,
- 0.5607843137254902f, 0.6509803921568628f, 0.7509803921568627f,
- 0.8509803921568627f, 0.9f}
- ),
- new TonalPalette(
- new float[] {0.036f, 0.036f, 0.036f, 0.036f, 0.03561253561253561f,
- 0.05098039215686275f, 0.07516339869281045f, 0.09477124183006536f,
- 0.1150326797385621f, 0.134640522875817f, 0.14640522875816991f,
- 0.1582397003745319f, 0.15773809523809523f, 0.15359477124183002f},
- new float[] {1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f},
- new float[] {0.19f, 0.26f, 0.34f, 0.39f, 0.4588235294117647f, 0.5f, 0.5f, 0.5f,
- 0.5f, 0.5f, 0.5f, 0.6509803921568628f, 0.7803921568627451f, 0.9f}
- ),
- new TonalPalette(
- new float[] {0.955f, 0.961f, 0.958f, 0.9596491228070175f, 0.9593837535014005f,
- 0.9514767932489452f, 0.943859649122807f, 0.9396825396825397f,
- 0.9395424836601307f, 0.9393939393939394f, 0.9362745098039216f,
- 0.9754098360655739f, 0.9824561403508771f},
- new float[] {0.87f, 0.85f, 0.85f, 0.84070796460177f, 0.8206896551724138f,
- 0.7979797979797981f, 0.7661290322580644f, 0.9051724137931036f,
- 1f, 1f, 1f, 1f, 1f},
- new float[] {0.06f, 0.11f, 0.16f, 0.22156862745098038f, 0.2843137254901961f,
- 0.388235294117647f, 0.48627450980392156f, 0.5450980392156863f,
- 0.6f, 0.6764705882352942f, 0.8f, 0.8803921568627451f,
- 0.9254901960784314f}
- ),
- new TonalPalette(
- new float[] {0.866f, 0.855f, 0.841025641025641f, 0.8333333333333334f,
- 0.8285256410256411f, 0.821522309711286f, 0.8083333333333333f,
- 0.8046594982078853f, 0.8005822416302766f, 0.7842377260981912f,
- 0.7771084337349398f, 0.7747747747747749f},
- new float[] {1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f,
- 0.737142857142857f, 0.6434108527131781f, 0.46835443037974644f},
- new float[] {0.05f, 0.08f, 0.12745098039215685f, 0.15490196078431373f,
- 0.20392156862745098f, 0.24901960784313726f, 0.3137254901960784f,
- 0.36470588235294116f, 0.44901960784313727f, 0.6568627450980392f,
- 0.7470588235294118f, 0.8450980392156863f}
- ),
- new TonalPalette(
- new float[] {0.925f, 0.93f, 0.938f, 0.947f, 0.955952380952381f,
- 0.9681069958847737f, 0.9760479041916167f, 0.9873563218390804f, 0f, 0f,
- 0.009057971014492771f, 0.026748971193415648f,
- 0.041666666666666616f, 0.05303030303030304f},
- new float[] {1f, 1f, 1f, 1f, 1f, 0.8350515463917526f, 0.6929460580912863f,
- 0.6387665198237885f, 0.6914893617021276f, 0.7583892617449666f,
- 0.8070175438596495f, 0.9310344827586209f, 1f, 1f},
- new float[] {0.10f, 0.13f, 0.17f, 0.2f, 0.27450980392156865f,
- 0.3803921568627451f, 0.4725490196078432f, 0.5549019607843138f,
- 0.6313725490196078f, 0.707843137254902f, 0.7764705882352941f,
- 0.8294117647058823f, 0.9058823529411765f, 0.9568627450980391f}
- ),
- new TonalPalette(
- new float[] {0.733f, 0.736f, 0.744f, 0.7514619883040936f, 0.7679738562091503f,
- 0.7802083333333333f, 0.7844311377245509f, 0.796875f,
- 0.8165618448637316f, 0.8487179487179487f, 0.8582375478927203f,
- 0.8562091503267975f, 0.8666666666666667f},
- new float[] {1f, 1f, 1f, 1f, 1f, 0.8163265306122449f, 0.6653386454183268f,
- 0.7547169811320753f, 0.929824561403509f, 0.9558823529411766f,
- 0.9560439560439562f, 1f, 1f},
- new float[] {0.07f, 0.12f, 0.17f, 0.2235294117647059f, 0.3f,
- 0.38431372549019605f, 0.492156862745098f, 0.5843137254901961f,
- 0.6647058823529411f, 0.7333333333333334f, 0.8215686274509804f, 0.9f,
- 0.9411764705882353f}
- ),
- new TonalPalette(
- new float[] {0.6666666666666666f, 0.6666666666666666f, 0.6666666666666666f,
- 0.6666666666666666f, 0.6666666666666666f, 0.6666666666666666f,
- 0.6666666666666666f, 0.6666666666666666f, 0.6666666666666666f,
- 0.6666666666666666f, 0.6666666666666666f},
- new float[] {0.25f, 0.24590163934426232f, 0.17880794701986752f,
- 0.14606741573033713f, 0.13761467889908252f, 0.14893617021276592f,
- 0.16756756756756758f, 0.20312500000000017f, 0.26086956521739135f,
- 0.29999999999999966f, 0.5000000000000004f},
- new float[] {0.18f, 0.2392156862745098f, 0.296078431372549f,
- 0.34901960784313724f, 0.4274509803921569f, 0.5392156862745098f,
- 0.6372549019607843f, 0.7490196078431373f, 0.8196078431372549f,
- 0.8823529411764706f, 0.9372549019607843f}
- ),
- new TonalPalette(
- new float[] {0.938f, 0.944f, 0.952f, 0.961f, 0.9678571428571429f,
- 0.9944812362030905f, 0f, 0f,
- 0.0047348484848484815f, 0.00316455696202532f, 0f,
- 0.9980392156862745f, 0.9814814814814816f, 0.9722222222222221f},
- new float[] {1f, 1f, 1f, 1f, 1f, 0.7023255813953488f, 0.6638655462184874f,
- 0.6521739130434782f, 0.7719298245614035f, 0.8315789473684211f,
- 0.6867469879518071f, 0.7264957264957265f, 0.8181818181818182f,
- 0.8181818181818189f},
- new float[] {0.08f, 0.13f, 0.18f, 0.23f, 0.27450980392156865f,
- 0.4215686274509804f,
- 0.4666666666666667f, 0.503921568627451f, 0.5529411764705883f,
- 0.6274509803921569f, 0.6745098039215687f, 0.7705882352941176f,
- 0.892156862745098f, 0.9568627450980391f}
- ),
- new TonalPalette(
- new float[] {0.88f, 0.888f, 0.897f, 0.9052287581699346f, 0.9112021857923498f,
- 0.9270152505446624f, 0.9343137254901961f, 0.9391534391534391f,
- 0.9437984496124031f, 0.943661971830986f, 0.9438943894389439f,
- 0.9426229508196722f, 0.9444444444444444f},
- new float[] {1f, 1f, 1f, 1f, 0.8133333333333332f, 0.7927461139896375f,
- 0.7798165137614679f, 0.7777777777777779f, 0.8190476190476191f,
- 0.8255813953488372f, 0.8211382113821142f, 0.8133333333333336f,
- 0.8000000000000006f},
- new float[] {0.08f, 0.12f, 0.16f, 0.2f, 0.29411764705882354f,
- 0.3784313725490196f, 0.42745098039215684f, 0.4764705882352941f,
- 0.5882352941176471f, 0.6627450980392157f, 0.7588235294117647f,
- 0.8529411764705882f, 0.9411764705882353f}
- ),
- new TonalPalette(
- new float[] {0.669f, 0.680f, 0.6884057971014492f, 0.6974789915966387f,
- 0.7079889807162534f, 0.7154471544715447f, 0.7217741935483872f,
- 0.7274143302180687f, 0.7272727272727273f, 0.7258064516129031f,
- 0.7252252252252251f, 0.7333333333333333f},
- new float[] {0.81f, 0.81f, 0.8214285714285715f, 0.6878612716763006f,
- 0.6080402010050251f, 0.5774647887323943f, 0.5391304347826086f,
- 0.46724890829694316f, 0.4680851063829788f, 0.462686567164179f,
- 0.45679012345678977f, 0.4545454545454551f},
- new float[] {0.12f, 0.16f, 0.2196078431372549f, 0.33921568627450976f,
- 0.39019607843137255f, 0.4176470588235294f, 0.45098039215686275f,
- 0.5509803921568628f, 0.6313725490196078f, 0.7372549019607844f,
- 0.8411764705882353f, 0.9352941176470588f}
- ),
- new TonalPalette(
- new float[] {0.6470588235294118f, 0.6516666666666667f, 0.6464174454828661f,
- 0.6441441441441442f, 0.6432748538011696f, 0.6416666666666667f,
- 0.6402439024390243f, 0.6412429378531074f, 0.6435185185185186f,
- 0.6428571428571429f},
- new float[] {0.8095238095238095f, 0.6578947368421053f, 0.5721925133689839f,
- 0.5362318840579711f, 0.5f, 0.4424778761061947f, 0.44086021505376327f,
- 0.44360902255639095f, 0.4499999999999997f, 0.4375000000000006f},
- new float[] {0.16470588235294117f, 0.2980392156862745f, 0.36666666666666664f,
- 0.40588235294117647f, 0.44705882352941173f,
- 0.5568627450980392f, 0.6352941176470588f, 0.7392156862745098f,
- 0.8431372549019608f, 0.9372549019607843f}
- ),
- new TonalPalette(
- new float[] {0.469f, 0.46732026143790845f, 0.4718614718614719f,
- 0.4793650793650794f, 0.48071625344352614f, 0.4829683698296837f,
- 0.484375f, 0.4841269841269842f, 0.48444444444444457f,
- 0.48518518518518516f, 0.4907407407407408f},
- new float[] {1f, 1f, 1f, 1f, 1f, 1f, 0.6274509803921569f, 0.41832669322709176f,
- 0.41899441340782106f, 0.4128440366972478f, 0.4090909090909088f},
- new float[] {0.07f, 0.1f, 0.15098039215686274f, 0.20588235294117646f,
- 0.2372549019607843f, 0.26862745098039215f, 0.4f, 0.5078431372549019f,
- 0.6490196078431372f, 0.7862745098039216f, 0.9137254901960784f}
- ),
- new TonalPalette(
- new float[] {0.542f, 0.5444444444444444f, 0.5555555555555556f,
- 0.5555555555555556f, 0.553763440860215f, 0.5526315789473684f,
- 0.5555555555555556f, 0.5555555555555555f, 0.5555555555555556f,
- 0.5512820512820514f, 0.5666666666666667f},
- new float[] {0.25f, 0.24590163934426232f, 0.19148936170212766f,
- 0.1791044776119403f, 0.18343195266272191f, 0.18446601941747576f,
- 0.1538461538461539f, 0.15625000000000003f, 0.15328467153284678f,
- 0.15662650602409653f, 0.151515151515151f},
- new float[] {0.05f, 0.1196078431372549f, 0.1843137254901961f,
- 0.2627450980392157f,
- 0.33137254901960783f, 0.403921568627451f, 0.5411764705882354f,
- 0.6235294117647059f, 0.7313725490196079f, 0.8372549019607843f,
- 0.9352941176470588f}
- ),
- new TonalPalette(
- new float[] {0.022222222222222223f, 0.02469135802469136f, 0.031249999999999997f,
- 0.03947368421052631f, 0.04166666666666668f,
- 0.043650793650793655f, 0.04411764705882352f, 0.04166666666666652f,
- 0.04444444444444459f, 0.05555555555555529f},
- new float[] {0.33333333333333337f, 0.2783505154639175f, 0.2580645161290323f,
- 0.25675675675675674f, 0.2528735632183908f, 0.17500000000000002f,
- 0.15315315315315312f, 0.15189873417721522f,
- 0.15789473684210534f, 0.15789473684210542f},
- new float[] {0.08823529411764705f, 0.19019607843137254f, 0.2431372549019608f,
- 0.2901960784313725f, 0.3411764705882353f, 0.47058823529411764f,
- 0.5647058823529412f, 0.6901960784313725f, 0.8137254901960784f,
- 0.9254901960784314f}
- ),
- new TonalPalette(
- new float[] {0.027f, 0.03f, 0.038f, 0.044f, 0.050884955752212385f,
- 0.07254901960784313f, 0.0934640522875817f,
- 0.10457516339869281f, 0.11699346405228758f,
- 0.1255813953488372f, 0.1268939393939394f, 0.12533333333333332f,
- 0.12500000000000003f, 0.12777777777777777f},
- new float[] {1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f},
- new float[] {0.25f, 0.3f, 0.35f, 0.4f, 0.44313725490196076f, 0.5f, 0.5f, 0.5f,
- 0.5f, 0.5784313725490196f,
- 0.6549019607843137f, 0.7549019607843137f, 0.8509803921568627f,
- 0.9411764705882353f}
- )
- };
-
- private static final TonalPalette GREY_PALETTE = new TonalPalette(
- new float[]{0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f},
- new float[]{0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f, 0f},
- new float[]{0.08f, 0.11f, 0.14901960784313725f, 0.2f, 0.2980392156862745f, 0.4f,
- 0.4980392156862745f, 0.6196078431372549f, 0.7176470588235294f,
- 0.8196078431372549f, 0.9176470588235294f, 0.9490196078431372f}
- );
-
- @SuppressWarnings("WeakerAccess")
- static final ColorRange[] DISALLOWED_COLORS = new ColorRange[] {
-
- // Red
- new ColorRange(
- new Range<>(0f, 20f) /* H */,
- new Range<>(0.7f, 1f) /* S */,
- new Range<>(0.21f, 0.79f)) /* L */,
- new ColorRange(
- new Range<>(0f, 20f),
- new Range<>(0.3f, 0.7f),
- new Range<>(0.355f, 0.653f)),
-
- // Red Orange
- new ColorRange(
- new Range<>(20f, 40f),
- new Range<>(0.7f, 1f),
- new Range<>(0.28f, 0.643f)),
- new ColorRange(
- new Range<>(20f, 40f),
- new Range<>(0.3f, 0.7f),
- new Range<>(0.414f, 0.561f)),
- new ColorRange(
- new Range<>(20f, 40f),
- new Range<>(0f, 3f),
- new Range<>(0.343f, 0.584f)),
-
- // Orange
- new ColorRange(
- new Range<>(40f, 60f),
- new Range<>(0.7f, 1f),
- new Range<>(0.173f, 0.349f)),
- new ColorRange(
- new Range<>(40f, 60f),
- new Range<>(0.3f, 0.7f),
- new Range<>(0.233f, 0.427f)),
- new ColorRange(
- new Range<>(40f, 60f),
- new Range<>(0f, 0.3f),
- new Range<>(0.231f, 0.484f)),
-
- // Yellow 60
- new ColorRange(
- new Range<>(60f, 80f),
- new Range<>(0.7f, 1f),
- new Range<>(0.488f, 0.737f)),
- new ColorRange(
- new Range<>(60f, 80f),
- new Range<>(0.3f, 0.7f),
- new Range<>(0.673f, 0.837f)),
-
- // Yellow Green 80
- new ColorRange(
- new Range<>(80f, 100f),
- new Range<>(0.7f, 1f),
- new Range<>(0.469f, 0.61f)),
-
- // Yellow green 100
- new ColorRange(
- new Range<>(100f, 120f),
- new Range<>(0.7f, 1f),
- new Range<>(0.388f, 0.612f)),
- new ColorRange(
- new Range<>(100f, 120f),
- new Range<>(0.3f, 0.7f),
- new Range<>(0.424f, 0.541f)),
-
- // Green
- new ColorRange(
- new Range<>(120f, 140f),
- new Range<>(0.7f, 1f),
- new Range<>(0.375f, 0.52f)),
- new ColorRange(
- new Range<>(120f, 140f),
- new Range<>(0.3f, 0.7f),
- new Range<>(0.435f, 0.524f)),
-
- // Green Blue 140
- new ColorRange(
- new Range<>(140f, 160f),
- new Range<>(0.7f, 1f),
- new Range<>(0.496f, 0.641f)),
-
- // Seafoam
- new ColorRange(
- new Range<>(160f, 180f),
- new Range<>(0.7f, 1f),
- new Range<>(0.496f, 0.567f)),
-
- // Cyan
- new ColorRange(
- new Range<>(180f, 200f),
- new Range<>(0.7f, 1f),
- new Range<>(0.52f, 0.729f)),
-
- // Blue
- new ColorRange(
- new Range<>(220f, 240f),
- new Range<>(0.7f, 1f),
- new Range<>(0.396f, 0.571f)),
- new ColorRange(
- new Range<>(220f, 240f),
- new Range<>(0.3f, 0.7f),
- new Range<>(0.425f, 0.551f)),
-
- // Blue Purple 240
- new ColorRange(
- new Range<>(240f, 260f),
- new Range<>(0.7f, 1f),
- new Range<>(0.418f, 0.639f)),
- new ColorRange(
- new Range<>(220f, 240f),
- new Range<>(0.3f, 0.7f),
- new Range<>(0.441f, 0.576f)),
-
- // Blue Purple 260
- new ColorRange(
- new Range<>(260f, 280f),
- new Range<>(0.3f, 1f), // Bigger range
- new Range<>(0.461f, 0.553f)),
-
- // Fuchsia
- new ColorRange(
- new Range<>(300f, 320f),
- new Range<>(0.7f, 1f),
- new Range<>(0.484f, 0.588f)),
- new ColorRange(
- new Range<>(300f, 320f),
- new Range<>(0.3f, 0.7f),
- new Range<>(0.48f, 0.592f)),
-
- // Pink
- new ColorRange(
- new Range<>(320f, 340f),
- new Range<>(0.7f, 1f),
- new Range<>(0.466f, 0.629f)),
-
- // Soft red
- new ColorRange(
- new Range<>(340f, 360f),
- new Range<>(0.7f, 1f),
- new Range<>(0.437f, 0.596f))
- };
-
- /**
- * Representation of an HSL color range.
- * <ul>
- * <li>hsl[0] is Hue [0 .. 360)</li>
- * <li>hsl[1] is Saturation [0...1]</li>
- * <li>hsl[2] is Lightness [0...1]</li>
- * </ul>
- */
- static class ColorRange {
- private Range<Float> mHue;
- private Range<Float> mSaturation;
- private Range<Float> mLightness;
-
- ColorRange(Range<Float> hue, Range<Float> saturation, Range<Float> lightness) {
- mHue = hue;
- mSaturation = saturation;
- mLightness = lightness;
- }
-
- boolean containsColor(float h, float s, float l) {
- if (!mHue.contains(h)) {
- return false;
- } else if (!mSaturation.contains(s)) {
- return false;
- } else if (!mLightness.contains(l)) {
- return false;
- }
- return true;
- }
-
- float[] getCenter() {
- return new float[] {
- mHue.getLower() + (mHue.getUpper() - mHue.getLower()) / 2f,
- mSaturation.getLower() + (mSaturation.getUpper() - mSaturation.getLower()) / 2f,
- mLightness.getLower() + (mLightness.getUpper() - mLightness.getLower()) / 2f
- };
- }
-
- @Override
- public String toString() {
- return String.format("H: %s, S: %s, L %s", mHue, mSaturation, mLightness);
- }
- }
-
- private static List<Integer> getMainColors(WallpaperColorsCompat wallpaperColors) {
- LinkedList<Integer> colors = new LinkedList<>();
- if (wallpaperColors.getPrimaryColor() != 0) {
- colors.add(wallpaperColors.getPrimaryColor());
- }
- if (wallpaperColors.getSecondaryColor() != 0) {
- colors.add(wallpaperColors.getSecondaryColor());
- }
- if (wallpaperColors.getTertiaryColor() != 0) {
- colors.add(wallpaperColors.getTertiaryColor());
- }
- return colors;
- }
-}
diff --git a/src_ui_overrides/com/android/launcher3/uioverrides/dynamicui/WallpaperColorsCompat.java b/src_ui_overrides/com/android/launcher3/uioverrides/dynamicui/WallpaperColorsCompat.java
deleted file mode 100644
index d984a84..0000000
--- a/src_ui_overrides/com/android/launcher3/uioverrides/dynamicui/WallpaperColorsCompat.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2017 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.uioverrides.dynamicui;
-
-/**
- * A compatibility layer around platform implementation of WallpaperColors
- */
-public class WallpaperColorsCompat {
-
- public static final int HINT_SUPPORTS_DARK_TEXT = 0x1;
- public static final int HINT_SUPPORTS_DARK_THEME = 0x2;
-
- private final int mPrimaryColor;
- private final int mSecondaryColor;
- private final int mTertiaryColor;
- private final int mColorHints;
-
- public WallpaperColorsCompat(int primaryColor, int secondaryColor, int tertiaryColor,
- int colorHints) {
- mPrimaryColor = primaryColor;
- mSecondaryColor = secondaryColor;
- mTertiaryColor = tertiaryColor;
- mColorHints = colorHints;
- }
-
- public int getPrimaryColor() {
- return mPrimaryColor;
- }
-
- public int getSecondaryColor() {
- return mSecondaryColor;
- }
-
- public int getTertiaryColor() {
- return mTertiaryColor;
- }
-
- public int getColorHints() {
- return mColorHints;
- }
-
-}
diff --git a/src_ui_overrides/com/android/launcher3/uioverrides/dynamicui/WallpaperManagerCompat.java b/src_ui_overrides/com/android/launcher3/uioverrides/dynamicui/WallpaperManagerCompat.java
deleted file mode 100644
index 9dbe47c..0000000
--- a/src_ui_overrides/com/android/launcher3/uioverrides/dynamicui/WallpaperManagerCompat.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2017 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.uioverrides.dynamicui;
-
-import android.content.Context;
-import android.os.Build;
-
-import androidx.annotation.Nullable;
-
-public abstract class WallpaperManagerCompat {
-
- private static final Object sInstanceLock = new Object();
- private static WallpaperManagerCompat sInstance;
-
- public static WallpaperManagerCompat getInstance(Context context) {
- synchronized (sInstanceLock) {
- if (sInstance == null) {
- context = context.getApplicationContext();
-
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {
- try {
- sInstance = new WallpaperManagerCompatVOMR1(context);
- } catch (Throwable e) {
- // The wallpaper APIs do not yet exist
- }
- }
- if (sInstance == null) {
- sInstance = new WallpaperManagerCompatVL(context);
- }
- }
- return sInstance;
- }
- }
-
-
- public abstract @Nullable WallpaperColorsCompat getWallpaperColors(int which);
-
- public abstract void addOnColorsChangedListener(OnColorsChangedListenerCompat listener);
-
- /**
- * Interface definition for a callback to be invoked when colors change on a wallpaper.
- */
- public interface OnColorsChangedListenerCompat {
-
- void onColorsChanged(WallpaperColorsCompat colors, int which);
- }
-}
diff --git a/src_ui_overrides/com/android/launcher3/uioverrides/dynamicui/WallpaperManagerCompatVL.java b/src_ui_overrides/com/android/launcher3/uioverrides/dynamicui/WallpaperManagerCompatVL.java
deleted file mode 100644
index 500fdc3..0000000
--- a/src_ui_overrides/com/android/launcher3/uioverrides/dynamicui/WallpaperManagerCompatVL.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * Copyright (C) 2017 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.uioverrides.dynamicui;
-
-import static android.app.WallpaperManager.FLAG_SYSTEM;
-
-import static com.android.launcher3.Utilities.getDevicePrefs;
-
-import android.app.WallpaperInfo;
-import android.app.WallpaperManager;
-import android.app.job.JobInfo;
-import android.app.job.JobParameters;
-import android.app.job.JobScheduler;
-import android.app.job.JobService;
-import android.content.BroadcastReceiver;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.pm.PackageManager;
-import android.content.pm.PermissionInfo;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.graphics.BitmapRegionDecoder;
-import android.graphics.Canvas;
-import android.graphics.Rect;
-import android.graphics.drawable.Drawable;
-import android.os.Handler;
-import android.os.HandlerThread;
-import android.os.ParcelFileDescriptor;
-import android.util.Log;
-import android.util.Pair;
-
-import com.android.launcher3.icons.ColorExtractor;
-
-import java.io.IOException;
-import java.util.ArrayList;
-
-import androidx.annotation.Nullable;
-
-public class WallpaperManagerCompatVL extends WallpaperManagerCompat {
-
- private static final String TAG = "WMCompatVL";
-
- private static final String VERSION_PREFIX = "1,";
- private static final String KEY_COLORS = "wallpaper_parsed_colors";
- private static final String ACTION_EXTRACTION_COMPLETE =
- "com.android.launcher3.uioverrides.dynamicui.WallpaperManagerCompatVL.EXTRACTION_COMPLETE";
-
- public static final int WALLPAPER_COMPAT_JOB_ID = 1;
-
- private final ArrayList<OnColorsChangedListenerCompat> mListeners = new ArrayList<>();
-
- private final Context mContext;
- private WallpaperColorsCompat mColorsCompat;
-
- WallpaperManagerCompatVL(Context context) {
- mContext = context;
-
- String colors = getDevicePrefs(mContext).getString(KEY_COLORS, "");
- int wallpaperId = -1;
- if (colors.startsWith(VERSION_PREFIX)) {
- Pair<Integer, WallpaperColorsCompat> storedValue = parseValue(colors);
- wallpaperId = storedValue.first;
- mColorsCompat = storedValue.second;
- }
-
- if (wallpaperId == -1 || wallpaperId != getWallpaperId(context)) {
- reloadColors();
- }
- context.registerReceiver(new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- reloadColors();
- }
- }, new IntentFilter(Intent.ACTION_WALLPAPER_CHANGED));
-
- // Register a receiver for results
- String permission = null;
- // Find a permission which only we can use.
- try {
- for (PermissionInfo info : context.getPackageManager().getPackageInfo(
- context.getPackageName(),
- PackageManager.GET_PERMISSIONS).permissions) {
- if ((info.protectionLevel & PermissionInfo.PROTECTION_SIGNATURE) != 0) {
- permission = info.name;
- }
- }
- } catch (PackageManager.NameNotFoundException e) {
- // Something went wrong. ignore
- Log.d(TAG, "Unable to get permission info", e);
- }
- mContext.registerReceiver(new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- handleResult(intent.getStringExtra(KEY_COLORS));
- }
- }, new IntentFilter(ACTION_EXTRACTION_COMPLETE), permission, new Handler());
- }
-
- @Nullable
- @Override
- public WallpaperColorsCompat getWallpaperColors(int which) {
- return which == FLAG_SYSTEM ? mColorsCompat : null;
- }
-
- @Override
- public void addOnColorsChangedListener(OnColorsChangedListenerCompat listener) {
- mListeners.add(listener);
- }
-
- private void reloadColors() {
- JobInfo job = new JobInfo.Builder(WALLPAPER_COMPAT_JOB_ID,
- new ComponentName(mContext, ColorExtractionService.class))
- .setMinimumLatency(0).build();
- ((JobScheduler) mContext.getSystemService(Context.JOB_SCHEDULER_SERVICE)).schedule(job);
- }
-
- private void handleResult(String result) {
- getDevicePrefs(mContext).edit().putString(KEY_COLORS, result).apply();
- mColorsCompat = parseValue(result).second;
- for (OnColorsChangedListenerCompat listener : mListeners) {
- listener.onColorsChanged(mColorsCompat, FLAG_SYSTEM);
- }
- }
-
- private static final int getWallpaperId(Context context) {
- return context.getSystemService(WallpaperManager.class).getWallpaperId(FLAG_SYSTEM);
- }
-
- /**
- * Parses the stored value and returns the wallpaper id and wallpaper colors.
- */
- private static Pair<Integer, WallpaperColorsCompat> parseValue(String value) {
- String[] parts = value.split(",");
- Integer wallpaperId = Integer.parseInt(parts[1]);
- if (parts.length == 2) {
- // There is no wallpaper color info present, eg when live wallpaper has no preview.
- return Pair.create(wallpaperId, null);
- }
-
- int primary = parts.length > 2 ? Integer.parseInt(parts[2]) : 0;
- int secondary = parts.length > 3 ? Integer.parseInt(parts[3]) : 0;
- int tertiary = parts.length > 4 ? Integer.parseInt(parts[4]) : 0;
-
- return Pair.create(wallpaperId, new WallpaperColorsCompat(primary, secondary, tertiary,
- 0 /* hints */));
- }
-
- /**
- * Intent service to handle color extraction
- */
- public static class ColorExtractionService extends JobService implements Runnable {
- private static final int MAX_WALLPAPER_EXTRACTION_AREA = 112 * 112;
-
- private HandlerThread mWorkerThread;
- private Handler mWorkerHandler;
- private ColorExtractor mColorExtractor;
-
- @Override
- public void onCreate() {
- super.onCreate();
- mWorkerThread = new HandlerThread("ColorExtractionService");
- mWorkerThread.start();
- mWorkerHandler = new Handler(mWorkerThread.getLooper());
- mColorExtractor = new ColorExtractor();
- }
-
- @Override
- public void onDestroy() {
- super.onDestroy();
- mWorkerThread.quit();
- }
-
- @Override
- public boolean onStartJob(final JobParameters jobParameters) {
- mWorkerHandler.post(this);
- return true;
- }
-
- @Override
- public boolean onStopJob(JobParameters jobParameters) {
- mWorkerHandler.removeCallbacksAndMessages(null);
- return true;
- }
-
- /**
- * Extracts the wallpaper colors and sends the result back through the receiver.
- */
- @Override
- public void run() {
- int wallpaperId = getWallpaperId(this);
-
- Bitmap bitmap = null;
- Drawable drawable = null;
-
- WallpaperManager wm = WallpaperManager.getInstance(this);
- WallpaperInfo info = wm.getWallpaperInfo();
- if (info != null) {
- // For live wallpaper, extract colors from thumbnail
- drawable = info.loadThumbnail(getPackageManager());
- } else {
- try (ParcelFileDescriptor fd = wm.getWallpaperFile(FLAG_SYSTEM)) {
- BitmapRegionDecoder decoder = BitmapRegionDecoder
- .newInstance(fd.getFileDescriptor(), false);
-
- int requestedArea = decoder.getWidth() * decoder.getHeight();
- BitmapFactory.Options options = new BitmapFactory.Options();
-
- if (requestedArea > MAX_WALLPAPER_EXTRACTION_AREA) {
- double areaRatio =
- (double) requestedArea / MAX_WALLPAPER_EXTRACTION_AREA;
- double nearestPowOf2 =
- Math.floor(Math.log(areaRatio) / (2 * Math.log(2)));
- options.inSampleSize = (int) Math.pow(2, nearestPowOf2);
- }
- Rect region = new Rect(0, 0, decoder.getWidth(), decoder.getHeight());
- bitmap = decoder.decodeRegion(region, options);
- decoder.recycle();
- } catch (IOException | NullPointerException e) {
- Log.e(TAG, "Fetching partial bitmap failed, trying old method", e);
- }
- if (bitmap == null) {
- drawable = wm.getDrawable();
- }
- }
-
- if (drawable != null) {
- // Calculate how big the bitmap needs to be.
- // This avoids unnecessary processing and allocation inside Palette.
- final int requestedArea = drawable.getIntrinsicWidth() *
- drawable.getIntrinsicHeight();
- double scale = 1;
- if (requestedArea > MAX_WALLPAPER_EXTRACTION_AREA) {
- scale = Math.sqrt(MAX_WALLPAPER_EXTRACTION_AREA / (double) requestedArea);
- }
- bitmap = Bitmap.createBitmap((int) (drawable.getIntrinsicWidth() * scale),
- (int) (drawable.getIntrinsicHeight() * scale), Bitmap.Config.ARGB_8888);
- final Canvas bmpCanvas = new Canvas(bitmap);
- drawable.setBounds(0, 0, bitmap.getWidth(), bitmap.getHeight());
- drawable.draw(bmpCanvas);
- }
-
- String value = VERSION_PREFIX + wallpaperId;
-
- if (bitmap != null) {
- int color = mColorExtractor.findDominantColorByHue(bitmap,
- MAX_WALLPAPER_EXTRACTION_AREA);
- value += "," + color;
- }
-
- // Send the result
- sendBroadcast(new Intent(ACTION_EXTRACTION_COMPLETE)
- .setPackage(getPackageName())
- .putExtra(KEY_COLORS, value));
- }
- }
-}
diff --git a/src_ui_overrides/com/android/launcher3/uioverrides/dynamicui/WallpaperManagerCompatVOMR1.java b/src_ui_overrides/com/android/launcher3/uioverrides/dynamicui/WallpaperManagerCompatVOMR1.java
deleted file mode 100644
index f34497d..0000000
--- a/src_ui_overrides/com/android/launcher3/uioverrides/dynamicui/WallpaperManagerCompatVOMR1.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (C) 2017 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.uioverrides.dynamicui;
-
-import android.annotation.TargetApi;
-import android.app.WallpaperColors;
-import android.app.WallpaperManager;
-import android.app.WallpaperManager.OnColorsChangedListener;
-import android.content.Context;
-import android.graphics.Color;
-import android.util.Log;
-
-import java.lang.reflect.Method;
-
-import androidx.annotation.Nullable;
-
-@TargetApi(27)
-public class WallpaperManagerCompatVOMR1 extends WallpaperManagerCompat {
-
- private static final String TAG = "WMCompatVOMR1";
-
- private final WallpaperManager mWm;
- private Method mWCColorHintsMethod;
-
- WallpaperManagerCompatVOMR1(Context context) throws Throwable {
- mWm = context.getSystemService(WallpaperManager.class);
- String className = WallpaperColors.class.getName();
- try {
- mWCColorHintsMethod = WallpaperColors.class.getDeclaredMethod("getColorHints");
- } catch (Exception exc) {
- Log.e(TAG, "getColorHints not available", exc);
- }
- }
-
- @Nullable
- @Override
- public WallpaperColorsCompat getWallpaperColors(int which) {
- return convertColorsObject(mWm.getWallpaperColors(which));
- }
-
- @Override
- public void addOnColorsChangedListener(final OnColorsChangedListenerCompat listener) {
- OnColorsChangedListener onChangeListener = new OnColorsChangedListener() {
- @Override
- public void onColorsChanged(WallpaperColors colors, int which) {
- listener.onColorsChanged(convertColorsObject(colors), which);
- }
- };
- mWm.addOnColorsChangedListener(onChangeListener, null);
- }
-
- private WallpaperColorsCompat convertColorsObject(WallpaperColors colors) {
- if (colors == null) {
- return null;
- }
- Color primary = colors.getPrimaryColor();
- Color secondary = colors.getSecondaryColor();
- Color tertiary = colors.getTertiaryColor();
- int primaryVal = primary != null ? primary.toArgb() : 0;
- int secondaryVal = secondary != null ? secondary.toArgb() : 0;
- int tertiaryVal = tertiary != null ? tertiary.toArgb() : 0;
- int colorHints = 0;
- try {
- if (mWCColorHintsMethod != null) {
- colorHints = (Integer) mWCColorHintsMethod.invoke(colors);
- }
- } catch (Exception exc) {
- Log.e(TAG, "error calling color hints", exc);
- }
- return new WallpaperColorsCompat(primaryVal, secondaryVal, tertiaryVal, colorHints);
- }
-}
diff --git a/src_ui_overrides/com/android/launcher3/uioverrides/states/AllAppsState.java b/src_ui_overrides/com/android/launcher3/uioverrides/states/AllAppsState.java
index 53748b7..978c321 100644
--- a/src_ui_overrides/com/android/launcher3/uioverrides/states/AllAppsState.java
+++ b/src_ui_overrides/com/android/launcher3/uioverrides/states/AllAppsState.java
@@ -23,6 +23,7 @@
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherState;
import com.android.launcher3.R;
+import com.android.launcher3.util.Themes;
/**
* Definition for AllApps state
@@ -76,7 +77,7 @@
}
@Override
- public float getWorkspaceScrimAlpha(Launcher launcher) {
- return 1;
+ public int getWorkspaceScrimColor(Launcher launcher) {
+ return Themes.getAttrColor(launcher, R.attr.allAppsScrimColor);
}
}
diff --git a/src_ui_overrides/com/android/launcher3/uioverrides/states/OverviewState.java b/src_ui_overrides/com/android/launcher3/uioverrides/states/OverviewState.java
index e85e505..d154317 100644
--- a/src_ui_overrides/com/android/launcher3/uioverrides/states/OverviewState.java
+++ b/src_ui_overrides/com/android/launcher3/uioverrides/states/OverviewState.java
@@ -19,7 +19,10 @@
import android.content.Context;
+import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherState;
+import com.android.launcher3.R;
+import com.android.launcher3.util.Themes;
/**
* Definition for overview state
@@ -56,4 +59,9 @@
public static OverviewState newSplitSelectState(int id) {
return new OverviewState(id);
}
+
+ @Override
+ public int getWorkspaceScrimColor(Launcher launcher) {
+ return Themes.getAttrColor(launcher, R.attr.overviewScrimColor);
+ }
}
diff --git a/tests/Android.mk b/tests/Android.mk
index 2c7d30a..883a69e 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -76,6 +76,9 @@
LOCAL_INSTRUMENTATION_FOR := Launcher3
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
include $(BUILD_PACKAGE)
include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/tapl/com/android/launcher3/tapl/AddToHomeScreenPrompt.java b/tests/tapl/com/android/launcher3/tapl/AddToHomeScreenPrompt.java
index e1fde3b..0582bc9 100644
--- a/tests/tapl/com/android/launcher3/tapl/AddToHomeScreenPrompt.java
+++ b/tests/tapl/com/android/launcher3/tapl/AddToHomeScreenPrompt.java
@@ -28,7 +28,7 @@
public class AddToHomeScreenPrompt {
private static final Pattern ADD_AUTOMATICALLY =
- Pattern.compile("^Add automatically$", CASE_INSENSITIVE);
+ Pattern.compile("^Add to Home screen$", CASE_INSENSITIVE);
private final LauncherInstrumentation mLauncher;
private final UiObject2 mWidgetCell;
diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
index ebad154..e5b93b1 100644
--- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
+++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
@@ -695,6 +695,7 @@
waitUntilLauncherObjectGone(CONTEXT_MENU_RES_ID);
// Swiping up can temporarily bring Nexus Launcher if the current
// Launcher is a Launcher3 one. Wait for the current launcher to reappear.
+ SystemClock.sleep(5000); // b/187080582
waitForLauncherObject(getAnyObjectSelector());
}
}