Merge Android 12
Bug: 202323961
Merged-In: I0311e0abb454fc9b7bdb1e9aaa5a380d6505830e
Change-Id: I0ed633f6f6c2669e644ab991febebc0a626ffb35
diff --git a/Android.bp b/Android.bp
index fa0c32e..156f055 100644
--- a/Android.bp
+++ b/Android.bp
@@ -17,16 +17,37 @@
default_applicable_licenses: ["Android-Apache-2.0"],
}
+android_library {
+ name: "CarLauncher-core",
+ platform_apis: true,
+
+ srcs: ["src/**/*.java"],
+
+ resource_dirs: ["res"],
+
+ static_libs: [
+ "androidx-constraintlayout_constraintlayout-solver",
+ "androidx-constraintlayout_constraintlayout",
+ "androidx.lifecycle_lifecycle-extensions",
+ "car-media-common",
+ "car-telephony-common",
+ "car-ui-lib",
+ "WindowManager-Shell",
+ ],
+
+ libs: ["android.car"],
+
+ manifest: "AndroidManifest.xml",
+}
+
android_app {
name: "CarLauncher",
- srcs: ["src/**/*.java"],
-
- resource_dirs: ["res"],
+ resource_dirs: [],
platform_apis: true,
- required: ["privapp_whitelist_com.android.car.carlauncher"],
+ required: ["allowed_privapp_com.android.car.carlauncher"],
certificate: "platform",
@@ -38,6 +59,10 @@
"Launcher3QuickStep",
],
+ static_libs: ["CarLauncher-core"],
+
+ libs: ["android.car"],
+
optimize: {
enabled: false,
},
@@ -46,16 +71,6 @@
enabled: false,
},
- static_libs: [
- "androidx-constraintlayout_constraintlayout-solver",
- "androidx-constraintlayout_constraintlayout",
- "androidx.lifecycle_lifecycle-extensions",
- "car-media-common",
- "car-ui-lib",
- ],
-
- libs: ["android.car"],
-
product_variables: {
pdk: {
enabled: false,
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index d0d98de..6035d5d 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -18,15 +18,22 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.car.carlauncher">
+ <!-- System permission to access the CarProjectionManager for projection status-->
<uses-permission android:name="android.car.permission.ACCESS_CAR_PROJECTION_STATUS"/>
<!-- System permission to host maps activity -->
<uses-permission android:name="android.permission.ACTIVITY_EMBEDDING"/>
+ <!-- Permission for the InCallController to bind the InCallService -->
+ <uses-permission android:name="android.permission.CONTROL_INCALL_EXPERIENCE"/>
<!-- System permission to send events to hosted maps activity -->
<uses-permission android:name="android.permission.INJECT_EVENTS"/>
<!-- System permission to use internal system windows -->
<uses-permission android:name="android.permission.INTERNAL_SYSTEM_WINDOW"/>
- <!-- System permissions to bring hosted maps activity to front on main display -->
- <uses-permission android:name="android.permission.MANAGE_ACTIVITY_STACKS"/>
+ <!-- System permission to register TaskOrganizer -->
+ <uses-permission android:name="android.permission.MANAGE_ACTIVITY_TASKS"/>
+ <!-- System permission to bring hosted maps activity to front on main display -->
+ <uses-permission android:name="android.permission.REORDER_TASKS"/>
+ <!-- System permission to remove a task -->
+ <uses-permission android:name="android.permission.REMOVE_TASKS"/>
<!-- System permission to query users on device -->
<uses-permission android:name="android.permission.MANAGE_USERS"/>
<!-- System permission to control media playback of the active session -->
@@ -35,7 +42,10 @@
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS"/>
<!-- System permission to query all installed packages -->
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
- <uses-permission android:name="android.permission.REORDER_TASKS"/>
+ <!-- Permission to read contacts data. Needed to display contact name on dialer card -->
+ <uses-permission android:name="android.permission.READ_CONTACTS"/>
+ <!-- Permission for read-only access to phone state, namely the status of any ongoing calls -->
+ <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<!-- To connect to media browser services in other apps, media browser clients
that target Android 11 need to add the following in their manifest -->
@@ -57,6 +67,7 @@
android:clearTaskOnLaunch="true"
android:stateNotNeeded="true"
android:resumeWhilePausing="true"
+ android:exported="true"
android:windowSoftInputMode="adjustPan">
<meta-data android:name="distractionOptimized" android:value="true"/>
<intent-filter>
@@ -71,6 +82,21 @@
android:exported="true"
android:theme="@style/Theme.Launcher.AppGridActivity">
<meta-data android:name="distractionOptimized" android:value="true"/>
+ <intent-filter>
+ <action android:name="com.android.car.carlauncher.ACTION_APP_GRID"/>
+ <category android:name="android.intent.category.DEFAULT"/>
+ </intent-filter>
</activity>
+ <service android:name=".homescreen.audio.telecom.InCallServiceImpl"
+ android:permission="android.permission.BIND_INCALL_SERVICE"
+ android:exported="true">
+ <!-- The home app does not display the in-call UI. This is handled by the
+ Dialer application.-->
+ <meta-data android:name="android.telecom.IN_CALL_SERVICE_UI" android:value="false"/>
+ <meta-data android:name="android.telecom.IN_CALL_SERVICE_CAR_MODE_UI" android:value="false"/>
+ <intent-filter>
+ <action android:name="android.telecom.InCallService"/>
+ </intent-filter>
+ </service>
</application>
</manifest>
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
new file mode 100644
index 0000000..686c3f6
--- /dev/null
+++ b/PREUPLOAD.cfg
@@ -0,0 +1,8 @@
+[Hook Scripts]
+checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}
+ktlint_hook = ${REPO_ROOT}/prebuilts/ktlint/ktlint.py -f ${PREUPLOAD_FILES}
+overlayable_resource_hook = ${REPO_ROOT}/packages/apps/Car/tests/tools/rro/verify-overlayable.py -r res -e res/values/overlayable.xml -o res/values/overlayable.xml
+
+[Builtin Hooks]
+commit_msg_changeid_field = true
+commit_msg_test_field = true
diff --git a/res/drawable/car_button_background.xml b/res/drawable/car_button_background.xml
index 52fb8e3..1f89f2e 100644
--- a/res/drawable/car_button_background.xml
+++ b/res/drawable/car_button_background.xml
@@ -16,8 +16,27 @@
-->
<!-- Default background styles for car buttons when enabled/disabled. -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- android:color="#8F000000">
- <item android:id="@android:id/mask">
- <color android:color="#1effffff" />
+ <item android:state_focused="true" android:state_pressed="true">
+ <shape android:shape="oval">
+ <solid android:color="@color/car_ui_rotary_focus_pressed_fill_color"/>
+ <stroke android:width="@dimen/car_ui_rotary_focus_pressed_stroke_width"
+ android:color="@color/car_ui_rotary_focus_pressed_stroke_color"/>
+ </shape>
+ </item>
+ <item android:state_focused="true">
+ <shape android:shape="oval">
+ <solid android:color="@color/car_ui_rotary_focus_fill_color"/>
+ <stroke android:width="@dimen/car_ui_rotary_focus_stroke_width"
+ android:color="@color/car_ui_rotary_focus_stroke_color"/>
+ </shape>
+ </item>
+ <item>
+ <ripple android:color="?android:attr/colorControlHighlight">
+ <item android:id="@android:id/mask">
+ <shape android:shape="oval">
+ <solid android:color="?android:colorAccent"/>
+ </shape>
+ </item>
+ </ripple>
</item>
</selector>
diff --git a/res/drawable/ic_call_end.xml b/res/drawable/ic_call_end.xml
new file mode 100644
index 0000000..b8cbbac
--- /dev/null
+++ b/res/drawable/ic_call_end.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ 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.
+ -->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="@dimen/home_card_button_size"
+ android:height="@dimen/home_card_button_size"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:pathData="M12,9c-1.6,0 -3.15,0.25 -4.6,0.72v3.1c0,0.39 -0.23,0.74 -0.56,0.9 -0.98,0.49 -1.87,1.12 -2.66,1.85 -0.18,0.18 -0.43,0.28 -0.7,0.28 -0.28,0 -0.53,-0.11 -0.71,-0.29L0.29,13.08c-0.18,-0.17 -0.29,-0.42 -0.29,-0.7 0,-0.28 0.11,-0.53 0.29,-0.71C3.34,8.78 7.46,7 12,7s8.66,1.78 11.71,4.67c0.18,0.18 0.29,0.43 0.29,0.71 0,0.28 -0.11,0.53 -0.29,0.71l-2.48,2.48c-0.18,0.18 -0.43,0.29 -0.71,0.29 -0.27,0 -0.52,-0.11 -0.7,-0.28 -0.79,-0.74 -1.69,-1.36 -2.67,-1.85 -0.33,-0.16 -0.56,-0.5 -0.56,-0.9v-3.1C15.15,9.25 13.6,9 12,9z"
+ android:fillColor="@color/dialer_button_icon_color"/>
+</vector>
\ No newline at end of file
diff --git a/res/drawable/ic_call_end_button.xml b/res/drawable/ic_call_end_button.xml
new file mode 100644
index 0000000..087192d
--- /dev/null
+++ b/res/drawable/ic_call_end_button.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ 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.
+ -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item>
+ <shape android:shape="oval">
+ <stroke
+ android:width="@dimen/button_outline_thickness"
+ android:color="@color/dialer_end_call_button_color"/>
+ <size
+ android:width="@dimen/button_tap_target_size"
+ android:height="@dimen/button_tap_target_size"/>
+ </shape>
+ </item>
+ <item android:gravity="center"
+ android:drawable="@drawable/ic_call_end"/>
+</layer-list>
\ No newline at end of file
diff --git a/res/drawable/ic_dialpad.xml b/res/drawable/ic_dialpad.xml
new file mode 100644
index 0000000..638b37b
--- /dev/null
+++ b/res/drawable/ic_dialpad.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ 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.
+ -->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="@dimen/home_card_button_size"
+ android:height="@dimen/home_card_button_size"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:pathData="M12,19c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM6,1c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM6,7c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM6,13c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM18,5c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,13c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM18,13c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM18,7c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,7c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,1c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z"
+ android:fillColor="@color/dialer_button_icon_color"/>
+</vector>
diff --git a/res/drawable/ic_mic_off.xml b/res/drawable/ic_mic_off.xml
new file mode 100644
index 0000000..4c25314
--- /dev/null
+++ b/res/drawable/ic_mic_off.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ 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.
+ -->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="@dimen/home_card_button_size"
+ android:height="@dimen/home_card_button_size"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:pathData="M11,5c0,-0.55 0.45,-1 1,-1s1,0.45 1,1v5.17l1.82,1.82c0.11,-0.31 0.18,-0.64 0.18,-0.99V5c0,-1.66 -1.34,-3 -3,-3S9,3.34 9,5v1.17l2,2V5zM2.81,2.81L1.39,4.22l11.65,11.65c-0.33,0.08 -0.68,0.13 -1.04,0.13 -2.76,0 -5,-2.24 -5,-5H5c0,3.53 2.61,6.43 6,6.92V21h2v-3.08c0.57,-0.08 1.12,-0.24 1.64,-0.46l5.14,5.14 1.41,-1.41L2.81,2.81zM19,11h-2c0,0.91 -0.26,1.75 -0.69,2.48l1.46,1.46C18.54,13.82 19,12.47 19,11z"
+ android:fillColor="@color/dialer_button_icon_color"/>
+</vector>
diff --git a/res/layout-land/car_launcher.xml b/res/layout-land/car_launcher.xml
index 1177d8c..44bdd6f 100644
--- a/res/layout-land/car_launcher.xml
+++ b/res/layout-land/car_launcher.xml
@@ -23,93 +23,43 @@
android:layoutDirection="ltr"
tools:context=".CarLauncher">
+ <com.android.car.ui.FocusArea
+ android:id="@+id/top_card"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_marginBottom="@dimen/main_screen_widget_margin"
+ android:layoutDirection="locale"
+ app:layout_constraintLeft_toLeftOf="parent"
+ app:layout_constraintRight_toLeftOf="@+id/vertical_barrier"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toTopOf="@+id/bottom_card"/>
+
+ <com.android.car.ui.FocusArea
+ android:id="@+id/bottom_card"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layoutDirection="locale"
+ app:layout_constraintLeft_toLeftOf="parent"
+ app:layout_constraintRight_toLeftOf="@+id/vertical_barrier"
+ app:layout_constraintTop_toBottomOf="@+id/top_card"
+ app:layout_constraintBottom_toBottomOf="parent"/>
+
<androidx.constraintlayout.widget.Guideline
- android:id="@+id/start_edge"
+ android:id="@+id/vertical_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
- app:layout_constraintGuide_begin="@dimen/horizontal_border_size"/>
-
- <androidx.constraintlayout.widget.Guideline
- android:id="@+id/top_edge"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- app:layout_constraintGuide_begin="@dimen/vertical_border_size"/>
-
- <androidx.constraintlayout.widget.Guideline
- android:id="@+id/end_edge"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- app:layout_constraintGuide_end="@dimen/horizontal_border_size"/>
-
- <androidx.constraintlayout.widget.Guideline
- android:id="@+id/bottom_edge"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- app:layout_constraintGuide_end="@dimen/vertical_border_size"/>
-
- <androidx.constraintlayout.widget.Guideline
- android:id="@+id/divider_vertical"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- app:layout_constraintGuide_percent="@dimen/maps_screen_percentage"/>
-
- <androidx.constraintlayout.widget.Guideline
- android:id="@+id/divider_horizontal"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- app:layout_constraintGuide_percent="@dimen/contextual_screen_percentage"/>
-
- <View
- android:id="@+id/top_line"
- style="@style/HorizontalLineDivider"
- app:layout_constraintTop_toTopOf="parent"/>
+ app:layout_constraintGuide_begin="@dimen/card_width"/>
<androidx.cardview.widget.CardView
+ android:id="@+id/maps_card"
style="@style/CardViewStyle"
android:layout_width="0dp"
android:layout_height="0dp"
- android:layout_margin="@dimen/main_screen_widget_margin"
- app:layout_constraintBottom_toTopOf="@+id/bottom_edge"
- app:layout_constraintRight_toLeftOf="@+id/divider_vertical"
- app:layout_constraintLeft_toRightOf="@+id/start_edge"
- app:layout_constraintTop_toBottomOf="@+id/top_edge"
- android:layoutDirection="locale">
- <android.car.app.CarActivityView
- android:id="@+id/maps"
- android:layout_width="match_parent"
- android:layout_height="match_parent"/>
- </androidx.cardview.widget.CardView>
-
- <FrameLayout
- android:id="@+id/contextual"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_margin="@dimen/main_screen_widget_margin"
- app:layout_constraintBottom_toTopOf="@+id/divider_horizontal"
- app:layout_constraintRight_toLeftOf="@+id/end_edge"
- app:layout_constraintLeft_toRightOf="@+id/divider_vertical"
- app:layout_constraintTop_toBottomOf="@+id/top_edge"
- android:layoutDirection="locale"/>
-
- <FrameLayout
- android:id="@+id/playback"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_margin="@dimen/main_screen_widget_margin"
- app:layout_constraintBottom_toTopOf="@+id/bottom_edge"
- app:layout_constraintRight_toLeftOf="@+id/end_edge"
- app:layout_constraintLeft_toRightOf="@+id/divider_vertical"
- app:layout_constraintTop_toBottomOf="@+id/divider_horizontal"
- android:layoutDirection="locale"/>
- <View
- android:id="@+id/bottom_line"
- style="@style/HorizontalLineDivider"
+ android:layout_marginLeft="@dimen/main_screen_widget_margin"
+ android:layoutDirection="locale"
+ app:layout_constraintLeft_toRightOf="@+id/vertical_barrier"
+ app:layout_constraintRight_toRightOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
-
-</androidx.constraintlayout.widget.ConstraintLayout>
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/res/layout/button_trio.xml b/res/layout/button_trio.xml
new file mode 100644
index 0000000..b61acd7
--- /dev/null
+++ b/res/layout/button_trio.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ 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.
+ -->
+
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:gravity="center"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:orientation="horizontal"
+ android:id="@+id/button_trio">
+
+ <ImageButton
+ android:id="@+id/button_left"
+ android:background="@drawable/car_button_background"
+ android:layout_height="@dimen/button_tap_target_size"
+ android:layout_width="@dimen/button_tap_target_size"
+ android:padding="@dimen/button_tap_target_icon_padding"
+ android:scaleType="centerInside"
+ android:adjustViewBounds="true"/>
+
+ <Space
+ android:layout_height="match_parent"
+ android:layout_width="0dp"
+ android:layout_weight="1"/>
+
+ <ImageButton
+ android:id="@+id/button_center"
+ android:background="@drawable/car_button_background"
+ android:layout_height="@dimen/button_tap_target_size"
+ android:layout_width="@dimen/button_tap_target_size"
+ android:padding="@dimen/button_tap_target_icon_padding"
+ android:scaleType="centerInside"
+ android:adjustViewBounds="true"/>
+
+ <Space
+ android:layout_height="match_parent"
+ android:layout_width="0dp"
+ android:layout_weight="1"/>
+
+ <ImageButton
+ android:id="@+id/button_right"
+ android:background="@drawable/car_button_background"
+ android:layout_height="@dimen/button_tap_target_size"
+ android:layout_width="@dimen/button_tap_target_size"
+ android:padding="@dimen/button_tap_target_icon_padding"
+ android:scaleType="centerInside"
+ android:adjustViewBounds="true"/>
+</LinearLayout>
diff --git a/res/layout/car_launcher.xml b/res/layout/car_launcher.xml
index 843d8e0..b130b1b 100644
--- a/res/layout/car_launcher.xml
+++ b/res/layout/car_launcher.xml
@@ -1,19 +1,19 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?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.
--->
+ ~ 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.
+ -->
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
@@ -23,93 +23,36 @@
android:layoutDirection="ltr"
tools:context=".CarLauncher">
- <androidx.constraintlayout.widget.Guideline
- android:id="@+id/start_edge"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- app:layout_constraintGuide_begin="@dimen/horizontal_border_size"/>
+ <com.android.car.ui.FocusArea
+ android:id="@+id/top_card"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_marginRight="@dimen/main_screen_widget_margin"
+ android:layoutDirection="locale"
+ app:layout_constraintLeft_toLeftOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintRight_toLeftOf="@+id/bottom_card"
+ app:layout_constraintBottom_toTopOf="@+id/maps_card"/>
- <androidx.constraintlayout.widget.Guideline
- android:id="@+id/top_edge"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- app:layout_constraintGuide_begin="@dimen/vertical_border_size"/>
-
- <androidx.constraintlayout.widget.Guideline
- android:id="@+id/end_edge"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- app:layout_constraintGuide_end="@dimen/horizontal_border_size"/>
-
- <androidx.constraintlayout.widget.Guideline
- android:id="@+id/bottom_edge"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- app:layout_constraintGuide_end="@dimen/vertical_border_size"/>
-
- <androidx.constraintlayout.widget.Guideline
- android:id="@+id/divider_vertical"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- app:layout_constraintGuide_percent="@dimen/contextual_screen_percentage"/>
-
- <androidx.constraintlayout.widget.Guideline
- android:id="@+id/divider_horizontal"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- app:layout_constraintGuide_percent="@dimen/maps_screen_percentage"/>
-
- <View
- android:id="@+id/top_line"
- style="@style/HorizontalLineDivider"
- app:layout_constraintTop_toTopOf="parent"/>
+ <com.android.car.ui.FocusArea
+ android:id="@+id/bottom_card"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layoutDirection="locale"
+ app:layout_constraintLeft_toRightOf="@+id/top_card"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintRight_toRightOf="parent"
+ app:layout_constraintBottom_toTopOf="@+id/maps_card"/>
<androidx.cardview.widget.CardView
+ android:id="@+id/maps_card"
style="@style/CardViewStyle"
android:layout_width="0dp"
android:layout_height="0dp"
- android:layout_margin="@dimen/main_screen_widget_margin"
- app:layout_constraintBottom_toTopOf="@+id/divider_horizontal"
- app:layout_constraintRight_toLeftOf="@+id/end_edge"
- app:layout_constraintLeft_toRightOf="@+id/start_edge"
+ android:layout_marginTop="@dimen/main_screen_widget_margin"
android:layoutDirection="locale"
- app:layout_constraintTop_toBottomOf="@+id/top_edge">
- <android.car.app.CarActivityView
- android:id="@+id/maps"
- android:layout_width="match_parent"
- android:layout_height="match_parent"/>
- </androidx.cardview.widget.CardView>
-
- <FrameLayout
- android:id="@+id/contextual"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_margin="@dimen/main_screen_widget_margin"
- app:layout_constraintBottom_toTopOf="@+id/bottom_edge"
- app:layout_constraintRight_toLeftOf="@+id/end_edge"
- app:layout_constraintLeft_toRightOf="@+id/divider_vertical"
- app:layout_constraintTop_toBottomOf="@+id/divider_horizontal"
- android:layoutDirection="locale"/>
-
- <FrameLayout
- android:id="@+id/playback"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_margin="@dimen/main_screen_widget_margin"
- android:layoutDirection="locale"
- app:layout_constraintBottom_toTopOf="@+id/bottom_edge"
- app:layout_constraintRight_toLeftOf="@+id/divider_vertical"
- app:layout_constraintLeft_toRightOf="@+id/start_edge"
- app:layout_constraintTop_toBottomOf="@+id/divider_horizontal"/>
- <View
- android:id="@+id/bottom_line"
- style="@style/HorizontalLineDivider"
- app:layout_constraintBottom_toBottomOf="parent"/>
-
-</androidx.constraintlayout.widget.ConstraintLayout>
+ app:layout_constraintLeft_toLeftOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/bottom_card"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintRight_toRightOf="parent"/>
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/res/layout/car_launcher_multiwindow.xml b/res/layout/car_launcher_multiwindow.xml
index 23deb08..6061dbf 100644
--- a/res/layout/car_launcher_multiwindow.xml
+++ b/res/layout/car_launcher_multiwindow.xml
@@ -20,7 +20,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layoutDirection="ltr"
tools:context=".CarLauncher">
<androidx.constraintlayout.widget.Guideline
@@ -64,7 +63,7 @@
app:layout_constraintTop_toTopOf="parent"/>
<FrameLayout
- android:id="@+id/contextual"
+ android:id="@+id/top_card"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="@dimen/main_screen_widget_margin"
@@ -75,7 +74,7 @@
app:layout_constraintTop_toBottomOf="@+id/top_edge"/>
<FrameLayout
- android:id="@+id/playback"
+ android:id="@+id/bottom_card"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="@dimen/main_screen_widget_margin"
diff --git a/res/layout/card_content_descriptive_text_only.xml b/res/layout/card_content_descriptive_text_only.xml
new file mode 100644
index 0000000..8dd3fa9
--- /dev/null
+++ b/res/layout/card_content_descriptive_text_only.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ 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.
+ -->
+
+<!-- Layout for a DescriptiveTextView -->
+<androidx.constraintlayout.widget.ConstraintLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent">
+
+ <include layout="@layout/descriptive_text"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_marginTop="@dimen/descriptive_text_only_top_margin"
+ app:layout_constraintTop_toTopOf="parent"/>
+
+ <include layout="@layout/tap_for_more_text"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_marginTop="@dimen/tap_text_margin"
+ android:layout_marginBottom="@dimen/tap_text_margin"
+ app:layout_constraintBottom_toBottomOf="parent"/>
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/res/layout/card_content_descriptive_text_with_controls.xml b/res/layout/card_content_descriptive_text_with_controls.xml
new file mode 100644
index 0000000..505f8f0
--- /dev/null
+++ b/res/layout/card_content_descriptive_text_with_controls.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ 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.
+ -->
+
+<!-- Layout for a DescriptiveTextWithControlsView -->
+<androidx.constraintlayout.widget.ConstraintLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent">
+
+ <include layout="@layout/descriptive_text"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_marginTop="@dimen/descriptive_text_with_controls_top_margin"
+ app:layout_constraintTop_toTopOf="parent"/>
+
+ <include layout="@layout/button_trio"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_marginStart="@dimen/button_trio_margin"
+ android:layout_marginEnd="@dimen/button_trio_margin"
+ android:layout_marginBottom="@dimen/button_trio_margin"
+ app:layout_constraintBottom_toBottomOf="parent"/>
+
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/res/layout/card_content_media.xml b/res/layout/card_content_media.xml
new file mode 100644
index 0000000..08a291d
--- /dev/null
+++ b/res/layout/card_content_media.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ 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.
+ -->
+
+<!-- Layout specifically for the media card, which uses media-specific playback_controls.xml -->
+<androidx.constraintlayout.widget.ConstraintLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent">
+
+ <include layout="@layout/descriptive_text"
+ android:id="@+id/media_descriptive_text"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_marginTop="@dimen/media_top_margin"
+ app:layout_constraintTop_toTopOf="parent"/>
+
+ <com.android.car.media.common.PlaybackControlsActionBar
+ android:id="@+id/media_playback_controls_bar"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_alignParentBottom="true"
+ app:columns="@integer/playback_controls_bar_columns"
+ app:layout_constraintTop_toBottomOf="@+id/media_descriptive_text"
+ app:layout_constraintBottom_toBottomOf="parent"/>
+
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/res/layout/card_content_text_block.xml b/res/layout/card_content_text_block.xml
new file mode 100644
index 0000000..bc181a9
--- /dev/null
+++ b/res/layout/card_content_text_block.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ 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.
+ -->
+
+<!-- Layout for a TextBlockView -->
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:orientation="vertical">
+
+ <include layout="@layout/text_block"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_marginTop="@dimen/text_block_top_margin"
+ android:layout_weight="1"/>
+
+ <include layout="@layout/tap_for_more_text"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_marginTop="@dimen/tap_text_margin"
+ android:layout_marginBottom="@dimen/tap_text_margin"/>
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/card_fragment.xml b/res/layout/card_fragment.xml
new file mode 100644
index 0000000..9ebf790
--- /dev/null
+++ b/res/layout/card_fragment.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ 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.
+ -->
+
+<androidx.cardview.widget.CardView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ style="@style/CardViewStyle"
+ android:id="@+id/card_view"
+ android:foreground="?android:attr/selectableItemBackground"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:visibility="gone">
+
+ <FrameLayout
+ android:id="@+id/card_background"
+ android:visibility="gone"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <com.android.car.apps.common.CrossfadeImageView
+ android:id="@+id/card_background_image"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerCrop"/>
+
+ <View
+ android:id="@+id/card_background_scrim"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:focusable="false"
+ android:background="@color/card_background_scrim"
+ android:alpha="@dimen/card_background_scrim_alpha"/>
+ </FrameLayout>
+
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:layout_marginEnd="@dimen/card_content_margin"
+ android:layout_marginStart="@dimen/card_content_margin">
+
+ <ImageView
+ android:id="@+id/card_icon"
+ android:layout_height="@dimen/card_icon_size"
+ android:layout_width="@dimen/card_icon_size"
+ app:layout_constraintTop_toTopOf="@+id/card_name"
+ app:layout_constraintBottom_toBottomOf="@+id/card_name"
+ app:layout_constraintStart_toStartOf="parent"/>
+
+ <TextView
+ android:id="@+id/card_name"
+ android:layout_height="wrap_content"
+ android:layout_width="0dp"
+ android:layout_marginStart="@dimen/card_name_margin_start"
+ android:layout_marginTop="@dimen/card_content_margin"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintStart_toEndOf="@+id/card_icon"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ <!-- Card Content can be displayed using one of the following layouts -->
+ <FrameLayout
+ android:layout_height="0dp"
+ android:layout_width="match_parent"
+ app:layout_constraintTop_toBottomOf="@+id/card_name"
+ app:layout_constraintBottom_toBottomOf="parent">
+
+ <ViewStub android:id="@+id/descriptive_text_layout"
+ android:inflatedId="@+id/descriptive_text_layout"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:visibility="gone"
+ android:layout="@layout/card_content_descriptive_text_only"/>
+
+ <ViewStub android:id="@+id/text_block_layout"
+ android:inflatedId="@+id/text_block_layout"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:visibility="gone"
+ android:layout="@layout/card_content_text_block"/>
+
+ <ViewStub android:id="@+id/descriptive_text_with_controls_layout"
+ android:inflatedId="@+id/descriptive_text_with_controls_layout"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:visibility="gone"
+ android:layout="@layout/card_content_descriptive_text_with_controls"/>
+
+ <ViewStub android:id="@+id/media_layout"
+ android:inflatedId="@+id/media_layout"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:visibility="gone"
+ android:layout="@layout/card_content_media"/>
+ </FrameLayout>
+ </androidx.constraintlayout.widget.ConstraintLayout>
+</androidx.cardview.widget.CardView>
diff --git a/res/layout/contextual_fragment.xml b/res/layout/contextual_fragment.xml
deleted file mode 100644
index 0193d2c..0000000
--- a/res/layout/contextual_fragment.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright 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.
--->
-<androidx.cardview.widget.CardView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- style="@style/ContextualSpace"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- app:contentPadding="@dimen/contextual_padding">
-
- <androidx.constraintlayout.widget.ConstraintLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center_vertical|start">
-
- <ImageView
- android:id="@+id/icon"
- android:layout_width="80dp"
- android:layout_height="80dp"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toBottomOf="parent"/>
-
- <TextView
- android:id="@+id/top_line"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginStart="@dimen/icon_end_margin"
- android:singleLine="true"
- android:textAppearance="?android:attr/textAppearanceLarge"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHorizontal_bias="0.0"
- app:layout_constraintStart_toEndOf="@+id/icon"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toTopOf="@+id/bottom_line_container"
- app:layout_constraintVertical_chainStyle="packed"/>
-
- <LinearLayout
- android:id="@+id/bottom_line_container"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="@dimen/icon_end_margin"
- android:layout_marginTop="@dimen/line_gap_margin"
- android:baselineAligned="true"
- app:layout_constraintStart_toEndOf="@+id/icon"
- app:layout_constraintTop_toBottomOf="@+id/top_line"
- app:layout_constraintBottom_toBottomOf="parent">
-
- <TextView
- android:id="@+id/bottom_line"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:ellipsize="end"
- android:maxLines="1"
- android:textAppearance="?android:attr/textAppearanceLarge"/>
-
- <TextView
- android:id="@+id/date_divider"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="4dp"
- android:layout_marginEnd="6dp"
- android:text="│"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textColor="@color/date_divider_bar_color"/>
-
- <com.android.car.carlauncher.LocalizedTextClock
- android:id="@+id/date"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:format12Hour="@string/date"
- android:format24Hour="@string/date"
- android:textAppearance="?android:attr/textAppearanceLarge"/>
-
- </LinearLayout>
-
- </androidx.constraintlayout.widget.ConstraintLayout>
-
-</androidx.cardview.widget.CardView>
diff --git a/res/layout/descriptive_text.xml b/res/layout/descriptive_text.xml
new file mode 100644
index 0000000..317bd4f
--- /dev/null
+++ b/res/layout/descriptive_text.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ 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.
+ -->
+
+<androidx.constraintlayout.widget.ConstraintLayout
+ 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="match_parent">
+
+ <ImageView
+ android:id="@+id/optional_image"
+ android:layout_height="@dimen/card_content_image_size"
+ android:layout_width="@dimen/card_content_image_size"
+ android:visibility="gone"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="@+id/primary_text"
+ app:layout_constraintBottom_toBottomOf="@+id/secondary_text"/>
+
+ <TextView
+ android:id="@+id/primary_text"
+ android:layout_height="wrap_content"
+ android:layout_width="0dp"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:layout_marginStart="@dimen/card_content_image_margin"
+ app:layout_goneMarginStart="0dp"
+ app:layout_constraintStart_toEndOf="@+id/optional_image"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toTopOf="@+id/secondary_text"/>
+
+ <Chronometer
+ android:id="@+id/optional_timer"
+ android:visibility="gone"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ app:layout_constraintStart_toStartOf="@+id/primary_text"
+ app:layout_constraintTop_toTopOf="@+id/secondary_text"
+ app:layout_constraintBottom_toBottomOf="@+id/secondary_text"/>
+
+ <TextView
+ android:id="@+id/optional_timer_separator"
+ android:visibility="gone"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/ongoing_call_duration_text_separator"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ app:layout_constraintStart_toEndOf="@+id/optional_timer"
+ app:layout_constraintTop_toTopOf="@+id/secondary_text"
+ app:layout_constraintBottom_toBottomOf="@+id/secondary_text"/>
+
+ <TextView
+ android:id="@+id/secondary_text"
+ android:layout_height="wrap_content"
+ android:layout_width="0dp"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:layout_marginTop="@dimen/secondary_text_margin_top"
+ app:layout_constraintStart_toEndOf="@+id/optional_timer_separator"
+ app:layout_constraintEnd_toEndOf="@+id/primary_text"
+ app:layout_constraintTop_toBottomOf="@+id/primary_text"
+ app:layout_constraintBottom_toBottomOf="parent"/>
+</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/res/layout/tap_for_more_text.xml b/res/layout/tap_for_more_text.xml
new file mode 100644
index 0000000..e02ef81
--- /dev/null
+++ b/res/layout/tap_for_more_text.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ 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.
+ -->
+<!-- A single line of text for the bottom of a card-->
+<TextView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/tap_for_more_text"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:gravity="center"
+ android:singleLine="true"
+ android:text="@string/tap_for_more_info_text"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="@color/tap_for_more_text_color"
+ android:visibility="gone"/>
diff --git a/res/layout/text_block.xml b/res/layout/text_block.xml
new file mode 100644
index 0000000..b4bf141
--- /dev/null
+++ b/res/layout/text_block.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ 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.
+ -->
+<!-- A multi-line text view -->
+<TextView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/text_block"
+ android:gravity="top"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:maxLines="@integer/card_content_text_block_max_lines"
+ android:textAppearance="?android:attr/textAppearanceLarge"/>
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index 93ec3c0..1bb4b20 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Alle programme"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Mediaprogramme"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> kan nie gebruik word terwyl jy bestuur nie."</string>
- <string name="greeting" msgid="7164414111783832396">"Hallo <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Tik op kaart vir meer inligting"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Tik op kaart om te begin"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Oproep aan die gang"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Begin Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Kan nie Android Auto begin nie. Geen aktiwiteit gevind nie."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> toestelle</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> toestel</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Weer"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° meestal sonnig"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Bergaansig • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Versteek ontfoutingprogramme"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Wys ontfoutingprogramme"</string>
</resources>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index 554f8f3..1f76984 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"ሁሉም መተግበሪያዎች"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"የሚዲያ መተግበሪያዎች"</string>
<string name="driving_toast_text" msgid="149483091947120092">"እየነዱ ሳለ <xliff:g id="APP_NAME">%1$s</xliff:g>ን መጠቀም አይቻልም።"</string>
- <string name="greeting" msgid="7164414111783832396">"ሰላም፣ <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"ለተጨማሪ መረጃ ካርድን መታ ያድርጉ"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"ለማስጀመር ካርድን መታ ያድርጉ"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"እየተካሄደ ያለ ጥሪ"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Autoን አስጀምር"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Autoን ማስጀመር አልተቻለም። ምንም እንቅስቃሴ አልተገኘም።"</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> መሣሪያዎች</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> መሣሪያዎች</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"የአየር ሁኔታ"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° በአብዛኛው ጸሐያማ"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"የተራራ እይታ • ከ፦ --° ዝ፦ --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"የአራሚ መተግበሪያዎችን ደብቅ"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"የአራሚ መተግበሪያዎችን አሳይ"</string>
</resources>
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index 2010374..03f03fe 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -21,7 +21,12 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"جميع التطبيقات"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"تطبيقات الوسائط"</string>
<string name="driving_toast_text" msgid="149483091947120092">"لا يمكن استخدام <xliff:g id="APP_NAME">%1$s</xliff:g> أثناء القيادة."</string>
- <string name="greeting" msgid="7164414111783832396">"مرحبًا <xliff:g id="USER">%s</xliff:g>،"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"انقر على البطاقة للحصول على مزيد من المعلومات."</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"انقر على البطاقة لتشغيل Android Auto."</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"مكالمة جارية"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"تشغيل Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"يتعذّر تشغيل Android Auto. لم يتم العثور على أي أنشطة."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="zero"><xliff:g id="COUNT_1">%d</xliff:g> جهاز</item>
<item quantity="two">جهازان (<xliff:g id="COUNT_1">%d</xliff:g>)</item>
@@ -30,6 +35,9 @@
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> جهاز</item>
<item quantity="one">جهاز واحد (<xliff:g id="COUNT_0">%d</xliff:g>)</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"الطقس"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° مشمس في أغلب الأوقات"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"مدينة القاهرة • درجة الحرارة الأعلى: --° الأدنى: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"إخفاء تطبيقات تصحيح الأخطاء"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"إظهار تطبيقات تصحيح الأخطاء"</string>
</resources>
diff --git a/res/values-as/strings.xml b/res/values-as/strings.xml
index 2d88f39..c9b74f4 100644
--- a/res/values-as/strings.xml
+++ b/res/values-as/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"আটাইবোৰ এপ্"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"মিডিয়া এপ্"</string>
<string name="driving_toast_text" msgid="149483091947120092">"গাড়ী চলাই থকাৰ সময়ত <xliff:g id="APP_NAME">%1$s</xliff:g> ব্যৱহাৰ কৰিব নোৱাৰি।"</string>
- <string name="greeting" msgid="7164414111783832396">"নমস্কাৰ, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"অধিক তথ্যৰ বাবে কাৰ্ডত টিপক"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"লঞ্চ কৰিবলৈ কাৰ্ডত টিপক"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"চলি থকা কল"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto লঞ্চ কৰক"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto লঞ্চ কৰিব পৰা নগ’ল। কোনো কাৰ্যকলাপ পোৱা নগ’ল।"</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> টা ডিভাইচ</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> টা ডিভাইচ</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"বতৰ"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° অধিক সময় ৰৌদ্ৰোজ্জ্বল"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"মাউণ্টেইন ভিউ • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"ডিবাগ এপ্সমূহ লুকুৱাওক"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"ডিবাগ এপ্সমূহ দেখুৱাওক"</string>
</resources>
diff --git a/res/values-az/strings.xml b/res/values-az/strings.xml
index 2711a9f..c2ea112 100644
--- a/res/values-az/strings.xml
+++ b/res/values-az/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Bütün tətbiqlər"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Media tətbiqləri"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Avtomobil sürərkən <xliff:g id="APP_NAME">%1$s</xliff:g> istifadə edilə bilməz."</string>
- <string name="greeting" msgid="7164414111783832396">"Salam, <xliff:g id="USER">%s</xliff:g>,"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Ətraflı məlumat üçün karta toxunun"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Başlatmaq üçün karta toxunun"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Davam edən zəng"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto\'nu başladın"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto\'nu başlatmaq mümkün deyil. Fəaliyyət tapılmadı."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> cihaz</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> cihaz</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Hava"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Əksərən günəşli"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Dağ Görünüşü • Y: --° U: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Sazlama tətbiqlərini gizlədin"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Sazlama tətbiqlərini göstərin"</string>
</resources>
diff --git a/res/values-b+sr+Latn/strings.xml b/res/values-b+sr+Latn/strings.xml
index fc746d9..148fbc6 100644
--- a/res/values-b+sr+Latn/strings.xml
+++ b/res/values-b+sr+Latn/strings.xml
@@ -21,12 +21,20 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Sve aplikacije"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Aplikacije za medije"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> ne može da se koristi tokom vožnje."</string>
- <string name="greeting" msgid="7164414111783832396">"Zdravo <xliff:g id="USER">%s</xliff:g>,"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Dodirnite karticu za više informacija"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Dodirnite karticu da biste pokrenuli uslugu"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Poziv je u toku"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Pokreni Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Pokretanje usluge Android Auto nije uspelo. Nije pronađena nijedna aktivnost."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> uređaj</item>
<item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> uređaja</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> uređaja</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Vreme"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° uglavnom sunčano"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Novi Sad • Najviša: --° Najniža: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Sakrij aplikacije za otklanjanje grešaka"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Prikaži aplikacije za otklanjanje grešaka"</string>
</resources>
diff --git a/res/values-be/strings.xml b/res/values-be/strings.xml
index 704f0a5..8fbdaca 100644
--- a/res/values-be/strings.xml
+++ b/res/values-be/strings.xml
@@ -21,13 +21,21 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Усе праграмы"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Мультымедыйныя праграмы"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Праграмай \"<xliff:g id="APP_NAME">%1$s</xliff:g>\" нельга карыстацца, калі вы за рулём."</string>
- <string name="greeting" msgid="7164414111783832396">"Прывітанне, <xliff:g id="USER">%s</xliff:g>!"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Націсніце на картку, каб атрымаць дадатковую інфармацыю"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Націсніце на картку, каб выканаць запуск"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Выконваецца выклік"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Запусціць Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Не ўдалося запусціць Android Auto. Дзеянні не знойдзены."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> прылада</item>
<item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> прылады</item>
<item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> прылад</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> прылады</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Надвор\'е"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--°, пераважна сонечна"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Маўтын-В\'ю • макс.: --°, мін.: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Схаваць праграмы адладкі"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Паказаць праграмы адладкі"</string>
</resources>
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index 8c97a73..c832b7a 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Всички приложения"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Медийни приложения"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> не може да се използва при шофиране."</string>
- <string name="greeting" msgid="7164414111783832396">"Здравейте, <xliff:g id="USER">%s</xliff:g>,"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Докоснете картата за още информация"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Докоснете картата за стартиране"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Текущо обаждане"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Стартиране на Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto не може да се стартира. Няма намерена активност."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> устройства</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> устройство</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Времето"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Предимно слънчево"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • Макс: --° Мин: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Скриване на приложенията за отстраняване на грешки"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Показване на приложенията за отстраняв. на грешки"</string>
</resources>
diff --git a/res/values-bn/strings.xml b/res/values-bn/strings.xml
index 9f5bd8a..0492a1b 100644
--- a/res/values-bn/strings.xml
+++ b/res/values-bn/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"সব অ্যাপ"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"মিডিয়া অ্যাপ"</string>
<string name="driving_toast_text" msgid="149483091947120092">"ড্রাইভ করার সময় <xliff:g id="APP_NAME">%1$s</xliff:g> ব্যবহার করা যাবে না।"</string>
- <string name="greeting" msgid="7164414111783832396">"হ্যালো, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"আরও তথ্যের জন্য \'কার্ড\' বিকল্পে ট্যাপ করুন"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"চালু করতে \'কার্ড\' বিকল্পে ট্যাপ করুন"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"চালু থাকা কল"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto লঞ্চ করুন"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto লঞ্চ করা যায়নি। কোনও অ্যাক্টিভিটি পাওয়া যায়নি।"</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g>টি ডিভাইস</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g>টি ডিভাইস</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Weather"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° সাধারণত রৌদ্রোজ্জ্বল"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"পাহাড়ের দৃশ্য • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"ডিবাগ অ্যাপ আড়াল করুন"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"ডিবাগ অ্যাপ দেখুন"</string>
</resources>
diff --git a/res/values-bs/strings.xml b/res/values-bs/strings.xml
index a2bc860..dfbdf4c 100644
--- a/res/values-bs/strings.xml
+++ b/res/values-bs/strings.xml
@@ -21,12 +21,20 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Sve aplikacije"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Medijske aplikacije"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Nije moguće koristiti aplikaciju <xliff:g id="APP_NAME">%1$s</xliff:g> tokom vožnje."</string>
- <string name="greeting" msgid="7164414111783832396">"Zdravo, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Dodirnite karticu za više informacija"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Dodirnite karticu za pokretanje"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Poziv u toku"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Pokreni Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Nije moguće pokrenuti Android Auto. Nije pronađena nijedna aktivnost."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> uređaj</item>
<item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> uređaja</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> uređaja</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Vrijeme"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Pretežno sunčano"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • V: --° N: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Sakrij aplikacije za otklanjanje grešaka"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Prikaži aplikacije za otklanjanje grešaka"</string>
</resources>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 2363279..5d91e90 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Totes les aplicacions"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Aplicacions multimèdia"</string>
<string name="driving_toast_text" msgid="149483091947120092">"No es pot utilitzar <xliff:g id="APP_NAME">%1$s</xliff:g> mentre es condueix."</string>
- <string name="greeting" msgid="7164414111783832396">"Hola, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Toca la targeta per veure més informació"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Toca la targeta per iniciar"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Trucada en curs"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Inicia Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"No es pot iniciar Android Auto. No s\'ha trobat cap activitat."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> dispositius</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> dispositiu</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Temps"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Principalment assolellat"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • Màx.: --° Mín.: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Amaga les aplicacions de depuració"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Mostra les aplicacions de depuració"</string>
</resources>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index 08be2a8..75a3c0e 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -21,13 +21,21 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Všechny aplikace"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Mediální aplikace"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Aplikaci <xliff:g id="APP_NAME">%1$s</xliff:g> nelze používat při řízení."</string>
- <string name="greeting" msgid="7164414111783832396">"Dobrý den, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Klepnutím na kartu zobrazíte další informace"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Klepnutím na kartu spustíte"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Probíhající hovor"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Spustit Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto se nepodařilo spustit. Nebyla nalezena žádná aktivita."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> zařízení</item>
<item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> zařízení</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> zařízení</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> zařízení</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Počasí"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Většinou slunečno"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • Nejvyšší: --° Nejnižší: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Skrýt ladicí aplikace"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Zobrazit ladicí aplikace"</string>
</resources>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index 82be011..3a481e1 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Alle apps"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Medieapps"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> kan ikke bruges under kørsel."</string>
- <string name="greeting" msgid="7164414111783832396">"Hej <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Tryk på kortet for at få flere oplysninger"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Tryk på kortet for at starte"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Igangværende opkald"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Start Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto kunne ikke startes. Der blev ikke fundet nogen aktivitet."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> enhed</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> enheder</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Vejret"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"-- ° Overvejende solskin"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • H: -- ° L: -- °"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Skjul apps til fejlretning"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Vis apps til fejlretning"</string>
</resources>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 18ff6dd..22ab878 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Alle Apps"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Medien-Apps"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> kann während der Fahrt nicht genutzt werden."</string>
- <string name="greeting" msgid="7164414111783832396">"Hallo <xliff:g id="USER">%s</xliff:g>,"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Für weitere Informationen auf die Karte tippen"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Zum Starten auf die Karte tippen"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Aktueller Anruf"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto starten"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto kann nicht gestartet werden. Keine Aktivität gefunden."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> Geräte</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> Gerät</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Wetter"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Größtenteils sonnig"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • H: --° T: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Debug-Apps verbergen"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Debug-Apps anzeigen"</string>
</resources>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index dd57558..44ed8e4 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Όλες οι εφαρμογές"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Εφαρμογές μέσων"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Αδύνατη χρήση της εφαρμογής <xliff:g id="APP_NAME">%1$s</xliff:g> κατά την οδήγηση."</string>
- <string name="greeting" msgid="7164414111783832396">"Γεια σας, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Πατήστε την κάρτα για περισσότερες πληροφορίες"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Πατήστε την κάρτα για εκκίνηση"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Κλήση σε εξέλιξη"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Εκκίνηση του Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Δεν είναι δυνατή η εκκίνηση τη εφαρμογής Android Auto. Δεν βρέθηκαν δραστηριότητες."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> συσκευές</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> συσκευή</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Καιρός"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Κυρίως ηλιοφάνεια"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • Μ: --° Ε: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Απόκρυψη εφαρμογών εντοπισμού σφαλμάτων"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Εμφάνιση εφαρμογών εντοπισμού σφαλμάτων"</string>
</resources>
diff --git a/res/values-en-rAU/strings.xml b/res/values-en-rAU/strings.xml
index d3d7ca4..ab1edd9 100644
--- a/res/values-en-rAU/strings.xml
+++ b/res/values-en-rAU/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"All apps"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Media apps"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> can\'t be used while driving."</string>
- <string name="greeting" msgid="7164414111783832396">"Hi <xliff:g id="USER">%s</xliff:g>,"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Tap card for more info"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Tap card to launch"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"On-going call"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Launch Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Unable to launch Android Auto. No activity found."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> devices</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> device</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Weather"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"–° Mostly sunny"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • H: –° L: –°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Hide debug apps"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Show debug apps"</string>
</resources>
diff --git a/res/values-en-rCA/strings.xml b/res/values-en-rCA/strings.xml
index d3d7ca4..ab1edd9 100644
--- a/res/values-en-rCA/strings.xml
+++ b/res/values-en-rCA/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"All apps"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Media apps"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> can\'t be used while driving."</string>
- <string name="greeting" msgid="7164414111783832396">"Hi <xliff:g id="USER">%s</xliff:g>,"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Tap card for more info"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Tap card to launch"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"On-going call"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Launch Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Unable to launch Android Auto. No activity found."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> devices</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> device</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Weather"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"–° Mostly sunny"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • H: –° L: –°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Hide debug apps"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Show debug apps"</string>
</resources>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index d3d7ca4..ab1edd9 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"All apps"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Media apps"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> can\'t be used while driving."</string>
- <string name="greeting" msgid="7164414111783832396">"Hi <xliff:g id="USER">%s</xliff:g>,"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Tap card for more info"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Tap card to launch"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"On-going call"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Launch Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Unable to launch Android Auto. No activity found."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> devices</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> device</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Weather"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"–° Mostly sunny"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • H: –° L: –°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Hide debug apps"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Show debug apps"</string>
</resources>
diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml
index d3d7ca4..ab1edd9 100644
--- a/res/values-en-rIN/strings.xml
+++ b/res/values-en-rIN/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"All apps"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Media apps"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> can\'t be used while driving."</string>
- <string name="greeting" msgid="7164414111783832396">"Hi <xliff:g id="USER">%s</xliff:g>,"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Tap card for more info"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Tap card to launch"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"On-going call"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Launch Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Unable to launch Android Auto. No activity found."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> devices</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> device</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Weather"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"–° Mostly sunny"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • H: –° L: –°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Hide debug apps"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Show debug apps"</string>
</resources>
diff --git a/res/values-en-rXC/strings.xml b/res/values-en-rXC/strings.xml
index 5535f93..61d0acb 100644
--- a/res/values-en-rXC/strings.xml
+++ b/res/values-en-rXC/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"All apps"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Media apps"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> can\'t be used while driving."</string>
- <string name="greeting" msgid="7164414111783832396">"Hi, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Tap card for more info"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Tap card to launch"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Ongoing call"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Launch Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Unable to launch Android Auto. No activity found."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> devices</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> device</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Weather"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Mostly sunny"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Hide debug apps"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Show debug apps"</string>
</resources>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 7f393ef..e264e92 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Todas las apps"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Apps multimedia"</string>
<string name="driving_toast_text" msgid="149483091947120092">"No puedes usar <xliff:g id="APP_NAME">%1$s</xliff:g> mientras conduces."</string>
- <string name="greeting" msgid="7164414111783832396">"Hola, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Presiona la tarjeta para obtener más información"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Presiona la tarjeta para iniciar"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Llamada en curso"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Iniciar Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"No se puede iniciar Android Auto. No se encontró ninguna actividad."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> dispositivos</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> dispositivo</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Tiempo"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Mayormente soleado"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • M: --° M: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Ocultar apps de depuración"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Mostrar apps de depuración"</string>
</resources>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 199a9af..a65492c 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Todas las aplicaciones"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Aplicaciones multimedia"</string>
<string name="driving_toast_text" msgid="149483091947120092">"No se puede usar <xliff:g id="APP_NAME">%1$s</xliff:g> mientras se conduce."</string>
- <string name="greeting" msgid="7164414111783832396">"Hola, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Toca la tarjeta para ver más información"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Toca la tarjeta para iniciar la aplicación"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Llamada en curso"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Iniciar Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"No se ha podido iniciar Android Auto. No se ha encontrado ninguna actividad."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> dispositivos</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> dispositivo</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Tiempo"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--°, mayormente soleado"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • Máx.: --° Mín.: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Ocultar aplicaciones de depuración"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Mostrar aplicaciones de depuración"</string>
</resources>
diff --git a/res/values-et/strings.xml b/res/values-et/strings.xml
index 074517e..235c8aa 100644
--- a/res/values-et/strings.xml
+++ b/res/values-et/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Kõik rakendused"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Meediarakendused"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Rakendust <xliff:g id="APP_NAME">%1$s</xliff:g> ei saa sõidu ajal kasutada."</string>
- <string name="greeting" msgid="7164414111783832396">"Tere, <xliff:g id="USER">%s</xliff:g>!"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Lisateabe saamiseks puudutage kaarti"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Käivitamiseks puudutage kaarti"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Käimasolev kõne"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto käivitamine"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Autot ei õnnestu käivitada. Ühtegi tegevust ei leitud."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> seadet</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> seade</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Ilm"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° – enamasti päikeseline"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • K: --° M: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Peida silumisrakendused"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Kuva silumisrakendused"</string>
</resources>
diff --git a/res/values-eu/strings.xml b/res/values-eu/strings.xml
index 37c50ec..4a92468 100644
--- a/res/values-eu/strings.xml
+++ b/res/values-eu/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Aplikazio guztiak"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Multimedia-aplikazioak"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> ezin da erabili gidatu bitartean."</string>
- <string name="greeting" msgid="7164414111783832396">"Kaixo, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Informazio gehiago lortzeko, sakatu txartela"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Sakatu txartela abiarazteko"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Deia abian da"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Abiarazi Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Ezin da abiarazi Android Auto. Ez da jarduerarik aurkitu."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> gailu</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> gailu</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Eguraldia"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"-- ° Gehienbat eguzkitsua"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • H: -- ° L: -- °"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Ezkutatu arazteko aplikazioak"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Erakutsi arazteko aplikazioak"</string>
</resources>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index 5029534..5c969de 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"همه برنامهها"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"برنامههای رسانه"</string>
<string name="driving_toast_text" msgid="149483091947120092">"هنگام رانندگی نمیتوان از <xliff:g id="APP_NAME">%1$s</xliff:g> استفاده کرد."</string>
- <string name="greeting" msgid="7164414111783832396">"سلام <xliff:g id="USER">%s</xliff:g>،"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"برای اطلاعات بیشتر، روی کارت ضربه بزنید"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"برای راهاندازی، روی کارت ضربه بزنید"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"تماس درحال انجام"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"راهاندازی Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto راهاندازی نشد. فعالیتی پیدا نشد."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> دستگاه</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> دستگاه</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"آبوهوا"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° بیشتر آفتابی"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"مانتین ویو • بیشینه: --° کمینه: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"پنهان کردن برنامههای اشکالزدایی"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"نمایش برنامههای اشکالزدایی"</string>
</resources>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index e7e9d17..54374a5 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Kaikki sovellukset"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Mediasovellukset"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> ei voi olla käytössä ajon aikana."</string>
- <string name="greeting" msgid="7164414111783832396">"Hei <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Katso lisätietoja napauttamalla korttia"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Käynnistä napauttamalla korttia"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Käynnissä oleva puhelu"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Käynnistä Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Autoa ei voi käynnistää. Tapahtumia ei löytynyt."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> laitetta</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> laite</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Sää"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Enimmäkseen aurinkoista"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • Maks.: --° Min.: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Piilota virheenkorjaussovellukset"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Näytä virheenkorjaussovellukset"</string>
</resources>
diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml
index 83a2b3d..46ea306 100644
--- a/res/values-fr-rCA/strings.xml
+++ b/res/values-fr-rCA/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Toutes les applications"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Applications multimédias"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> ne peut pas être utilisée en conduisant."</string>
- <string name="greeting" msgid="7164414111783832396">"Bonjour <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Touchez la carte pour en savoir plus"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Touchez la carte pour lancer"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Appel en cours"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Lancez Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Impossible de lancer Android Auto. Aucune activité trouvée."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> appareil</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> appareils</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Météo"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° et principalement ensoleillé"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Montréal • Max. : --° Min. : --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Masquer les applications de débogage"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Afficher les applications de débogage"</string>
</resources>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index d8e7d37..86fcdfb 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Toutes les applications"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Applications multimédias"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Impossible d\'utiliser <xliff:g id="APP_NAME">%1$s</xliff:g> en conduisant."</string>
- <string name="greeting" msgid="7164414111783832396">"Bonjour <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Appuyer sur la carte pour en savoir plus"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Appuyer sur la carte pour effectuer le lancement"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Appel en cours"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Lancer Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Impossible de lancer Android Auto. Aucune activité trouvée."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> appareil</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> appareils</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Météo"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"-- ° Ensoleillé dans l\'ensemble"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • Max. : -- ° - Min. : -- °"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Masquer les applis de débogage"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Afficher les applis de débogage"</string>
</resources>
diff --git a/res/values-gl/strings.xml b/res/values-gl/strings.xml
index 292d667..fe3bc9d 100644
--- a/res/values-gl/strings.xml
+++ b/res/values-gl/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Todas as aplicacións"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Aplicacións multimedia"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Non se pode utilizar <xliff:g id="APP_NAME">%1$s</xliff:g> mentres se conduce."</string>
- <string name="greeting" msgid="7164414111783832396">"Ola, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Toca a tarxeta para obter máis información"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Toca a tarxeta para iniciar"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Chamada en curso"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Iniciar Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Non se puido iniciar Android Auto. Non se atopou ningunha actividade."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> dispositivos</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> dispositivo</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Información meteorolóxica"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--°, principalmente solleiro"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • Máxima: --°; mínima: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Ocultar aplicacións de depuración"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Mostrar aplicacións de depuración"</string>
</resources>
diff --git a/res/values-gu/strings.xml b/res/values-gu/strings.xml
index 3e57429..573865b 100644
--- a/res/values-gu/strings.xml
+++ b/res/values-gu/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"બધી ઍપ"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"મીડિયા ઍપ"</string>
<string name="driving_toast_text" msgid="149483091947120092">"ડ્રાઇવ કરતી વખતે <xliff:g id="APP_NAME">%1$s</xliff:g>નો ઉપયોગ કરી શકાતો નથી."</string>
- <string name="greeting" msgid="7164414111783832396">"નમસ્કાર, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"વધુ માહિતી માટે કાર્ડ પર ટૅપ કરો"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"લૉન્ચ કરવા માટે કાર્ડ પર ટૅપ કરો"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"કૉલ ચાલુ છે"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto લૉન્ચ કરો"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto લૉન્ચ કરી શકાતું નથી. કોઈ પ્રવૃત્તિ મળી નથી."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> ડિવાઇસ</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> ડિવાઇસ</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Weather"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° મોટેભાગે તડકો"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"માઉન્ટેન વ્યૂ • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"ડિબગ ઍપ છુપાવો"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"ડિબગ ઍપ બતાવો"</string>
</resources>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index bfec926..625d5cf 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"सभी ऐप्लिकेशन"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"मीडिया ऐप्लिकेशन"</string>
<string name="driving_toast_text" msgid="149483091947120092">"गाड़ी चलाते समय <xliff:g id="APP_NAME">%1$s</xliff:g> ऐप्लिकेशन इस्तेमाल नहीं किया जा सकता."</string>
- <string name="greeting" msgid="7164414111783832396">"नमस्ते, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"ज़्यादा जानकारी के लिए कार्ड पर टैप करें"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"लॉन्च करने के लिए कार्ड पर टैप करें"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"ऑनगोइंग कॉल"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto लॉन्च करें"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto लॉन्च नहीं किया जा सका. कोई गतिविधि नहीं मिली."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> डिवाइस</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> डिवाइस</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Weather"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° ज़्यादातर समय धूप रहेगी"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"माउंट आबू • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"डीबग ऐप्लिकेशन छिपाएं"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"डीबग ऐप्लिकेशन दिखाएं"</string>
</resources>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index 4d69cbb..82c4cdc 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -21,12 +21,20 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Sve aplikacije"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Aplikacije za medijske sadržaje"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Aplikacija <xliff:g id="APP_NAME">%1$s</xliff:g> ne može se koristiti tijekom vožnje."</string>
- <string name="greeting" msgid="7164414111783832396">"Pozdrav, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Dodirnite karticu za više informacija"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Dodirnite karticu za pokretanje"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Poziv u tijeku"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Pokrenite Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Pokretanje Android Auta nije uspjelo. Nije pronađena nijedna aktivnost."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> uređaj</item>
<item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> uređaja</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> uređaja</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Vrijeme"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° uglavnom sunčano"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • V: --° N: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Sakrij aplikacije za otklanjanje pogrešaka"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Prikaži aplikacije za otklanjanje pogrešaka"</string>
</resources>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index 2ddfdd5..680e973 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Összes alkalmazás"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Médiaalkalmazások"</string>
<string name="driving_toast_text" msgid="149483091947120092">"A(z) <xliff:g id="APP_NAME">%1$s</xliff:g> nem használható vezetés közben."</string>
- <string name="greeting" msgid="7164414111783832396">"Kedves <xliff:g id="USER">%s</xliff:g>!"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"További információkért koppintson a kártyára."</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Az indításhoz koppintson a kártyára"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Hívás folyamatban"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto indítása"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Az Android Auto indítása nem sikerült. Nem található tevékenység."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> eszköz</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> eszköz</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Időjárás"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Túlnyomóan napos"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • Max.: --° Min.: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Hibakereső alkalmazások elrejtése"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Hibakereső alkalmazások megjelenítése"</string>
</resources>
diff --git a/res/values-hy/strings.xml b/res/values-hy/strings.xml
index 495c01d..5da8b61 100644
--- a/res/values-hy/strings.xml
+++ b/res/values-hy/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Բոլոր հավելվածները"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Մեդիա հավելվածներ"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> հավելվածը հնարավոր չէ օգտագործել վարելու ժամանակ։"</string>
- <string name="greeting" msgid="7164414111783832396">"Ողջույն, <xliff:g id="USER">%s</xliff:g>։"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Հպեք քարտին՝ ավելին իմանալու համար"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Հպեք քարտին՝ գործարկելու ամար"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Ընթացիկ զանգ"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Գործարկել Android Auto-ն"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Չհաջողվեց գործարկել Android Auto-ն։ Ոչ մի գործողություն չի գտնվել։"</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> սարք</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> սարք</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Եղանակ"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Հիմնականում արևոտ"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Մաունթին Վյու • Առավ.՝ --° Նվազ.՝ --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Թաքցնել վրիպազերծման հավելվածները"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Ցույց տալ վրիպազերծման հավելվածները"</string>
</resources>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index 63e0c41..fa09c78 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Semua aplikasi"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Aplikasi media"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> tidak dapat digunakan saat mengemudi."</string>
- <string name="greeting" msgid="7164414111783832396">"Halo, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Ketuk kartu untuk informasi lebih lanjut"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Ketuk kartu untuk meluncurkan"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Panggilan sedang berlangsung"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Luncurkan Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Tidak dapat meluncurkan Android Auto. Tidak ditemukan aktivitas."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> perangkat</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> perangkat</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Cuaca"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Sebagian besar cerah"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Sembunyikan aplikasi debug"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Tampilkan aplikasi debug"</string>
</resources>
diff --git a/res/values-is/strings.xml b/res/values-is/strings.xml
index c097f59..9e794bc 100644
--- a/res/values-is/strings.xml
+++ b/res/values-is/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Öll forrit"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Margmiðlunarforrit"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Ekki er hægt að nota <xliff:g id="APP_NAME">%1$s</xliff:g> við akstur."</string>
- <string name="greeting" msgid="7164414111783832396">"Hæ <xliff:g id="USER">%s</xliff:g>."</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Ýttu á spjaldið til að fá meiri upplýsingar"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Ýttu á spjaldið til að ræsa"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Símtal í gangi"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Ræsa Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Ekki er hægt að ræsa Android Auto. Engin virkni fannst."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> tæki</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> tæki</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Veður"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Sólskin að mestu"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Fjallasýn • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Fela villuleitarforrit"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Sýna villuleitarforrit"</string>
</resources>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 1e93de5..2c3efa9 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Tutte le app"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"App multimediali"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Non è possibile usare l\'app <xliff:g id="APP_NAME">%1$s</xliff:g> durante la guida."</string>
- <string name="greeting" msgid="7164414111783832396">"Buongiorno <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Tocca la scheda per avere ulteriori informazioni"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Tocca la scheda per avviare"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Chiamata in corso"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Avvia Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Impossibile avviare Android Auto. Non è stata trovata alcuna attività."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> dispositivi</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> dispositivo</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Meteo"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--°, prevalentemente soleggiato"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • Max: --° Min: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Nascondi app di debug"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Mostra app di debug"</string>
</resources>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index 2ae0500..4b5aa61 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -21,13 +21,21 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"כל האפליקציות"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"אפליקציות מדיה"</string>
<string name="driving_toast_text" msgid="149483091947120092">"לא ניתן להשתמש באפליקציה <xliff:g id="APP_NAME">%1$s</xliff:g> במהלך הנהיגה."</string>
- <string name="greeting" msgid="7164414111783832396">"שלום <xliff:g id="USER">%s</xliff:g>,"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"יש להקיש על הכרטיס למידע נוסף"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"יש להקיש על הכרטיס להפעלה"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"שיחה פעילה"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"הפעלה של Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"לא ניתן להפעיל את Android Auto. לא נמצאה פעילות."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="two"><xliff:g id="COUNT_1">%d</xliff:g> מכשירים</item>
<item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> מכשירים</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> מכשירים</item>
<item quantity="one">מכשיר אחד (<xliff:g id="COUNT_0">%d</xliff:g>)</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"מזג אוויר"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° שמשי"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"הסתרת אפליקציות לניפוי באגים"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"הצגת אפליקציות לניפוי באגים"</string>
</resources>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index 06183eb..2b29e9c 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"すべてのアプリ"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"メディアアプリ"</string>
<string name="driving_toast_text" msgid="149483091947120092">"運転中は <xliff:g id="APP_NAME">%1$s</xliff:g> を使用できません。"</string>
- <string name="greeting" msgid="7164414111783832396">"<xliff:g id="USER">%s</xliff:g>様"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"カードをタップして詳細を確認"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"カードをタップして起動"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"通話中"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto の起動"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto を起動できません。アクティビティが見つかりません。"</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> 台のデバイス</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> 台のデバイス</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"天気情報"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° 晴れ"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"デバッグアプリを表示しない"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"デバッグアプリを表示する"</string>
</resources>
diff --git a/res/values-ka/strings.xml b/res/values-ka/strings.xml
index 25fafb1..f230e9f 100644
--- a/res/values-ka/strings.xml
+++ b/res/values-ka/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"ყველა აპი"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"მედია აპები"</string>
<string name="driving_toast_text" msgid="149483091947120092">"მანქანის მართვისას <xliff:g id="APP_NAME">%1$s</xliff:g>-ს ვერ გამოიყენებთ."</string>
- <string name="greeting" msgid="7164414111783832396">"გამარჯობა, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"შეეხეთ ბარათს მეტი ინფორმაციისთვის"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"შეეხეთ ბარათს გასაშვებად"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"მიმდინარე ზარი"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"გაუშვით Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto-ს გაშვება შეუძლებელია. აქტივობა ვერ მოიძებნა."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> მოწყობილობა</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> მოწყობილობა</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"ამინდი"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° უმეტესად მზიანი"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"მთების ხედი • მაქს.: --° მინ.: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"გამართვის აპების დამალვა"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"გამართვის აპების ჩვენება"</string>
</resources>
diff --git a/res/values-kk/strings.xml b/res/values-kk/strings.xml
index 03b20e5..595339d 100644
--- a/res/values-kk/strings.xml
+++ b/res/values-kk/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Барлық қолданба"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Мультимедиа қолданбалары"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Көлік жүргізгенде <xliff:g id="APP_NAME">%1$s</xliff:g> қолданбасын пайдалануға болмайды."</string>
- <string name="greeting" msgid="7164414111783832396">"Сәлеметсіз бе, <xliff:g id="USER">%s</xliff:g>!"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Қосымша ақпарат алу үшін картаны түртіңіз."</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Іске қосу үшін картаны түртіңіз."</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Ағымдағы қоңырау"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto қолданбасын іске қосу"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto қолданбасы іске қосылмады. Ешқандай әрекет табылмады."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> құрылғы</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> құрылғы</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Ауа райы"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° көбінесе күн ашық"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Түзету қолданбаларын жасыру"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Түзету қолданбаларын көрсету"</string>
</resources>
diff --git a/res/values-km/strings.xml b/res/values-km/strings.xml
index 63e928e..0b9ed9d 100644
--- a/res/values-km/strings.xml
+++ b/res/values-km/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"កម្មវិធីទាំងអស់"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"កម្មវិធីមេឌៀ"</string>
<string name="driving_toast_text" msgid="149483091947120092">"មិនអាចប្រើ <xliff:g id="APP_NAME">%1$s</xliff:g> នៅពេលបើកបរបានទេ។"</string>
- <string name="greeting" msgid="7164414111783832396">"សួស្ដី <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"ចុចកាត ដើម្បីទទួលបានព័ត៌មានបន្ថែម"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"ចុចកាត ដើម្បីចាប់ផ្ដើម"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"កំពុងបន្តការហៅ"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"ចាប់ផ្ដើម Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"មិនអាចចាប់ផ្ដើម Android Auto បានទេ។ រកមិនឃើញសកម្មភាពទេ។"</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other">ឧបករណ៍ <xliff:g id="COUNT_1">%d</xliff:g></item>
<item quantity="one">ឧបករណ៍ <xliff:g id="COUNT_0">%d</xliff:g></item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"អាកាសធាតុ"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° ភាគច្រើនបើកថ្ងៃ"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"លាក់កម្មវិធីជួសជុល"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"បង្ហាញកម្មវិធីជួសជុល"</string>
</resources>
diff --git a/res/values-kn/strings.xml b/res/values-kn/strings.xml
index c9544a6..325d844 100644
--- a/res/values-kn/strings.xml
+++ b/res/values-kn/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"ಎಲ್ಲಾ ಆ್ಯಪ್ಗಳು"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"ಮಾಧ್ಯಮ ಆ್ಯಪ್ಗಳು"</string>
<string name="driving_toast_text" msgid="149483091947120092">"ಡ್ರೈವ್ ಮಾಡುವಾಗ <xliff:g id="APP_NAME">%1$s</xliff:g> ಬಳಸಲು ಸಾಧ್ಯವಾಗುವುದಿಲ್ಲ."</string>
- <string name="greeting" msgid="7164414111783832396">"ಹಾಯ್, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"ಹೆಚ್ಚಿನ ಮಾಹಿತಿಗಾಗಿ ಕಾರ್ಡ್ ಅನ್ನು ಟ್ಯಾಪ್ ಮಾಡಿ"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"ಪ್ರಾರಂಭಿಸಲು ಕಾರ್ಡ್ ಅನ್ನು ಟ್ಯಾಪ್ ಮಾಡಿ"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"ಚಾಲ್ತಿಯಲ್ಲಿರುವ ಕರೆ"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto ಪ್ರಾರಂಭಿಸಿ"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto ಪ್ರಾರಂಭಿಸಲು ಸಾಧ್ಯವಾಗುತ್ತಿಲ್ಲ. ಯಾವುದೇ ಚಟುವಟಿಕೆ ಕಂಡುಬಂದಿಲ್ಲ."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> ಸಾಧನಗಳು</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> ಸಾಧನಗಳು</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"ಹವಾಮಾನ"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° ಬಹುತೇಕ ಬಿಸಿಲಿನ ವಾತಾವರಣ"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"ಮೌಂಟೇನ್ ವ್ಯೂ • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"ಡೀಬಗ್ ಆ್ಯಪ್ಗಳನ್ನು ಮರೆಮಾಡಿ"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"ಡೀಬಗ್ ಆ್ಯಪ್ಗಳನ್ನು ತೋರಿಸಿ"</string>
</resources>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 9809085..d4fcb8c 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"모든 앱"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"미디어 앱"</string>
<string name="driving_toast_text" msgid="149483091947120092">"운전 중에는 <xliff:g id="APP_NAME">%1$s</xliff:g> 앱을 사용할 수 없습니다."</string>
- <string name="greeting" msgid="7164414111783832396">"<xliff:g id="USER">%s</xliff:g>님, 안녕하세요."</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"자세히 보려면 카드를 탭하세요."</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"시작하려면 카드를 탭하세요."</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"진행 중인 통화"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto 시작"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto를 시작할 수 없습니다. 활동이 없습니다."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other">기기 <xliff:g id="COUNT_1">%d</xliff:g>대</item>
<item quantity="one">기기 <xliff:g id="COUNT_0">%d</xliff:g>대</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"날씨"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° 대체로 맑음"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"마운틴 뷰 • 최고: --° 최저: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"디버그 앱 숨기기"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"디버그 앱 표시"</string>
</resources>
diff --git a/res/values-ky/strings.xml b/res/values-ky/strings.xml
index e8a0a19..0e6aa2d 100644
--- a/res/values-ky/strings.xml
+++ b/res/values-ky/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Бардык колдонмолор"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Медиа колдонмолору"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Айдап баратканда <xliff:g id="APP_NAME">%1$s</xliff:g> колдонулбайт."</string>
- <string name="greeting" msgid="7164414111783832396">"Салам, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Кеңири маалымат алуу үчүн картаны таптап коюңуз"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Иштетүү үчүн картаны таптап коюңуз"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Учурдагы чалуу"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto\'ну ишке киргизүү"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto иштетилген жок. Аракеттер табылган жок."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> түзмөк</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> түзмөк</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Аба ырайы"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Көбүнесе күн чайыттай ачык болот"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Маунтин-Вью • Ж: --° Т: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Мүчүлүштүктөрдү аныктоочу колдонмолорду жашыруу"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Мүчүлүштүктөрдү аныктоочу колдонмолорду көрсөтүү"</string>
</resources>
diff --git a/res/values-lo/strings.xml b/res/values-lo/strings.xml
index ef24d5e..d1d7d0c 100644
--- a/res/values-lo/strings.xml
+++ b/res/values-lo/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"ແອັບທັງໝົດ"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"ແອັບມີເດຍ"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> ບໍ່ສາມາດໃຊ້ແປ້ນພິມໃນຂະນະຂັບຂີ່ໄດ້."</string>
- <string name="greeting" msgid="7164414111783832396">"ສະບາຍດີ, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"ແຕະບັດສຳລັບຂໍ້ມູນເພີ່ມເຕີມ"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"ແຕະບັດເພື່ອເປີດໃຊ້"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"ສາຍໂທອອກ"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"ເປີດໃຊ້ Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"ບໍ່ສາມາດເປີດໃຊ້ Android Auto ໄດ້. ບໍ່ພົບການເຄື່ອນໄຫວໃດໆ."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> ອຸປະກອນ</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> ອຸປະກອນ</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"ສະພາບອາກາດ"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° ແດດອອກເປັນສ່ວນໃຫຍ່"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"ວິວພູເຂົາ • ສູງສຸດ: --° ຕໍ່າສຸດ: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"ເຊື່ອງແອັບດີບັກ"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"ສະແດງແອັບດີບັກ"</string>
</resources>
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index 211a020..d4d28c7 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -21,13 +21,21 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Visos programos"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Medijos programos"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Vairuojant negalima naudoti „<xliff:g id="APP_NAME">%1$s</xliff:g>“."</string>
- <string name="greeting" msgid="7164414111783832396">"Sveiki, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Palieskite kortelę, kad sužinotumėte daugiau informacijos"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Palieskite kortelę, kad paleistumėte"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Vykstantis skambutis"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Paleisti „Android Auto“"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Nepavyko paleisti „Android Auto“. Nerasta jokios veiklos."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> įrenginys</item>
<item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> įrenginiai</item>
<item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> įrenginio</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> įrenginių</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Orai"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Daugiausia saulėta"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mauntin Vju • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Slėpti derinimo programas"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Rodyti derinimo programas"</string>
</resources>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index dc45295..32b50b9 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -21,12 +21,20 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Visas lietotnes"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Multivides lietotnes"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Lietotni <xliff:g id="APP_NAME">%1$s</xliff:g> nevar izmantot braukšanas laikā."</string>
- <string name="greeting" msgid="7164414111783832396">"Labdien, <xliff:g id="USER">%s</xliff:g>!"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Pieskarieties kartītei, lai iegūtu plašāku informāciju"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Pieskarieties kartītei, lai palaistu"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Pašreizējais zvans"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Palaist Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Nevar palaist Android Auto. Netika atrasta neviena darbība."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="zero"><xliff:g id="COUNT_1">%d</xliff:g> ierīču</item>
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> ierīce</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> ierīces</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Laikapstākļi"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--°; galvenokārt saulains laiks"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mauntinvjū • Augstākā: --°; zemākā: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Slēpt atkļūdošanas lietotnes"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Rādīt atkļūdošanas lietotnes"</string>
</resources>
diff --git a/res/values-mk/strings.xml b/res/values-mk/strings.xml
index 8389d24..885ed1d 100644
--- a/res/values-mk/strings.xml
+++ b/res/values-mk/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Сите апликации"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Апликации за аудиовизуелни содржини"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> не може да се користи при возењето."</string>
- <string name="greeting" msgid="7164414111783832396">"Здраво <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Допрете ја картичката за повеќе информации"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Допрете ја картичката за да стартува"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Тековен повик"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Стартувајте ја Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Не може да се стартува Android Auto. Не е најдена активност."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> уред</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> уреди</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Временска прогноза"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"-- ° Претежно сончево"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Маунтин Вју • В: -- ° Н: -- °"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Сокриј апликации за отстранување грешки"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Прикажи апликации за отстранување грешки"</string>
</resources>
diff --git a/res/values-ml/strings.xml b/res/values-ml/strings.xml
index 2683c05..bdc689c 100644
--- a/res/values-ml/strings.xml
+++ b/res/values-ml/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"എല്ലാ ആപ്പുകളും"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"മീഡിയ ആപ്പുകൾ"</string>
<string name="driving_toast_text" msgid="149483091947120092">"ഡ്രൈവിംഗിനിടെ <xliff:g id="APP_NAME">%1$s</xliff:g> ഉപയോഗിക്കാനാകില്ല."</string>
- <string name="greeting" msgid="7164414111783832396">"ഹായ്, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"കൂടുതൽ വിവരങ്ങൾക്ക് കാർഡ് ടാപ്പ് ചെയ്യുക"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"ലോഞ്ച് ചെയ്യാൻ കാർഡ് ടാപ്പ് ചെയ്യുക"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"സജീവമായ കോൾ"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto ലോഞ്ച് ചെയ്യുക"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto ലോഞ്ച് ചെയ്യാനാകുന്നില്ല. ആക്റ്റിവിറ്റിയൊന്നും കണ്ടെത്തിയില്ല."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> ഉപകരണങ്ങൾ</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> ഉപകരണം</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"കാലാവസ്ഥ"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° കൂടുതലും തെളിഞ്ഞ ആകാശം"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • കൂടിയത്: --° കുറഞ്ഞത്: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"ഡീബഗ് ആപ്പുകൾ മറയ്ക്കുക"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"ഡീബഗ് ആപ്പുകൾ കാണിക്കുക"</string>
</resources>
diff --git a/res/values-mn/strings.xml b/res/values-mn/strings.xml
index a82029b..45f1a94 100644
--- a/res/values-mn/strings.xml
+++ b/res/values-mn/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Бүх апп"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Медиа аппууд"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g>-г жолоо барьж байх үед ашиглах боломжгүй."</string>
- <string name="greeting" msgid="7164414111783832396">"Сайн уу, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Дэлгэрэнгүй мэдээлэл авах бол картыг товшино уу"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Эхлүүлэхийн тулд картыг товшино уу"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Үргэлжилж буй дуудлага"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Аuto-г эхлүүлэх"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto-г эхлүүлэх боломжгүй. Үйл ажиллагаа олдсонгүй."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> төхөөрөмж</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> төхөөрөмж</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Цаг агаар"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Ихэвчлэн нартай"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • Дээд: --° Доод: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Дебаг хийх аппуудыг нуух"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Дебаг хийх аппуудыг харуулах"</string>
</resources>
diff --git a/res/values-mr/strings.xml b/res/values-mr/strings.xml
index a6ef93a..4845261 100644
--- a/res/values-mr/strings.xml
+++ b/res/values-mr/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"सर्व अॅप्स"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"मीडिया अॅप्स"</string>
<string name="driving_toast_text" msgid="149483091947120092">"ड्राइव्ह करताना <xliff:g id="APP_NAME">%1$s</xliff:g> वापरता येऊ शकत नाही."</string>
- <string name="greeting" msgid="7164414111783832396">"हाय, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"अधिक माहितीसाठी कार्डवर टॅप करा"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"लाँच करण्यासाठी कार्डवर टॅप करा"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"सुरू असलेला कॉल"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto लाँच करा"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto लाँच करता आले नाही. कोणतीही अॅक्टिव्हिटी आढळली नाही."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> डिव्हाइस</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> डिव्हाइस</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"हवामान"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° बहुतांशी सुर्यप्रकाशित"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"महाबळेश्वर • कमाल: --° किमान: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"डीबग केलेली ॲप्स लपवा"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"डीबग केलेली ॲप्स दाखवा"</string>
</resources>
diff --git a/res/values-ms/strings.xml b/res/values-ms/strings.xml
index ebcfee9..4258870 100644
--- a/res/values-ms/strings.xml
+++ b/res/values-ms/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Semua apl"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Apl media"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> tidak boleh digunakan semasa memandu."</string>
- <string name="greeting" msgid="7164414111783832396">"Hai, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Ketik kad untuk mendapatkan maklumat lanjut"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Ketik kad untuk lancarkan"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Panggilan sedang berjalan"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Lancarkan Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Tidak dapat melancarkan Android Auto. Tiada aktiviti ditemukan."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> peranti</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> peranti</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Cuaca"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Kebanyakannya cerah"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Pemandangan Gunung • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Sembunyikan apl nyahpepijat"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Tunjukkan apl nyahpepijat"</string>
</resources>
diff --git a/res/values-my/strings.xml b/res/values-my/strings.xml
index 726adc0..736dd9a 100644
--- a/res/values-my/strings.xml
+++ b/res/values-my/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"အက်ပ်အားလုံး"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"မီဒီယာ အက်ပ်များ"</string>
<string name="driving_toast_text" msgid="149483091947120092">"ကားမောင်းနေစဉ် <xliff:g id="APP_NAME">%1$s</xliff:g> ကို သုံး၍မရပါ။"</string>
- <string name="greeting" msgid="7164414111783832396">"မင်္ဂလာပါ <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"နောက်ထပ် အချက်အလက်များအတွက် ကတ်ကိုတို့ပါ"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"ဖွင့်ရန် ကတ်ကိုတို့ပါ"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"လက်ရှိခေါ်ဆိုမှု"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto ဖွင့်ပါ"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto ဖွင့်၍မရပါ။ လုပ်ဆောင်ချက် မရှိပါ။"</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other">စက်ပစ္စည်း <xliff:g id="COUNT_1">%d</xliff:g> ခု</item>
<item quantity="one">စက်ပစ္စည်း <xliff:g id="COUNT_0">%d</xliff:g> ခု</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"မိုးလေဝသ"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° အများအားဖြင့် နေသာသည်"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • မြင့်- --° နိမ့်- --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"အမှားရှာပြင်သည့်အက်ပ်များ ဖျောက်ထားရန်"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"အမှားရှာပြင်သည့်အက်ပ်များ ပြရန်"</string>
</resources>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 0f447e8..8d210c6 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Alle apper"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Medieapper"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Du kan ikke bruke <xliff:g id="APP_NAME">%1$s</xliff:g> mens du kjører."</string>
- <string name="greeting" msgid="7164414111783832396">"Hei, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Trykk på kortet for mer informasjon"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Trykk på kortet for å åpne det"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Pågående samtale"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Start Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Kan ikke starte Android Auto. Fant ingen aktiviteter."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> enheter</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> enhet</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Været"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° For det meste sol"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • Høyeste temp.: --° Laveste temp.: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Skjul feilsøkingsapper"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Vis feilsøkingsapper"</string>
</resources>
diff --git a/res/values-ne/strings.xml b/res/values-ne/strings.xml
index 1d2207f..9489797 100644
--- a/res/values-ne/strings.xml
+++ b/res/values-ne/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"सबै एपहरू"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"मिडिया एपहरू"</string>
<string name="driving_toast_text" msgid="149483091947120092">"ड्राइभ गर्दा <xliff:g id="APP_NAME">%1$s</xliff:g> प्रयोग गर्न सकिँदैन।"</string>
- <string name="greeting" msgid="7164414111783832396">"नमस्ते, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"थप जानकारी प्राप्त गर्न कार्डमा ट्याप गर्नुहोस्"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"लन्च गर्न कार्डमा ट्याप गर्नुहोस्"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"भइरहेको कल"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto लन्च गर्नुहोस्"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto लन्च गर्न सकिएन। कुनै गतिविधि भेट्टिएन।"</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> वटा यन्त्र</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> यन्त्र</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"मौसम"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° अधिकांश घमाइलो"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"माउन्टेन भ्यू • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"डिबग एपहरू लुकाइयोस्"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"डिबग एपहरू देखाइयोस्"</string>
</resources>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index bf4951d..2aad711 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Alle apps"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Media-apps"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Je kunt <xliff:g id="APP_NAME">%1$s</xliff:g> niet gebruiken tijdens het rijden"</string>
- <string name="greeting" msgid="7164414111783832396">"Hallo, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Tik op de kaart voor meer informatie"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Tik op de kaart om te starten"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Actief gesprek"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto starten"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Kan Android Auto niet starten. Geen activiteit gevonden."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> apparaten</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> apparaat</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Weer"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"-- ° Grotendeels zonnig"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • Max: -- ° Min: -- °"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Foutopsporingsapps verbergen"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Foutopsporingsapps tonen"</string>
</resources>
diff --git a/res/values-or/strings.xml b/res/values-or/strings.xml
index ba37742..d7746a9 100644
--- a/res/values-or/strings.xml
+++ b/res/values-or/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"ସମସ୍ତ ଆପ୍"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"ମିଡିଆ ଆପ୍ସ"</string>
<string name="driving_toast_text" msgid="149483091947120092">"ଡ୍ରାଇଭ୍ କରିବା ସମୟରେ <xliff:g id="APP_NAME">%1$s</xliff:g> ବ୍ୟବହାର କରାଯାଇପାରିବ ନାହିଁ।"</string>
- <string name="greeting" msgid="7164414111783832396">"ନମସ୍କାର, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"ଅଧିକ ସୂଚନା ପାଇଁ କାର୍ଡକୁ ଟାପ୍ କରନ୍ତୁ"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"ଲଞ୍ଚ କରିବା ପାଇଁ କାର୍ଡକୁ ଟାପ୍ କରନ୍ତୁ"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"ଚାଲୁ ରହିଥିବା କଲ୍"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Autoକୁ ଲଞ୍ଚ କରନ୍ତୁ"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Autoକୁ ଲଞ୍ଚ କରିବା ପାଇଁ ଅସମର୍ଥ। କୌଣସି କାର୍ଯ୍ୟକଳାପ ମିଳୁ ନାହିଁ।"</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g>ଟି ଡିଭାଇସ୍</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g>ଟି ଡିଭାଇସ୍</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"ପାଣିପାଗ"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° ପ୍ରାୟତଃ ଖରା"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"ମାଉଣ୍ଟେନ୍ ଭ୍ୟୁ • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"ଡିବଗ୍ ଆପଗୁଡ଼ିକୁ ଲୁଚାନ୍ତୁ"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"ଡିବଗ୍ ଆପଗୁଡ଼ିକୁ ଦେଖାନ୍ତୁ"</string>
</resources>
diff --git a/res/values-pa/strings.xml b/res/values-pa/strings.xml
index e88a062..da3c844 100644
--- a/res/values-pa/strings.xml
+++ b/res/values-pa/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"ਸਾਰੀਆਂ ਐਪਾਂ"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"ਮੀਡੀਆ ਐਪਾਂ"</string>
<string name="driving_toast_text" msgid="149483091947120092">"ਗੱਡੀ ਚਲਾਉਣ ਵੇਲੇ <xliff:g id="APP_NAME">%1$s</xliff:g> ਨੂੰ ਵਰਤਿਆ ਨਹੀਂ ਜਾ ਸਕਦਾ।"</string>
- <string name="greeting" msgid="7164414111783832396">"ਸਤਿ ਸ੍ਰੀ ਅਕਾਲ, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"ਹੋਰ ਜਾਣਕਾਰੀ ਲਈ ਕਾਰਡ \'ਤੇ ਟੈਪ ਕਰੋ"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"ਲਾਂਚ ਕਰਨ ਲਈ ਕਾਰਡ \'ਤੇ ਟੈਪ ਕਰੋ"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"ਜਾਰੀ ਕਾਲ"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto ਲਾਂਚ ਕਰੋ"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto ਲਾਂਚ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ। ਕੋਈ ਸਰਗਰਮੀ ਨਹੀਂ ਮਿਲੀ।"</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> ਡੀਵਾਈਸ</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> ਡੀਵਾਈਸਾਂ</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"ਮੌਸਮ"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° ਜ਼ਿਆਦਾਤਰ ਧੁੱਪ"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"ਅੰਮ੍ਰਿਤਸਰ • ਉੱਚ: --° ਨਿਮਨ: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"ਡੀਬੱਗ ਐਪਾਂ ਲੁਕਾਓ"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"ਡੀਬੱਗ ਐਪਾਂ ਦਿਖਾਓ"</string>
</resources>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index ca58eb6..00c6f91 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -21,13 +21,21 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Wszystkie aplikacje"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Aplikacje multimedialne"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Podczas jazdy nie można korzystać z aplikacji <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
- <string name="greeting" msgid="7164414111783832396">"Cześć <xliff:g id="USER">%s</xliff:g>,"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Kliknij kartę, by uzyskać więcej informacji"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Kliknij kartę, by uruchomić"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Trwa połączenie"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Uruchom Androida Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Nie można uruchomić Androida Auto. Nie znaleziono żadnych działań."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> urządzenia</item>
<item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> urządzeń</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> urządzenia</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> urządzenie</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Pogoda"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--°, liczne przejaśnienia"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • maks.: --° min.: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Ukryj aplikacje do debugowania"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Pokaż aplikacje do debugowania"</string>
</resources>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index 2b14121..043f67c 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Todas as apps"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Apps de multimédia"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Não é possível utilizar a app <xliff:g id="APP_NAME">%1$s</xliff:g> durante a condução."</string>
- <string name="greeting" msgid="7164414111783832396">"Olá, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Toque no cartão para obter mais informações"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Toque no cartão para iniciar"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">"•"</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Chamada em curso"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Iniciar o Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Não é possível iniciar o Android Auto. Não foram encontradas atividades."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> dispositivos</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> dispositivo</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Meteorologia"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Céu maioritariamente limpo"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • Máx.: --° Mín.: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Ocultar apps de depuração"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Mostrar apps de depuração"</string>
</resources>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 9f21183..1485157 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Todos os apps"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Apps de mídia"</string>
<string name="driving_toast_text" msgid="149483091947120092">"O app <xliff:g id="APP_NAME">%1$s</xliff:g> não pode ser usado ao dirigir."</string>
- <string name="greeting" msgid="7164414111783832396">"Olá, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Toque no card para mais informações"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Toque no card para iniciar"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Chamada em andamento"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Iniciar o Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Não foi possível iniciar o Android Auto. Nenhuma atividade foi encontrada."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> dispositivo</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> dispositivos</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Clima"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Predominantemente ensolarado"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • Mínima: --° Máxima: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Ocultar apps de depuração"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Mostrar apps de depuração"</string>
</resources>
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index a8a7dd5..1827006 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -21,12 +21,20 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Toate aplicațiile"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Aplicații media"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Nu puteți folosi <xliff:g id="APP_NAME">%1$s</xliff:g> în timp ce conduceți."</string>
- <string name="greeting" msgid="7164414111783832396">"Bună ziua, <xliff:g id="USER">%s</xliff:g>,"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Pentru mai multe informații, atingeți cardul"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Pentru a lansa, atingeți cardul"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Apel în desfășurare"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Lansați Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Nu se poate lansa Android Auto. Nu a fost găsită nicio activitate."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> dispozitive</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> de dispozitive</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> dispozitiv</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Meteo"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° În mare parte însorit"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • Max: --° Min: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Ascundeți aplicațiile de remediere a erorilor"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Afișați aplicațiile de remediere a erorilor"</string>
</resources>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 3252eea..57ac749 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -21,13 +21,21 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Все приложения"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Мультимедийные приложения"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Приложение \"<xliff:g id="APP_NAME">%1$s</xliff:g>\" нельзя использовать за рулем."</string>
- <string name="greeting" msgid="7164414111783832396">"Здравствуйте, <xliff:g id="USER">%s</xliff:g>!"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Нажмите на карточку, чтобы узнать больше."</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Нажмите на карточку, чтобы запустить."</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Текущий вызов"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Запустить Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Не удается запустить Android Auto. Ничего не найдено."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> устройство</item>
<item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> устройства</item>
<item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> устройств</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> устройства</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Погода"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Преим. солнечно"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Маунтин-Вью • Макс. --°, мин. --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Скрыть приложения для отладки"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Показать приложения для отладки"</string>
</resources>
diff --git a/res/values-si/strings.xml b/res/values-si/strings.xml
index a992a9a..58f6ab7 100644
--- a/res/values-si/strings.xml
+++ b/res/values-si/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"සියලු යෙදුම්"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"මාධ්ය යෙදුම්"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> හට රිය පදවන අතරේ යතුරු පුවරුව භාවිතා කළ නොහැක."</string>
- <string name="greeting" msgid="7164414111783832396">"ආයුබෝවන්, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"වැඩි විස්තර සඳහා කාඩ්පත තට්ටු කරන්න"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"දියත් කිරීමට කාඩ්පත තට්ටු කරන්න"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"කරගෙන යන ඇමතුම"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto දියත් කරන්න"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto දියත් කිරීමට නොහැකිය. ක්රියාකාරකම් නොමැත."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one">උපාංග <xliff:g id="COUNT_1">%d</xliff:g></item>
<item quantity="other">උපාංග <xliff:g id="COUNT_1">%d</xliff:g></item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"කාලගුණය"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° බොහෝ විට අව්ව"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"කඳුකර දර්ශනය • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"නිදොස් කිරීමේ යෙදුම් සඟවන්න"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"නිදොස් කිරීමේ යෙදුම් පෙන්වන්න"</string>
</resources>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index dcd17ac..b10261b 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -21,13 +21,21 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Všetky aplikácie"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Mediálne aplikácie"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Pri šoférovaní nie je možné používať aplikáciu <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
- <string name="greeting" msgid="7164414111783832396">"Dobrý deň, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Ďalšie informácie získate klepnutím na kartu"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Spustíte klepnutím na kartu"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Prebiehajúci hovor"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Spustiť Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto sa nepodarilo spustiť. Nebola nájdená sa žiadna aktivita."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> zariadenia</item>
<item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> devices</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> zariadení</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> zariadenie</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Počasie"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Väčšinou slnečno"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Skryť aplikácie na ladenie"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Zobraziť aplikácie ladenia"</string>
</resources>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index 933a799..b73a86f 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -21,13 +21,21 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Vse aplikacije"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Aplikacije za predstavnost"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Med vožnjo ni mogoče uporabljati aplikacije <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
- <string name="greeting" msgid="7164414111783832396">"Pozdravljeni, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Dotaknite se kartice za več informacij"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Dotaknite se kartice za zagon"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Aktivni klic"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Zaženite storitev Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Ni mogoče zagnati Androida Auto. Najdena ni bila nobena dejavnost."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> naprava</item>
<item quantity="two"><xliff:g id="COUNT_1">%d</xliff:g> napravi</item>
<item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> naprave</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> naprav</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Vreme"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° pretežno sončno"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • V: --° N: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Skrij aplikacije za odpravljanje napak"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Prikaži aplikacije za odpravljanje napak"</string>
</resources>
diff --git a/res/values-sq/strings.xml b/res/values-sq/strings.xml
index 4444dfa..f4b7a74 100644
--- a/res/values-sq/strings.xml
+++ b/res/values-sq/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Të gjitha aplikacionet"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Aplikacionet e medias"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> nuk mund të përdoret gjatë drejtimit të makinës."</string>
- <string name="greeting" msgid="7164414111783832396">"Përshëndetje, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Trokit te karta për më shumë informacion"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Trokit te karta për ta nisur"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Telefonatë në vazhdim"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Hap Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto nuk mund të niset. Nuk u gjet asnjë aktivitet."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> pajisje</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> pajisje</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Moti"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Kryesisht me diell"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • L: --° U: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Fshih aplikacionet e korrigjimit"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Shfaq aplikacionet e korrigjimit"</string>
</resources>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index 8a0c564..53e0a25 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -21,12 +21,20 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Све апликације"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Апликације за медије"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> не може да се користи током вожње."</string>
- <string name="greeting" msgid="7164414111783832396">"Здраво <xliff:g id="USER">%s</xliff:g>,"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Додирните картицу за више информација"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Додирните картицу да бисте покренули услугу"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Позив је у току"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Покрени Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Покретање услуге Android Auto није успело. Није пронађена ниједна активност."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> уређај</item>
<item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> уређаја</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> уређаја</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Време"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° углавном сунчано"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Нови Сад • Највиша: --° Најнижа: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Сакриј апликације за отклањање грешака"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Прикажи апликације за отклањање грешака"</string>
</resources>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index 583a26d..5575dfc 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Alla appar"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Medieappar"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g> går inte att använda under körning."</string>
- <string name="greeting" msgid="7164414111783832396">"Hej <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Tryck på kortet för mer information"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Tryck på kortet för att starta"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Pågående samtal"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Starta Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Det gick inte att starta Android Auto. Ingen aktivitet hittades."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> enheter</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> enhet</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Väder"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Mestadels soligt"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • max: --° min: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Dölj felsökningsappar"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Visa felsökningsappar"</string>
</resources>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index 181237a..fb354b1 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Programu zote"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Programu za muziki"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Huwezi kutumia <xliff:g id="APP_NAME">%1$s</xliff:g> wakati unaendesha gari."</string>
- <string name="greeting" msgid="7164414111783832396">"Hujambo, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Gusa kadi ili upate maelezo zaidi"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Gusa kadi ili ufungue"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Simu inayoendelea"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Fungua Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Imeshindwa kufungua Android Auto. Hamna shughuli iliyopatikana."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other">Vifaa <xliff:g id="COUNT_1">%d</xliff:g></item>
<item quantity="one">Kifaa <xliff:g id="COUNT_0">%d</xliff:g></item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Hali ya Hewa"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Jua mara nyingi"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mwonekano wa Mlima • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Ficha programu za kutatua"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Onyesha programu za kutatua"</string>
</resources>
diff --git a/res/values-ta/strings.xml b/res/values-ta/strings.xml
index 7c375fe..71d14d5 100644
--- a/res/values-ta/strings.xml
+++ b/res/values-ta/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"அனைத்து ஆப்ஸும்"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"மீடியா ஆப்ஸ்"</string>
<string name="driving_toast_text" msgid="149483091947120092">"காரை ஓட்டும்போது <xliff:g id="APP_NAME">%1$s</xliff:g> ஆப்ஸைப் பயன்படுத்த இயலாது."</string>
- <string name="greeting" msgid="7164414111783832396">"வணக்கம் <xliff:g id="USER">%s</xliff:g>,"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"மேலும் தகவல்களுக்கு கார்டைத் தட்டவும்"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"தொடங்குவதற்கு கார்டைத் தட்டவும்"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"செயலில் இருக்கும் அழைப்பு"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Autoவைத் தொடங்கு"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Autoவைத் தொடங்க முடியவில்லை. செயல்பாடு எதுவுமில்லை."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> சாதனங்கள்</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> சாதனம்</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Weather"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° உடன் பெரும்பாலும் வெயிலடிக்கும்"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"மவுண்டன் வியூ • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"பிழைதிருத்தும் ஆப்ஸை மறை"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"பிழைதிருத்தும் ஆப்ஸைக் காட்டு"</string>
</resources>
diff --git a/res/values-te/strings.xml b/res/values-te/strings.xml
index cdb5eae..e6696d5 100644
--- a/res/values-te/strings.xml
+++ b/res/values-te/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"అన్ని యాప్లు"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"మీడియా యాప్లు"</string>
<string name="driving_toast_text" msgid="149483091947120092">"డ్రైవింగ్ చేస్తున్నపుడు <xliff:g id="APP_NAME">%1$s</xliff:g> ఉపయోగించలేరు."</string>
- <string name="greeting" msgid="7164414111783832396">"హాయ్, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"మరింత సమాచారం కోసం కార్డ్ను ట్యాప్ చేయండి"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"లాంచ్ చేయడానికి కార్డ్ను ట్యాప్ చేయండి"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"ఇప్పుడు కొనసాగుతున్న కాల్"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Autoను లాంచ్ చేయండి"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Autoను లాంచ్ చేయడం సాధ్యం కాలేదు. ఏ యాక్టివిటీ కనుగొనబడలేదు."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> పరికరాలు</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> పరికరం</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"వాతావరణం"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"చాలావరకు --° ఎండగా ఉంటుంది"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"మౌంటెయిన్ వ్యూ • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"డీబగ్ యాప్లను దాచండి"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"డీబగ్ యాప్లను చూపించండి"</string>
</resources>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index 4753b25..b1a7343 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"แอปทั้งหมด"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"แอปสื่อ"</string>
<string name="driving_toast_text" msgid="149483091947120092">"ใช้ <xliff:g id="APP_NAME">%1$s</xliff:g> ขณะขับรถไม่ได้"</string>
- <string name="greeting" msgid="7164414111783832396">"สวัสดีคุณ <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"แตะการ์ดเพื่อดูข้อมูลเพิ่มเติม"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"แตะการ์ดเพื่อเปิด"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"สายที่สนทนาอยู่"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"เปิด Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"เปิด Android Auto ไม่ได้ ไม่พบกิจกรรม"</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other">อุปกรณ์ <xliff:g id="COUNT_1">%d</xliff:g> เครื่อง</item>
<item quantity="one">อุปกรณ์ <xliff:g id="COUNT_0">%d</xliff:g> เครื่อง</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"สภาพอากาศ"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° แดดจัดเป็นส่วนใหญ่"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"เมาน์เทนวิว • สูงสุด: --° ต่ำสุด: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"ซ่อนแอปแก้ไขข้อบกพร่อง"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"แสดงแอปแก้ไขข้อบกพร่อง"</string>
</resources>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index 6b832dc..ac00242 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Lahat ng app"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Mga media app"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Hindi magagamit ang <xliff:g id="APP_NAME">%1$s</xliff:g> habang nagmamaneho."</string>
- <string name="greeting" msgid="7164414111783832396">"Kumusta, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"I-tap ang card para sa higit pang impormasyon"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"I-tap ang card na ilulunsad"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Kasalukuyang tawag"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Ilunsad ang Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Hindi mailunsad ang Android Auto. Walang nakitang aktibidad."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> device</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> na device</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Lagay ng Panahon"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Maaraw sa pangkalahatan"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Itago ang mga debug app"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Ipakita ang mga debug app"</string>
</resources>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 9343171..e46d592 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Tüm uygulamalar"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Medya uygulamaları"</string>
<string name="driving_toast_text" msgid="149483091947120092">"<xliff:g id="APP_NAME">%1$s</xliff:g>, sürüş sırasında kullanılamaz."</string>
- <string name="greeting" msgid="7164414111783832396">"Merhaba <xliff:g id="USER">%s</xliff:g>,"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Daha fazla bilgi için karta dokunun"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Başlatmak için karta dokunun"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Devam eden çağrı"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto\'yu başlatın"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto başlatılamadı. Hiçbir etkinlik bulunamadı."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> cihaz</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> cihaz</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Hava durumu"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Çoğunlukla güneşli"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • E.Y.: --° E.D.: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Hata ayıklama uygulamalarını gizle"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Hata ayıklama uygulamalarını göster"</string>
</resources>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index 00456ac..6b1c3dc 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -21,13 +21,21 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Усі додатки"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Мультимедійні додатки"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Додатком <xliff:g id="APP_NAME">%1$s</xliff:g> не можна користуватися під час руху."</string>
- <string name="greeting" msgid="7164414111783832396">"Вітаємо, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Натисніть картку, щоб дізнатися більше"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Натисніть картку, щоб запустити"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Активний виклик"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Запустити Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Не вдається запустити Android Auto. Не знайдено жодних дій."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one"><xliff:g id="COUNT_1">%d</xliff:g> пристрій</item>
<item quantity="few"><xliff:g id="COUNT_1">%d</xliff:g> пристрої</item>
<item quantity="many"><xliff:g id="COUNT_1">%d</xliff:g> пристроїв</item>
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> пристрою</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Погода"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--°, в основному сонячно"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Маунтін-В\'ю • Макс. --°, мін. --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Сховати додатки для налагодження"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Показати додатки для налагодження"</string>
</resources>
diff --git a/res/values-ur/strings.xml b/res/values-ur/strings.xml
index 750dfe4..f1423ab 100644
--- a/res/values-ur/strings.xml
+++ b/res/values-ur/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"سبھی ایپس"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"میڈیا ایپس"</string>
<string name="driving_toast_text" msgid="149483091947120092">"گاڑی چلاتے وقت <xliff:g id="APP_NAME">%1$s</xliff:g> کا استعمال نہیں کیا جاسکتا۔"</string>
- <string name="greeting" msgid="7164414111783832396">"آداب، <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"مزید معلومات کے لیے کارڈ تھپتھپائیں"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"شروع کرنے کے لیے کارڈ تھپتھپائیں"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"جاری کال"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto شروع کریں"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto شروع کرنے سے قاصر۔ کوئی سرگرمی نہیں ملی۔"</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> آلات</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> آلہ</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"موسم"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° زیادہ تر دھوپ"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"ڈیبگ ایپس چھپائیں"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"ڈیبگ ایپس دکھائیں"</string>
</resources>
diff --git a/res/values-uz/strings.xml b/res/values-uz/strings.xml
index 7e328d5..51d50eb 100644
--- a/res/values-uz/strings.xml
+++ b/res/values-uz/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Barcha ilovalar"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Media ilovalari"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Avtomobil rejimida <xliff:g id="APP_NAME">%1$s</xliff:g> ishlamaydi."</string>
- <string name="greeting" msgid="7164414111783832396">"Salom, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Batafsil axborot olish uchun bildirgi ustiga bosing"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Ishga tushirish uchun bildirgi ustiga bosing"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Joriy chaqiruv"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Android Auto xizmatini ishga tushirish"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Android Auto ishga tushmadi. Hech qanday harakat topilmadi."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> ta qurilma</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> ta qurilma</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Ob-havo"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Asosan quyoshli"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • Maks: --° Min: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Nosozliklarni aniqlash ilovalarini berkitish"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Nosozliklarni aniqlash ilovalarini chiqarish"</string>
</resources>
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index 8867e91..b205d48 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Tất cả ứng dụng"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Ứng dụng đa phương tiện"</string>
<string name="driving_toast_text" msgid="149483091947120092">"Không thể dùng <xliff:g id="APP_NAME">%1$s</xliff:g> trong khi lái xe."</string>
- <string name="greeting" msgid="7164414111783832396">"Chào <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Nhấn vào thẻ để xem thêm thông tin"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Nhấn vào thẻ để mở trình chạy"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Cuộc gọi đang thực hiện"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Chạy Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Không thể chạy Android Auto. Không tìm thấy hoạt động nào."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> thiết bị</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> thiết bị</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Thời tiết"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Nhiều nắng"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Mountain View • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Ẩn các ứng dụng gỡ lỗi"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Hiển thị các ứng dụng gỡ lỗi"</string>
</resources>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 13de1b8..7d7edf8 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"所有应用"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"媒体应用"</string>
<string name="driving_toast_text" msgid="149483091947120092">"驾车时无法使用<xliff:g id="APP_NAME">%1$s</xliff:g>。"</string>
- <string name="greeting" msgid="7164414111783832396">"<xliff:g id="USER">%s</xliff:g>,您好"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"点按卡片即可了解详情"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"点按卡片即可启动"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">"•"</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"正在通话"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"启动 Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"无法启动 Android Auto。未找到任何活动。"</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> 部设备</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> 部设备</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"天气"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° 以晴为主"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"山景城 • 高:--° 低:--°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"隐藏调试应用"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"显示调试应用"</string>
</resources>
diff --git a/res/values-zh-rHK/strings.xml b/res/values-zh-rHK/strings.xml
index 2bc9259..8686c91 100644
--- a/res/values-zh-rHK/strings.xml
+++ b/res/values-zh-rHK/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"所有應用程式"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"媒體應用程式"</string>
<string name="driving_toast_text" msgid="149483091947120092">"駕駛時無法使用「<xliff:g id="APP_NAME">%1$s</xliff:g>」。"</string>
- <string name="greeting" msgid="7164414111783832396">"<xliff:g id="USER">%s</xliff:g>,您好"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"輕按資訊卡以瞭解詳情"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"輕按資訊卡以啟動"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"通話中"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"啟動 Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"無法啟動 Android Auto。找不到活動。"</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> 部裝置</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> 部裝置</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"天氣"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° 大致晴朗"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"山景城 • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"隱藏偵錯應用程式"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"顯示偵錯應用程式"</string>
</resources>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 8cd8061..f964c2f 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"所有應用程式"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"媒體應用程式"</string>
<string name="driving_toast_text" msgid="149483091947120092">"開車時無法使用「<xliff:g id="APP_NAME">%1$s</xliff:g>」。"</string>
- <string name="greeting" msgid="7164414111783832396">"<xliff:g id="USER">%s</xliff:g>,你好"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"輕觸資訊卡即可瞭解詳情"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"輕觸資訊卡即可啟動"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"通話中"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"啟動 Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"無法啟動 Android Auto。找不到任何活動。"</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> 部裝置</item>
<item quantity="one"><xliff:g id="COUNT_0">%d</xliff:g> 部裝置</item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"天氣"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° 晴時多雲"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"山景城 • 高:--° 低:--°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"隱藏偵錯應用程式"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"顯示偵錯應用程式"</string>
</resources>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index bedd322..be10cf0 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -21,11 +21,19 @@
<string name="app_launcher_title_all_apps" msgid="3215107396036838217">"Zonke izinhlelo zokusebenza"</string>
<string name="app_launcher_title_media_only" msgid="4400886555907422816">"Izinhlelo zokusebenza zemidiya"</string>
<string name="driving_toast_text" msgid="149483091947120092">"I-<xliff:g id="APP_NAME">%1$s</xliff:g> ayikwazi ukusetshenziswa ngenkathi ushayela."</string>
- <string name="greeting" msgid="7164414111783832396">"Sawubona, <xliff:g id="USER">%s</xliff:g>"</string>
+ <string name="tap_for_more_info_text" msgid="2043549383814415585">"Thepha ikhadi ngolwazi olungeziwe"</string>
+ <string name="tap_to_launch_text" msgid="6910695705119260847">"Thepha ikhadi ukuqalisa"</string>
+ <string name="ongoing_call_duration_text_separator" msgid="6019453854809413561">" • "</string>
+ <string name="ongoing_call_text" msgid="2394626676478708070">"Ikholi eqhubekayo"</string>
+ <string name="projected_launch_text" msgid="5809132353957907500">"Qalisa i-Android Auto"</string>
+ <string name="projected_onclick_launch_error_toast_text" msgid="7462478007773137082">"Ayikwazi ukuqalisa i-Android Auto. Awukho umsebenzi otholakalayo."</string>
<plurals name="projection_devices" formatted="false" msgid="4740612230451956299">
<item quantity="one">amadivayisi angu-<xliff:g id="COUNT_1">%d</xliff:g></item>
<item quantity="other">amadivayisi angu-<xliff:g id="COUNT_1">%d</xliff:g></item>
</plurals>
+ <string name="weather_app_name" msgid="8048146303519139993">"Isimo sezulu"</string>
+ <string name="fake_weather_main_text" msgid="8117240999340284429">"--° Kuzoshisa isikhathi esiningi"</string>
+ <string name="fake_weather_footer_text" msgid="4570172025869749926">"Ukubuka Kwentaba • H: --° L: --°"</string>
<string name="hide_debug_apps" msgid="6128313544379622475">"Fihla izinhlelo zokusebenza zokususa iphutha"</string>
<string name="show_debug_apps" msgid="4521073121286325786">"Bonisa izinhlelo zokusebenza zokususa iphutha"</string>
</resources>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index b17ae79..b78fc0b 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -17,4 +17,9 @@
<color name="date_divider_bar_color">@*android:color/car_grey_500</color>
<color name="icon_tint">@*android:color/car_tint</color>
<color name="recent_apps_line_divider_color">@*android:color/car_list_divider</color>
+ <color name="card_background_scrim">#000000</color>
+ <color name="tap_for_more_text_color">#DADCE0</color>
+ <color name="dialer_button_icon_color">#FFFFFF</color>
+ <color name="dialer_end_call_button_color">#EE675C</color>
+ <color name="minimized_progress_bar_background">#5CFFFFFF</color>
</resources>
diff --git a/res/values/config.xml b/res/values/config.xml
new file mode 100644
index 0000000..f17db3f
--- /dev/null
+++ b/res/values/config.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ 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.
+ -->
+
+<resources>
+ <!-- A list of package names that provide the cards to display on the home screen -->
+ <string-array name="config_homeCardModuleClasses" translatable="false">
+ <item>com.android.car.carlauncher.homescreen.assistive.AssistiveCard</item>
+ <item>com.android.car.carlauncher.homescreen.audio.AudioCard</item>
+ </string-array>
+
+ <!--
+ A list of preferred intents to use for displaying the maps card. Intents
+ are formatted according to Intent.URI_ANDROID_APP_SCHEME.
+ This list will be used as follows:
+
+ * Pick the first item that is in the same package as the default handler
+ for CATEGORY_APP_MAPS.
+ * Pick the default handler if no such item is in the list.
+ * Pick the first item from the list if there is no default handler.
+ -->
+ <string-array name="config_homeCardPreferredMapActivities" translatable="false">
+ <!--
+ <item>android-app://com.example.map#Intent;category=android.intent.category.GADGET;end</item>
+ <item>android-app://com.example.nav#Intent;component=com.example.nav/.MapsCardActivity;end</item>
+ -->
+ </string-array>
+</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 065c665..3997700 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -16,23 +16,17 @@
-->
<resources>
<!-- CarLauncher Activity values -->
- <dimen name="launcher_card_corner_radius">6dp</dimen>
- <item name="maps_screen_percentage" type="dimen" format="float">0.6</item>
+ <dimen name="launcher_card_corner_radius">8dp</dimen>
<!-- Vertical percentage of screen (not occupied by maps to devote to the contextual space
(Ex: date time temp) -->
<item name="contextual_screen_percentage" type="dimen" format="float">.6</item>
- <!-- Padding on the edges of the contextual card -->
- <dimen name="contextual_padding">@*android:dimen/car_padding_4</dimen>
+
<!--Used for the space between the top, and bottom of the screen and the content -->
<dimen name="vertical_border_size">@*android:dimen/car_padding_1</dimen>
<!-- Used for the space between the start, and end of the screen and the content -->
<dimen name="horizontal_border_size">@*android:dimen/car_padding_1</dimen>
<!-- Margin surrounding fragments on the main activity -->
- <dimen name="main_screen_widget_margin">@*android:dimen/car_padding_1</dimen>
- <!-- Gap between the end of the icon and the start of the text -->
- <dimen name="icon_end_margin">@*android:dimen/car_padding_3</dimen>
- <!-- Gap between text lines -->
- <dimen name="line_gap_margin">@*android:dimen/car_padding_1</dimen>
+ <dimen name="main_screen_widget_margin">16dp</dimen>
<!-- AppGridActivity -->
<dimen name="recent_apps_divider_margin">40dp</dimen>
@@ -43,8 +37,6 @@
<dimen name="panel_margin">@*android:dimen/car_margin</dimen>
<!-- Height of the text and exit button on the app selection screen -->
<dimen name="app_bar_height">@*android:dimen/car_app_bar_height</dimen>
- <!-- Margin between the right edge of the screen and the app bar title -->
- <dimen name="app_bar_title_right_margin">@*android:dimen/car_padding_5</dimen>
<dimen name="icon_size">@*android:dimen/car_primary_icon_size</dimen>
<dimen name="recent_apps_row_height">@*android:dimen/car_list_divider_height</dimen>
<dimen name="app_grid_touch_target_size">@*android:dimen/car_touch_target_size</dimen>
@@ -62,4 +54,43 @@
<dimen name="search_box_height">65dp</dimen>
<dimen name="search_bar_margin">@*android:dimen/car_keyline_1</dimen>
<dimen name="search_bar_drawable_text_padding">46dp</dimen>
+
+ <!-- Card dimensions -->
+ <dimen name="card_width">388dp</dimen>
+
+ <!-- Card Header dimensions -->
+ <dimen name="card_content_margin">24dp</dimen>
+ <dimen name="card_icon_size">36dp</dimen>
+ <dimen name="card_name_margin_start">16dp</dimen>
+
+ <!-- Card Content dimensions -->
+ <dimen name="media_top_margin">24dp</dimen>
+ <dimen name="descriptive_text_only_top_margin">32dp</dimen>
+ <dimen name="descriptive_text_with_controls_top_margin">24dp</dimen>
+ <!-- Percent transparency of the scrim applied to the image used for the card's background as a float between 0 and 1, where 0 applies no darkening scrim-->
+ <dimen name="card_background_scrim_alpha" format="float">0.72</dimen>
+ <!--Percent by which to blur the image used for the card's background as a float between 0 and 1, where 0 is not blurred-->
+ <dimen name="card_background_image_blur_radius" format="float">0.36</dimen>
+
+ <!-- card_content_descriptive_text dimensions -->
+ <dimen name="card_content_image_size">76dp</dimen>
+ <dimen name="card_content_image_margin">16dp</dimen>
+ <dimen name="descriptive_text_margin_top">8dp</dimen>
+ <dimen name="secondary_text_margin_top">0dp</dimen>
+
+ <!-- card_content_text_block dimensions -->
+ <dimen name="text_block_top_margin">24dp</dimen>
+
+ <!-- card_content_button_trio dimensions -->
+ <dimen name="home_card_button_size">44dp</dimen>
+ <dimen name="button_outline_thickness">4dp</dimen>
+ <dimen name="button_tap_target_size">76dp</dimen>
+ <dimen name="button_tap_target_icon_padding">8dp</dimen>
+ <dimen name="button_trio_margin">24dp</dimen>
+
+ <!-- card_content_playback_controls dimensions -->
+ <dimen name="playback_controls_margin">24dp</dimen>
+
+ <!-- card_content_tap_for_more dimensions -->
+ <dimen name="tap_text_margin">24dp</dimen>
</resources>
diff --git a/res/values/integers.xml b/res/values/integers.xml
index 46cc508..6f05b13 100644
--- a/res/values/integers.xml
+++ b/res/values/integers.xml
@@ -16,5 +16,9 @@
<resources>
<!-- Columns -->
<integer name="car_app_selector_column_number">3</integer>
+
+ <integer name="card_content_text_block_max_lines">3</integer>
+ <!-- Number of buttons shown for the media playback controls bar -->
+ <integer name="playback_controls_bar_columns">3</integer>
</resources>
diff --git a/res/values/overlayable.xml b/res/values/overlayable.xml
new file mode 100644
index 0000000..30f816e
--- /dev/null
+++ b/res/values/overlayable.xml
@@ -0,0 +1,167 @@
+<?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.-->
+<!--
+THIS FILE WAS AUTO GENERATED, DO NOT EDIT MANUALLY.
+REGENERATE USING packages/apps/Car/tests/tools/rro/generate-overlayable.py
+-->
+<resources>
+ <overlayable name="CarLauncher">
+ <policy type="system|product|signature">
+ <item type="array" name="config_homeCardModuleClasses"/>
+ <item type="array" name="config_homeCardPreferredMapActivities"/>
+ <item type="array" name="hidden_apps"/>
+ <item type="color" name="card_background_scrim"/>
+ <item type="color" name="date_divider_bar_color"/>
+ <item type="color" name="dialer_button_icon_color"/>
+ <item type="color" name="dialer_end_call_button_color"/>
+ <item type="color" name="icon_tint"/>
+ <item type="color" name="minimized_progress_bar_background"/>
+ <item type="color" name="recent_apps_line_divider_color"/>
+ <item type="color" name="tap_for_more_text_color"/>
+ <item type="dimen" name="app_bar_height"/>
+ <item type="dimen" name="app_grid_header_margin"/>
+ <item type="dimen" name="app_grid_row_margin"/>
+ <item type="dimen" name="app_grid_touch_target_size"/>
+ <item type="dimen" name="app_icon_description_margin"/>
+ <item type="dimen" name="app_icon_opacity"/>
+ <item type="dimen" name="app_icon_opacity_unavailable"/>
+ <item type="dimen" name="app_icon_ripple_radius"/>
+ <item type="dimen" name="app_touch_target_margin"/>
+ <item type="dimen" name="app_touch_target_padding"/>
+ <item type="dimen" name="button_outline_thickness"/>
+ <item type="dimen" name="button_tap_target_icon_padding"/>
+ <item type="dimen" name="button_tap_target_size"/>
+ <item type="dimen" name="button_trio_margin"/>
+ <item type="dimen" name="card_background_image_blur_radius"/>
+ <item type="dimen" name="card_background_scrim_alpha"/>
+ <item type="dimen" name="card_content_image_margin"/>
+ <item type="dimen" name="card_content_image_size"/>
+ <item type="dimen" name="card_content_margin"/>
+ <item type="dimen" name="card_icon_size"/>
+ <item type="dimen" name="card_name_margin_start"/>
+ <item type="dimen" name="card_width"/>
+ <item type="dimen" name="contextual_screen_percentage"/>
+ <item type="dimen" name="descriptive_text_margin_top"/>
+ <item type="dimen" name="descriptive_text_only_top_margin"/>
+ <item type="dimen" name="descriptive_text_with_controls_top_margin"/>
+ <item type="dimen" name="home_card_button_size"/>
+ <item type="dimen" name="horizontal_border_size"/>
+ <item type="dimen" name="icon_size"/>
+ <item type="dimen" name="launcher_card_corner_radius"/>
+ <item type="dimen" name="main_screen_widget_margin"/>
+ <item type="dimen" name="media_top_margin"/>
+ <item type="dimen" name="panel_margin"/>
+ <item type="dimen" name="playback_controls_margin"/>
+ <item type="dimen" name="recent_apps_divider_margin"/>
+ <item type="dimen" name="recent_apps_row_height"/>
+ <item type="dimen" name="search_bar_drawable_text_padding"/>
+ <item type="dimen" name="search_bar_margin"/>
+ <item type="dimen" name="search_box_height"/>
+ <item type="dimen" name="search_item_width"/>
+ <item type="dimen" name="search_result_margin"/>
+ <item type="dimen" name="search_result_text_margin"/>
+ <item type="dimen" name="secondary_text_margin_top"/>
+ <item type="dimen" name="tap_text_margin"/>
+ <item type="dimen" name="text_block_top_margin"/>
+ <item type="dimen" name="vertical_border_size"/>
+ <item type="drawable" name="car_button_background"/>
+ <item type="drawable" name="ic_apps_black"/>
+ <item type="drawable" name="ic_arrow_back_black"/>
+ <item type="drawable" name="ic_call_end"/>
+ <item type="drawable" name="ic_call_end_button"/>
+ <item type="drawable" name="ic_clear_black"/>
+ <item type="drawable" name="ic_dialpad"/>
+ <item type="drawable" name="ic_mic_off"/>
+ <item type="drawable" name="ic_search_black"/>
+ <item type="id" name="app_icon"/>
+ <item type="id" name="app_item"/>
+ <item type="id" name="app_name"/>
+ <item type="id" name="apps_grid"/>
+ <item type="id" name="bottom_card"/>
+ <item type="id" name="bottom_edge"/>
+ <item type="id" name="bottom_line"/>
+ <item type="id" name="button_center"/>
+ <item type="id" name="button_left"/>
+ <item type="id" name="button_right"/>
+ <item type="id" name="button_trio"/>
+ <item type="id" name="card_background"/>
+ <item type="id" name="card_background_image"/>
+ <item type="id" name="card_background_scrim"/>
+ <item type="id" name="card_icon"/>
+ <item type="id" name="card_name"/>
+ <item type="id" name="card_view"/>
+ <item type="id" name="descriptive_text_layout"/>
+ <item type="id" name="descriptive_text_with_controls_layout"/>
+ <item type="id" name="divider"/>
+ <item type="id" name="divider_horizontal"/>
+ <item type="id" name="end_edge"/>
+ <item type="id" name="focus_area"/>
+ <item type="id" name="maps_card"/>
+ <item type="id" name="media_descriptive_text"/>
+ <item type="id" name="media_layout"/>
+ <item type="id" name="media_playback_controls_bar"/>
+ <item type="id" name="optional_image"/>
+ <item type="id" name="optional_timer"/>
+ <item type="id" name="optional_timer_separator"/>
+ <item type="id" name="primary_text"/>
+ <item type="id" name="recent_apps_row"/>
+ <item type="id" name="secondary_text"/>
+ <item type="id" name="start_edge"/>
+ <item type="id" name="tap_for_more_text"/>
+ <item type="id" name="text_block"/>
+ <item type="id" name="text_block_layout"/>
+ <item type="id" name="top_card"/>
+ <item type="id" name="top_edge"/>
+ <item type="id" name="top_line"/>
+ <item type="id" name="vertical_barrier"/>
+ <item type="integer" name="car_app_selector_column_number"/>
+ <item type="integer" name="card_content_text_block_max_lines"/>
+ <item type="integer" name="playback_controls_bar_columns"/>
+ <item type="layout" name="app_grid_activity"/>
+ <item type="layout" name="app_item"/>
+ <item type="layout" name="button_trio"/>
+ <item type="layout" name="car_launcher"/>
+ <item type="layout" name="car_launcher_multiwindow"/>
+ <item type="layout" name="card_content_descriptive_text_only"/>
+ <item type="layout" name="card_content_descriptive_text_with_controls"/>
+ <item type="layout" name="card_content_media"/>
+ <item type="layout" name="card_content_text_block"/>
+ <item type="layout" name="card_fragment"/>
+ <item type="layout" name="descriptive_text"/>
+ <item type="layout" name="recent_apps_row"/>
+ <item type="layout" name="tap_for_more_text"/>
+ <item type="layout" name="text_block"/>
+ <item type="plurals" name="projection_devices"/>
+ <item type="string" name="app_launcher_title_all_apps"/>
+ <item type="string" name="app_launcher_title_media_only"/>
+ <item type="string" name="app_title"/>
+ <item type="string" name="driving_toast_text"/>
+ <item type="string" name="fake_weather_footer_text"/>
+ <item type="string" name="fake_weather_main_text"/>
+ <item type="string" name="hide_debug_apps"/>
+ <item type="string" name="ongoing_call_duration_text_separator"/>
+ <item type="string" name="ongoing_call_text"/>
+ <item type="string" name="projected_launch_text"/>
+ <item type="string" name="projected_onclick_launch_error_toast_text"/>
+ <item type="string" name="show_debug_apps"/>
+ <item type="string" name="tap_for_more_info_text"/>
+ <item type="string" name="tap_to_launch_text"/>
+ <item type="string" name="weather_app_name"/>
+ <item type="style" name="CardViewStyle"/>
+ <item type="style" name="ContextualSpace"/>
+ <item type="style" name="HorizontalLineDivider"/>
+ <item type="style" name="Theme.Launcher"/>
+ <item type="style" name="Theme.Launcher.AppGridActivity"/>
+ <item type="style" name="TitleText"/>
+ </policy>
+ </overlayable>
+</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 9bb7207..cbd2bf9 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -24,19 +24,27 @@
<xliff:g id="app_name" example="Settings">%1$s</xliff:g> can\'t be used while driving.
</string>
- <!-- Contextual Fragment -->
- <string name="greeting">Hi,
- <xliff:g example="Owner" id="user">%s</xliff:g>
- </string>
- <string name="temperature" translatable="false">%d\u00B0</string>
- <string name="temperature_empty" translatable="false">--\u00B0</string>
- <string name="date" translatable="false">EEEMMMd</string>
+ <string name="tap_for_more_info_text">Tap card for more info</string>
+ <string name="tap_to_launch_text">Tap card to launch</string>
+ <!-- InCallModel strings -->
+ <!-- Separates the duration from the ongoing_call_text -->
+ <string name="ongoing_call_duration_text_separator"> • </string>
+ <string name="ongoing_call_text">Ongoing call</string>
+
+ <!-- ProjectionModel strings -->
+ <string name="projected_launch_text">Launch Android Auto</string>
+ <string name="projected_onclick_launch_error_toast_text">Unable to launch Android Auto. No activity found.</string>
<plurals name="projection_devices">
<item quantity="one"><xliff:g example="1" id="count">%d</xliff:g> device</item>
<item quantity="other"><xliff:g example="2" id="count">%d</xliff:g> devices</item>
</plurals>
+ <!-- FakeWeatherModel strings -->
+ <string name="weather_app_name">Weather</string>
+ <string name="fake_weather_main_text">--\u00B0 Mostly sunny</string>
+ <string name="fake_weather_footer_text">Mountain View • H: --\u00B0 L: --\u00B0</string>
+
<!-- Toolbar MenuItem text for hiding debug apps, only visible on debug builds [CHAR_LIMIT=50] -->
<string name="hide_debug_apps">Hide debug apps</string>
<!-- Toolbar MenuItem text for showing debug apps, only visible on debug builds [CHAR_LIMIT=50] -->
diff --git a/src/com/android/car/carlauncher/AppGridActivity.java b/src/com/android/car/carlauncher/AppGridActivity.java
index d198067..1b905a2 100644
--- a/src/com/android/car/carlauncher/AppGridActivity.java
+++ b/src/com/android/car/carlauncher/AppGridActivity.java
@@ -69,7 +69,7 @@
/**
* Launcher activity that shows a grid of apps.
*/
-public final class AppGridActivity extends Activity implements InsetsChangedListener {
+public class AppGridActivity extends Activity implements InsetsChangedListener {
private static final String TAG = "AppGridActivity";
private static final String MODE_INTENT_EXTRA = "com.android.car.carlauncher.mode";
@@ -233,8 +233,8 @@
/** Updates the list of all apps, and the list of the most recently used ones. */
private void updateAppsLists() {
- Set<String> blackList = mShowAllApps ? Collections.emptySet() : mHiddenApps;
- LauncherAppsInfo appsInfo = AppLauncherUtils.getLauncherApps(blackList,
+ Set<String> appsToHide = mShowAllApps ? Collections.emptySet() : mHiddenApps;
+ LauncherAppsInfo appsInfo = AppLauncherUtils.getLauncherApps(appsToHide,
mCustomMediaComponents,
mMode.mAppTypes,
mMode.mOpenMediaCenter,
diff --git a/src/com/android/car/carlauncher/AppLauncherUtils.java b/src/com/android/car/carlauncher/AppLauncherUtils.java
index 65493a1..e5e9d9e 100644
--- a/src/com/android/car/carlauncher/AppLauncherUtils.java
+++ b/src/com/android/car/carlauncher/AppLauncherUtils.java
@@ -154,7 +154,7 @@
* Gets all the components that we want to see in the launcher in unsorted order, including
* launcher activities and media services.
*
- * @param blackList A (possibly empty) list of apps (package names) to hide
+ * @param appsToHide A (possibly empty) list of apps (package names) to hide
* @param customMediaComponents A (possibly empty) list of media components (component names)
* that shouldn't be shown in Launcher because their applications'
* launcher activities will be shown
@@ -168,7 +168,7 @@
*/
@NonNull
static LauncherAppsInfo getLauncherApps(
- @NonNull Set<String> blackList,
+ @NonNull Set<String> appsToHide,
@NonNull Set<String> customMediaComponents,
@AppTypes int appTypes,
boolean openMediaCenter,
@@ -199,7 +199,7 @@
String className = info.serviceInfo.name;
ComponentName componentName = new ComponentName(packageName, className);
mediaServicesMap.put(componentName, info);
- if (shouldAddToLaunchables(componentName, blackList, customMediaComponents,
+ if (shouldAddToLaunchables(componentName, appsToHide, customMediaComponents,
appTypes, APP_TYPE_MEDIA_SERVICES)) {
final boolean isDistractionOptimized = true;
@@ -237,7 +237,7 @@
for (LauncherActivityInfo info : availableActivities) {
ComponentName componentName = info.getComponentName();
String packageName = componentName.getPackageName();
- if (shouldAddToLaunchables(componentName, blackList, customMediaComponents,
+ if (shouldAddToLaunchables(componentName, appsToHide, customMediaComponents,
appTypes, APP_TYPE_LAUNCHABLES)) {
boolean isDistractionOptimized =
isActivityDistractionOptimized(carPackageManager, packageName,
@@ -264,11 +264,11 @@
}
private static boolean shouldAddToLaunchables(@NonNull ComponentName componentName,
- @NonNull Set<String> blackList,
+ @NonNull Set<String> appsToHide,
@NonNull Set<String> customMediaComponents,
@AppTypes int appTypesToShow,
@AppTypes int componentAppType) {
- if (blackList.contains(componentName.getPackageName())) {
+ if (appsToHide.contains(componentName.getPackageName())) {
return false;
}
switch (componentAppType) {
diff --git a/src/com/android/car/carlauncher/CarLauncher.java b/src/com/android/car/carlauncher/CarLauncher.java
index d049239..fdf8771 100644
--- a/src/com/android/car/carlauncher/CarLauncher.java
+++ b/src/com/android/car/carlauncher/CarLauncher.java
@@ -16,111 +16,122 @@
package com.android.car.carlauncher;
-import android.app.ActivityManager;
-import android.app.ActivityView;
-import android.car.app.CarActivityView;
+import static android.app.ActivityTaskManager.INVALID_TASK_ID;
+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY;
+
+import android.app.ActivityOptions;
+import android.app.ActivityTaskManager;
+import android.app.PendingIntent;
+import android.app.TaskStackListener;
import android.content.ActivityNotFoundException;
+import android.content.ComponentName;
import android.content.Intent;
+import android.content.pm.PackageManager;
import android.content.res.Configuration;
-import android.hardware.display.DisplayManager;
-import android.hardware.display.DisplayManager.DisplayListener;
import android.os.Bundle;
-import android.os.Handler;
-import android.os.Looper;
import android.util.Log;
import android.view.Display;
-import android.view.WindowInsets;
-import android.widget.FrameLayout;
+import android.view.ViewGroup;
+import android.view.WindowManager;
+import androidx.collection.ArraySet;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentTransaction;
+import androidx.lifecycle.ViewModelProvider;
-import com.android.car.media.common.PlaybackFragment;
+import com.android.car.carlauncher.homescreen.HomeCardModule;
+import com.android.car.internal.common.UserHelperLite;
+import com.android.wm.shell.TaskView;
+import com.android.wm.shell.common.HandlerExecutor;
+
+import java.net.URISyntaxException;
+import java.util.Set;
/**
- * Basic Launcher for Android Automotive which demonstrates the use of {@link ActivityView} to host
- * maps content.
+ * Basic Launcher for Android Automotive which demonstrates the use of {@link TaskView} to host
+ * maps content and uses a Model-View-Presenter structure to display content in cards.
*
- * <p>Note: On some devices, the ActivityView may render with a width, height, and/or aspect
+ * <p>Implementations of the Launcher that use the given layout of the main activity
+ * (car_launcher.xml) can customize the home screen cards by providing their own
+ * {@link HomeCardModule} for R.id.top_card or R.id.bottom_card. Otherwise, implementations that
+ * use their own layout should define their own activity rather than using this one.
+ *
+ * <p>Note: On some devices, the TaskView may render with a width, height, and/or aspect
* ratio that does not meet Android compatibility definitions. Developers should work with content
* owners to ensure content renders correctly when extending or emulating this class.
- *
- * <p>Note: Since the hosted maps Activity in ActivityView is currently in a virtual display, the
- * system considers the Activity to always be in front. Launching the maps Activity with a direct
- * Intent will not work. To start the maps Activity on the real display, send the Intent to the
- * Launcher with the {@link Intent#CATEGORY_APP_MAPS} category, and the launcher will start the
- * Activity on the real display.
- *
- * <p>Note: The state of the virtual display in the ActivityView is nondeterministic when
- * switching away from and back to the current user. To avoid a crash, this Activity will finish
- * when switching users.
*/
public class CarLauncher extends FragmentActivity {
- private static final String TAG = "CarLauncher";
+ public static final String TAG = "CarLauncher";
private static final boolean DEBUG = false;
- private CarActivityView mActivityView;
- private boolean mActivityViewReady;
- private boolean mIsStarted;
- private DisplayManager mDisplayManager;
- private final Handler mMainHandler = new Handler(Looper.getMainLooper());
+ private TaskViewManager mTaskViewManager;
+ private TaskView mTaskView;
+ private boolean mTaskViewReady;
+ // Tracking this to check if the task in TaskView has crashed in the background.
+ private int mTaskViewTaskId = INVALID_TASK_ID;
+ private boolean mIsResumed;
+ private boolean mFocused;
+ private int mCarLauncherTaskId = INVALID_TASK_ID;
+ private Set<HomeCardModule> mHomeCardModules;
/** Set to {@code true} once we've logged that the Activity is fully drawn. */
private boolean mIsReadyLogged;
- private final ActivityView.StateCallback mActivityViewCallback =
- new ActivityView.StateCallback() {
- @Override
- public void onActivityViewReady(ActivityView view) {
- if (DEBUG) Log.d(TAG, "onActivityViewReady(" + getUserId() + ")");
- mActivityViewReady = true;
- startMapsInActivityView();
- maybeLogReady();
- }
-
- @Override
- public void onActivityViewDestroyed(ActivityView view) {
- if (DEBUG) Log.d(TAG, "onActivityViewDestroyed(" + getUserId() + ")");
- mActivityViewReady = false;
- }
-
- @Override
- public void onTaskMovedToFront(int taskId) {
- if (DEBUG) {
- Log.d(TAG, "onTaskMovedToFront(" + getUserId() + "): started="
- + mIsStarted);
- }
- try {
- if (mIsStarted) {
- ActivityManager am =
- (ActivityManager) getSystemService(ACTIVITY_SERVICE);
- am.moveTaskToFront(CarLauncher.this.getTaskId(), /* flags= */ 0);
- }
- } catch (RuntimeException e) {
- Log.w(TAG, "Failed to move CarLauncher to front.");
- }
- }
- };
-
- private final DisplayListener mDisplayListener = new DisplayListener() {
+ // The callback methods in {@code mTaskViewListener} are running under MainThread.
+ private final TaskView.Listener mTaskViewListener = new TaskView.Listener() {
@Override
- public void onDisplayAdded(int displayId) {}
- @Override
- public void onDisplayRemoved(int displayId) {}
+ public void onInitialized() {
+ if (DEBUG) Log.d(TAG, "onInitialized(" + getUserId() + ")");
+ mTaskViewReady = true;
+ startMapsInTaskView();
+ maybeLogReady();
+ }
@Override
- public void onDisplayChanged(int displayId) {
- if (displayId != getDisplay().getDisplayId()) {
- return;
+ public void onReleased() {
+ if (DEBUG) Log.d(TAG, "onReleased(" + getUserId() + ")");
+ mTaskViewReady = false;
+ }
+
+ @Override
+ public void onTaskCreated(int taskId, ComponentName name) {
+ if (DEBUG) Log.d(TAG, "onTaskCreated: taskId=" + taskId);
+ mTaskViewTaskId = taskId;
+ }
+
+ @Override
+ public void onTaskRemovalStarted(int taskId) {
+ if (DEBUG) Log.d(TAG, "onTaskRemovalStarted: taskId=" + taskId);
+ mTaskViewTaskId = INVALID_TASK_ID;
+ }
+ };
+
+ private final TaskStackListener mTaskStackListener = new TaskStackListener() {
+ @Override
+ public void onTaskFocusChanged(int taskId, boolean focused) {
+ mFocused = taskId == mCarLauncherTaskId && focused;
+ if (DEBUG) {
+ Log.d(TAG, "onTaskFocusChanged: mFocused=" + mFocused
+ + ", mTaskViewTaskId=" + mTaskViewTaskId);
}
- // startMapsInActivityView() will check Display's State.
- startMapsInActivityView();
+ if (mFocused && mTaskViewTaskId == INVALID_TASK_ID) {
+ startMapsInTaskView();
+ }
}
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+
+ mCarLauncherTaskId = getTaskId();
+ ActivityTaskManager.getInstance().registerTaskStackListener(mTaskStackListener);
+
+ // Setting as trusted overlay to let touches pass through.
+ getWindow().addPrivateFlags(PRIVATE_FLAG_TRUSTED_OVERLAY);
+ // To pass touches to the underneath task.
+ getWindow().addFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL);
+
// Don't show the maps panel in multi window mode.
// NOTE: CTS tests for split screen are not compatible with activity views on the default
// activity of the launcher
@@ -128,46 +139,60 @@
setContentView(R.layout.car_launcher_multiwindow);
} else {
setContentView(R.layout.car_launcher);
+ // We don't want to show Map card unnecessarily for the headless user 0.
+ if (!UserHelperLite.isHeadlessSystemUser(getUserId())) {
+ ViewGroup mapsCard = findViewById(R.id.maps_card);
+ if (mapsCard != null) {
+ setUpTaskView(mapsCard);
+ }
+ }
}
- initializeFragments();
- mActivityView = findViewById(R.id.maps);
- if (mActivityView != null) {
- mActivityView.setCallback(mActivityViewCallback);
- }
- mDisplayManager = getSystemService(DisplayManager.class);
- mDisplayManager.registerDisplayListener(mDisplayListener, mMainHandler);
+ initializeCards();
+ }
+
+ private void setUpTaskView(ViewGroup parent) {
+ mTaskViewManager = new TaskViewManager(this,
+ new HandlerExecutor(getMainThreadHandler()));
+ mTaskViewManager.createTaskView(taskView -> {
+ taskView.setListener(getMainExecutor(), mTaskViewListener);
+ parent.addView(taskView);
+ mTaskView = taskView;
+ });
}
@Override
- protected void onRestart() {
- super.onRestart();
- startMapsInActivityView();
- }
-
- @Override
- protected void onStart() {
- super.onStart();
- mIsStarted = true;
+ protected void onResume() {
+ super.onResume();
+ mIsResumed = true;
maybeLogReady();
+ if (DEBUG) {
+ Log.d(TAG, "onResume: mFocused=" + mFocused + ", mTaskViewTaskId=" + mTaskViewTaskId);
+ }
+ if (mFocused && mTaskViewTaskId == INVALID_TASK_ID) {
+ // If the task in TaskView is crashed during CarLauncher is background,
+ // We'd like to restart it when CarLauncher becomes foreground.
+ startMapsInTaskView();
+ }
}
@Override
- protected void onStop() {
- super.onStop();
- mIsStarted = false;
+ protected void onPause() {
+ super.onPause();
+ mIsResumed = false;
}
@Override
protected void onDestroy() {
super.onDestroy();
- mDisplayManager.unregisterDisplayListener(mDisplayListener);
- if (mActivityView != null && mActivityViewReady) {
- mActivityView.release();
+ ActivityTaskManager.getInstance().unregisterTaskStackListener(mTaskStackListener);
+ if (mTaskView != null && mTaskViewReady) {
+ mTaskView.release();
+ mTaskView = null;
}
}
- private void startMapsInActivityView() {
- if (mActivityView == null || !mActivityViewReady) {
+ private void startMapsInTaskView() {
+ if (mTaskView == null || !mTaskViewReady) {
return;
}
// If we happen to be be resurfaced into a multi display mode we skip launching content
@@ -180,53 +205,97 @@
return;
}
try {
- mActivityView.startActivity(getMapsIntent());
+ ActivityOptions options = ActivityOptions.makeCustomAnimation(this,
+ /* enterResId= */ 0, /* exitResId= */ 0);
+ // To show the Activity in TaskView, the Activity should be above the host task in
+ // ActivityStack. This option only effects the host Activity is in resumed.
+ options.setTaskAlwaysOnTop(true);
+ mTaskView.startActivity(
+ PendingIntent.getActivity(this, /* requestCode= */ 0, getMapsIntent(),
+ PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT),
+ /* fillInIntent= */ null, options, null /* launchBounds */);
} catch (ActivityNotFoundException e) {
Log.w(TAG, "Maps activity not found", e);
}
}
private Intent getMapsIntent() {
- return Intent.makeMainSelectorActivity(Intent.ACTION_MAIN, Intent.CATEGORY_APP_MAPS);
+ Intent defaultIntent =
+ Intent.makeMainSelectorActivity(Intent.ACTION_MAIN, Intent.CATEGORY_APP_MAPS);
+ PackageManager pm = getPackageManager();
+ ComponentName defaultActivity = defaultIntent.resolveActivity(pm);
+
+ for (String intentUri : getResources().getStringArray(
+ R.array.config_homeCardPreferredMapActivities)) {
+ Intent preferredIntent;
+ try {
+ preferredIntent = Intent.parseUri(intentUri, Intent.URI_ANDROID_APP_SCHEME);
+ } catch (URISyntaxException se) {
+ Log.w(TAG, "Invalid intent URI in config_homeCardPreferredMapActivities", se);
+ continue;
+ }
+
+ if (defaultActivity != null && !defaultActivity.getPackageName().equals(
+ preferredIntent.getPackage())) {
+ continue;
+ }
+
+ if (preferredIntent.resolveActivityInfo(pm, /* flags= */ 0) != null) {
+ return preferredIntent;
+ }
+ }
+ return defaultIntent;
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
- initializeFragments();
+ initializeCards();
}
- private void initializeFragments() {
- PlaybackFragment playbackFragment = new PlaybackFragment();
- ContextualFragment contextualFragment = null;
- FrameLayout contextual = findViewById(R.id.contextual);
- if (contextual != null) {
- contextualFragment = new ContextualFragment();
+ private void initializeCards() {
+ if (mHomeCardModules == null) {
+ mHomeCardModules = new ArraySet<>();
+ for (String providerClassName : getResources().getStringArray(
+ R.array.config_homeCardModuleClasses)) {
+ try {
+ long reflectionStartTime = System.currentTimeMillis();
+ HomeCardModule cardModule = (HomeCardModule) Class.forName(
+ providerClassName).newInstance();
+ cardModule.setViewModelProvider(new ViewModelProvider( /* owner= */this));
+ mHomeCardModules.add(cardModule);
+ if (DEBUG) {
+ long reflectionTime = System.currentTimeMillis() - reflectionStartTime;
+ Log.d(TAG, "Initialization of HomeCardModule class " + providerClassName
+ + " took " + reflectionTime + " ms");
+ }
+ } catch (IllegalAccessException | InstantiationException |
+ ClassNotFoundException e) {
+ Log.w(TAG, "Unable to create HomeCardProvider class " + providerClassName, e);
+ }
+ }
}
-
- FragmentTransaction fragmentTransaction =
- getSupportFragmentManager().beginTransaction();
- fragmentTransaction.replace(R.id.playback, playbackFragment);
- if (contextual != null) {
- fragmentTransaction.replace(R.id.contextual, contextualFragment);
+ FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
+ for (HomeCardModule cardModule : mHomeCardModules) {
+ transaction.replace(cardModule.getCardResId(), cardModule.getCardView());
}
- fragmentTransaction.commitNow();
+ transaction.commitNow();
}
/** Logs that the Activity is ready. Used for startup time diagnostics. */
private void maybeLogReady() {
if (DEBUG) {
- Log.d(TAG, "maybeLogReady(" + getUserId() + "): activityReady=" + mActivityViewReady
- + ", started=" + mIsStarted + ", alreadyLogged: " + mIsReadyLogged);
+ Log.d(TAG, "maybeLogReady(" + getUserId() + "): activityReady=" + mTaskViewReady
+ + ", started=" + mIsResumed + ", alreadyLogged: " + mIsReadyLogged);
}
- if (mActivityViewReady && mIsStarted) {
- // We should report everytime - the Android framework will take care of logging just
- // when it's effectivelly drawn for the first time, but....
+ if (mTaskViewReady && mIsResumed) {
+ // We should report every time - the Android framework will take care of logging just
+ // when it's effectively drawn for the first time, but....
reportFullyDrawn();
if (!mIsReadyLogged) {
// ... we want to manually check that the Log.i below (which is useful to show
- // the user id) is only logged once (otherwise it would be logged everytime the user
- // taps Home)
+ // the user id) is only logged once (otherwise it would be logged every time the
+ // user taps Home)
Log.i(TAG, "Launcher for user " + getUserId() + " is ready");
mIsReadyLogged = true;
}
diff --git a/src/com/android/car/carlauncher/ContextualFragment.java b/src/com/android/car/carlauncher/ContextualFragment.java
deleted file mode 100644
index 522a362..0000000
--- a/src/com/android/car/carlauncher/ContextualFragment.java
+++ /dev/null
@@ -1,80 +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.car.carlauncher;
-
-import android.content.Intent;
-import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import androidx.fragment.app.Fragment;
-import androidx.lifecycle.ViewModelProviders;
-
-/** {@link Fragment} which displays relevant information that changes over time. */
-public class ContextualFragment extends Fragment {
-
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- View rootView = inflater.inflate(R.layout.contextual_fragment, container, false);
- ImageView iconView = rootView.findViewById(R.id.icon);
- TextView topLineView = rootView.findViewById(R.id.top_line);
- TextView bottomLineView = rootView.findViewById(R.id.bottom_line);
- View dateDividerView = rootView.findViewById(R.id.date_divider);
- View dateView = rootView.findViewById(R.id.date);
- View bottomLineContainerView = rootView.findViewById(R.id.bottom_line_container);
-
- ContextualViewModel viewModel = ViewModelProviders.of(this).get(ContextualViewModel.class);
-
- viewModel.getContextualInfo().observe(this, info -> {
- if (info == null) {
- return;
- }
-
- iconView.setImageDrawable(info.getIcon());
- topLineView.setText(info.getTopLine());
-
- boolean showBottomLineMessage = (info.getBottomLine() != null);
-
- bottomLineView.setVisibility(showBottomLineMessage ? View.VISIBLE : View.GONE);
- bottomLineView.setText(info.getBottomLine());
-
- dateView.setVisibility(info.getShowClock() ? View.VISIBLE : View.GONE);
-
- // If both the bottom-line message and the clock are shown, show the divider.
- dateDividerView.setVisibility(
- (showBottomLineMessage && info.getShowClock()) ? View.VISIBLE : View.GONE);
- // Hide the bottom-line container if neither the bottom-line message nor the clock
- // is being shown. This will center the top-line message in the card.
- bottomLineContainerView.setVisibility(
- (showBottomLineMessage || info.getShowClock()) ? View.VISIBLE : View.GONE);
-
- Intent onClickActivity = info.getOnClickActivity();
- View.OnClickListener listener =
- onClickActivity != null
- ? v -> startActivity(info.getOnClickActivity())
- : null;
- rootView.setOnClickListener(listener);
- rootView.setClickable(listener != null);
- });
-
- return rootView;
- }
-}
diff --git a/src/com/android/car/carlauncher/ContextualInfo.java b/src/com/android/car/carlauncher/ContextualInfo.java
deleted file mode 100644
index a85a53e..0000000
--- a/src/com/android/car/carlauncher/ContextualInfo.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package com.android.car.carlauncher;
-
-import android.content.Intent;
-import android.graphics.drawable.Drawable;
-
-import androidx.annotation.Nullable;
-
-final class ContextualInfo {
- private final Drawable mIcon;
- private final CharSequence mTopLine;
- private final @Nullable CharSequence mBottomLine;
- private final boolean mShowClock;
- private final Intent mOnClickActivity;
-
- public ContextualInfo(
- Drawable icon,
- CharSequence topLine,
- @Nullable CharSequence bottomLine,
- boolean showClock,
- @Nullable Intent onClickActivity) {
- mIcon = icon;
- mTopLine = topLine;
- mBottomLine = bottomLine;
- mShowClock = showClock;
- mOnClickActivity = onClickActivity;
- }
-
- /** Gets the icon to be shown in the contextual space. */
- public Drawable getIcon() {
- return mIcon;
- }
-
- /** Gets the top line of the text to be shown in the contextual space. */
- public CharSequence getTopLine() {
- return mTopLine;
- }
-
- /**
- * Gets the bottom line of the text to be shown in the contextual space.
- *
- * If null, no bottom-line text will be shown in the contextual space.
- */
- @Nullable
- public CharSequence getBottomLine() {
- return mBottomLine;
- }
-
- /** Gets whether to show the date in the contextual space. */
- public boolean getShowClock() {
- return mShowClock;
- }
-
- /**
- * Gets the {@link Intent} for the activity to be started when the contextual space is tapped.
- *
- * If null, the contextual space will not be tappable.
- */
- @Nullable
- public Intent getOnClickActivity() {
- return mOnClickActivity;
- }
-}
diff --git a/src/com/android/car/carlauncher/ContextualViewModel.java b/src/com/android/car/carlauncher/ContextualViewModel.java
deleted file mode 100644
index 23194c1..0000000
--- a/src/com/android/car/carlauncher/ContextualViewModel.java
+++ /dev/null
@@ -1,106 +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.car.carlauncher;
-
-import android.app.Application;
-import android.car.Car;
-import android.car.CarNotConnectedException;
-import android.car.CarProjectionManager;
-import android.car.CarProjectionManager.ProjectionStatusListener;
-import android.content.Context;
-import android.content.Intent;
-import android.graphics.drawable.Drawable;
-import android.os.UserManager;
-
-import androidx.annotation.Nullable;
-import androidx.annotation.VisibleForTesting;
-import androidx.lifecycle.AndroidViewModel;
-import androidx.lifecycle.LiveData;
-import androidx.lifecycle.MediatorLiveData;
-import androidx.lifecycle.MutableLiveData;
-import androidx.lifecycle.Observer;
-import androidx.lifecycle.Transformations;
-import androidx.lifecycle.ViewModel;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Objects;
-
-/**
- * Implementation {@link ViewModel} for {@link ContextualFragment}.
- *
- * Returns the first non-null {@link ContextualInfo} from a set of delegates.
- */
-public class ContextualViewModel extends AndroidViewModel {
- private final MediatorLiveData<ContextualInfo> mContextualInfo = new MediatorLiveData<>();
-
- private final List<LiveData<ContextualInfo>> mInfoDelegates;
-
- private Car mCar;
-
- public ContextualViewModel(Application application) {
- this(application, null);
- }
-
- @VisibleForTesting
- ContextualViewModel(Application application, CarProjectionManager carProjectionManager) {
- super(application);
-
- if (carProjectionManager == null) {
- mCar = Car.createCar(application);
- carProjectionManager =
- (CarProjectionManager) mCar.getCarManager(Car.PROJECTION_SERVICE);
- }
-
- mInfoDelegates =
- Collections.unmodifiableList(Arrays.asList(
- new ProjectionContextualInfoLiveData(application, carProjectionManager),
- new WeatherContextualInfoLiveData(application)
- ));
-
- Observer<Object> observer = x -> updateLiveData();
- for (LiveData<ContextualInfo> delegate : mInfoDelegates) {
- mContextualInfo.addSource(delegate, observer);
- }
- }
-
- @Override
- protected void onCleared() {
- if (mCar != null && mCar.isConnected()) {
- mCar.disconnect();
- mCar = null;
- }
- super.onCleared();
- }
-
- private void updateLiveData() {
- for (LiveData<ContextualInfo> delegate : mInfoDelegates) {
- ContextualInfo value = delegate.getValue();
- if (value != null) {
- mContextualInfo.setValue(value);
- return;
- }
- }
-
- mContextualInfo.setValue(null);
- }
-
- public LiveData<ContextualInfo> getContextualInfo() {
- return mContextualInfo;
- }
-}
diff --git a/src/com/android/car/carlauncher/LocalizedTextClock.java b/src/com/android/car/carlauncher/LocalizedTextClock.java
deleted file mode 100644
index 49b9666..0000000
--- a/src/com/android/car/carlauncher/LocalizedTextClock.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.android.car.carlauncher;
-
-import android.content.Context;
-import android.text.format.DateFormat;
-import android.util.AttributeSet;
-import android.widget.TextClock;
-
-import java.util.Locale;
-
-/**
- * {@link TextClock} implementation which expects a date format skeleton for
- * {@link android.R.styleable#TextClock_format12Hour} and
- * {@link android.R.styleable#TextClock_format24Hour} and applies the best format as determined by
- * {@link DateFormat#getBestDateTimePattern(java.util.Locale, String)}.
- */
-public class LocalizedTextClock extends TextClock {
-
- public LocalizedTextClock(Context context) {
- super(context);
- }
-
- public LocalizedTextClock(Context context, AttributeSet attrs) {
- super(context, attrs, 0);
- }
-
- public LocalizedTextClock(Context context, AttributeSet attrs, int defStyleAttr) {
- this(context, attrs, defStyleAttr, 0);
- }
-
- public LocalizedTextClock(Context context, AttributeSet attrs, int defStyleAttr,
- int defStyleRes) {
- super(context, attrs, defStyleAttr, defStyleRes);
- }
-
- @Override
- protected void onFinishInflate() {
- super.onFinishInflate();
- setFormat12Hour(DateFormat.getBestDateTimePattern(Locale.getDefault(),
- getFormat12Hour().toString()));
- setFormat24Hour(DateFormat.getBestDateTimePattern(Locale.getDefault(),
- getFormat24Hour().toString()));
- }
-}
diff --git a/src/com/android/car/carlauncher/ProjectionContextualInfoLiveData.java b/src/com/android/car/carlauncher/ProjectionContextualInfoLiveData.java
deleted file mode 100644
index bd3d466..0000000
--- a/src/com/android/car/carlauncher/ProjectionContextualInfoLiveData.java
+++ /dev/null
@@ -1,123 +0,0 @@
-package com.android.car.carlauncher;
-
-import android.car.CarProjectionManager;
-import android.car.projection.ProjectionStatus;
-import android.content.Context;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
-import android.util.Log;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.lifecycle.LiveData;
-
-import java.util.List;
-
-/** A {@link LiveData} of {@link ContextualInfo} on projection status. */
-class ProjectionContextualInfoLiveData extends LiveData<ContextualInfo>
- implements CarProjectionManager.ProjectionStatusListener {
- private static final String TAG = "ProjectionContext";
-
- private final Context mContext;
- private final CarProjectionManager mCarProjectionManager;
-
- ProjectionContextualInfoLiveData(
- Context context,
- CarProjectionManager carProjectionManager) {
- mContext = context;
- mCarProjectionManager = carProjectionManager;
- }
-
- @Override
- protected void onActive() {
- super.onActive();
- mCarProjectionManager.registerProjectionStatusListener(this);
- }
-
- @Override
- protected void onInactive() {
- mCarProjectionManager.unregisterProjectionStatusListener(this);
- super.onInactive();
- }
-
- @Override
- public void onProjectionStatusChanged(
- int state, @Nullable String packageName, @NonNull List<ProjectionStatus> details) {
- if (Log.isLoggable(TAG, Log.DEBUG)) {
- Log.d(TAG, "onProjectionStatusChanged state=" + state + " package=" + packageName);
- }
- if (state == ProjectionStatus.PROJECTION_STATE_INACTIVE || packageName == null) {
- setValue(null);
- return;
- }
-
- PackageManager pm = mContext.getPackageManager();
- ApplicationInfo applicationInfo;
- try {
- applicationInfo = pm.getApplicationInfo(packageName, 0);
- } catch (PackageManager.NameNotFoundException e) {
- Log.e(TAG, "Could not load projection package information", e);
- setValue(null);
- return;
- }
-
- setValue(
- new ContextualInfo(
- applicationInfo.loadIcon(pm),
- applicationInfo.loadLabel(pm),
- getStatusMessage(packageName, details),
- /* showClock= */ false,
- pm.getLaunchIntentForPackage(packageName)));
- }
-
- @Nullable
- private String getStatusMessage(
- String packageName, List<ProjectionStatus> details) {
- for (ProjectionStatus status : details) {
- if (packageName.equals(status.getPackageName())) {
- return getStatusMessage(status);
- }
- }
-
- return null;
- }
-
- @Nullable
- private String getStatusMessage(ProjectionStatus status) {
- // The status message is as follows:
- // - If there is an unambiguous "best" device, the name of that device.
- // "Unambiguous" is defined as only one projecting device, or no projecting devices
- // and only one non-projecting device.
- // - If there are multiple projecting or non-projecting devices, "N devices", where N
- // is the total number of projecting and non-projecting devices.
- // - If there are no devices at all, no message. This should not happen if projection
- // apps are behaving properly, but may happen in the event of a projection app bug.
- String projectingDevice = null;
- String nonProjectingDevice = null;
- int projectingDeviceCount = 0;
- int nonProjectingDeviceCount = 0;
- for (ProjectionStatus.MobileDevice device : status.getConnectedMobileDevices()) {
- if (device.isProjecting()) {
- projectingDevice = device.getName();
- projectingDeviceCount++;
- } else {
- nonProjectingDevice = device.getName();
- nonProjectingDeviceCount++;
- }
- }
-
- if (projectingDeviceCount == 1) {
- return projectingDevice;
- } else if (projectingDeviceCount == 0 && nonProjectingDeviceCount == 1) {
- return nonProjectingDevice;
- }
-
- int totalDeviceCount = projectingDeviceCount + nonProjectingDeviceCount;
- if (totalDeviceCount > 0) {
- return mContext.getResources().getQuantityString(
- R.plurals.projection_devices, totalDeviceCount, totalDeviceCount);
- } else {
- return null;
- }
- }
-}
diff --git a/src/com/android/car/carlauncher/TaskViewManager.java b/src/com/android/car/carlauncher/TaskViewManager.java
new file mode 100644
index 0000000..83a3167
--- /dev/null
+++ b/src/com/android/car/carlauncher/TaskViewManager.java
@@ -0,0 +1,89 @@
+/*
+ * 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.car.carlauncher;
+
+import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW;
+
+import static com.android.car.carlauncher.CarLauncher.TAG;
+import static com.android.wm.shell.ShellTaskOrganizer.TASK_LISTENER_TYPE_FULLSCREEN;
+
+import android.annotation.UiContext;
+import android.app.ActivityTaskManager;
+import android.app.TaskInfo;
+import android.content.Context;
+import android.util.Slog;
+import android.window.TaskAppearedInfo;
+
+import com.android.wm.shell.FullscreenTaskListener;
+import com.android.wm.shell.ShellTaskOrganizer;
+import com.android.wm.shell.TaskView;
+import com.android.wm.shell.TaskViewFactory;
+import com.android.wm.shell.TaskViewFactoryController;
+import com.android.wm.shell.common.HandlerExecutor;
+import com.android.wm.shell.common.SyncTransactionQueue;
+import com.android.wm.shell.common.TransactionPool;
+import com.android.wm.shell.startingsurface.StartingWindowController;
+import com.android.wm.shell.startingsurface.phone.PhoneStartingWindowTypeAlgorithm;
+
+import java.util.List;
+import java.util.function.Consumer;
+
+public final class TaskViewManager {
+ private static final boolean DBG = false;
+
+ private final Context mContext;
+ private final HandlerExecutor mExecutor;
+ private final TaskViewFactory mTaskViewFactory;
+
+ public TaskViewManager(@UiContext Context context, HandlerExecutor handlerExecutor) {
+ mContext = context;
+ mExecutor = handlerExecutor;
+ mTaskViewFactory = initWmShell();
+ }
+
+ private TaskViewFactory initWmShell() {
+ ShellTaskOrganizer taskOrganizer = new ShellTaskOrganizer(mExecutor, mContext);
+ TransactionPool transactionPool = new TransactionPool();
+ FullscreenTaskListener fullscreenTaskListener =
+ new FullscreenTaskListener(new SyncTransactionQueue(transactionPool, mExecutor));
+ taskOrganizer.addListenerForType(fullscreenTaskListener, TASK_LISTENER_TYPE_FULLSCREEN);
+ StartingWindowController startingController =
+ new StartingWindowController(mContext, mExecutor,
+ new PhoneStartingWindowTypeAlgorithm(), transactionPool);
+ taskOrganizer.initStartingWindow(startingController);
+ List<TaskAppearedInfo> taskAppearedInfos = taskOrganizer.registerOrganizer();
+ cleanUpExistingTaskViewTasks(taskAppearedInfos);
+
+ return new TaskViewFactoryController(taskOrganizer, mExecutor).asTaskViewFactory();
+ }
+
+ void createTaskView(Consumer<TaskView> onCreate) {
+ mTaskViewFactory.create(mContext, mExecutor, onCreate);
+ }
+
+ private static void cleanUpExistingTaskViewTasks(List<TaskAppearedInfo> taskAppearedInfos) {
+ ActivityTaskManager atm = ActivityTaskManager.getInstance();
+ for (TaskAppearedInfo taskAppearedInfo : taskAppearedInfos) {
+ TaskInfo taskInfo = taskAppearedInfo.getTaskInfo();
+ // Only TaskView tasks have WINDOWING_MODE_MULTI_WINDOW.
+ if (taskInfo.getWindowingMode() == WINDOWING_MODE_MULTI_WINDOW) {
+ if (DBG) Slog.d(TAG, "Found the dangling task, removing: " + taskInfo.taskId);
+ atm.removeTask(taskInfo.taskId);
+ }
+ }
+ }
+}
diff --git a/src/com/android/car/carlauncher/WeatherContextualInfoLiveData.java b/src/com/android/car/carlauncher/WeatherContextualInfoLiveData.java
deleted file mode 100644
index 96c9773..0000000
--- a/src/com/android/car/carlauncher/WeatherContextualInfoLiveData.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.android.car.carlauncher;
-
-import android.content.Context;
-import android.graphics.drawable.Drawable;
-import android.os.UserManager;
-
-import androidx.lifecycle.LiveData;
-
-/** A {@link LiveData} that returns placeholder weather {@link ContextualInfo}. */
-class WeatherContextualInfoLiveData extends LiveData<ContextualInfo> {
- private final Context mContext;
-
- WeatherContextualInfoLiveData(Context context) {
- mContext = context;
- }
-
- @Override
- protected void onActive() {
- super.onActive();
- setValue(
- new ContextualInfo(
- getWeatherIcon(),
- getGreeting(),
- getTemperature(),
- /* showClock= */ true,
- /* onClickActivity= */ null));
- }
-
- private Drawable getWeatherIcon() {
- return mContext.getDrawable(R.drawable.ic_partly_cloudy);
- }
-
- private CharSequence getGreeting() {
- UserManager userManager = UserManager.get(mContext);
- String userName = userManager.getUserName();
-
- if (userName != null) {
- return mContext.getString(R.string.greeting, userName);
- } else {
- return "";
- }
- }
-
- private CharSequence getTemperature() {
- return mContext.getText(R.string.temperature_empty);
- }
-}
diff --git a/src/com/android/car/carlauncher/homescreen/CardPresenter.java b/src/com/android/car/carlauncher/homescreen/CardPresenter.java
new file mode 100644
index 0000000..9637495
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/CardPresenter.java
@@ -0,0 +1,48 @@
+/*
+ * 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.car.carlauncher.homescreen;
+
+import androidx.fragment.app.Fragment;
+
+/**
+ * Abstract class for the Presenter for a card on the home screen.
+ */
+public abstract class CardPresenter implements HomeCardInterface.Presenter {
+
+ private HomeCardInterface.View mView;
+
+ @Override
+ public void setView(HomeCardInterface.View view) {
+ mView = view;
+ }
+
+ @Override
+ public void onModelUpdated(HomeCardInterface.Model model) {
+ if (model != null && model.getCardHeader() != null) {
+ mView.updateHeaderView(model.getCardHeader());
+ if (model.getCardContent() != null) {
+ mView.updateContentView(model.getCardContent());
+ }
+ } else {
+ mView.hideCard();
+ }
+ }
+
+ public Fragment getFragment() {
+ return mView.getFragment();
+ }
+}
diff --git a/src/com/android/car/carlauncher/homescreen/HomeCardFragment.java b/src/com/android/car/carlauncher/homescreen/HomeCardFragment.java
new file mode 100644
index 0000000..9b77c8d
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/HomeCardFragment.java
@@ -0,0 +1,304 @@
+/*
+ * 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.car.carlauncher.homescreen;
+
+import android.graphics.drawable.Drawable;
+import android.os.Bundle;
+import android.util.Size;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewStub;
+import android.widget.ImageButton;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.fragment.app.Fragment;
+
+import com.android.car.apps.common.CrossfadeImageView;
+import com.android.car.carlauncher.R;
+import com.android.car.carlauncher.homescreen.ui.CardContent;
+import com.android.car.carlauncher.homescreen.ui.CardHeader;
+import com.android.car.carlauncher.homescreen.ui.DescriptiveTextView;
+import com.android.car.carlauncher.homescreen.ui.DescriptiveTextWithControlsView;
+import com.android.car.carlauncher.homescreen.ui.TextBlockView;
+
+/**
+ * Abstract class for a {@link Fragment} that implements the Home App's View interface.
+ *
+ * {@link HomeCardInterface.View} classes that extend HomeCardFragment will override the update
+ * methods of the types of CardContent that they support. Each CardContent class corresponds to a
+ * layout shown on the card. The layout is a combination of xml files.
+ * {@link DescriptiveTextWithControlsView}: card_content_descriptive_text, card_content_button_trio
+ * {@link DescriptiveTextView}: card_content_descriptive_text, card_content_tap_for_more_text
+ * {@link TextBlockView}: card_content_text_block, card_content_tap_for_more_text
+ */
+public class HomeCardFragment extends Fragment implements HomeCardInterface.View {
+
+ private static final String TAG = "HomeFragment";
+ private HomeCardInterface.Presenter mPresenter;
+ private Size mSize;
+ private View mCardBackground;
+ private CrossfadeImageView mCardBackgroundImage;
+ private View mRootView;
+ private TextView mCardTitle;
+ private ImageView mCardIcon;
+
+ // Views from card_content_text_block.xml
+ private View mTextBlockLayoutView;
+ private TextView mTextBlock;
+ private TextView mTextBlockTapForMore;
+
+ // Views from card_content_descriptive_text_only.xml
+ private View mDescriptiveTextOnlyLayoutView;
+ private ImageView mDescriptiveTextOnlyOptionalImage;
+ private TextView mDescriptiveTextOnlyTitle;
+ private TextView mDescriptiveTextOnlySubtitle;
+ private TextView mDescriptiveTextOnlyTapForMore;
+
+ // Views from card_content_descriptive_text_with_controls.xml
+ private View mDescriptiveTextWithControlsLayoutView;
+ private ImageView mDescriptiveTextWithControlsOptionalImage;
+ private TextView mDescriptiveTextWithControlsTitle;
+ private TextView mDescriptiveTextWithControlsSubtitle;
+ private View mControlBarView;
+ private ImageButton mControlBarLeftButton;
+ private ImageButton mControlBarCenterButton;
+ private ImageButton mControlBarRightButton;
+
+ @Override
+ public void setPresenter(HomeCardInterface.Presenter presenter) {
+ mPresenter = presenter;
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ mRootView = inflater.inflate(R.layout.card_fragment, container, false);
+ mCardTitle = mRootView.findViewById(R.id.card_name);
+ mCardIcon = mRootView.findViewById(R.id.card_icon);
+ return mRootView;
+ }
+
+ @Override
+ public void onViewCreated(View view, Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+ mPresenter.onViewCreated();
+ mRootView.setOnClickListener(v -> mPresenter.onViewClicked(v));
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ if (mPresenter != null) {
+ mPresenter.onViewDestroyed();
+ }
+ mSize = null;
+ }
+
+ @Override
+ public Fragment getFragment() {
+ return this;
+ }
+
+ /**
+ * Returns the size of the card or null if the view hasn't yet been laid out
+ */
+ protected Size getCardSize() {
+ if (mSize == null && mRootView.isLaidOut()) {
+ mSize = new Size(mRootView.getWidth(), mRootView.getHeight());
+ }
+ return mSize;
+ }
+
+ /**
+ * Removes the audio card from view
+ */
+ @Override
+ public void hideCard() {
+ hideAllViews();
+ mRootView.setVisibility(View.GONE);
+ }
+
+ /**
+ * Updates the card's header: name and icon of source app
+ */
+ @Override
+ public void updateHeaderView(CardHeader header) {
+ requireActivity().runOnUiThread(() -> {
+ mRootView.setVisibility(View.VISIBLE);
+ mCardTitle.setText(header.getCardTitle());
+ mCardIcon.setImageDrawable(header.getCardIcon());
+ });
+ }
+
+ @Override
+ public final void updateContentView(CardContent content) {
+ requireActivity().runOnUiThread(() -> {
+ hideAllViews();
+ updateContentViewInternal(content);
+ });
+ }
+
+ /**
+ * Child classes can override this method for updating their specific types of card content
+ */
+ protected void updateContentViewInternal(CardContent content) {
+ switch (content.getType()) {
+ case DESCRIPTIVE_TEXT:
+ DescriptiveTextView descriptiveTextContent = (DescriptiveTextView) content;
+ updateDescriptiveTextOnlyView(descriptiveTextContent.getTitle(),
+ descriptiveTextContent.getSubtitle(), descriptiveTextContent.getImage(),
+ descriptiveTextContent.getFooter());
+ break;
+ case DESCRIPTIVE_TEXT_WITH_CONTROLS:
+ DescriptiveTextWithControlsView
+ descriptiveTextWithControlsContent =
+ (DescriptiveTextWithControlsView) content;
+ updateDescriptiveTextWithControlsView(descriptiveTextWithControlsContent.getTitle(),
+ descriptiveTextWithControlsContent.getSubtitle(),
+ descriptiveTextWithControlsContent.getImage(),
+ descriptiveTextWithControlsContent.getLeftControl(),
+ descriptiveTextWithControlsContent.getCenterControl(),
+ descriptiveTextWithControlsContent.getRightControl());
+ break;
+ case TEXT_BLOCK:
+ TextBlockView textBlockContent = (TextBlockView) content;
+ updateTextBlock(textBlockContent.getText(), textBlockContent.getFooter());
+ break;
+ }
+ }
+
+ protected final void updateDescriptiveTextOnlyView(CharSequence primaryText,
+ CharSequence secondaryText, Drawable optionalImage, CharSequence tapForMoreText) {
+ getDescriptiveTextOnlyLayoutView().setVisibility(View.VISIBLE);
+ mDescriptiveTextOnlyTitle.setText(primaryText);
+ mDescriptiveTextOnlySubtitle.setText(secondaryText);
+ mDescriptiveTextOnlyOptionalImage.setImageDrawable(optionalImage);
+ mDescriptiveTextOnlyOptionalImage.setVisibility(
+ optionalImage == null ? View.GONE : View.VISIBLE);
+ mDescriptiveTextOnlyTapForMore.setText(tapForMoreText);
+ mDescriptiveTextOnlyTapForMore.setVisibility(
+ tapForMoreText == null ? View.GONE : View.VISIBLE);
+ }
+
+ protected final void updateDescriptiveTextWithControlsView(CharSequence primaryText,
+ CharSequence secondaryText, Drawable optionalImage,
+ DescriptiveTextWithControlsView.Control leftButton,
+ DescriptiveTextWithControlsView.Control centerButton,
+ DescriptiveTextWithControlsView.Control rightButton) {
+ getDescriptiveTextWithControlsLayoutView().setVisibility(View.VISIBLE);
+ mDescriptiveTextWithControlsTitle.setText(primaryText);
+ mDescriptiveTextWithControlsSubtitle.setText(secondaryText);
+ mDescriptiveTextWithControlsOptionalImage.setImageDrawable(optionalImage);
+ mDescriptiveTextWithControlsOptionalImage.setVisibility(
+ optionalImage == null ? View.GONE : View.VISIBLE);
+
+ updateControlBarButton(leftButton, mControlBarLeftButton);
+ updateControlBarButton(centerButton, mControlBarCenterButton);
+ updateControlBarButton(rightButton, mControlBarRightButton);
+ }
+
+ private void updateControlBarButton(DescriptiveTextWithControlsView.Control buttonContent,
+ ImageButton buttonView) {
+ if (buttonContent != null) {
+ buttonView.setImageDrawable(buttonContent.getIcon());
+ buttonView.setOnClickListener(buttonContent.getOnClickListener());
+ buttonView.setVisibility(View.VISIBLE);
+ } else {
+ buttonView.setVisibility(View.GONE);
+ }
+ }
+
+ protected final void updateTextBlock(CharSequence mainText, CharSequence tapForMoreText) {
+ getTextBlockLayoutView().setVisibility(View.VISIBLE);
+ mTextBlock.setText(mainText);
+ mTextBlockTapForMore.setText(tapForMoreText);
+ mTextBlockTapForMore.setVisibility(tapForMoreText == null ? View.GONE : View.VISIBLE);
+ }
+
+ protected void hideAllViews() {
+ getTextBlockLayoutView().setVisibility(View.GONE);
+ getDescriptiveTextOnlyLayoutView().setVisibility(View.GONE);
+ getDescriptiveTextWithControlsLayoutView().setVisibility(View.GONE);
+ }
+
+ protected final View getRootView() {
+ return mRootView;
+ }
+
+ protected final View getCardBackground() {
+ if (mCardBackground == null) {
+ mCardBackground = getRootView().findViewById(R.id.card_background);
+ }
+ return mCardBackground;
+ }
+
+ protected final CrossfadeImageView getCardBackgroundImage() {
+ if (mCardBackgroundImage == null) {
+ mCardBackgroundImage = getCardBackground().findViewById(R.id.card_background_image);
+ }
+ return mCardBackgroundImage;
+ }
+
+ protected final View getDescriptiveTextOnlyLayoutView() {
+ if (mDescriptiveTextOnlyLayoutView == null) {
+ ViewStub stub = mRootView.findViewById(R.id.descriptive_text_layout);
+ mDescriptiveTextOnlyLayoutView = stub.inflate();
+ mDescriptiveTextOnlyTitle = mDescriptiveTextOnlyLayoutView.findViewById(
+ R.id.primary_text);
+ mDescriptiveTextOnlySubtitle = mDescriptiveTextOnlyLayoutView.findViewById(
+ R.id.secondary_text);
+ mDescriptiveTextOnlyOptionalImage = mDescriptiveTextOnlyLayoutView.findViewById(
+ R.id.optional_image);
+ mDescriptiveTextOnlyTapForMore = mDescriptiveTextOnlyLayoutView.findViewById(
+ R.id.tap_for_more_text);
+ }
+ return mDescriptiveTextOnlyLayoutView;
+ }
+
+ protected final View getDescriptiveTextWithControlsLayoutView() {
+ if (mDescriptiveTextWithControlsLayoutView == null) {
+ ViewStub stub = mRootView.findViewById(R.id.descriptive_text_with_controls_layout);
+ mDescriptiveTextWithControlsLayoutView = stub.inflate();
+ mDescriptiveTextWithControlsTitle = mDescriptiveTextWithControlsLayoutView.findViewById(
+ R.id.primary_text);
+ mDescriptiveTextWithControlsSubtitle =
+ mDescriptiveTextWithControlsLayoutView.findViewById(R.id.secondary_text);
+ mDescriptiveTextWithControlsOptionalImage =
+ mDescriptiveTextWithControlsLayoutView.findViewById(R.id.optional_image);
+ mControlBarView = mDescriptiveTextWithControlsLayoutView.findViewById(R.id.button_trio);
+ mControlBarLeftButton = mDescriptiveTextWithControlsLayoutView.findViewById(
+ R.id.button_left);
+ mControlBarCenterButton = mDescriptiveTextWithControlsLayoutView.findViewById(
+ R.id.button_center);
+ mControlBarRightButton = mDescriptiveTextWithControlsLayoutView.findViewById(
+ R.id.button_right);
+ }
+ return mDescriptiveTextWithControlsLayoutView;
+ }
+
+ private View getTextBlockLayoutView() {
+ if (mTextBlockLayoutView == null) {
+ ViewStub stub = mRootView.findViewById(R.id.text_block_layout);
+ mTextBlockLayoutView = stub.inflate();
+ mTextBlock = mTextBlockLayoutView.findViewById(R.id.text_block);
+ mTextBlockTapForMore = mTextBlockLayoutView.findViewById(R.id.tap_for_more_text);
+ }
+ return mTextBlockLayoutView;
+ }
+}
diff --git a/src/com/android/car/carlauncher/homescreen/HomeCardInterface.java b/src/com/android/car/carlauncher/homescreen/HomeCardInterface.java
new file mode 100644
index 0000000..8168147
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/HomeCardInterface.java
@@ -0,0 +1,160 @@
+/*
+ * 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.car.carlauncher.homescreen;
+
+import android.content.Context;
+
+import androidx.fragment.app.Fragment;
+
+import com.android.car.carlauncher.homescreen.ui.CardContent;
+import com.android.car.carlauncher.homescreen.ui.CardHeader;
+
+import java.util.List;
+
+/**
+ * Defines the interfaces for a card on the home app.
+ * The cards follow a Model-View-Presenter architectural design pattern to separate functionality
+ * into discrete components to be extensible and easily testable.
+ *
+ * The layout of a card is distinguished into two parts:
+ * (1) Header - the source of the card's data. This is the source app's name and app icon.
+ * (2) Content - the data itself. This could include text, an image, etc.
+ */
+public interface HomeCardInterface {
+
+ /**
+ * The View is what the user interacts with.
+ *
+ * The methods that the View exposes will be called by its Presenter. The View should
+ * only be responsible for providing a UI; the logic for determining the card's layout and
+ * content is handled by the presenter.
+ */
+ interface View {
+
+ /**
+ * Sets the {@link Presenter} that will manage this View.
+ */
+ void setPresenter(Presenter presenter);
+
+ /**
+ * Called by the Presenter to remove the entire card from view if there is no data to
+ * display.
+ */
+ void hideCard();
+
+ /**
+ * Called by the Presenter when there is a change in the source of the card's content.
+ * This updates the app name and app icon displayed on the card.
+ */
+ void updateHeaderView(CardHeader header);
+
+ /**
+ * Called by the Presenter to update the card's content.
+ */
+ void updateContentView(CardContent content);
+
+ /**
+ * Returns the {@link Fragment} with which the View is associated.
+ */
+ Fragment getFragment();
+ }
+
+ /**
+ * The Presenter connects the View to the Model.
+ *
+ * It accesses and formats the data from a Model and updates the View to display the data
+ */
+ interface Presenter {
+
+ /**
+ * Sets the {@link View}, which is the card's UI that the Presenter will update.
+ */
+ void setView(View view);
+
+
+ /**
+ * Sets the list of {@link Model} that the Presenter will use as sources of content.
+ */
+ void setModels(List<Model> models);
+
+ /**
+ * Called by the View when its view has been created.
+ * This signals the presenter to initialize the relevant models it will use as data sources
+ * and start listening for updates.
+ */
+ void onViewCreated();
+
+ /**
+ * Called by the View when it is destroyed to allow the presenter to clean up any models
+ */
+ void onViewDestroyed();
+
+ /**
+ * Called by the View when it is clicked
+ */
+ default void onViewClicked(android.view.View v) {};
+
+ /**
+ * Called by one of the Presenter's models when it has updated information to display on
+ * the card.
+ */
+ void onModelUpdated(Model model);
+ }
+
+ /**
+ * The Model defines the data to be displayed in a card on the home screen.
+ *
+ * The card's header is distinguished from the body as the body may update more frequently.
+ * For example, as a user listens to media from a single app, the header (source app)
+ * remains the same while the body (song title) changes.
+ */
+ interface Model {
+
+ /**
+ * Gets the {@link CardHeader} to display for the model.
+ * If there is no content to display, this returns null.
+ */
+ CardHeader getCardHeader();
+
+ /**
+ * Gets the {@link CardContent} to display for the model
+ */
+ CardContent getCardContent();
+
+ /**
+ * Sets the Presenter for the model. The model updates its presenter of changes and the
+ * presenter manages updating the UI.
+ */
+ void setPresenter(HomeCardInterface.Presenter presenter);
+
+ /**
+ * Called by the Presenter to create the Model when the View is created.
+ * Should be called after the Model's Presenter has been set with setPresenter
+ */
+ default void onCreate(Context context) {};
+
+ /**
+ * Called by the Presenter to destroy the Model when the View is destroyed
+ */
+ default void onDestroy(Context context) {};
+
+ /**
+ * Called by the Presenter to handle when the View is clicked
+ */
+ default void onClick(android.view.View view) {};
+ }
+}
diff --git a/src/com/android/car/carlauncher/homescreen/HomeCardModule.java b/src/com/android/car/carlauncher/homescreen/HomeCardModule.java
new file mode 100644
index 0000000..8083f87
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/HomeCardModule.java
@@ -0,0 +1,63 @@
+/*
+ * 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.car.carlauncher.homescreen;
+
+import android.annotation.IdRes;
+
+import androidx.lifecycle.ViewModelProvider;
+
+import com.android.car.carlauncher.homescreen.HomeCardInterface.Presenter;
+import com.android.car.carlauncher.homescreen.HomeCardInterface.View;
+
+import java.util.List;
+
+/**
+ * A HomeCardModule creates and provides the Model-View-Presenter structure that underlies cards
+ * on the home screen.
+ *
+ * The class should construct the {@link HomeCardInterface} View, Presenter, and Model(s) needed
+ * for the card and call their appropriate set methods. For the View: {@link
+ * View#setPresenter(Presenter)}. For the Presenter:
+ * {@link Presenter#setView(HomeCardInterface.View)},
+ * {@link Presenter#setModels(List)}
+ */
+public interface HomeCardModule {
+
+ /**
+ * Sets the {@link ViewModelProvider}. which provides {@link androidx.lifecycle.ViewModel}s for
+ * the scope of the {@link androidx.lifecycle.ViewModelStoreOwner} specified when constructed.
+ */
+ void setViewModelProvider(ViewModelProvider viewModelProvider);
+
+ /**
+ * Returns the id of the container view that will hold this card.
+ */
+ @IdRes
+ int getCardResId();
+
+ /**
+ * Returns the card's {@link Presenter}
+ */
+ CardPresenter getCardPresenter();
+
+
+ /**
+ * Returns the card's {@link View}
+ */
+ HomeCardFragment getCardView();
+
+}
diff --git a/src/com/android/car/carlauncher/homescreen/assistive/AssistiveCard.java b/src/com/android/car/carlauncher/homescreen/assistive/AssistiveCard.java
new file mode 100644
index 0000000..1aa98ee
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/assistive/AssistiveCard.java
@@ -0,0 +1,69 @@
+/*
+ * 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.car.carlauncher.homescreen.assistive;
+
+import androidx.lifecycle.ViewModelProvider;
+
+import com.android.car.carlauncher.R;
+import com.android.car.carlauncher.homescreen.CardPresenter;
+import com.android.car.carlauncher.homescreen.HomeCardFragment;
+import com.android.car.carlauncher.homescreen.HomeCardModule;
+
+import java.util.Arrays;
+import java.util.Collections;
+
+/**
+ * Home screen card that displays general assistive content including projection status and
+ * static weather data.
+ */
+public class AssistiveCard implements HomeCardModule {
+
+ private ViewModelProvider mViewModelProvider;
+ private AssistiveCardPresenter mAssistiveCardPresenter;
+ private HomeCardFragment mAssistiveCardView;
+
+ @Override
+ public void setViewModelProvider(ViewModelProvider viewModelProvider) {
+ mViewModelProvider = viewModelProvider;
+ }
+
+ @Override
+ public int getCardResId() {
+ return R.id.top_card;
+ }
+
+ @Override
+ public CardPresenter getCardPresenter() {
+ if (mAssistiveCardPresenter == null) {
+ mAssistiveCardPresenter = new AssistiveCardPresenter();
+ mAssistiveCardPresenter.setModels(
+ Collections.unmodifiableList(
+ Arrays.asList(new ProjectionModel(), new FakeWeatherModel())));
+ }
+ return mAssistiveCardPresenter;
+ }
+
+ @Override
+ public HomeCardFragment getCardView() {
+ if (mAssistiveCardView == null) {
+ mAssistiveCardView = new HomeCardFragment();
+ getCardPresenter().setView(mAssistiveCardView);
+ mAssistiveCardView.setPresenter(getCardPresenter());
+ }
+ return mAssistiveCardView;
+ }
+}
diff --git a/src/com/android/car/carlauncher/homescreen/assistive/AssistiveCardPresenter.java b/src/com/android/car/carlauncher/homescreen/assistive/AssistiveCardPresenter.java
new file mode 100644
index 0000000..92f8eb4
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/assistive/AssistiveCardPresenter.java
@@ -0,0 +1,95 @@
+/*
+ * 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.car.carlauncher.homescreen.assistive;
+
+import android.view.View;
+
+import com.android.car.carlauncher.homescreen.CardPresenter;
+import com.android.car.carlauncher.homescreen.HomeCardInterface;
+
+import java.util.List;
+
+/**
+ * The {@link CardPresenter} for an assistive card.
+ */
+public class AssistiveCardPresenter extends CardPresenter {
+
+ private HomeCardInterface.Model mCurrentModel;
+ private List<HomeCardInterface.Model> mModels;
+
+ @Override
+ public void setModels(List<HomeCardInterface.Model> models) {
+ mModels = models;
+ }
+
+ /**
+ * Called when the View is created
+ */
+ @Override
+ public void onViewCreated() {
+ for (HomeCardInterface.Model model : mModels) {
+ model.setPresenter(this);
+ model.onCreate(getFragment().requireContext());
+ }
+ }
+
+ /**
+ * Called when the View is destroyed
+ */
+ @Override
+ public void onViewDestroyed() {
+ if (mModels != null) {
+ for (HomeCardInterface.Model model : mModels) {
+ model.onDestroy(getFragment().requireContext());
+ }
+ }
+ }
+
+ /**
+ * Called when the View is clicked
+ */
+ @Override
+ public void onViewClicked(View v) {
+ mCurrentModel.onClick(v);
+ }
+
+ /**
+ * Called when a Model is updated.
+ */
+ @Override
+ public void onModelUpdated(HomeCardInterface.Model model) {
+ if (model.getCardHeader() == null) {
+ if (mCurrentModel != null && model.getClass() == mCurrentModel.getClass()) {
+ if (mModels != null) {
+ // Check if any other models have content to display
+ for (HomeCardInterface.Model candidate : mModels) {
+ if (candidate.getCardHeader() != null) {
+ mCurrentModel = candidate;
+ super.onModelUpdated(candidate);
+ return;
+ }
+ }
+ }
+ } else {
+ // Otherwise, another model is already on display,
+ return;
+ }
+ }
+ mCurrentModel = model;
+ super.onModelUpdated(model);
+ }
+}
diff --git a/src/com/android/car/carlauncher/homescreen/assistive/FakeWeatherModel.java b/src/com/android/car/carlauncher/homescreen/assistive/FakeWeatherModel.java
new file mode 100644
index 0000000..45d6596
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/assistive/FakeWeatherModel.java
@@ -0,0 +1,63 @@
+/*
+ * 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.car.carlauncher.homescreen.assistive;
+
+import android.content.Context;
+import android.content.res.Resources;
+
+import com.android.car.carlauncher.R;
+import com.android.car.carlauncher.homescreen.HomeCardInterface;
+import com.android.car.carlauncher.homescreen.ui.CardContent;
+import com.android.car.carlauncher.homescreen.ui.CardHeader;
+import com.android.car.carlauncher.homescreen.ui.DescriptiveTextView;
+
+/**
+ * Displays static weather information to provide default content for the assistive card.
+ */
+public class FakeWeatherModel implements HomeCardInterface.Model {
+
+ private HomeCardInterface.Presenter mPresenter;
+ private CardHeader mCardHeader;
+ private DescriptiveTextView mCardContent;
+
+ @Override
+ public void onCreate(Context context) {
+ mCardHeader = new CardHeader(context.getString(R.string.weather_app_name),
+ context.getDrawable(R.drawable.ic_partly_cloudy));
+ mCardContent = new DescriptiveTextView(
+ /* image= */ context.getDrawable(R.drawable.ic_partly_cloudy),
+ /* title= */ context.getString(R.string.fake_weather_main_text),
+ /* subtitle= */ null,
+ /* footer= */ context.getString(R.string.fake_weather_footer_text));
+ mPresenter.onModelUpdated(this);
+ }
+
+ @Override
+ public CardHeader getCardHeader() {
+ return mCardHeader;
+ }
+
+ @Override
+ public CardContent getCardContent() {
+ return mCardContent;
+ }
+
+ @Override
+ public void setPresenter(HomeCardInterface.Presenter presenter) {
+ mPresenter = presenter;
+ }
+}
diff --git a/src/com/android/car/carlauncher/homescreen/assistive/ProjectionModel.java b/src/com/android/car/carlauncher/homescreen/assistive/ProjectionModel.java
new file mode 100644
index 0000000..97c7f2c
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/assistive/ProjectionModel.java
@@ -0,0 +1,193 @@
+/*
+ * 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.car.carlauncher.homescreen.assistive;
+
+import android.annotation.Nullable;
+import android.car.Car;
+import android.car.CarProjectionManager;
+import android.car.projection.ProjectionStatus;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.res.Resources;
+import android.graphics.drawable.Drawable;
+import android.util.Log;
+import android.view.View;
+import android.widget.Toast;
+
+import com.android.car.carlauncher.homescreen.HomeCardInterface;
+import com.android.car.carlauncher.R;
+import com.android.car.carlauncher.homescreen.ui.CardContent;
+import com.android.car.carlauncher.homescreen.ui.CardHeader;
+import com.android.car.carlauncher.homescreen.ui.DescriptiveTextView;
+
+import java.util.List;
+
+/**
+ * The {@link HomeCardInterface.Model} for projection status
+ */
+public class ProjectionModel implements CarProjectionManager.ProjectionStatusListener,
+ HomeCardInterface.Model {
+
+ private static final String TAG = "ProjectionModel";
+
+ private HomeCardInterface.Presenter mPresenter;
+ private Car mCar;
+ private CarProjectionManager mCarProjectionManager;
+ private PackageManager mPackageManager;
+ private Resources mResources;
+
+ private CharSequence mAppName;
+ private Drawable mAppIcon;
+ private CharSequence mLaunchMessage;
+ private CharSequence mStatusMessage;
+ private CharSequence mTapToLaunchText;
+ private Intent mIntent;
+
+ @Override
+ public void onCreate(Context context) {
+ if (mCar == null) {
+ mCar = Car.createCar(context);
+ mCarProjectionManager = (CarProjectionManager) mCar.getCarManager(
+ Car.PROJECTION_SERVICE);
+ }
+ mPackageManager = context.getPackageManager();
+ mResources = context.getResources();
+
+ mCarProjectionManager.registerProjectionStatusListener(this);
+ mLaunchMessage = context.getResources().getString(R.string.projected_launch_text);
+ mTapToLaunchText = context.getResources().getString(R.string.tap_to_launch_text);
+ }
+
+ @Override
+ public void onDestroy(Context context) {
+ if (mCar != null) {
+ mCar.disconnect();
+ }
+ if (mCarProjectionManager != null) {
+ mCarProjectionManager.unregisterProjectionStatusListener(this);
+ }
+ }
+
+ @Override
+ public CardHeader getCardHeader() {
+ return mAppName == null ? null : new CardHeader(mAppName, mAppIcon);
+ }
+
+ @Override
+ public CardContent getCardContent() {
+ return mAppName == null ? null : new DescriptiveTextView(mAppIcon, mLaunchMessage,
+ mStatusMessage, mTapToLaunchText);
+ }
+
+ @Override
+ public void onClick(View v) {
+ if (mIntent.resolveActivity(v.getContext().getPackageManager()) != null) {
+ v.getContext().startActivity(mIntent);
+ } else {
+ Log.e(TAG, "No activity component found to handle intent with action: "
+ + mIntent.getAction());
+ Toast.makeText(v.getContext(),
+ mResources.getString(R.string.projected_onclick_launch_error_toast_text),
+ Toast.LENGTH_SHORT).show();
+ }
+ }
+
+ @Override
+ public void setPresenter(HomeCardInterface.Presenter presenter) {
+ mPresenter = presenter;
+ }
+
+ @Override
+ public void onProjectionStatusChanged(int state, String packageName,
+ List<ProjectionStatus> details) {
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Log.d(TAG, "onProjectionStatusChanged state=" + state + " package=" + packageName);
+ }
+ if (state == ProjectionStatus.PROJECTION_STATE_INACTIVE || packageName == null) {
+ if (mAppName != null) {
+ mAppName = null;
+ mPresenter.onModelUpdated(this);
+ }
+ return;
+ }
+
+ ApplicationInfo applicationInfo;
+ try {
+ applicationInfo = mPackageManager.getApplicationInfo(packageName, 0);
+ } catch (PackageManager.NameNotFoundException e) {
+ Log.e(TAG, "Could not load projection package information", e);
+ return;
+ }
+
+ mAppName = applicationInfo.loadLabel(mPackageManager);
+ mAppIcon = applicationInfo.loadIcon(mPackageManager);
+ mStatusMessage = getStatusMessage(packageName, details);
+ mIntent = mPackageManager.getLaunchIntentForPackage(packageName);
+ mPresenter.onModelUpdated(this);
+ }
+
+ @Nullable
+ private String getStatusMessage(String packageName, List<ProjectionStatus> details) {
+ for (ProjectionStatus status : details) {
+ if (packageName.equals(status.getPackageName())) {
+ return getStatusMessage(status);
+ }
+ }
+ return null;
+ }
+
+ @Nullable
+ private String getStatusMessage(ProjectionStatus status) {
+ // The status message is as follows:
+ // - If there is an unambiguous "best" device, the name of that device.
+ // "Unambiguous" is defined as only one projecting device, or no projecting devices
+ // and only one non-projecting device.
+ // - If there are multiple projecting or non-projecting devices, "N devices", where N
+ // is the total number of projecting and non-projecting devices.
+ // - If there are no devices at all, no message. This should not happen if projection
+ // apps are behaving properly, but may happen in the event of a projection app bug.
+ String projectingDevice = null;
+ String nonProjectingDevice = null;
+ int projectingDeviceCount = 0;
+ int nonProjectingDeviceCount = 0;
+ for (ProjectionStatus.MobileDevice device : status.getConnectedMobileDevices()) {
+ if (device.isProjecting()) {
+ projectingDevice = device.getName();
+ projectingDeviceCount++;
+ } else {
+ nonProjectingDevice = device.getName();
+ nonProjectingDeviceCount++;
+ }
+ }
+
+ if (projectingDeviceCount == 1) {
+ return projectingDevice;
+ } else if (projectingDeviceCount == 0 && nonProjectingDeviceCount == 1) {
+ return nonProjectingDevice;
+ }
+
+ int totalDeviceCount = projectingDeviceCount + nonProjectingDeviceCount;
+ if (totalDeviceCount > 0) {
+ return mResources.getQuantityString(R.plurals.projection_devices, totalDeviceCount,
+ totalDeviceCount);
+ } else {
+ return null;
+ }
+ }
+}
diff --git a/src/com/android/car/carlauncher/homescreen/audio/AudioCard.java b/src/com/android/car/carlauncher/homescreen/audio/AudioCard.java
new file mode 100644
index 0000000..2f3ea44
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/audio/AudioCard.java
@@ -0,0 +1,80 @@
+/*
+ * 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.car.carlauncher.homescreen.audio;
+
+import android.os.SystemClock;
+import android.util.Log;
+
+import androidx.lifecycle.ViewModelProvider;
+
+import com.android.car.carlauncher.R;
+import com.android.car.carlauncher.homescreen.CardPresenter;
+import com.android.car.carlauncher.homescreen.HomeCardFragment;
+import com.android.car.carlauncher.homescreen.HomeCardModule;
+
+import java.util.Arrays;
+import java.util.Collections;
+
+/**
+ * Home screen card that displays audio related content
+ */
+public class AudioCard implements HomeCardModule {
+
+ private static final String TAG = "HomeScreenAudioCard";
+
+ private ViewModelProvider mViewModelProvider;
+ private HomeAudioCardPresenter mAudioCardPresenter;
+ private AudioFragment mAudioCardView;
+
+ @Override
+ public void setViewModelProvider(ViewModelProvider viewModelProvider) {
+ mViewModelProvider = viewModelProvider;
+ }
+
+ @Override
+ public int getCardResId() {
+ return R.id.bottom_card;
+ }
+
+ @Override
+ public CardPresenter getCardPresenter() {
+ if (mAudioCardPresenter == null) {
+ mAudioCardPresenter = new HomeAudioCardPresenter();
+ if (mViewModelProvider == null) {
+ Log.w(TAG, "No ViewModelProvider set. Cannot get MediaViewModel");
+ mAudioCardPresenter.setModels(
+ Collections.unmodifiableList(Collections.singletonList(
+ new InCallModel(SystemClock.elapsedRealtimeClock()))));
+ } else {
+ mAudioCardPresenter.setModels(Collections.unmodifiableList(Arrays.asList(
+ mViewModelProvider.get(MediaViewModel.class),
+ new InCallModel(SystemClock.elapsedRealtimeClock()))));
+ }
+ }
+ return mAudioCardPresenter;
+ }
+
+ @Override
+ public HomeCardFragment getCardView() {
+ if (mAudioCardView == null) {
+ mAudioCardView = new AudioFragment();
+ getCardPresenter().setView(mAudioCardView);
+ mAudioCardView.setPresenter(getCardPresenter());
+ }
+ return mAudioCardView;
+ }
+}
diff --git a/src/com/android/car/carlauncher/homescreen/audio/AudioFragment.java b/src/com/android/car/carlauncher/homescreen/audio/AudioFragment.java
new file mode 100644
index 0000000..1a39c23
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/audio/AudioFragment.java
@@ -0,0 +1,146 @@
+/*
+ * Copyright (C) 2020 Google Inc.
+ *
+ * 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.car.carlauncher.homescreen.audio;
+
+import android.graphics.Bitmap;
+import android.graphics.drawable.Drawable;
+import android.os.Bundle;
+import android.util.Size;
+import android.view.View;
+import android.view.ViewStub;
+import android.widget.Chronometer;
+import android.widget.TextView;
+
+import com.android.car.apps.common.BitmapUtils;
+import com.android.car.apps.common.ImageUtils;
+import com.android.car.carlauncher.R;
+import com.android.car.carlauncher.homescreen.HomeCardFragment;
+import com.android.car.carlauncher.homescreen.HomeCardInterface;
+import com.android.car.carlauncher.homescreen.ui.CardContent;
+import com.android.car.carlauncher.homescreen.ui.DescriptiveTextWithControlsView;
+
+
+/**
+ * {@link HomeCardInterface.View} for the audio card. Displays and controls the current audio source
+ * such as the currently playing (or last played) media item or an ongoing phone call.
+ */
+public class AudioFragment extends HomeCardFragment {
+
+ private HomeAudioCardPresenter mPresenter;
+ private Chronometer mChronometer;
+ private View mChronometerSeparator;
+ private float mBlurRadius;
+
+ // Views from card_content_media.xml, which is used only for the media card
+ private View mMediaLayoutView;
+ private TextView mMediaTitle;
+ private TextView mMediaSubtitle;
+
+ @Override
+ public void setPresenter(HomeCardInterface.Presenter presenter) {
+ super.setPresenter(presenter);
+ mPresenter = (HomeAudioCardPresenter) presenter;
+ }
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ mBlurRadius = getResources().getFloat(R.dimen.card_background_image_blur_radius);
+ }
+
+ @Override
+ public void updateContentViewInternal(CardContent content) {
+ if (content.getType() == CardContent.HomeCardContentType.DESCRIPTIVE_TEXT_WITH_CONTROLS) {
+ DescriptiveTextWithControlsView audioContent =
+ (DescriptiveTextWithControlsView) content;
+ updateBackgroundImage(audioContent.getImage());
+ if (audioContent.getCenterControl() == null) {
+ updateMediaView(audioContent.getTitle(), audioContent.getSubtitle());
+ } else {
+ updateDescriptiveTextWithControlsView(audioContent.getTitle(),
+ audioContent.getSubtitle(),
+ /* optionalImage= */ null, audioContent.getLeftControl(),
+ audioContent.getCenterControl(), audioContent.getRightControl());
+ updateAudioDuration(audioContent);
+ }
+ } else {
+ super.updateContentViewInternal(content);
+ }
+ }
+
+ @Override
+ protected void hideAllViews() {
+ super.hideAllViews();
+ getCardBackground().setVisibility(View.GONE);
+ getMediaLayoutView().setVisibility(View.GONE);
+ }
+
+ private Chronometer getChronometer() {
+ if (mChronometer == null) {
+ mChronometer = getDescriptiveTextWithControlsLayoutView().findViewById(
+ R.id.optional_timer);
+ mChronometerSeparator = getDescriptiveTextWithControlsLayoutView().findViewById(
+ R.id.optional_timer_separator);
+ }
+ return mChronometer;
+ }
+
+ private View getMediaLayoutView() {
+ if (mMediaLayoutView == null) {
+ ViewStub stub = getRootView().findViewById(R.id.media_layout);
+ mMediaLayoutView = stub.inflate();
+ mMediaTitle = mMediaLayoutView.findViewById(R.id.primary_text);
+ mMediaSubtitle = mMediaLayoutView.findViewById(R.id.secondary_text);
+ View mediaControlBarView = mMediaLayoutView.findViewById(
+ R.id.media_playback_controls_bar);
+ mPresenter.initializeControlsActionBar(mediaControlBarView);
+ }
+ return mMediaLayoutView;
+ }
+
+
+ private void updateBackgroundImage(Drawable image) {
+ if (image != null && getCardSize() != null) {
+ int maxDimen = Math.max(getCardSize().getWidth(), getCardSize().getHeight());
+ Size scaledSize = new Size(maxDimen, maxDimen);
+ Bitmap imageBitmap = BitmapUtils.fromDrawable(image, scaledSize);
+ Bitmap blurredBackground = ImageUtils.blur(getContext(), imageBitmap, scaledSize,
+ mBlurRadius);
+
+ getCardBackgroundImage().setImageBitmap(blurredBackground, /* showAnimation= */ true);
+ getCardBackground().setVisibility(View.VISIBLE);
+ }
+ }
+
+ private void updateMediaView(CharSequence title, CharSequence subtitle) {
+ getMediaLayoutView().setVisibility(View.VISIBLE);
+ mMediaTitle.setText(title);
+ mMediaSubtitle.setText(subtitle);
+ }
+
+ private void updateAudioDuration(DescriptiveTextWithControlsView content) {
+ if (content.getStartTime() > 0) {
+ getChronometer().setVisibility(View.VISIBLE);
+ getChronometer().setBase(content.getStartTime());
+ getChronometer().start();
+ mChronometerSeparator.setVisibility(View.VISIBLE);
+ } else {
+ getChronometer().setVisibility(View.GONE);
+ mChronometerSeparator.setVisibility(View.GONE);
+ }
+ }
+}
diff --git a/src/com/android/car/carlauncher/homescreen/audio/HomeAudioCardPresenter.java b/src/com/android/car/carlauncher/homescreen/audio/HomeAudioCardPresenter.java
new file mode 100644
index 0000000..3398389
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/audio/HomeAudioCardPresenter.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2020 Google Inc.
+ *
+ * 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.car.carlauncher.homescreen.audio;
+
+import android.view.View;
+
+import com.android.car.carlauncher.homescreen.CardPresenter;
+import com.android.car.carlauncher.homescreen.HomeCardInterface;
+import com.android.car.media.common.PlaybackControlsActionBar;
+
+import java.util.List;
+
+/**
+ * The {@link CardPresenter} for an audio card.
+ *
+ * For the audio card, the {@link AudioFragment} implements the View and displays information on
+ * media from a {@link MediaViewModel}.
+ */
+public class HomeAudioCardPresenter extends CardPresenter {
+
+ private HomeCardInterface.Model mCurrentModel;
+ private List<HomeCardInterface.Model> mModelList;
+ private MediaViewModel mMediaViewModel;
+
+ @Override
+ public void setModels(List<HomeCardInterface.Model> models) {
+ mModelList = models;
+ }
+
+ /**
+ * Called when the View is created
+ */
+ @Override
+ public void onViewCreated() {
+ for (HomeCardInterface.Model model : mModelList) {
+ if (model.getClass() == MediaViewModel.class) {
+ mMediaViewModel = (MediaViewModel) model;
+ }
+ model.setPresenter(this);
+ model.onCreate(getFragment().requireContext());
+ }
+ }
+
+ /**
+ * Called when the View is destroyed
+ */
+ @Override
+ public void onViewDestroyed() {
+ if (mModelList != null) {
+ for (HomeCardInterface.Model model : mModelList) {
+ model.onDestroy(getFragment().requireContext());
+ }
+ }
+ }
+
+ /**
+ * Called when the View is clicked
+ */
+ @Override
+ public void onViewClicked(View v) {
+ mCurrentModel.onClick(v);
+ }
+
+ /**
+ * Updates the View appropriately when a Model has new content.
+ *
+ * If the updated model has content, it is displayed, regardless of what is currently shown on
+ * the card. Otherwise if the model on display is updating to empty content (eg. when a call
+ * ends, the InCallModel header and content are updated to null), default to showing the media
+ * model if it has content.
+ */
+ @Override
+ public void onModelUpdated(HomeCardInterface.Model model) {
+ // Null card header indicates the model has no content to display
+ if (model.getCardHeader() == null) {
+ if (mCurrentModel != null && model.getClass() == mCurrentModel.getClass()) {
+ // If the model currently on display is updating to empty content, check if there
+ // is media content to display. If there is no media content the super method is
+ // called with empty content, which hides the card.
+ if (mMediaViewModel != null && mMediaViewModel.getCardHeader() != null) {
+ mCurrentModel = mMediaViewModel;
+ super.onModelUpdated(mMediaViewModel);
+ return;
+ }
+ } else {
+ // Otherwise, another model is already on display, so don't update with this
+ // empty content since that would hide the card.
+ return;
+ }
+ }
+ mCurrentModel = model;
+ super.onModelUpdated(model);
+ }
+
+ void initializeControlsActionBar(View actionBar) {
+ // TODO(b/159452592): implement media control bar instead of using PlaybackControlsActionBar
+ // The PlaybackControlsActionBar requires direct access to the PlaybackViewModel, which
+ // directly connects a View to a Model. To fit the design of the home app, interactions
+ // should be mediated by the HomeAudioCardPresenter instead. Using these existing classes
+ // for now until the logic can be brought into the MediaViewModel.
+ ((PlaybackControlsActionBar) actionBar).setModel(mMediaViewModel.getPlaybackViewModel(),
+ getFragment().getViewLifecycleOwner());
+ }
+}
diff --git a/src/com/android/car/carlauncher/homescreen/audio/InCallModel.java b/src/com/android/car/carlauncher/homescreen/audio/InCallModel.java
new file mode 100644
index 0000000..5421cb9
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/audio/InCallModel.java
@@ -0,0 +1,271 @@
+/*
+ * Copyright (C) 2020 Google Inc.
+ *
+ * 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.car.carlauncher.homescreen.audio;
+
+import android.Manifest;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.content.pm.PackageManager;
+import android.graphics.drawable.Drawable;
+import android.os.IBinder;
+import android.telecom.Call;
+import android.telecom.TelecomManager;
+import android.util.Log;
+import android.view.View;
+
+import androidx.core.content.ContextCompat;
+
+import com.android.car.carlauncher.R;
+import com.android.car.carlauncher.homescreen.HomeCardInterface;
+import com.android.car.carlauncher.homescreen.audio.telecom.InCallServiceImpl;
+import com.android.car.carlauncher.homescreen.ui.CardContent;
+import com.android.car.carlauncher.homescreen.ui.CardHeader;
+import com.android.car.carlauncher.homescreen.ui.DescriptiveTextWithControlsView;
+import com.android.car.telephony.common.CallDetail;
+import com.android.car.telephony.common.TelecomUtils;
+import com.android.internal.annotations.VisibleForTesting;
+
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.time.Clock;
+import java.util.concurrent.CompletableFuture;
+
+/**
+ * The {@link HomeCardInterface.Model} for ongoing phone calls.
+ */
+public class InCallModel implements HomeCardInterface.Model, InCallServiceImpl.InCallListener {
+
+ private static final String TAG = "InCallModel";
+ private static final boolean DEBUG = false;
+
+ private Context mContext;
+ private TelecomManager mTelecomManager;
+ private final Clock mElapsedTimeClock;
+ private Call mCurrentCall;
+ private boolean mMuteCallToggle = true;
+ private CompletableFuture<Void> mPhoneNumberInfoFuture;
+
+ private InCallServiceImpl mInCallService;
+ private HomeCardInterface.Presenter mPresenter;
+
+ private CardHeader mCardHeader;
+ private CardContent mCardContent;
+ private CharSequence mOngoingCallSubtitle;
+ private DescriptiveTextWithControlsView.Control mMuteButton;
+ private DescriptiveTextWithControlsView.Control mEndCallButton;
+ private DescriptiveTextWithControlsView.Control mDialpadButton;
+
+ private final ServiceConnection mInCallServiceConnection = new ServiceConnection() {
+ @Override
+ public void onServiceConnected(ComponentName name, IBinder service) {
+ if (DEBUG) Log.d(TAG, "onServiceConnected: " + name + ", service: " + service);
+ mInCallService = ((InCallServiceImpl.LocalBinder) service).getService();
+ mInCallService.addListener(InCallModel.this);
+ }
+
+ @Override
+ public void onServiceDisconnected(ComponentName name) {
+ if (DEBUG) Log.d(TAG, "onServiceDisconnected: " + name);
+ mInCallService = null;
+ }
+ };
+
+ private Call.Callback mCallback = new Call.Callback() {
+ @Override
+ public void onStateChanged(Call call, int state) {
+ super.onStateChanged(call, state);
+ if (state == Call.STATE_ACTIVE) {
+ mCurrentCall = call;
+ mMuteCallToggle = true;
+ CallDetail callDetails = CallDetail.fromTelecomCallDetail(call.getDetails());
+ // If the home app does not have permission to read contacts, just display the
+ // phone number
+ if (ContextCompat.checkSelfPermission(mContext, Manifest.permission.READ_CONTACTS)
+ != PackageManager.PERMISSION_GRANTED) {
+ updateModelWithPhoneNumber(callDetails.getNumber());
+ return;
+ }
+ if (mPhoneNumberInfoFuture != null) {
+ mPhoneNumberInfoFuture.cancel(/* mayInterruptIfRunning= */ true);
+ }
+ mPhoneNumberInfoFuture = TelecomUtils.getPhoneNumberInfo(mContext,
+ callDetails.getNumber())
+ .thenAcceptAsync(x -> updateModelWithContact(x),
+ mContext.getMainExecutor());
+ }
+ }
+ };
+
+ public InCallModel(Clock elapsedTimeClock) {
+ mElapsedTimeClock = elapsedTimeClock;
+ }
+
+ @Override
+ public void onCreate(Context context) {
+ mContext = context;
+ mTelecomManager = context.getSystemService(TelecomManager.class);
+ mOngoingCallSubtitle = context.getResources().getString(R.string.ongoing_call_text);
+ initializeAudioControls();
+ try {
+ PackageManager pm = context.getPackageManager();
+ Drawable appIcon = pm.getApplicationIcon(mTelecomManager.getDefaultDialerPackage());
+ CharSequence appName = pm.getApplicationLabel(
+ pm.getApplicationInfo(mTelecomManager.getDefaultDialerPackage(), /* flags = */
+ 0));
+ mCardHeader = new CardHeader(appName, appIcon);
+ } catch (PackageManager.NameNotFoundException e) {
+ Log.w(TAG, "No default dialer package found", e);
+ }
+
+ Intent intent = new Intent(context, InCallServiceImpl.class);
+ intent.setAction(InCallServiceImpl.ACTION_LOCAL_BIND);
+ context.getApplicationContext().bindService(intent, mInCallServiceConnection,
+ Context.BIND_AUTO_CREATE);
+ }
+
+ @Override
+ public void onDestroy(Context context) {
+ if (mInCallService != null) {
+ context.getApplicationContext().unbindService(mInCallServiceConnection);
+ mInCallService = null;
+ }
+ if (mPhoneNumberInfoFuture != null) {
+ mPhoneNumberInfoFuture.cancel(/* mayInterruptIfRunning= */true);
+ }
+ }
+
+ @Override
+ public void setPresenter(HomeCardInterface.Presenter presenter) {
+ mPresenter = presenter;
+ }
+
+ @Override
+ public CardHeader getCardHeader() {
+ return mCardContent == null ? null : mCardHeader;
+ }
+
+ @Override
+ public CardContent getCardContent() {
+ return mCardContent;
+ }
+
+ /**
+ * Clicking the card opens the default dialer application that fills the role of {@link
+ * android.app.role.RoleManager#ROLE_DIALER}. This application will have an appropriate UI to
+ * display as one of the requirements to fill this role is to provide an ongoing call UI.
+ */
+ @Override
+ public void onClick(View view) {
+ PackageManager pm = mContext.getPackageManager();
+ Intent intent = pm.getLaunchIntentForPackage(mTelecomManager.getDefaultDialerPackage());
+ if (intent != null) {
+ mContext.startActivity(intent);
+ } else {
+ if (DEBUG) {
+ Log.d(TAG, "No launch intent found for dialer package: "
+ + mTelecomManager.getDefaultDialerPackage());
+ }
+ }
+ }
+
+ /**
+ * When a {@link Call} is added, notify the {@link HomeCardInterface.Presenter} to update the
+ * card to display content on the ongoing phone call.
+ */
+ @Override
+ public void onCallAdded(Call call) {
+ if (call != null) {
+ call.registerCallback(mCallback);
+ }
+ }
+
+ /**
+ * When a {@link Call} is removed, notify the {@link HomeCardInterface.Presenter} to update the
+ * card to remove the content on the no longer ongoing phone call.
+ */
+ @Override
+ public void onCallRemoved(Call call) {
+ mCurrentCall = null;
+ mCardContent = null;
+ mPresenter.onModelUpdated(this);
+ if (call != null) {
+ call.unregisterCallback(mCallback);
+ }
+ }
+
+ /**
+ * Updates the model's content using the given phone number.
+ */
+ @VisibleForTesting
+ void updateModelWithPhoneNumber(String number) {
+ String formattedNumber = TelecomUtils.getFormattedNumber(mContext, number);
+ mCardContent = new DescriptiveTextWithControlsView(null, formattedNumber,
+ mOngoingCallSubtitle, mElapsedTimeClock.millis(), mMuteButton, mEndCallButton,
+ mDialpadButton);
+ mPresenter.onModelUpdated(this);
+ }
+
+ /**
+ * Updates the model's content using the given {@link TelecomUtils.PhoneNumberInfo}. If there is
+ * a corresponding contact, use the contact's name and avatar. If the contact doesn't have an
+ * avatar, use an icon with their first initial.
+ */
+ @VisibleForTesting
+ void updateModelWithContact(TelecomUtils.PhoneNumberInfo phoneNumberInfo) {
+ String contactName = phoneNumberInfo.getDisplayName();
+ Drawable contactImage = null;
+ if (phoneNumberInfo.getAvatarUri() != null) {
+ try {
+ InputStream inputStream = mContext.getContentResolver().openInputStream(
+ phoneNumberInfo.getAvatarUri());
+ contactImage = Drawable.createFromStream(inputStream,
+ phoneNumberInfo.getAvatarUri().toString());
+ } catch (FileNotFoundException e) {
+ // If no file is found for the contact's avatar URI, the icon will be set to a
+ // LetterTile below.
+ if (DEBUG) {
+ Log.d(TAG, "Unable to find contact avatar from Uri: "
+ + phoneNumberInfo.getAvatarUri(), e);
+ }
+ }
+ }
+ if (contactImage == null) {
+ contactImage = TelecomUtils.createLetterTile(mContext,
+ phoneNumberInfo.getInitials(), phoneNumberInfo.getDisplayName());
+ }
+ mCardContent = new DescriptiveTextWithControlsView(contactImage, contactName,
+ mOngoingCallSubtitle, mElapsedTimeClock.millis(), mMuteButton, mEndCallButton,
+ mDialpadButton);
+ mPresenter.onModelUpdated(this);
+ }
+
+ private void initializeAudioControls() {
+ mMuteButton = new DescriptiveTextWithControlsView.Control(
+ mContext.getDrawable(R.drawable.ic_mic_off),
+ v -> {
+ mInCallService.setMuted(mMuteCallToggle);
+ mMuteCallToggle = !mMuteCallToggle;
+ });
+ mEndCallButton = new DescriptiveTextWithControlsView.Control(
+ mContext.getDrawable(R.drawable.ic_call_end_button),
+ v -> mCurrentCall.disconnect());
+ mDialpadButton = new DescriptiveTextWithControlsView.Control(
+ mContext.getDrawable(R.drawable.ic_dialpad), this::onClick);
+ }
+}
diff --git a/src/com/android/car/carlauncher/homescreen/audio/MediaViewModel.java b/src/com/android/car/carlauncher/homescreen/audio/MediaViewModel.java
new file mode 100644
index 0000000..cfad430
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/audio/MediaViewModel.java
@@ -0,0 +1,223 @@
+/*
+ * Copyright (C) 2020 Google Inc.
+ *
+ * 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.car.carlauncher.homescreen.audio;
+
+import static android.car.media.CarMediaManager.MEDIA_SOURCE_MODE_PLAYBACK;
+
+import android.app.Application;
+import android.car.Car;
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.drawable.Drawable;
+import android.util.Size;
+import android.view.View;
+
+import androidx.annotation.NonNull;
+import androidx.lifecycle.AndroidViewModel;
+import androidx.lifecycle.Observer;
+
+import com.android.car.apps.common.imaging.ImageBinder;
+import com.android.car.carlauncher.homescreen.HomeCardInterface;
+import com.android.car.carlauncher.homescreen.ui.CardContent;
+import com.android.car.carlauncher.homescreen.ui.CardHeader;
+import com.android.car.carlauncher.homescreen.ui.DescriptiveTextWithControlsView;
+import com.android.car.media.common.MediaItemMetadata;
+import com.android.car.media.common.R;
+import com.android.car.media.common.playback.PlaybackViewModel;
+import com.android.car.media.common.source.MediaSource;
+import com.android.car.media.common.source.MediaSourceViewModel;
+import com.android.internal.annotations.VisibleForTesting;
+
+
+/**
+ * ViewModel for media. Uses both a {@link MediaSourceViewModel} and a {@link PlaybackViewModel}
+ * for data on the audio source and audio metadata (such as song title), respectively.
+ */
+public class MediaViewModel extends AndroidViewModel implements HomeCardInterface.Model {
+
+ private HomeCardInterface.Presenter mAudioPresenter;
+ // MediaSourceViewModel is for the current or last played media app
+ private MediaSourceViewModel mSourceViewModel;
+ // PlaybackViewModel has the media's metadata
+ private PlaybackViewModel mPlaybackViewModel;
+ private Context mContext;
+
+ private CardHeader mCardHeader;
+ private CharSequence mAppName;
+ private Drawable mAppIcon;
+ private CharSequence mSongTitle;
+ private CharSequence mArtistName;
+ private ImageBinder<MediaItemMetadata.ArtworkRef> mAlbumArtBinder;
+ private Drawable mAlbumImageBitmap;
+
+ private Observer<Object> mMediaSourceObserver = x -> updateModel();
+ private Observer<Object> mMetadataObserver = x -> updateModelMetadata();
+
+ public MediaViewModel(Application application) {
+ super(application);
+ }
+
+ @VisibleForTesting
+ MediaViewModel(Application application, MediaSourceViewModel sourceViewModel,
+ PlaybackViewModel playbackViewModel) {
+ super(application);
+ mSourceViewModel = sourceViewModel;
+ mPlaybackViewModel = playbackViewModel;
+ }
+
+ @Override
+ public void onCreate(@NonNull Context context) {
+ if (mSourceViewModel == null) {
+ mSourceViewModel = MediaSourceViewModel.get(getApplication(),
+ MEDIA_SOURCE_MODE_PLAYBACK);
+ }
+ if (mPlaybackViewModel == null) {
+ mPlaybackViewModel = PlaybackViewModel.get(getApplication(),
+ MEDIA_SOURCE_MODE_PLAYBACK);
+ }
+
+ mContext = context;
+ int max = context.getResources().getInteger(R.integer.media_items_bitmap_max_size_px);
+ Size maxArtSize = new Size(max, max);
+ mAlbumArtBinder = new ImageBinder<>(ImageBinder.PlaceholderType.FOREGROUND, maxArtSize,
+ drawable -> {
+ mAlbumImageBitmap = drawable;
+ mAudioPresenter.onModelUpdated(this);
+ });
+ mSourceViewModel.getPrimaryMediaSource().observeForever(mMediaSourceObserver);
+ mPlaybackViewModel.getMetadata().observeForever(mMetadataObserver);
+ mAudioPresenter.onModelUpdated(this);
+ }
+
+ @Override
+ protected void onCleared() {
+ super.onCleared();
+ mSourceViewModel.getPrimaryMediaSource().removeObserver(mMediaSourceObserver);
+ mPlaybackViewModel.getMetadata().removeObserver(mMetadataObserver);
+ }
+
+ @Override
+ public void onClick(View v) {
+ v.getContext().startActivity(new Intent(Car.CAR_INTENT_ACTION_MEDIA_TEMPLATE));
+ }
+
+ /**
+ * Sets the Presenter, which will handle updating the UI
+ */
+ @Override
+ public void setPresenter(HomeCardInterface.Presenter presenter) {
+ mAudioPresenter = presenter;
+ }
+
+ @Override
+ public CardHeader getCardHeader() {
+ return mCardHeader;
+ }
+
+ @Override
+ public CardContent getCardContent() {
+ return new DescriptiveTextWithControlsView(mAlbumImageBitmap, mSongTitle, mArtistName);
+ }
+
+ /**
+ * Package private method to allow the {@link HomeAudioCardPresenter} to access the model to
+ * initialize the {@link com.android.car.media.common.PlaybackControlsActionBar}
+ */
+ PlaybackViewModel getPlaybackViewModel() {
+ return mPlaybackViewModel;
+ }
+
+ /**
+ * Callback for the observer of the MediaSourceViewModel
+ */
+ private void updateModel() {
+ MediaSource mediaSource = mSourceViewModel.getPrimaryMediaSource().getValue();
+ if (mediaSourceChanged()) {
+ if (mediaSource == null) {
+ mAppName = null;
+ mAppIcon = null;
+ mCardHeader = null;
+ clearMetadata();
+ } else {
+ mAppName = mediaSource.getDisplayName();
+ mAppIcon = mediaSource.getIcon();
+ mCardHeader = new CardHeader(mAppName, mAppIcon);
+ updateMetadata();
+ }
+ mAudioPresenter.onModelUpdated(this);
+ }
+ }
+
+ /**
+ * Callback for the observer of the PlaybackViewModel
+ */
+ private void updateModelMetadata() {
+ if (metadataChanged()) {
+ updateMetadata();
+ if (mCardHeader != null) {
+ mAudioPresenter.onModelUpdated(this);
+ }
+ }
+ }
+
+ private void updateMetadata() {
+ MediaItemMetadata metadata = mPlaybackViewModel.getMetadata().getValue();
+ if (metadata == null) {
+ clearMetadata();
+ } else {
+ mSongTitle = metadata.getTitle();
+ mArtistName = metadata.getArtist();
+ mAlbumArtBinder.setImage(mContext, metadata.getArtworkKey());
+ }
+ }
+
+ private void clearMetadata() {
+ mSongTitle = null;
+ mArtistName = null;
+ mAlbumArtBinder.setImage(mContext, /* newArtRef = */ null);
+ }
+
+ /**
+ * Helper method to check for a change in the media's metadata
+ */
+ private boolean metadataChanged() {
+ MediaItemMetadata metadata = mPlaybackViewModel.getMetadata().getValue();
+ if (metadata == null && (mSongTitle != null || mArtistName != null)) {
+ return true;
+ }
+ if (metadata != null && (mSongTitle != metadata.getTitle()
+ || mArtistName != metadata.getArtist())) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Helper method to check for a change in the media source
+ */
+ private boolean mediaSourceChanged() {
+ MediaSource mediaSource = mSourceViewModel.getPrimaryMediaSource().getValue();
+ if (mediaSource == null && (mAppName != null | mAppIcon != null)) {
+ return true;
+ }
+ if (mediaSource != null && (mAppName != mediaSource.getDisplayName()
+ || mAppIcon != mediaSource.getIcon())) {
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/src/com/android/car/carlauncher/homescreen/audio/telecom/InCallServiceImpl.java b/src/com/android/car/carlauncher/homescreen/audio/telecom/InCallServiceImpl.java
new file mode 100644
index 0000000..252a53f
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/audio/telecom/InCallServiceImpl.java
@@ -0,0 +1,121 @@
+/*
+ * 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.car.carlauncher.homescreen.audio.telecom;
+
+import android.content.Intent;
+import android.os.Binder;
+import android.os.IBinder;
+import android.os.Process;
+import android.telecom.Call;
+import android.telecom.InCallService;
+import android.util.Log;
+
+import com.android.car.carlauncher.homescreen.audio.InCallModel;
+
+import java.util.ArrayList;
+
+/**
+ * Implementation of {@link InCallService}, an {@link android.telecom} service which must be
+ * implemented by an app that wishes to provide functionality for managing phone calls. This service
+ * is bound by android telecom and {@link InCallModel}.
+ */
+public class InCallServiceImpl extends InCallService {
+ private static final String TAG = "Home.InCallServiceImpl";
+ private static final boolean DEBUG = false;
+
+ /**
+ * An action which indicates a bind is from local component. Local components must use this
+ * action to be able to bind the service.
+ */
+ public static final String ACTION_LOCAL_BIND = "local_bind";
+
+ private ArrayList<InCallListener> mInCallListeners = new ArrayList<>();
+
+ @Override
+ public void onCallAdded(Call call) {
+ if (DEBUG) Log.d(TAG, "onCallAdded: " + call);
+ for (InCallListener listener : mInCallListeners) {
+ listener.onCallAdded(call);
+ }
+ }
+
+ @Override
+ public void onCallRemoved(Call call) {
+ if (DEBUG) Log.d(TAG, "onCallRemoved: " + call);
+ for (InCallListener listener : mInCallListeners) {
+ listener.onCallRemoved(call);
+ }
+ }
+
+ @Override
+ public IBinder onBind(Intent intent) {
+ if (DEBUG) Log.d(TAG, "onBind, intent: " + intent);
+ return ACTION_LOCAL_BIND.equals(intent.getAction())
+ ? new LocalBinder()
+ : super.onBind(intent);
+ }
+
+ @Override
+ public boolean onUnbind(Intent intent) {
+ if (DEBUG) Log.d(TAG, "onUnbind, intent: " + intent);
+ if (ACTION_LOCAL_BIND.equals(intent.getAction())) {
+ return false;
+ }
+ return super.onUnbind(intent);
+ }
+
+ /**
+ * Adds a listener for {@link InCallService} events
+ */
+ public void addListener(InCallListener listener) {
+ mInCallListeners.add(listener);
+ }
+
+ /**
+ * Class used for the client Binder to access the service.
+ */
+ public class LocalBinder extends Binder {
+
+ /**
+ * Returns this instance of {@link InCallServiceImpl} if running in the Home App process,
+ * otherwise null
+ */
+ public InCallServiceImpl getService() {
+ if (getCallingPid() == Process.myPid()) {
+ return InCallServiceImpl.this;
+ }
+ return null;
+ }
+ }
+
+ /**
+ * Listens for {@link #onCallAdded(Call)} and {@link #onCallRemoved(Call)} events
+ */
+ public interface InCallListener {
+ /**
+ * Called when a {@link Call} has been added to this in-call session, generally indicating
+ * that the call has been received.
+ */
+ void onCallAdded(Call call);
+
+ /**
+ * Called when a {@link Call} has been removed from this in-call session, generally
+ * indicating that the call has ended.
+ */
+ void onCallRemoved(Call call);
+ }
+}
diff --git a/src/com/android/car/carlauncher/homescreen/ui/CardContent.java b/src/com/android/car/carlauncher/homescreen/ui/CardContent.java
new file mode 100644
index 0000000..be68d0d
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/ui/CardContent.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2020 Google Inc.
+ *
+ * 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.car.carlauncher.homescreen.ui;
+
+/**
+ * Defines the content displayed below the header on a home app's card.
+ */
+public abstract class CardContent {
+
+ /**
+ * The finite set of layouts supported by the home app each of which corresponds to an XML file.
+ * DESCRIPTIVE_TEXT: card_content_descriptive_text_only.xml
+ * DESCRIPTIVE_TEXT_WITH_CONTROLS: card_content_descriptive_text_with_controls.xml
+ * TEXT_BLOCK: card_content_text_block.xml
+ */
+ public enum HomeCardContentType {
+ DESCRIPTIVE_TEXT,
+ DESCRIPTIVE_TEXT_WITH_CONTROLS,
+ TEXT_BLOCK,
+ }
+
+ /**
+ * Returns the type of content layout
+ */
+ public abstract HomeCardContentType getType();
+}
diff --git a/src/com/android/car/carlauncher/homescreen/ui/CardHeader.java b/src/com/android/car/carlauncher/homescreen/ui/CardHeader.java
new file mode 100644
index 0000000..304a91e
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/ui/CardHeader.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2020 Google Inc.
+ *
+ * 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.car.carlauncher.homescreen.ui;
+
+import android.graphics.drawable.Drawable;
+
+/**
+ * The header of a home app card displays the name and icon of the app that's providing
+ * the data displayed.
+ */
+public final class CardHeader {
+ private final CharSequence mCardTitle;
+ private final Drawable mCardIcon;
+
+ public CardHeader(CharSequence appName, Drawable cardIcon) {
+ mCardTitle = appName;
+ mCardIcon = cardIcon;
+ }
+
+ /**
+ * Returns the name of the source app
+ */
+ public CharSequence getCardTitle() {
+ return mCardTitle;
+ }
+
+ /**
+ * Returns the icon for the source app
+ */
+ public Drawable getCardIcon() {
+ return mCardIcon;
+ }
+}
diff --git a/src/com/android/car/carlauncher/homescreen/ui/DescriptiveTextView.java b/src/com/android/car/carlauncher/homescreen/ui/DescriptiveTextView.java
new file mode 100644
index 0000000..37a08c0
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/ui/DescriptiveTextView.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2020 Google Inc.
+ *
+ * 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.car.carlauncher.homescreen.ui;
+
+import android.graphics.drawable.Drawable;
+
+/**
+ * A layout that displays a title line of text with a subtitle line below
+ */
+public class DescriptiveTextView extends CardContent {
+
+ private Drawable mImage;
+ private CharSequence mTitle;
+ private CharSequence mSubtitle;
+ private CharSequence mFooter;
+
+ public DescriptiveTextView(Drawable image, CharSequence title, CharSequence subtitle) {
+ this(image, title, subtitle, /* footer = */ null);
+ }
+
+ public DescriptiveTextView(Drawable image, CharSequence title, CharSequence subtitle,
+ CharSequence footer) {
+ mImage = image;
+ mTitle = title;
+ mSubtitle = subtitle;
+ mFooter = footer;
+ }
+
+ @Override
+ public HomeCardContentType getType() {
+ return HomeCardContentType.DESCRIPTIVE_TEXT;
+ }
+
+ /**
+ * Returns title text
+ */
+ public CharSequence getTitle() {
+ return mTitle;
+ }
+
+ /**
+ * Returns subtitle text
+ */
+ public CharSequence getSubtitle() {
+ return mSubtitle;
+ }
+
+ public CharSequence getFooter() {
+ return mFooter;
+ }
+
+ public Drawable getImage() {
+ return mImage;
+ }
+}
diff --git a/src/com/android/car/carlauncher/homescreen/ui/DescriptiveTextWithControlsView.java b/src/com/android/car/carlauncher/homescreen/ui/DescriptiveTextWithControlsView.java
new file mode 100644
index 0000000..f442daf
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/ui/DescriptiveTextWithControlsView.java
@@ -0,0 +1,122 @@
+/*
+ * Copyright (C) 2020 Google Inc.
+ *
+ * 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.car.carlauncher.homescreen.ui;
+
+import android.graphics.drawable.Drawable;
+import android.view.View;
+
+/**
+ * A layout that displays a title line of text with a subtitle line below and three buttons to
+ * control the audio. Displayed using card_content_descriptive_text_with_controls.xml
+ */
+public class DescriptiveTextWithControlsView extends CardContent {
+
+ private Drawable mImage;
+ private CharSequence mTitle;
+ private CharSequence mSubtitle;
+
+ private Control mLeftControl;
+ private Control mCenterControl;
+ private Control mRightControl;
+ private long mStartTime;
+
+ public DescriptiveTextWithControlsView(Drawable image, CharSequence title,
+ CharSequence subtitle) {
+ mImage = image;
+ mTitle = title;
+ mSubtitle = subtitle;
+ }
+
+ public DescriptiveTextWithControlsView(Drawable image, CharSequence title,
+ CharSequence subtitle,Control leftControl, Control centerControl, Control rightControl) {
+ mImage = image;
+ mTitle = title;
+ mSubtitle = subtitle;
+ mLeftControl = leftControl;
+ mCenterControl = centerControl;
+ mRightControl = rightControl;
+ }
+
+ public DescriptiveTextWithControlsView(Drawable image, CharSequence title,
+ CharSequence subtitle, long startTime, Control leftControl,
+ Control centerControl, Control rightControl) {
+ mImage = image;
+ mTitle = title;
+ mSubtitle = subtitle;
+ mStartTime = startTime;
+ mLeftControl = leftControl;
+ mCenterControl = centerControl;
+ mRightControl = rightControl;
+ }
+
+ @Override
+ public HomeCardContentType getType() {
+ return HomeCardContentType.DESCRIPTIVE_TEXT_WITH_CONTROLS;
+ }
+
+ public Drawable getImage() {
+ return mImage;
+ }
+
+ public CharSequence getTitle() {
+ return mTitle;
+ }
+
+ public CharSequence getSubtitle() {
+ return mSubtitle;
+ }
+
+ public long getStartTime() {
+ return mStartTime;
+ }
+
+ public Control getLeftControl() {
+ return mLeftControl;
+ }
+
+ public Control getCenterControl() {
+ return mCenterControl;
+ }
+
+ public Control getRightControl() {
+ return mRightControl;
+ }
+
+ /**
+ * A button shown with the DescriptiveTextWithControlsView that has a {@link Drawable} icon
+ * used as the button's image and an {@link android.view.View.OnClickListener} that defines the
+ * action when the button is clicked.
+ */
+ public static class Control {
+
+ private Drawable mIcon;
+ private View.OnClickListener mOnClickListener;
+
+ public Control(Drawable icon, View.OnClickListener listener) {
+ mIcon = icon;
+ mOnClickListener = listener;
+ }
+
+ public Drawable getIcon() {
+ return mIcon;
+ }
+
+ public View.OnClickListener getOnClickListener() {
+ return mOnClickListener;
+ }
+ }
+}
diff --git a/src/com/android/car/carlauncher/homescreen/ui/TextBlockView.java b/src/com/android/car/carlauncher/homescreen/ui/TextBlockView.java
new file mode 100644
index 0000000..43a198e
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/ui/TextBlockView.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2020 Google Inc.
+ *
+ * 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.car.carlauncher.homescreen.ui;
+
+/**
+ * A layout that displays a potentially multi-line block of text
+ */
+public class TextBlockView extends CardContent {
+
+ private CharSequence mText;
+ private CharSequence mFooter;
+
+ public TextBlockView(CharSequence text) {
+ this(text, /* footer = */ null);
+ }
+
+ public TextBlockView(CharSequence text, CharSequence footer) {
+ mText = text;
+ mFooter = footer;
+ }
+
+ @Override
+ public CardContent.HomeCardContentType getType() {
+ return CardContent.HomeCardContentType.TEXT_BLOCK;
+ }
+
+ /**
+ * Returns the text
+ */
+ public CharSequence getText() {
+ return mText;
+ }
+
+ public CharSequence getFooter() {
+ return mFooter;
+ }
+}
diff --git a/tests/Android.bp b/tests/Android.bp
new file mode 100644
index 0000000..0813d7a
--- /dev/null
+++ b/tests/Android.bp
@@ -0,0 +1,54 @@
+//
+// Copyright (C) 2020 Google Inc.
+//
+// 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 {
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+android_test {
+ name: "CarLauncherTests",
+
+ srcs: ["src/**/*.java"],
+
+ libs: [
+ "android.test.base",
+ "android.car",
+ ],
+
+ static_libs: [
+ "androidx.test.core",
+ "androidx.test.runner",
+ "androidx.test.espresso.core",
+ "androidx.test.espresso.intents",
+ "androidx.test.ext.junit",
+ "hamcrest-library",
+ "mockito-target-minus-junit4",
+ "testables",
+ "CarLauncher-core"
+ ],
+
+ platform_apis: true,
+
+ certificate: "platform",
+
+ manifest: "AndroidManifest.xml",
+
+ instrumentation_for: "CarLauncher",
+
+ dex_preopt: {
+ enabled: false,
+ },
+}
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
new file mode 100644
index 0000000..f71ca60
--- /dev/null
+++ b/tests/AndroidManifest.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ Copyright (C) 2020 Google Inc.
+ ~
+ ~ 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.car.carlauncher">
+
+ <application android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ </application>
+
+ <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
+ android:targetPackage="com.android.car.carlauncher"
+ android:label="Tests for Car Launcher"/>
+</manifest>
diff --git a/tests/src/com/android/car/carlauncher/CarLauncherTest.java b/tests/src/com/android/car/carlauncher/CarLauncherTest.java
new file mode 100644
index 0000000..c008db6
--- /dev/null
+++ b/tests/src/com/android/car/carlauncher/CarLauncherTest.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2020 Google Inc.
+ *
+ * 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.car.carlauncher;
+
+import static androidx.test.espresso.Espresso.onView;
+import static androidx.test.espresso.assertion.ViewAssertions.matches;
+import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static androidx.test.espresso.matcher.ViewMatchers.withId;
+
+import android.testing.TestableContext;
+
+import androidx.lifecycle.Lifecycle;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.core.app.ActivityScenario;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+import androidx.test.filters.SmallTest;
+
+import org.junit.After;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class CarLauncherTest {
+
+ @Rule
+ public TestableContext mContext = new TestableContext(InstrumentationRegistry.getContext());
+ private ActivityScenario<CarLauncher> mActivityScenario;
+
+ @After
+ public void tearDown() {
+ if (mActivityScenario != null) {
+ mActivityScenario.close();
+ }
+ }
+
+ @Test
+ public void onResume_mapsCard_isVisible() {
+ mActivityScenario = ActivityScenario.launch(CarLauncher.class);
+ mActivityScenario.moveToState(Lifecycle.State.RESUMED);
+
+ onView(withId(R.id.maps_card)).check(matches(isDisplayed()));
+ }
+
+ @Test
+ public void onResume_assistiveCard_isVisible() {
+ mActivityScenario = ActivityScenario.launch(CarLauncher.class);
+ mActivityScenario.moveToState(Lifecycle.State.RESUMED);
+
+ onView(withId(R.id.top_card)).check(matches(isDisplayed()));
+ }
+
+ @Test
+ public void onResume_audioCard_isVisible() {
+ mActivityScenario = ActivityScenario.launch(CarLauncher.class);
+ mActivityScenario.moveToState(Lifecycle.State.RESUMED);
+
+ onView(withId(R.id.bottom_card)).check(matches(isDisplayed()));
+ }
+}
diff --git a/tests/src/com/android/car/carlauncher/homescreen/CardPresenterTest.java b/tests/src/com/android/car/carlauncher/homescreen/CardPresenterTest.java
new file mode 100644
index 0000000..438e724
--- /dev/null
+++ b/tests/src/com/android/car/carlauncher/homescreen/CardPresenterTest.java
@@ -0,0 +1,108 @@
+/*
+ * 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.car.carlauncher.homescreen;
+
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import com.android.car.carlauncher.homescreen.ui.CardHeader;
+import com.android.car.carlauncher.homescreen.ui.DescriptiveTextView;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import java.util.List;
+
+@RunWith(JUnit4.class)
+public class CardPresenterTest {
+
+ private static final CardHeader CARD_HEADER = new CardHeader("appName", /* cardIcon = */ null);
+ private static final DescriptiveTextView CARD_CONTENT = new DescriptiveTextView(/* image = */
+ null, "title", "subtitle");
+
+ private CardPresenter mPresenter;
+
+ @Mock
+ private HomeCardInterface.View mView;
+ @Mock
+ private HomeCardInterface.Model mModel;
+
+ @Before
+ public void setUp() {
+ MockitoAnnotations.initMocks(this);
+ mPresenter = new CardPresenter() {
+ @Override
+ public void setModels(List<HomeCardInterface.Model> models) {
+ }
+
+ @Override
+ public void onViewCreated() {
+ }
+
+ @Override
+ public void onViewDestroyed() {
+ }
+ };
+ mPresenter.setView(mView);
+ }
+
+ @Test
+ public void onModelUpdated_nullModel_hidesFragment() {
+ mPresenter.onModelUpdated(null);
+
+ verify(mView).hideCard();
+ }
+
+ @Test
+ public void onModelUpdated_validModel_updatesFragment() {
+ when(mModel.getCardHeader()).thenReturn(CARD_HEADER);
+ when(mModel.getCardContent()).thenReturn(CARD_CONTENT);
+
+ mPresenter.onModelUpdated(mModel);
+
+ verify(mView).updateHeaderView(CARD_HEADER);
+ verify(mView).updateContentView(CARD_CONTENT);
+ }
+
+ @Test
+ public void onModelUpdated_validHeaderNullContent_showsHeaderOnly() {
+ when(mModel.getCardHeader()).thenReturn(CARD_HEADER);
+ when(mModel.getCardContent()).thenReturn(null);
+
+ mPresenter.onModelUpdated(mModel);
+
+ verify(mView).updateHeaderView(CARD_HEADER);
+ verify(mView, never()).updateContentView(any());
+ }
+
+ @Test
+ public void onModelUpdated_nullHeaderValidContent_hidesFragment() {
+ when(mModel.getCardHeader()).thenReturn(null);
+ when(mModel.getCardContent()).thenReturn(CARD_CONTENT);
+
+ mPresenter.onModelUpdated(mModel);
+
+ verify(mView).hideCard();
+ verify(mView, never()).updateContentView(CARD_CONTENT);
+ }
+}
diff --git a/tests/src/com/android/car/carlauncher/homescreen/HomeCardFragmentTest.java b/tests/src/com/android/car/carlauncher/homescreen/HomeCardFragmentTest.java
new file mode 100644
index 0000000..8050bb2
--- /dev/null
+++ b/tests/src/com/android/car/carlauncher/homescreen/HomeCardFragmentTest.java
@@ -0,0 +1,141 @@
+/*
+ * Copyright (C) 2020 Google Inc.
+ *
+ * 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.car.carlauncher.homescreen;
+
+import static androidx.test.espresso.Espresso.onView;
+import static androidx.test.espresso.assertion.ViewAssertions.matches;
+import static androidx.test.espresso.matcher.ViewMatchers.isDescendantOfA;
+import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static androidx.test.espresso.matcher.ViewMatchers.withId;
+import static androidx.test.espresso.matcher.ViewMatchers.withText;
+
+import static org.hamcrest.CoreMatchers.allOf;
+import static org.hamcrest.CoreMatchers.not;
+
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+import androidx.test.rule.ActivityTestRule;
+
+import com.android.car.carlauncher.CarLauncher;
+import com.android.car.carlauncher.R;
+import com.android.car.carlauncher.homescreen.ui.CardHeader;
+import com.android.car.carlauncher.homescreen.ui.DescriptiveTextView;
+import com.android.car.carlauncher.homescreen.ui.TextBlockView;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+public class HomeCardFragmentTest {
+
+ private static final String DESCRIPTIVE_TEXT_TITLE = "Test title text";
+ private static final String DESCRIPTIVE_TEXT_SUBTITLE = "Test subtitle text";
+ private static final String DESCRIPTIVE_TEXT_FOOTER = "Descriptive footer";
+ private static final String TEXT_BLOCK_CONTENT = "Test text for text block";
+ private static final String TEXT_BLOCK_FOOTER = "Text block footer";
+ private static final CardHeader CARD_HEADER = new CardHeader("Test App Name", /* appIcon= */ null);
+ private static final DescriptiveTextView DESCRIPTIVE_TEXT_VIEW =
+ new DescriptiveTextView(/* image = */ null, DESCRIPTIVE_TEXT_TITLE,
+ DESCRIPTIVE_TEXT_SUBTITLE, DESCRIPTIVE_TEXT_FOOTER);
+ private static final DescriptiveTextView DESCRIPTIVE_TEXT_VIEW_NO_FOOTER =
+ new DescriptiveTextView(/* image = */ null, DESCRIPTIVE_TEXT_TITLE,
+ DESCRIPTIVE_TEXT_SUBTITLE);
+ private static final TextBlockView TEXT_BLOCK_VIEW = new TextBlockView(TEXT_BLOCK_CONTENT,
+ TEXT_BLOCK_FOOTER);
+ private static final TextBlockView TEXT_BLOCK_VIEW_NO_FOOTER = new TextBlockView(
+ TEXT_BLOCK_CONTENT);
+
+ @Rule
+ public ActivityTestRule<CarLauncher> mActivityTestRule = new ActivityTestRule<CarLauncher>(
+ CarLauncher.class);
+
+ @Test
+ public void updateContentView_descriptiveTextWithFooter_displaysTapForMoreView() {
+ HomeCardFragment fragment = (HomeCardFragment) mActivityTestRule.getActivity()
+ .getSupportFragmentManager().findFragmentById(R.id.top_card);
+ fragment.updateHeaderView(CARD_HEADER);
+ fragment.updateContentView(DESCRIPTIVE_TEXT_VIEW);
+
+ onView(allOf(withId(R.id.descriptive_text_layout),
+ isDescendantOfA(withId(R.id.top_card)))).check(
+ matches(isDisplayed()));
+ onView(allOf(withId(R.id.primary_text), withText(DESCRIPTIVE_TEXT_TITLE),
+ isDescendantOfA(withId(R.id.descriptive_text_layout)),
+ isDescendantOfA(withId(R.id.top_card)))).check(matches(isDisplayed()));
+ onView(allOf(withId(R.id.secondary_text), withText(DESCRIPTIVE_TEXT_SUBTITLE),
+ isDescendantOfA(withId(R.id.descriptive_text_layout)),
+ isDescendantOfA(withId(R.id.top_card)))).check(matches(isDisplayed()));
+ onView(allOf(withId(R.id.tap_for_more_text), withText(DESCRIPTIVE_TEXT_FOOTER),
+ isDescendantOfA(withId(R.id.descriptive_text_layout)),
+ isDescendantOfA(withId(R.id.top_card)))).check(matches(isDisplayed()));
+ }
+
+ @Test
+ public void updateContentView_descriptiveTextWithNoFooter_hidesTapForMoreView() {
+ HomeCardFragment fragment = (HomeCardFragment) mActivityTestRule.getActivity()
+ .getSupportFragmentManager().findFragmentById(R.id.top_card);
+ fragment.updateHeaderView(CARD_HEADER);
+ fragment.updateContentView(DESCRIPTIVE_TEXT_VIEW_NO_FOOTER);
+
+ onView(allOf(withId(R.id.descriptive_text_layout),
+ isDescendantOfA(withId(R.id.top_card)))).check(
+ matches(isDisplayed()));
+ onView(allOf(withId(R.id.primary_text), withText(DESCRIPTIVE_TEXT_TITLE),
+ isDescendantOfA(withId(R.id.descriptive_text_layout)),
+ isDescendantOfA(withId(R.id.top_card)))).check(matches(isDisplayed()));
+ onView(allOf(withId(R.id.secondary_text), withText(DESCRIPTIVE_TEXT_SUBTITLE),
+ isDescendantOfA(withId(R.id.descriptive_text_layout)),
+ isDescendantOfA(withId(R.id.top_card)))).check(matches(isDisplayed()));
+ onView(allOf(withId(R.id.tap_for_more_text),
+ isDescendantOfA(withId(R.id.descriptive_text_layout)),
+ isDescendantOfA(withId(R.id.top_card)))).check(matches(not(isDisplayed())));
+ }
+
+ @Test
+ public void updateContentView_textBlockWithFooter_displaysTapForMoreView() {
+ HomeCardFragment fragment = (HomeCardFragment) mActivityTestRule.getActivity()
+ .getSupportFragmentManager().findFragmentById(R.id.top_card);
+ fragment.updateHeaderView(CARD_HEADER);
+ fragment.updateContentView(TEXT_BLOCK_VIEW);
+
+ onView(allOf(withId(R.id.text_block_layout), isDescendantOfA(withId(R.id.top_card)))).check(
+ matches(isDisplayed()));
+ onView(allOf(withId(R.id.text_block), withText(TEXT_BLOCK_CONTENT),
+ isDescendantOfA(withId(R.id.text_block_layout)),
+ isDescendantOfA(withId(R.id.top_card)))).check(matches(isDisplayed()));
+ onView(allOf(withId(R.id.tap_for_more_text), withText(TEXT_BLOCK_FOOTER),
+ isDescendantOfA(withId(R.id.text_block_layout)),
+ isDescendantOfA(withId(R.id.top_card)))).check(matches(isDisplayed()));
+ }
+
+ @Test
+ public void updateContentView_textBlockNoFooter_hidesTapForMoreView() {
+ HomeCardFragment fragment = (HomeCardFragment) mActivityTestRule.getActivity()
+ .getSupportFragmentManager().findFragmentById(R.id.top_card);
+ fragment.updateHeaderView(CARD_HEADER);
+ fragment.updateContentView(TEXT_BLOCK_VIEW_NO_FOOTER);
+
+ onView(allOf(withId(R.id.text_block_layout), isDescendantOfA(withId(R.id.top_card)))).check(
+ matches(isDisplayed()));
+ onView(allOf(withId(R.id.text_block), withText(TEXT_BLOCK_CONTENT),
+ isDescendantOfA(withId(R.id.text_block_layout)),
+ isDescendantOfA(withId(R.id.top_card)))).check(matches(isDisplayed()));
+ onView(allOf(withId(R.id.tap_for_more_text),
+ isDescendantOfA(withId(R.id.text_block_layout)),
+ isDescendantOfA(withId(R.id.top_card)))).check(matches(not(isDisplayed())));
+ }
+}
diff --git a/tests/src/com/android/car/carlauncher/homescreen/assistive/AssistiveCardPresenterTest.java b/tests/src/com/android/car/carlauncher/homescreen/assistive/AssistiveCardPresenterTest.java
new file mode 100644
index 0000000..28a5717
--- /dev/null
+++ b/tests/src/com/android/car/carlauncher/homescreen/assistive/AssistiveCardPresenterTest.java
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2020 Google Inc.
+ *
+ * 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.car.carlauncher.homescreen.assistive;
+
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.view.View;
+
+import com.android.car.carlauncher.homescreen.HomeCardInterface;
+import com.android.car.carlauncher.homescreen.ui.CardHeader;
+import com.android.car.carlauncher.homescreen.ui.DescriptiveTextView;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+@RunWith(JUnit4.class)
+public class AssistiveCardPresenterTest {
+
+ private static final CardHeader CARD_HEADER = new CardHeader("testAppName", /* appIcon = */
+ null);
+ private static final DescriptiveTextView CARD_CONTENT = new DescriptiveTextView(/* image = */
+ null, "title", "subtitle");
+
+ private AssistiveCardPresenter mPresenter;
+
+ @Mock
+ private View mFragmentView;
+ @Mock
+ private HomeCardInterface.View mView;
+ @Mock
+ private HomeCardInterface.Model mModel;
+ @Mock
+ private ProjectionModel mOtherModel;
+
+ @Before
+ public void setUp() {
+ MockitoAnnotations.initMocks(this);
+ when(mModel.getCardHeader()).thenReturn(CARD_HEADER);
+ when(mModel.getCardContent()).thenReturn(CARD_CONTENT);
+ mPresenter = new AssistiveCardPresenter();
+ mPresenter.setView(mView);
+ }
+
+ @Test
+ public void onModelUpdated_updatesFragment() {
+ mPresenter.onModelUpdated(mModel);
+ mPresenter.onViewClicked(mFragmentView);
+
+ verify(mView).updateHeaderView(CARD_HEADER);
+ verify(mView).updateContentView(CARD_CONTENT);
+ verify(mModel).onClick(mFragmentView);
+ }
+
+ @Test
+ public void onModelUpdated_nullDifferentModel_doesNotUpdate() {
+ when(mOtherModel.getCardHeader()).thenReturn(null);
+ mPresenter.onModelUpdated(mModel);
+ reset(mView);
+
+ mPresenter.onModelUpdated(mOtherModel);
+ mPresenter.onViewClicked(mFragmentView);
+
+ verify(mView, never()).hideCard();
+ verify(mView, never()).updateHeaderView(any());
+ verify(mView, never()).updateContentView(any());
+ verify(mModel).onClick(mFragmentView);
+ verify(mOtherModel, never()).onClick(any());
+ }
+
+ @Test
+ public void onModelUpdated_nullSameModel_updatesFragment() {
+ mPresenter.onModelUpdated(mModel);
+ reset(mView);
+ when(mModel.getCardHeader()).thenReturn(null);
+
+ mPresenter.onModelUpdated(mModel);
+
+ verify(mView).hideCard();
+ }
+
+ @Test
+ public void onModelUpdated_nullModelAndNullCurrentModel_doesNotUpdate() {
+ when(mModel.getCardHeader()).thenReturn(null);
+
+ mPresenter.onModelUpdated(mModel);
+
+ verify(mView, never()).hideCard();
+ }
+}
diff --git a/tests/src/com/android/car/carlauncher/homescreen/assistive/ProjectionModelTest.java b/tests/src/com/android/car/carlauncher/homescreen/assistive/ProjectionModelTest.java
new file mode 100644
index 0000000..c1e4d9f
--- /dev/null
+++ b/tests/src/com/android/car/carlauncher/homescreen/assistive/ProjectionModelTest.java
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2020 Google Inc.
+ *
+ * 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.car.carlauncher.homescreen.assistive;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.verify;
+
+import android.car.projection.ProjectionStatus;
+import android.testing.TestableContext;
+
+import androidx.test.InstrumentationRegistry;
+
+import com.android.car.carlauncher.homescreen.HomeCardInterface;
+import com.android.car.carlauncher.homescreen.ui.DescriptiveTextView;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import java.util.Collections;
+
+@RunWith(JUnit4.class)
+public class ProjectionModelTest {
+
+ @Rule
+ public TestableContext mContext = new TestableContext(InstrumentationRegistry.getContext());
+
+ private static final String PROJECTING_DEVICE_NAME = "projecting device name";
+ private static final String NONPROJECTING_DEVICE_NAME = "non-projecting device name";
+ private static final ProjectionStatus.MobileDevice PROJECTING_DEVICE =
+ ProjectionStatus.MobileDevice.builder(0, PROJECTING_DEVICE_NAME).setProjecting(
+ true).build();
+ private static final ProjectionStatus.MobileDevice NONPROJECTING_DEVICE =
+ ProjectionStatus.MobileDevice.builder(0, NONPROJECTING_DEVICE_NAME).setProjecting(
+ false).build();
+
+ private final ProjectionStatus mInactiveProjectionStatus = ProjectionStatus.builder(
+ mContext.getPackageName(), ProjectionStatus.PROJECTION_STATE_INACTIVE).build();
+ private final ProjectionStatus mProjectingDeviceProjectionStatus = ProjectionStatus.builder(
+ mContext.getPackageName(),
+ ProjectionStatus.PROJECTION_STATE_READY_TO_PROJECT).addMobileDevice(
+ PROJECTING_DEVICE).build();
+ private final ProjectionStatus mNonProjectingDeviceProjectionStatus = ProjectionStatus.builder(
+ mContext.getPackageName(), ProjectionStatus.PROJECTION_STATE_READY_TO_PROJECT)
+ .addMobileDevice(NONPROJECTING_DEVICE).build();
+
+ private ProjectionModel mModel;
+
+ @Mock
+ private HomeCardInterface.Presenter mPresenter;
+
+ @Before
+ public void setUp() {
+ MockitoAnnotations.initMocks(this);
+ mModel = new ProjectionModel();
+ mModel.setPresenter(mPresenter);
+ mModel.onCreate(mContext);
+ reset(mPresenter);
+ }
+
+ @After
+ public void tearDown() {
+ mModel.onDestroy(mContext);
+ }
+
+ @Test
+ public void noChange_doesNotCallPresenter() {
+ verify(mPresenter, never()).onModelUpdated(any());
+ assertNull(mModel.getCardHeader());
+ assertNull(mModel.getCardContent());
+ }
+
+ @Test
+ public void changeProjectionStatusToProjectingDevice_callsPresenter() {
+ sendProjectionStatus(mProjectingDeviceProjectionStatus);
+
+ verify(mPresenter).onModelUpdated(mModel);
+ DescriptiveTextView content = (DescriptiveTextView) mModel.getCardContent();
+ assertEquals(content.getSubtitle(), PROJECTING_DEVICE_NAME);
+ }
+
+ @Test
+ public void changeProjectionStatusToNonProjectingDevice_callsPresenter() {
+ sendProjectionStatus(mNonProjectingDeviceProjectionStatus);
+
+ verify(mPresenter).onModelUpdated(mModel);
+ DescriptiveTextView content = (DescriptiveTextView) mModel.getCardContent();
+ assertEquals(content.getSubtitle(), NONPROJECTING_DEVICE_NAME);
+ }
+
+ @Test
+ public void changeProjectionStatusToInactive_callsPresenter() {
+ sendProjectionStatus(mProjectingDeviceProjectionStatus);
+ reset(mPresenter);
+
+ sendProjectionStatus(mInactiveProjectionStatus);
+
+ verify(mPresenter).onModelUpdated(mModel);
+ assertNull(mModel.getCardHeader());
+ assertNull(mModel.getCardContent());
+ }
+
+ private void sendProjectionStatus(ProjectionStatus status) {
+ reset(mPresenter);
+ mModel.onProjectionStatusChanged(
+ status.getState(),
+ status.getPackageName(),
+ Collections.singletonList(status));
+ }
+}
diff --git a/tests/src/com/android/car/carlauncher/homescreen/audio/AudioFragmentTest.java b/tests/src/com/android/car/carlauncher/homescreen/audio/AudioFragmentTest.java
new file mode 100644
index 0000000..540f29f
--- /dev/null
+++ b/tests/src/com/android/car/carlauncher/homescreen/audio/AudioFragmentTest.java
@@ -0,0 +1,177 @@
+/*
+ * Copyright (C) 2020 Google Inc.
+ *
+ * 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.car.carlauncher.homescreen.audio;
+
+import static androidx.test.espresso.Espresso.onView;
+import static androidx.test.espresso.assertion.ViewAssertions.matches;
+import static androidx.test.espresso.matcher.ViewMatchers.isDescendantOfA;
+import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static androidx.test.espresso.matcher.ViewMatchers.withId;
+import static androidx.test.espresso.matcher.ViewMatchers.withText;
+
+import static org.hamcrest.CoreMatchers.allOf;
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+
+import android.graphics.Bitmap;
+import android.graphics.drawable.BitmapDrawable;
+
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+import androidx.test.rule.ActivityTestRule;
+
+import com.android.car.apps.common.CrossfadeImageView;
+import com.android.car.carlauncher.CarLauncher;
+import com.android.car.carlauncher.R;
+import com.android.car.carlauncher.homescreen.ui.CardHeader;
+import com.android.car.carlauncher.homescreen.ui.DescriptiveTextView;
+import com.android.car.carlauncher.homescreen.ui.DescriptiveTextWithControlsView;
+import com.android.car.carlauncher.homescreen.ui.TextBlockView;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+public class AudioFragmentTest {
+
+ private static final CardHeader CARD_HEADER = new CardHeader("Test App Name", null);
+ private static final BitmapDrawable BITMAP = new BitmapDrawable(
+ Bitmap.createBitmap(/* width = */100, /* height = */100, Bitmap.Config.ARGB_8888));
+ private static final String AUDIO_VIEW_TITLE = "Test song title";
+ private static final String AUDIO_VIEW_SUBTITLE = "Test artist name";
+ private static final long AUDIO_START_TIME = 1L;
+ private static final DescriptiveTextView DESCRIPTIVE_TEXT_VIEW = new DescriptiveTextView(
+ /* image = */ null, "Primary Text", "Secondary Text");
+ private static final TextBlockView TEXT_BLOCK_VIEW = new TextBlockView("Text");
+
+ private final DescriptiveTextWithControlsView
+ mDescriptiveTextWithControlsView = new DescriptiveTextWithControlsView(BITMAP,
+ AUDIO_VIEW_TITLE,
+ AUDIO_VIEW_SUBTITLE);
+ private final DescriptiveTextWithControlsView.Control mControl =
+ new DescriptiveTextWithControlsView.Control(BITMAP, v -> {
+ });
+ private final DescriptiveTextWithControlsView
+ mDescriptiveTextWithControlsViewWithButtons = new DescriptiveTextWithControlsView(
+ BITMAP, AUDIO_VIEW_TITLE, AUDIO_VIEW_SUBTITLE, AUDIO_START_TIME, mControl,
+ mControl, mControl);
+
+ @Rule
+ public ActivityTestRule<CarLauncher> mActivityTestRule =
+ new ActivityTestRule<CarLauncher>(CarLauncher.class);
+
+ @Test
+ public void updateContentAndHeaderView_audioContentNoControls_showsMediaPlaybackControlsBar() {
+ AudioFragment fragment = (AudioFragment) mActivityTestRule.getActivity()
+ .getSupportFragmentManager().findFragmentById(R.id.bottom_card);
+ mActivityTestRule.getActivity().runOnUiThread(fragment::hideCard);
+ fragment.updateContentView(mDescriptiveTextWithControlsView);
+ // Card is only made visible when the header is updated
+ // But content should still be updated so it is correct when card is next made visible
+ onView(allOf(withId(R.id.card_view), isDescendantOfA(withId(R.id.bottom_card))))
+ .check(matches(not(isDisplayed())));
+
+ // Now the card is made visible and we verify that content has been updated
+ fragment.updateHeaderView(CARD_HEADER);
+ onView(allOf(withId(R.id.card_background),
+ isDescendantOfA(withId(R.id.bottom_card)))).check(matches(isDisplayed()));
+ onView(allOf(withId(R.id.card_background_image), is(instanceOf(CrossfadeImageView.class)),
+ isDescendantOfA(withId(R.id.bottom_card)))).check(matches(isDisplayed()));
+ onView(allOf(withId(R.id.media_layout),
+ isDescendantOfA(withId(R.id.bottom_card)))).check(matches(isDisplayed()));
+ onView(allOf(withId(R.id.primary_text), withText(AUDIO_VIEW_TITLE),
+ isDescendantOfA(withId(R.id.media_layout)),
+ isDescendantOfA(withId(R.id.bottom_card)))).check(matches(isDisplayed()));
+ onView(allOf(withId(R.id.secondary_text), withText(AUDIO_VIEW_SUBTITLE),
+ isDescendantOfA(withId(R.id.media_layout)),
+ isDescendantOfA(withId(R.id.bottom_card)))).check(matches(isDisplayed()));
+ onView(allOf(withId(R.id.optional_timer), isDescendantOfA(withId(R.id.bottom_card)),
+ isDescendantOfA(withId(R.id.media_layout)))).check(
+ matches(not(isDisplayed())));
+ onView(allOf(withId(R.id.media_playback_controls_bar),
+ isDescendantOfA(withId(R.id.media_layout)),
+ isDescendantOfA(withId(R.id.bottom_card)))).check(matches(isDisplayed()));
+ onView(allOf(withId(R.id.descriptive_text_with_controls_layout),
+ isDescendantOfA(withId(R.id.bottom_card)))).check(matches(not(isDisplayed())));
+ }
+
+ @Test
+ public void updateContentAndHeaderView_audioContentWithControls_showsControlBar() {
+ AudioFragment fragment = (AudioFragment) mActivityTestRule.getActivity()
+ .getSupportFragmentManager().findFragmentById(R.id.bottom_card);
+ mActivityTestRule.getActivity().runOnUiThread(fragment::hideCard);
+ fragment.updateHeaderView(CARD_HEADER);
+ fragment.updateContentView(mDescriptiveTextWithControlsViewWithButtons);
+
+ onView(allOf(withId(R.id.optional_timer),
+ isDescendantOfA(withId(R.id.descriptive_text_with_controls_layout)),
+ isDescendantOfA(withId(R.id.bottom_card)))).check(matches(isDisplayed()));
+ onView(allOf(withId(R.id.button_left),
+ isDescendantOfA(withId(R.id.descriptive_text_with_controls_layout)),
+ isDescendantOfA(withId(R.id.bottom_card)))).check(matches(isDisplayed()));
+ onView(allOf(withId(R.id.button_center),
+ isDescendantOfA(withId(R.id.descriptive_text_with_controls_layout)),
+ isDescendantOfA(withId(R.id.bottom_card)))).check(matches(isDisplayed()));
+ onView(allOf(withId(R.id.button_right),
+ isDescendantOfA(withId(R.id.descriptive_text_with_controls_layout)),
+ isDescendantOfA(withId(R.id.bottom_card)))).check(matches(isDisplayed()));
+ onView(allOf(withId(R.id.media_playback_controls_bar),
+ isDescendantOfA(withId(R.id.media_layout)),
+ isDescendantOfA(withId(R.id.bottom_card)))).check(matches(not(isDisplayed())));
+ onView(allOf(withId(R.id.media_layout), isDescendantOfA(withId(R.id.bottom_card)))).check(
+ matches(not(isDisplayed())));
+ }
+
+ @Test
+ public void updateContentView_descriptiveText_hidesPlaybackControlsBar() {
+ AudioFragment fragment = (AudioFragment) mActivityTestRule.getActivity()
+ .getSupportFragmentManager().findFragmentById(R.id.bottom_card);
+ fragment.updateContentView(mDescriptiveTextWithControlsView);
+ fragment.updateContentView(DESCRIPTIVE_TEXT_VIEW);
+
+ onView(allOf(withId(R.id.card_background),
+ isDescendantOfA(withId(R.id.bottom_card)))).check(matches(not(isDisplayed())));
+ onView(allOf(withId(R.id.card_background_image), is(instanceOf(CrossfadeImageView.class)),
+ isDescendantOfA(withId(R.id.bottom_card)))).check(matches(not(isDisplayed())));
+ onView(allOf(withId(R.id.descriptive_text_layout),
+ isDescendantOfA(withId(R.id.bottom_card)))).check(matches(isDisplayed()));
+ onView(allOf(withId(R.id.descriptive_text_with_controls_layout),
+ isDescendantOfA(withId(R.id.bottom_card)))).check(matches(not(isDisplayed())));
+ onView(allOf(withId(R.id.media_layout), isDescendantOfA(withId(R.id.bottom_card)))).check(
+ matches(not(isDisplayed())));
+ }
+
+ @Test
+ public void updateContentView_textBlock_hidesPlaybackControlsBar() {
+ AudioFragment fragment = (AudioFragment) mActivityTestRule.getActivity()
+ .getSupportFragmentManager().findFragmentById(R.id.bottom_card);
+ fragment.updateContentView(mDescriptiveTextWithControlsView);
+ fragment.updateContentView(TEXT_BLOCK_VIEW);
+
+ onView(allOf(withId(R.id.card_background),
+ isDescendantOfA(withId(R.id.bottom_card)))).check(matches(not(isDisplayed())));
+ onView(allOf(withId(R.id.card_background_image), is(instanceOf(CrossfadeImageView.class)),
+ isDescendantOfA(withId(R.id.bottom_card)))).check(matches(not(isDisplayed())));
+ onView(allOf(withId(R.id.text_block_layout),
+ isDescendantOfA(withId(R.id.bottom_card)))).check(matches(isDisplayed()));
+ onView(allOf(withId(R.id.descriptive_text_with_controls_layout),
+ isDescendantOfA(withId(R.id.bottom_card)))).check(matches(not(isDisplayed())));
+ onView(allOf(withId(R.id.media_layout), isDescendantOfA(withId(R.id.bottom_card)))).check(
+ matches(not(isDisplayed())));
+ }
+}
diff --git a/tests/src/com/android/car/carlauncher/homescreen/audio/HomeAudioCardPresenterTest.java b/tests/src/com/android/car/carlauncher/homescreen/audio/HomeAudioCardPresenterTest.java
new file mode 100644
index 0000000..602e364
--- /dev/null
+++ b/tests/src/com/android/car/carlauncher/homescreen/audio/HomeAudioCardPresenterTest.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2020 Google Inc.
+ *
+ * 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.car.carlauncher.homescreen.audio;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.view.View;
+
+import com.android.car.carlauncher.homescreen.HomeCardInterface;
+import com.android.car.carlauncher.homescreen.ui.CardHeader;
+import com.android.car.carlauncher.homescreen.ui.DescriptiveTextView;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import java.util.Collections;
+
+@RunWith(JUnit4.class)
+public class HomeAudioCardPresenterTest {
+
+ private static final CardHeader CARD_HEADER = new CardHeader("testAppName", /* appIcon = */
+ null);
+ private static final DescriptiveTextView CARD_CONTENT = new DescriptiveTextView(/* image = */
+ null, "title", "subtitle");
+
+ private HomeAudioCardPresenter mPresenter;
+
+ @Mock
+ private View mFragmentView;
+ @Mock
+ private HomeCardInterface.View mView;
+ @Mock
+ private HomeCardInterface.Model mModel;
+ @Mock
+ private InCallModel mOtherModel;
+
+ @Before
+ public void setUp() {
+ MockitoAnnotations.initMocks(this);
+ when(mModel.getCardHeader()).thenReturn(CARD_HEADER);
+ when(mModel.getCardContent()).thenReturn(CARD_CONTENT);
+ mPresenter = new HomeAudioCardPresenter();
+ mPresenter.setView(mView);
+ }
+
+ @Test
+ public void onModelUpdated_updatesFragment() {
+ mPresenter.onModelUpdated(mModel);
+ mPresenter.onViewClicked(mFragmentView);
+
+ verify(mView).updateHeaderView(CARD_HEADER);
+ verify(mView).updateContentView(CARD_CONTENT);
+ verify(mModel).onClick(mFragmentView);
+ }
+
+ @Test
+ public void onModelUpdated_nullDifferentModel_doesNotUpdate() {
+ when(mOtherModel.getCardHeader()).thenReturn(null);
+ mPresenter.onModelUpdated(mModel);
+ reset(mView);
+
+ mPresenter.onModelUpdated(mOtherModel);
+ mPresenter.onViewClicked(mFragmentView);
+
+ verify(mView, never()).hideCard();
+ verify(mView, never()).updateHeaderView(any());
+ verify(mView, never()).updateContentView(any());
+ verify(mModel).onClick(mFragmentView);
+ verify(mOtherModel, never()).onClick(any());
+ }
+
+ @Test
+ public void onModelUpdated_nullSameModel_updatesFragment() {
+ mPresenter.onModelUpdated(mModel);
+ reset(mView);
+ when(mModel.getCardHeader()).thenReturn(null);
+
+ mPresenter.onModelUpdated(mModel);
+
+ verify(mView).hideCard();
+ }
+
+ @Test
+ public void onModelUpdated_nullModelAndNullCurrentModel_updatesFragment() {
+ when(mModel.getCardHeader()).thenReturn(null);
+
+ mPresenter.onModelUpdated(mModel);
+
+ verify(mView, never()).hideCard();
+ }
+}
diff --git a/tests/src/com/android/car/carlauncher/homescreen/audio/InCallModelTest.java b/tests/src/com/android/car/carlauncher/homescreen/audio/InCallModelTest.java
new file mode 100644
index 0000000..f199cb3
--- /dev/null
+++ b/tests/src/com/android/car/carlauncher/homescreen/audio/InCallModelTest.java
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2020 Google Inc.
+ *
+ * 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.car.carlauncher.homescreen.audio;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+
+import android.content.Context;
+import android.net.Uri;
+import android.telecom.Call;
+
+import androidx.test.core.app.ApplicationProvider;
+
+import com.android.car.carlauncher.R;
+import com.android.car.carlauncher.homescreen.HomeCardInterface;
+import com.android.car.carlauncher.homescreen.ui.DescriptiveTextWithControlsView;
+import com.android.car.telephony.common.TelecomUtils;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import java.time.Clock;
+
+@RunWith(JUnit4.class)
+public class InCallModelTest {
+
+ private static final String PHONE_NUMBER = "01234567";
+ private static final String DISPLAY_NAME = "Test Caller";
+ private static final String INITIALS = "T";
+
+ private InCallModel mInCallModel;
+ private String mOngoingCallSecondaryText;
+ private Context mContext;
+
+ @Mock
+ private HomeCardInterface.Presenter mPresenter;
+ @Mock
+ private Clock mClock;
+
+ private Call mCall = null;
+
+ @Before
+ public void setUp() {
+ MockitoAnnotations.initMocks(this);
+ mContext = ApplicationProvider.getApplicationContext();
+ mInCallModel = new InCallModel(mClock);
+ mInCallModel.setPresenter(mPresenter);
+ mInCallModel.onCreate(mContext);
+ mOngoingCallSecondaryText =
+ ApplicationProvider.getApplicationContext().getResources().getString(
+ R.string.ongoing_call_text);
+ }
+
+ @After
+ public void tearDown() {
+ mInCallModel.onDestroy(ApplicationProvider.getApplicationContext());
+ }
+
+ @Test
+ public void noChange_doesNotCallPresenter() {
+ verify(mPresenter, never()).onModelUpdated(any());
+ }
+
+ @Test
+ public void onCallRemoved_callsPresenter() {
+ mInCallModel.onCallRemoved(mCall);
+
+ verify(mPresenter).onModelUpdated(mInCallModel);
+ }
+
+ @Test
+ public void updateModelWithPhoneNumber_setsPhoneNumber() {
+ mInCallModel.updateModelWithPhoneNumber(PHONE_NUMBER);
+
+ verify(mPresenter).onModelUpdated(mInCallModel);
+ DescriptiveTextWithControlsView content =
+ (DescriptiveTextWithControlsView) mInCallModel.getCardContent();
+ String formattedNumber = TelecomUtils.getFormattedNumber(
+ ApplicationProvider.getApplicationContext(), PHONE_NUMBER);
+ assertEquals(content.getTitle(), formattedNumber);
+ assertEquals(content.getSubtitle(), mOngoingCallSecondaryText);
+ }
+
+ @Test
+ public void updateModelWithContact_noAvatarUri_setsContactNameAndInitialsIcon() {
+ TelecomUtils.PhoneNumberInfo phoneInfo = new TelecomUtils.PhoneNumberInfo(PHONE_NUMBER,
+ DISPLAY_NAME, DISPLAY_NAME, INITIALS, /* avatarUri = */ null,
+ /* typeLabel = */ null, /* lookupKey = */ null);
+ mInCallModel.updateModelWithContact(phoneInfo);
+
+ verify(mPresenter).onModelUpdated(mInCallModel);
+ DescriptiveTextWithControlsView content =
+ (DescriptiveTextWithControlsView) mInCallModel.getCardContent();
+ assertEquals(content.getTitle(), DISPLAY_NAME);
+ assertEquals(content.getSubtitle(), mOngoingCallSecondaryText);
+ assertNotNull(content.getImage());
+ }
+
+ @Test
+ public void updateModelWithContact_invalidAvatarUri_setsContactNameAndInitialsIcon() {
+ Uri invalidUri = new Uri.Builder().path("invalid uri path").build();
+ TelecomUtils.PhoneNumberInfo phoneInfo = new TelecomUtils.PhoneNumberInfo(PHONE_NUMBER,
+ DISPLAY_NAME, DISPLAY_NAME, INITIALS, invalidUri, /* typeLabel = */ null,
+ /* lookupKey = */ null);
+ mInCallModel.updateModelWithContact(phoneInfo);
+
+ verify(mPresenter).onModelUpdated(mInCallModel);
+ DescriptiveTextWithControlsView content =
+ (DescriptiveTextWithControlsView) mInCallModel.getCardContent();
+ assertEquals(content.getTitle(), DISPLAY_NAME);
+ assertEquals(content.getSubtitle(), mOngoingCallSecondaryText);
+ assertNotNull(content.getImage());
+ }
+}
diff --git a/tests/src/com/android/car/carlauncher/homescreen/audio/MediaViewModelTest.java b/tests/src/com/android/car/carlauncher/homescreen/audio/MediaViewModelTest.java
new file mode 100644
index 0000000..118fb9b
--- /dev/null
+++ b/tests/src/com/android/car/carlauncher/homescreen/audio/MediaViewModelTest.java
@@ -0,0 +1,160 @@
+/*
+ * Copyright (C) 2020 Google Inc.
+ *
+ * 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.car.carlauncher.homescreen.audio;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.graphics.drawable.Drawable;
+
+import androidx.lifecycle.MutableLiveData;
+import androidx.test.core.app.ApplicationProvider;
+
+import com.android.car.arch.common.testing.InstantTaskExecutorRule;
+import com.android.car.carlauncher.homescreen.HomeCardInterface;
+import com.android.car.carlauncher.homescreen.ui.CardHeader;
+import com.android.car.carlauncher.homescreen.ui.DescriptiveTextWithControlsView;
+import com.android.car.media.common.MediaItemMetadata;
+import com.android.car.media.common.playback.PlaybackViewModel;
+import com.android.car.media.common.source.MediaSource;
+import com.android.car.media.common.source.MediaSourceViewModel;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+@RunWith(JUnit4.class)
+public class MediaViewModelTest {
+
+ private static final CharSequence APP_NAME = "test app name";
+ private static final Drawable APP_ICON = null;
+ private static final CharSequence SONG_TITLE = "test song title";
+ private static final CharSequence ARTIST_NAME = "test artist name";
+
+ private MediaViewModel mMediaViewModel;
+ private MutableLiveData<MediaSource> mLiveMediaSource = new MutableLiveData<>();
+ private MutableLiveData<MediaItemMetadata> mLiveMetadata = new MutableLiveData<>();
+
+ @Mock
+ private MediaSourceViewModel mSourceViewModel;
+ @Mock
+ private PlaybackViewModel mPlaybackViewModel;
+ @Mock
+ private MediaSource mMediaSource;
+ @Mock
+ private MediaItemMetadata mMetadata;
+ @Mock
+ private HomeCardInterface.Presenter mPresenter;
+
+ // The tests use the MediaViewModel's observers. To avoid errors with invoking observeForever
+ // on a background thread, this rule configures LiveData to execute each task synchronously.
+ @Rule
+ public final InstantTaskExecutorRule mTaskExecutorRule = new InstantTaskExecutorRule();
+
+ @Before
+ public void setUp() {
+ MockitoAnnotations.initMocks(this);
+ mMediaViewModel = new MediaViewModel(ApplicationProvider.getApplicationContext(),
+ mSourceViewModel, mPlaybackViewModel);
+ when(mSourceViewModel.getPrimaryMediaSource()).thenReturn(mLiveMediaSource);
+ when(mPlaybackViewModel.getMetadata()).thenReturn(mLiveMetadata);
+ mMediaViewModel.setPresenter(mPresenter);
+ mMediaViewModel.onCreate(ApplicationProvider.getApplicationContext());
+ reset(mPresenter);
+ }
+
+ @After
+ public void after() {
+ mMediaViewModel.onCleared();
+ }
+
+ @Test
+ public void noChange_doesNotCallPresenter() {
+ verify(mPresenter, never()).onModelUpdated(any());
+ assertNull(mMediaViewModel.getCardHeader());
+ DescriptiveTextWithControlsView content =
+ (DescriptiveTextWithControlsView) mMediaViewModel.getCardContent();
+ assertNull(content.getTitle());
+ assertNull(content.getSubtitle());
+ }
+
+ @Test
+ public void changeSourceAndMetadata_updatesModel() {
+ when(mMediaSource.getDisplayName()).thenReturn(APP_NAME);
+ when(mMediaSource.getIcon()).thenReturn(APP_ICON);
+ when(mMetadata.getArtist()).thenReturn(ARTIST_NAME);
+ when(mMetadata.getTitle()).thenReturn(SONG_TITLE);
+
+ mLiveMediaSource.setValue(mMediaSource);
+ mLiveMetadata.setValue(mMetadata);
+
+ // Model is updated exactly twice: once when source is set (null metadata)
+ // and again when the metadata is set
+ verify(mPresenter, times(2)).onModelUpdated(mMediaViewModel);
+ CardHeader header = mMediaViewModel.getCardHeader();
+ assertEquals(header.getCardTitle(), APP_NAME);
+ assertNull(header.getCardIcon());
+ DescriptiveTextWithControlsView content =
+ (DescriptiveTextWithControlsView) mMediaViewModel.getCardContent();
+ assertEquals(content.getTitle(), SONG_TITLE);
+ assertEquals(content.getSubtitle(), ARTIST_NAME);
+ }
+
+ @Test
+ public void changeSourceOnly_updatesModel() {
+ when(mMediaSource.getDisplayName()).thenReturn(APP_NAME);
+ when(mMediaSource.getIcon()).thenReturn(APP_ICON);
+
+ mLiveMediaSource.setValue(mMediaSource);
+
+ verify(mPresenter).onModelUpdated(mMediaViewModel);
+ CardHeader header = mMediaViewModel.getCardHeader();
+ assertEquals(header.getCardTitle(), APP_NAME);
+ assertNull(header.getCardIcon());
+ DescriptiveTextWithControlsView content =
+ (DescriptiveTextWithControlsView) mMediaViewModel.getCardContent();
+ assertNull(content.getTitle());
+ assertNull(content.getSubtitle());
+ }
+
+ @Test
+ public void changeMetadataOnly_doesNotCallPresenter() {
+ when(mMetadata.getArtist()).thenReturn(ARTIST_NAME);
+ when(mMetadata.getTitle()).thenReturn(SONG_TITLE);
+
+ mLiveMetadata.setValue(mMetadata);
+
+ verify(mPresenter, never()).onModelUpdated(any());
+ assertNull(mMediaViewModel.getCardHeader());
+ DescriptiveTextWithControlsView content =
+ (DescriptiveTextWithControlsView) mMediaViewModel.getCardContent();
+ assertEquals(content.getTitle(), SONG_TITLE);
+ assertEquals(content.getSubtitle(), ARTIST_NAME);
+ }
+}
+
diff --git a/tests/src/com/android/car/carlauncher/homescreen/audio/telecom/InCallServiceImplTest.java b/tests/src/com/android/car/carlauncher/homescreen/audio/telecom/InCallServiceImplTest.java
new file mode 100644
index 0000000..161d7d4
--- /dev/null
+++ b/tests/src/com/android/car/carlauncher/homescreen/audio/telecom/InCallServiceImplTest.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2020 Google Inc.
+ *
+ * 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.car.carlauncher.homescreen.audio.telecom;
+
+import static org.mockito.Mockito.verify;
+
+import android.content.Intent;
+import android.os.IBinder;
+import android.telecom.Call;
+
+import androidx.test.core.app.ApplicationProvider;
+import androidx.test.rule.ServiceTestRule;
+
+import com.android.car.carlauncher.homescreen.audio.InCallModel;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import java.util.concurrent.TimeoutException;
+
+@RunWith(JUnit4.class)
+public class InCallServiceImplTest {
+
+ private InCallServiceImpl mService;
+ private Call mCall = null;
+
+ @Mock
+ private InCallModel mInCallModel;
+
+ @Rule
+ public final ServiceTestRule mServiceTestRule = new ServiceTestRule();
+
+ @Before
+ public void setUp() throws TimeoutException {
+ MockitoAnnotations.initMocks(this);
+
+ Intent intent = new Intent(ApplicationProvider.getApplicationContext(),
+ InCallServiceImpl.class);
+ intent.setAction(InCallServiceImpl.ACTION_LOCAL_BIND);
+ IBinder binder = mServiceTestRule.bindService(intent);
+ mService = ((InCallServiceImpl.LocalBinder) binder).getService();
+ }
+
+ @Test
+ public void onCallAdded_callsListener() {
+ mService.addListener(mInCallModel);
+ mService.onCallAdded(mCall);
+
+ verify(mInCallModel).onCallAdded(mCall);
+ }
+
+ @Test
+ public void onCallRemoved_callsListener() {
+ mService.addListener(mInCallModel);
+ mService.onCallRemoved(mCall);
+
+ verify(mInCallModel).onCallRemoved(mCall);
+ }
+}
diff --git a/tools/generate-overlayable.sh b/tools/generate-overlayable.sh
new file mode 100755
index 0000000..e34b3e9
--- /dev/null
+++ b/tools/generate-overlayable.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+# 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.
+
+# Run this script to regenerate the overlayable.xml file.
+
+if [[ -z "$ANDROID_BUILD_TOP" ]]; then
+ echo 'ANDROID_BUILD_TOP environment variable is empty; did you forget to run `lunch`?'
+ exit 1
+fi
+
+PROJECT_TOP=$ANDROID_BUILD_TOP/packages/apps/Car/Launcher
+
+python $ANDROID_BUILD_TOP/packages/apps/Car/tests/tools/rro/generate-overlayable.py \
+ -n CarLauncher \
+ -r $PROJECT_TOP/res \
+ -e $PROJECT_TOP/res/values/overlayable.xml \
+ -o $PROJECT_TOP/res/values/overlayable.xml