Announce “Desktop” when focusing on the desktop mode in Overview
https://drive.google.com/file/d/1MNUyDtRhyU8tKRZ5JONLAeUBQ_8Vrids/view?usp=drive_link
Test: NA
BUG: 329375034
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: I36460002be94697746fb085e4aeca9a6ac804002
diff --git a/quickstep/res/layout/task_desktop.xml b/quickstep/res/layout/task_desktop.xml
index 8c7090e..1564653 100644
--- a/quickstep/res/layout/task_desktop.xml
+++ b/quickstep/res/layout/task_desktop.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
Copyright (C) 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,20 +14,19 @@
limitations under the License.
-->
-<com.android.quickstep.views.DesktopTaskView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
+<com.android.quickstep.views.DesktopTaskView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res-auto"
android:id="@+id/task_view_desktop"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="true"
+ android:clipToPadding="true"
+ android:contentDescription="@string/recent_task_desktop"
android:defaultFocusHighlightEnabled="false"
android:focusable="true"
+ android:padding="0.1dp"
launcher:focusBorderColor="?attr/materialColorOutline"
- launcher:hoverBorderColor="?attr/materialColorPrimary"
- android:clipToPadding="true"
- android:padding="0.1dp">
+ launcher:hoverBorderColor="?attr/materialColorPrimary">
<!-- Setting a padding of 0.1 dp since android:clipToPadding needs a non-zero value for
padding to work-->
<View
@@ -38,8 +36,8 @@
<ViewStub
android:id="@+id/icon"
- android:inflatedId="@id/icon"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
+ android:inflatedId="@id/icon" />
</com.android.quickstep.views.DesktopTaskView>
diff --git a/quickstep/res/values/strings.xml b/quickstep/res/values/strings.xml
index 037a0f6..d0f474f 100644
--- a/quickstep/res/values/strings.xml
+++ b/quickstep/res/values/strings.xml
@@ -26,9 +26,12 @@
<string name="recent_task_option_pin">Pin</string>
<!-- Title for an option to enter freeform mode for a given app -->
<string name="recent_task_option_freeform">Freeform</string>
- <!-- Title for an option to enter desktop windowing mode for a given app -->
+ <!-- Title and content description for an option to enter desktop windowing mode for a given app -->
<string name="recent_task_option_desktop">Desktop</string>
+ <!-- Title and content description for Desktop tile in Recents screen that contains apps opened inside desktop windowing mode [CHAR LIMIT=NONE] -->
+ <string name="recent_task_desktop">Desktop</string>
+
<!-- Recents: The empty recents string. [CHAR LIMIT=NONE] -->
<string name="recents_empty_message">No recent items</string>
diff --git a/quickstep/src/com/android/quickstep/views/DesktopTaskView.kt b/quickstep/src/com/android/quickstep/views/DesktopTaskView.kt
index aa628f8..e242dfd 100644
--- a/quickstep/src/com/android/quickstep/views/DesktopTaskView.kt
+++ b/quickstep/src/com/android/quickstep/views/DesktopTaskView.kt
@@ -94,7 +94,7 @@
context.theme
)
)
- setText(resources.getText(R.string.recent_task_option_desktop))
+ setText(resources.getText(R.string.recent_task_desktop))
}
childCountAtInflation = childCount
}