Snap for 8564071 from 0f35e4057d15861ec8de469c6f1ca456c1a1307f to mainline-adbd-release
Change-Id: I308f9dbf60ea47ec472bc7d886365a39ac0ad510
diff --git a/Android.bp b/Android.bp
index 338b0bd..77e8e3d 100644
--- a/Android.bp
+++ b/Android.bp
@@ -13,16 +13,41 @@
// limitations under the License.
//
-android_app {
- name: "CarLauncher",
+package {
+ 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",
+
+ resource_dirs: [],
+
platform_apis: true,
- required: ["privapp_whitelist_com.android.car.carlauncher"],
+ required: ["allowed_privapp_com.android.car.carlauncher"],
certificate: "platform",
@@ -34,6 +59,10 @@
"Launcher3QuickStep",
],
+ static_libs: ["CarLauncher-core"],
+
+ libs: ["android.car"],
+
optimize: {
enabled: false,
},
@@ -42,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 8b26907..1d3fc7b 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -18,15 +18,29 @@
<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"/>
+ <!-- Permission to assign Activity to TDA -->
+ <uses-permission android:name="android.car.permission.CONTROL_CAR_APP_LAUNCH"/>
<!-- System permission to host maps activity -->
<uses-permission android:name="android.permission.ACTIVITY_EMBEDDING"/>
+ <!-- Needed to change component enabled state when user opens disabled apps. -->
+ <uses-permission android:name="android.permission.CHANGE_COMPONENT_ENABLED_STATE"/>
+ <!-- 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 call AM.getRunningAppProcesses().
+ TODO: change this to REAL_GET_TASKS. -->
+ <uses-permission android:name="android.permission.GET_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 +49,20 @@
<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"/>
+ <!-- Allows input events to be monitored by CarDisplayAreaTouchHandler. -->
+ <uses-permission android:name="android.permission.MONITOR_INPUT"/>
+ <!-- Needed to use TYPE_APPLICATION_OVERLAY window type to display title bar. -->
+ <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
+ <!-- Permission to start a voice interaction service. -->
+ <uses-permission android:name="android.permission.ACCESS_VOICE_INTERACTION_SERVICE" />
+ <!-- Permission to use InteractionJankMonitor. -->
+ <uses-permission android:name="android.permission.READ_DEVICE_CONFIG" />
+ <!-- Permission to send notifications -->
+ <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<!-- To connect to media browser services in other apps, media browser clients
that target Android 11 need to add the following in their manifest -->
@@ -48,7 +75,8 @@
<application
android:icon="@drawable/ic_launcher_home"
android:label="@string/app_title"
- android:theme="@style/Theme.Launcher">
+ android:theme="@style/Theme.Launcher"
+ android:supportsRtl="true">
<activity
android:name=".CarLauncher"
android:configChanges="uiMode|mcc|mnc"
@@ -56,21 +84,50 @@
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>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.HOME"/>
<category android:name="android.intent.category.DEFAULT"/>
+ <category android:name="android.intent.category.LAUNCHER_APP"/>
+ </intent-filter>
+ </activity>
+ <activity
+ android:name=".ControlBarActivity"
+ android:launchMode="singleInstance"
+ 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>
+ <category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".AppGridActivity"
android:launchMode="singleInstance"
android:exported="true"
- android:noHistory="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/OWNERS b/OWNERS
index 595fd6e..d524a5c 100644
--- a/OWNERS
+++ b/OWNERS
@@ -1,9 +1,8 @@
# Default code reviewers picked from top 3 or more developers.
# Please update this list if you find better candidates.
-ajchen@google.com
arnaudberry@google.com
-davidln@google.com
-hseog@google.com
-jonathankoo@google.com
+alexstetson@google.com
+nehah@google.com
+igorr@google.com
stenning@google.com
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
new file mode 100644
index 0000000..7a9b8ca
--- /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/systemlibs/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/default_audio_background.xml b/res/drawable/default_audio_background.xml
new file mode 100644
index 0000000..8c92f16
--- /dev/null
+++ b/res/drawable/default_audio_background.xml
@@ -0,0 +1,19 @@
+<?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.
+ -->
+
+<!-- Empty drawable for default audio card background -->
+<shape xmlns:android="http://schemas.android.com/apk/res/android" />
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/drawable/ic_mic_on.xml b/res/drawable/ic_mic_on.xml
new file mode 100644
index 0000000..9869d7e
--- /dev/null
+++ b/res/drawable/ic_mic_on.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ Copyright (C) 2021 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="@dimen/home_card_button_size"
+ android:height="@dimen/home_card_button_size"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:pathData="M12,14c1.66,0 2.99,-1.34 2.99,-3L15,5c0,-1.66 -1.34,-3 -3,-3S9,3.34 9,5v6c0,1.66 1.34,3 3,3zM17.3,11c0,3 -2.54,5.1 -5.3,5.1S6.7,14 6.7,11L5,11c0,3.41 2.72,6.23 6,6.72L11,21h2v-3.28c3.28,-0.48 6,-3.3 6,-6.72h-1.7z"
+ android:fillColor="@color/dialer_button_icon_color"/>
+</vector>
diff --git a/res/drawable/ic_mute_activatable.xml b/res/drawable/ic_mute_activatable.xml
new file mode 100644
index 0000000..f0e3e6d
--- /dev/null
+++ b/res/drawable/ic_mute_activatable.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ ~ Copyright (C) 2021 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_selected="true"
+ android:drawable="@drawable/ic_mic_off"/>
+
+ <item android:drawable="@drawable/ic_mic_on"/>
+</selector>
diff --git a/res/layout-land/car_launcher.xml b/res/layout-land/car_launcher.xml
index b7d8ed5..b6a1589 100644
--- a/res/layout-land/car_launcher.xml
+++ b/res/layout-land/car_launcher.xml
@@ -20,92 +20,50 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:layoutDirection="ltr"
tools:context=".CarLauncher">
+ <com.android.car.ui.FocusParkingView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+
+ <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_constraintEnd_toStartOf="@+id/divider_vertical"
- app:layout_constraintStart_toEndOf="@+id/start_edge"
- 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/divider_horizontal"
- app:layout_constraintEnd_toStartOf="@+id/end_edge"
- app:layout_constraintStart_toEndOf="@+id/divider_vertical"
- app:layout_constraintTop_toBottomOf="@+id/top_edge"/>
-
- <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_constraintEnd_toStartOf="@+id/end_edge"
- app:layout_constraintStart_toEndOf="@+id/divider_vertical"
- app:layout_constraintTop_toBottomOf="@+id/divider_horizontal"/>
- <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 f2cd649..e45dc69 100644
--- a/res/layout/car_launcher.xml
+++ b/res/layout/car_launcher.xml
@@ -1,111 +1,63 @@
-<?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"
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
- android:id="@+id/start_edge"
+ <com.android.car.ui.FocusParkingView
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- app:layout_constraintGuide_begin="@dimen/horizontal_border_size"/>
+ android:layout_height="wrap_content"/>
- <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"/>
+ <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:layout_marginBottom="@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/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:layout_marginBottom="@dimen/main_screen_widget_margin"
+ 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_constraintEnd_toStartOf="@+id/end_edge"
- app:layout_constraintStart_toEndOf="@+id/start_edge"
- 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_constraintEnd_toStartOf="@+id/end_edge"
- app:layout_constraintStart_toEndOf="@+id/divider_vertical"
- app:layout_constraintTop_toBottomOf="@+id/divider_horizontal"/>
-
- <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_constraintEnd_toStartOf="@+id/divider_vertical"
- app:layout_constraintStart_toEndOf="@+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>
+ android:layoutDirection="locale"
+ 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 04924be..6061dbf 100644
--- a/res/layout/car_launcher_multiwindow.xml
+++ b/res/layout/car_launcher_multiwindow.xml
@@ -63,23 +63,25 @@
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"
+ android:layoutDirection="locale"
app:layout_constraintBottom_toTopOf="@+id/divider_horizontal"
- app:layout_constraintEnd_toStartOf="@+id/end_edge"
- app:layout_constraintStart_toEndOf="@+id/start_edge"
+ app:layout_constraintRight_toLeftOf="@+id/end_edge"
+ app:layout_constraintLeft_toRightOf="@+id/start_edge"
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"
+ android:layoutDirection="locale"
app:layout_constraintBottom_toTopOf="@+id/bottom_edge"
- app:layout_constraintEnd_toStartOf="@+id/end_edge"
- app:layout_constraintStart_toEndOf="@+id/start_edge"
+ app:layout_constraintRight_toLeftOf="@+id/end_edge"
+ app:layout_constraintLeft_toRightOf="@+id/start_edge"
app:layout_constraintTop_toBottomOf="@+id/divider_horizontal"/>
<View
android:id="@+id/bottom_line"
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 307ba27..0000000
--- a/res/layout/contextual_fragment.xml
+++ /dev/null
@@ -1,92 +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">
-
- <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/control_bar_container.xml b/res/layout/control_bar_container.xml
new file mode 100644
index 0000000..4c3d955
--- /dev/null
+++ b/res/layout/control_bar_container.xml
@@ -0,0 +1,34 @@
+<?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.
+ -->
+<androidx.constraintlayout.widget.ConstraintLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <com.android.car.ui.FocusArea
+ android:id="@+id/bottom_card"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layoutDirection="locale"
+ android:padding="@dimen/control_bar_padding"
+ app:layout_constraintLeft_toLeftOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintRight_toRightOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"/>
+
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
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
new file mode 100644
index 0000000..1bb4b20
--- /dev/null
+++ b/res/values-af/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Motorlanseerder"</string>
+ <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="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
new file mode 100644
index 0000000..1f76984
--- /dev/null
+++ b/res/values-am/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"የመኪና ማስጀመሪያ"</string>
+ <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="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
new file mode 100644
index 0000000..03f03fe
--- /dev/null
+++ b/res/values-ar/strings.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"مشغّل تطبيقات السيارة"</string>
+ <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="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>
+ <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>
+ <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
new file mode 100644
index 0000000..c9b74f4
--- /dev/null
+++ b/res/values-as/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"গাড়ী লঞ্চাৰ"</string>
+ <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="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
new file mode 100644
index 0000000..c2ea112
--- /dev/null
+++ b/res/values-az/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Avtomobil Başladıcısı"</string>
+ <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="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
new file mode 100644
index 0000000..148fbc6
--- /dev/null
+++ b/res/values-b+sr+Latn/strings.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Pokretač za automobile"</string>
+ <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="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
new file mode 100644
index 0000000..8fbdaca
--- /dev/null
+++ b/res/values-be/strings.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Праграма запуску для аўтамабіля"</string>
+ <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="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
new file mode 100644
index 0000000..c832b7a
--- /dev/null
+++ b/res/values-bg/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Стартов панел на автомобила"</string>
+ <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="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
new file mode 100644
index 0000000..0492a1b
--- /dev/null
+++ b/res/values-bn/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..dfbdf4c
--- /dev/null
+++ b/res/values-bs/strings.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Pokretač za automobil"</string>
+ <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="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
new file mode 100644
index 0000000..5d91e90
--- /dev/null
+++ b/res/values-ca/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Menú d\'aplicacions del cotxe"</string>
+ <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="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
new file mode 100644
index 0000000..75a3c0e
--- /dev/null
+++ b/res/values-cs/strings.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Spouštěč v autě"</string>
+ <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="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
new file mode 100644
index 0000000..3a481e1
--- /dev/null
+++ b/res/values-da/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..22ab878
--- /dev/null
+++ b/res/values-de/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Auto-Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..44ed8e4
--- /dev/null
+++ b/res/values-el/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Εφαρμογή εκκίνησης αυτοκινήτου"</string>
+ <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="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
new file mode 100644
index 0000000..ab1edd9
--- /dev/null
+++ b/res/values-en-rAU/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..ab1edd9
--- /dev/null
+++ b/res/values-en-rCA/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..ab1edd9
--- /dev/null
+++ b/res/values-en-rGB/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..ab1edd9
--- /dev/null
+++ b/res/values-en-rIN/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..61d0acb
--- /dev/null
+++ b/res/values-en-rXC/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..e264e92
--- /dev/null
+++ b/res/values-es-rUS/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Selector para vehículos"</string>
+ <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="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
new file mode 100644
index 0000000..a65492c
--- /dev/null
+++ b/res/values-es/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Menú de aplicaciones del coche"</string>
+ <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="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
new file mode 100644
index 0000000..235c8aa
--- /dev/null
+++ b/res/values-et/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Auto käivitusprogramm"</string>
+ <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="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
new file mode 100644
index 0000000..4a92468
--- /dev/null
+++ b/res/values-eu/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..5c969de
--- /dev/null
+++ b/res/values-fa/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"راهانداز خودرو"</string>
+ <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="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
new file mode 100644
index 0000000..54374a5
--- /dev/null
+++ b/res/values-fi/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Auton käynnistysohjelma"</string>
+ <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="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
new file mode 100644
index 0000000..46ea306
--- /dev/null
+++ b/res/values-fr-rCA/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Lanceur d\'application pour la voiture"</string>
+ <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="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
new file mode 100644
index 0000000..86fcdfb
--- /dev/null
+++ b/res/values-fr/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..fe3bc9d
--- /dev/null
+++ b/res/values-gl/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Launcher do coche"</string>
+ <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="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
new file mode 100644
index 0000000..573865b
--- /dev/null
+++ b/res/values-gu/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"કાર લૉન્ચર"</string>
+ <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="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
new file mode 100644
index 0000000..625d5cf
--- /dev/null
+++ b/res/values-hi/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..82c4cdc
--- /dev/null
+++ b/res/values-hr/strings.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Pokretač za automobil"</string>
+ <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="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
new file mode 100644
index 0000000..680e973
--- /dev/null
+++ b/res/values-hu/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Autóindító"</string>
+ <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="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
new file mode 100644
index 0000000..5da8b61
--- /dev/null
+++ b/res/values-hy/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Մեքենայի գործարկիչ"</string>
+ <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="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
new file mode 100644
index 0000000..fa09c78
--- /dev/null
+++ b/res/values-in/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..9e794bc
--- /dev/null
+++ b/res/values-is/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Ræsiforrit bíls"</string>
+ <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="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
new file mode 100644
index 0000000..ffd04a7
--- /dev/null
+++ b/res/values-it/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Avvio app dell\'auto"</string>
+ <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="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="one"><xliff:g id="COUNT_1">%d</xliff:g> dispositivi</item>
+ <item quantity="other"><xliff:g id="COUNT_1">%d</xliff:g> dispositivi</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
new file mode 100644
index 0000000..4b5aa61
--- /dev/null
+++ b/res/values-iw/strings.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"מרכז האפליקציות ברכב"</string>
+ <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="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
new file mode 100644
index 0000000..2b29e9c
--- /dev/null
+++ b/res/values-ja/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"車用ランチャー"</string>
+ <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="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
new file mode 100644
index 0000000..f230e9f
--- /dev/null
+++ b/res/values-ka/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"მანქანის გამშვები"</string>
+ <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="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
new file mode 100644
index 0000000..595339d
--- /dev/null
+++ b/res/values-kk/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..0b9ed9d
--- /dev/null
+++ b/res/values-km/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..325d844
--- /dev/null
+++ b/res/values-kn/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"ಕಾರ್ ಲಾಂಚರ್"</string>
+ <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="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
new file mode 100644
index 0000000..d4fcb8c
--- /dev/null
+++ b/res/values-ko/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"차량 런처"</string>
+ <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="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
new file mode 100644
index 0000000..0e6aa2d
--- /dev/null
+++ b/res/values-ky/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Автоунааны жүргүзгүч"</string>
+ <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="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
new file mode 100644
index 0000000..d1d7d0c
--- /dev/null
+++ b/res/values-lo/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"ລັນເຊີລົດ"</string>
+ <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="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
new file mode 100644
index 0000000..d4d28c7
--- /dev/null
+++ b/res/values-lt/strings.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Automobilio paleidimo priemonė"</string>
+ <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="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
new file mode 100644
index 0000000..32b50b9
--- /dev/null
+++ b/res/values-lv/strings.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..885ed1d
--- /dev/null
+++ b/res/values-mk/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Стартер на автомобил"</string>
+ <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="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
new file mode 100644
index 0000000..bdc689c
--- /dev/null
+++ b/res/values-ml/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"കാർ ലോഞ്ചർ"</string>
+ <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="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
new file mode 100644
index 0000000..45f1a94
--- /dev/null
+++ b/res/values-mn/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Машины эхлүүлэгч"</string>
+ <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="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
new file mode 100644
index 0000000..4845261
--- /dev/null
+++ b/res/values-mr/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"कार लाँचर"</string>
+ <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="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
new file mode 100644
index 0000000..4258870
--- /dev/null
+++ b/res/values-ms/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Pelancar Kereta"</string>
+ <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="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
new file mode 100644
index 0000000..736dd9a
--- /dev/null
+++ b/res/values-my/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"ကား၏ ဖွင့်စနစ်"</string>
+ <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="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
new file mode 100644
index 0000000..8d210c6
--- /dev/null
+++ b/res/values-nb/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..9489797
--- /dev/null
+++ b/res/values-ne/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"कार लन्चर"</string>
+ <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="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
new file mode 100644
index 0000000..2aad711
--- /dev/null
+++ b/res/values-nl/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..d7746a9
--- /dev/null
+++ b/res/values-or/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"କାର୍ ଲଞ୍ଚର୍"</string>
+ <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="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
new file mode 100644
index 0000000..da3c844
--- /dev/null
+++ b/res/values-pa/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"ਕਾਰ ਲਾਂਚਰ"</string>
+ <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="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
new file mode 100644
index 0000000..00c6f91
--- /dev/null
+++ b/res/values-pl/strings.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Program uruchamiający w samochodzie"</string>
+ <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="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
new file mode 100644
index 0000000..f4b5bf5
--- /dev/null
+++ b/res/values-pt-rPT/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Launcher do carro"</string>
+ <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="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="one"><xliff:g id="COUNT_0">%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">"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
new file mode 100644
index 0000000..1485157
--- /dev/null
+++ b/res/values-pt/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Tela de início do carro"</string>
+ <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="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
new file mode 100644
index 0000000..1827006
--- /dev/null
+++ b/res/values-ro/strings.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Lansator de aplicații pentru mașină"</string>
+ <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="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
new file mode 100644
index 0000000..57ac749
--- /dev/null
+++ b/res/values-ru/strings.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Панель запуска для автомобиля"</string>
+ <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="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
new file mode 100644
index 0000000..58f6ab7
--- /dev/null
+++ b/res/values-si/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"මෝටර් රථ දියත්කරණය"</string>
+ <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="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
new file mode 100644
index 0000000..b10261b
--- /dev/null
+++ b/res/values-sk/strings.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Spúšťač v aute"</string>
+ <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="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
new file mode 100644
index 0000000..b73a86f
--- /dev/null
+++ b/res/values-sl/strings.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Zaganjalnik za avtomobil"</string>
+ <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="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
new file mode 100644
index 0000000..f4b7a74
--- /dev/null
+++ b/res/values-sq/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..53e0a25
--- /dev/null
+++ b/res/values-sr/strings.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Покретач за аутомобиле"</string>
+ <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="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
new file mode 100644
index 0000000..5575dfc
--- /dev/null
+++ b/res/values-sv/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..fb354b1
--- /dev/null
+++ b/res/values-sw/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Kifungua Programu cha Gari"</string>
+ <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="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
new file mode 100644
index 0000000..71d14d5
--- /dev/null
+++ b/res/values-ta/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..e6696d5
--- /dev/null
+++ b/res/values-te/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"కార్ లాంచర్"</string>
+ <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="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
new file mode 100644
index 0000000..b1a7343
--- /dev/null
+++ b/res/values-th/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..ac00242
--- /dev/null
+++ b/res/values-tl/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..e46d592
--- /dev/null
+++ b/res/values-tr/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..6b1c3dc
--- /dev/null
+++ b/res/values-uk/strings.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Панель запуску для автомобіля"</string>
+ <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="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
new file mode 100644
index 0000000..f1423ab
--- /dev/null
+++ b/res/values-ur/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"کار لانچر"</string>
+ <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="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
new file mode 100644
index 0000000..51d50eb
--- /dev/null
+++ b/res/values-uz/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Avtomobil uchun launcher"</string>
+ <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="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
new file mode 100644
index 0000000..b205d48
--- /dev/null
+++ b/res/values-vi/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Trình chạy cho ô tô"</string>
+ <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="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
new file mode 100644
index 0000000..7d7edf8
--- /dev/null
+++ b/res/values-zh-rCN/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"车用启动器"</string>
+ <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="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
new file mode 100644
index 0000000..8686c91
--- /dev/null
+++ b/res/values-zh-rHK/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Car Launcher"</string>
+ <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="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
new file mode 100644
index 0000000..f964c2f
--- /dev/null
+++ b/res/values-zh-rTW/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"車用啟動器"</string>
+ <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="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
new file mode 100644
index 0000000..be10cf0
--- /dev/null
+++ b/res/values-zu/strings.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_title" msgid="1995858460392177468">"Isiqalisi Semoto"</string>
+ <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="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..fe15153 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -16,5 +16,11 @@
<resources>
<color name="date_divider_bar_color">@*android:color/car_grey_500</color>
<color name="icon_tint">@*android:color/car_tint</color>
+ <color name="media_button_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..2336cb7
--- /dev/null
+++ b/res/values/config.xml
@@ -0,0 +1,57 @@
+<?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>
+
+ <!-- An intent to start a map activity with limited functionality, optimized for small canvas.
+ The default map intent is used, if this value is empty or cannot be parsed as an intent
+ URI, for example:
+ "intent:#Intent;component=com.google.android.apps.maps/com.google.android.maps.LimitedMapsActivity;end"
+ -->
+ <string name="config_smallCanvasOptimizedMapIntent" translatable="false"></string>
+
+ <!--
+ A list of package names that will prompt a restart of the Task inside TaskView,
+ when the package is updated.
+ E.g.) If a map is running in TaskView, the package names of the map and the service
+ which the map depends on should be enumerated
+ -->
+ <string-array name="config_taskViewPackages" translatable="false">
+ </string-array>
+</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index bd38f62..575d386 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>
@@ -47,8 +41,8 @@
<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>
<!-- Padding around the touch target (makes ripple look better) -->
- <dimen name="app_touch_target_padding">@*android:dimen/car_padding_1</dimen>
- <dimen name="app_touch_target_margin">@*android:dimen/car_padding_2</dimen>
+ <dimen name="app_touch_target_padding">@*android:dimen/car_padding_2</dimen>
+ <dimen name="app_touch_target_margin">@*android:dimen/car_padding_1</dimen>
<dimen name="app_grid_row_margin">@*android:dimen/car_padding_4</dimen>
<dimen name="app_icon_description_margin">@*android:dimen/car_padding_4</dimen>
<dimen name="app_icon_ripple_radius">@*android:dimen/car_radius_2</dimen>
@@ -60,4 +54,45 @@
<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>
+
+ <dimen name="control_bar_padding">0dp</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..b1ab52f
--- /dev/null
+++ b/res/values/overlayable.xml
@@ -0,0 +1,176 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Copyright (C) 2022 The Android Open Source Project
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.-->
+<!--
+THIS FILE WAS AUTO GENERATED, DO NOT EDIT MANUALLY.
+REGENERATE USING packages/apps/Car/libs/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="config_taskViewPackages"/>
+ <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="media_button_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="control_bar_padding"/>
+ <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="default_audio_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_mic_on"/>
+ <item type="drawable" name="ic_mute_activatable"/>
+ <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="control_bar_container"/>
+ <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="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="config_smallCanvasOptimizedMapIntent"/>
+ <item type="string" name="dialing_call_text"/>
+ <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="projection_devices"/>
+ <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..949794b 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -24,18 +24,28 @@
<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>
- <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>
+ <!-- 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>
+ <string name="dialing_call_text">Dialing…</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>
+ <string name="projection_devices">{count, plural,
+ =1 {# device}
+ other {# devices}
+ }
+ </string>
+
+ <!-- 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>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index c576b1c..e4a8429 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -27,6 +27,7 @@
<style name="TitleText">
<item name="android:textAppearance">?android:attr/textAppearanceLarge</item>
<item name="android:fontFamily">sans-serif-medium</item>
+ <item name="android:textAlignment">viewStart</item>
</style>
<style name="HorizontalLineDivider">
diff --git a/src/com/android/car/carlauncher/AppGridActivity.java b/src/com/android/car/carlauncher/AppGridActivity.java
index 9d77f18..9445317 100644
--- a/src/com/android/car/carlauncher/AppGridActivity.java
+++ b/src/com/android/car/carlauncher/AppGridActivity.java
@@ -47,15 +47,15 @@
import androidx.annotation.StringRes;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup;
-import androidx.recyclerview.widget.RecyclerView;
import com.android.car.carlauncher.AppLauncherUtils.LauncherAppsInfo;
import com.android.car.ui.FocusArea;
import com.android.car.ui.baselayout.Insets;
import com.android.car.ui.baselayout.InsetsChangedListener;
import com.android.car.ui.core.CarUi;
+import com.android.car.ui.recyclerview.CarUiRecyclerView;
import com.android.car.ui.toolbar.MenuItem;
-import com.android.car.ui.toolbar.Toolbar;
+import com.android.car.ui.toolbar.NavButtonMode;
import com.android.car.ui.toolbar.ToolbarController;
import java.util.ArrayList;
@@ -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";
@@ -87,6 +87,16 @@
private CarMediaManager mCarMediaManager;
private Mode mMode;
+ /**
+ * enum to define the state of display area possible.
+ * CONTROL_BAR state is when only control bar is visible.
+ * FULL state is when display area hosting default apps cover the screen fully.
+ * DEFAULT state where maps are shown above DA for default apps.
+ */
+ public enum CAR_LAUNCHER_STATE {
+ CONTROL_BAR, DEFAULT, FULL
+ }
+
private enum Mode {
ALL_APPS(R.string.app_launcher_title_all_apps,
APP_TYPE_LAUNCHABLES + APP_TYPE_MEDIA_SERVICES,
@@ -143,6 +153,7 @@
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+
mColumnNumber = getResources().getInteger(R.integer.car_app_selector_column_number);
mPackageManager = getPackageManager();
mUsageStatsManager = (UsageStatsManager) getSystemService(Context.USAGE_STATS_SERVICE);
@@ -156,8 +167,8 @@
updateMode();
ToolbarController toolbar = CarUi.requireToolbar(this);
- toolbar.setNavButtonMode(Toolbar.NavButtonMode.CLOSE);
- toolbar.setState(Toolbar.State.SUBPAGE);
+
+ toolbar.setNavButtonMode(NavButtonMode.CLOSE);
if (Build.IS_DEBUGGABLE) {
toolbar.setMenuItems(Collections.singletonList(MenuItem.builder(this)
@@ -174,7 +185,7 @@
}
mGridAdapter = new AppGridAdapter(this);
- RecyclerView gridView = requireViewById(R.id.apps_grid);
+ CarUiRecyclerView gridView = requireViewById(R.id.apps_grid);
GridLayoutManager gridLayoutManager = new GridLayoutManager(this, mColumnNumber);
gridLayoutManager.setSpanSizeLookup(new SpanSizeLookup() {
@@ -226,6 +237,7 @@
@Override
protected void onResume() {
super.onResume();
+
// Using onResume() to refresh most recently used apps because we want to refresh even if
// the app being launched crashes/doesn't cover the entire screen.
updateAppsLists();
@@ -233,14 +245,16 @@
/** 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(getApplicationContext(),
+ appsToHide,
mCustomMediaComponents,
mMode.mAppTypes,
mMode.mOpenMediaCenter,
getSystemService(LauncherApps.class),
mCarPackageManager,
mPackageManager,
+ new AppLauncherUtils.VideoAppPredicate(mPackageManager),
mCarMediaManager);
mGridAdapter.setAllApps(appsInfo.getLaunchableComponentsList());
mGridAdapter.setMostRecentApps(getMostRecentApps(appsInfo));
@@ -265,7 +279,7 @@
@Override
protected void onStop() {
- super.onPause();
+ super.onStop();
// disconnect from app install/uninstall receiver
if (mInstallUninstallReceiver != null) {
unregisterReceiver(mInstallUninstallReceiver);
@@ -360,6 +374,7 @@
.setPadding(0, insets.getTop(), 0, insets.getBottom());
FocusArea focusArea = requireViewById(R.id.focus_area);
focusArea.setHighlightPadding(0, insets.getTop(), 0, insets.getBottom());
+ focusArea.setBoundsOffset(0, insets.getTop(), 0, insets.getBottom());
requireViewById(android.R.id.content)
.setPadding(insets.getLeft(), 0, insets.getRight(), 0);
diff --git a/src/com/android/car/carlauncher/AppGridAdapter.java b/src/com/android/car/carlauncher/AppGridAdapter.java
index 89cf10a..fbd6bba 100644
--- a/src/com/android/car/carlauncher/AppGridAdapter.java
+++ b/src/com/android/car/carlauncher/AppGridAdapter.java
@@ -16,12 +16,14 @@
package com.android.car.carlauncher;
-import android.annotation.Nullable;
+import android.content.ComponentName;
import android.content.Context;
+import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import java.util.Collections;
@@ -33,6 +35,8 @@
final class AppGridAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
public static final int RECENT_APPS_TYPE = 1;
public static final int APP_ITEM_TYPE = 2;
+ private static final long RECENT_APPS_ID = 0;
+ private static final String TAG = "AppGridAdapter";
private final Context mContext;
private final int mColumnNumber;
@@ -47,6 +51,8 @@
mInflater = LayoutInflater.from(context);
mColumnNumber =
mContext.getResources().getInteger(R.integer.car_app_selector_column_number);
+ // Stable IDs improve performance and make rotary work better.
+ setHasStableIds(true);
}
void setIsDistractionOptimizationRequired(boolean isDistractionOptimizationRequired) {
@@ -60,6 +66,27 @@
notifyDataSetChanged();
}
+ @Override
+ public long getItemId(int position) {
+ if (position == 0 && hasRecentlyUsedApps()) {
+ return RECENT_APPS_ID;
+ }
+ if (mApps == null) {
+ Log.w(TAG, "apps list not set");
+ return RecyclerView.NO_ID;
+ }
+ int index = hasRecentlyUsedApps() ? position - 1 : position;
+ if (index < 0 || index >= mApps.size()) {
+ Log.w(TAG, "index out of range");
+ return RecyclerView.NO_ID;
+ }
+ ComponentName componentName = mApps.get(index).getComponentName();
+ long id = componentName.getPackageName().hashCode();
+ id <<= Integer.SIZE;
+ id |= componentName.getClassName().hashCode();
+ return id;
+ }
+
void setAllApps(@Nullable List<AppMetaData> apps) {
mApps = apps;
sortAllApps();
@@ -124,4 +151,4 @@
Collections.sort(mApps, AppLauncherUtils.ALPHABETICAL_COMPARATOR);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/com/android/car/carlauncher/AppItemViewHolder.java b/src/com/android/car/carlauncher/AppItemViewHolder.java
index 418bb85..c00c199 100644
--- a/src/com/android/car/carlauncher/AppItemViewHolder.java
+++ b/src/com/android/car/carlauncher/AppItemViewHolder.java
@@ -16,14 +16,13 @@
package com.android.car.carlauncher;
-import android.annotation.Nullable;
import android.content.Context;
-import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
+import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
/**
@@ -66,11 +65,15 @@
if (isLaunchable) {
mAppItem.setOnClickListener(v -> app.getLaunchCallback().accept(mContext));
- mAppItem.setLongClickable(app.getAlternateLaunchCallback() != null);
- mAppItem.setOnLongClickListener(v-> {
- app.getAlternateLaunchCallback().accept(mContext);
- return true;
- });
+ boolean hasLongClickCallback = (app.getAlternateLaunchCallback() != null);
+ mAppItem.setLongClickable(hasLongClickCallback);
+ if (hasLongClickCallback) {
+ // Note setOnLongClickListener implicitly sets view to be long clickable
+ mAppItem.setOnLongClickListener(v -> {
+ app.getAlternateLaunchCallback().accept(mContext);
+ return true;
+ });
+ }
} else {
String warningText = mContext.getResources()
.getString(R.string.driving_toast_text, app.getDisplayName());
diff --git a/src/com/android/car/carlauncher/AppLauncherUtils.java b/src/com/android/car/carlauncher/AppLauncherUtils.java
index d10ee5f..3b4eda0 100644
--- a/src/com/android/car/carlauncher/AppLauncherUtils.java
+++ b/src/com/android/car/carlauncher/AppLauncherUtils.java
@@ -16,9 +16,10 @@
package com.android.car.carlauncher;
+import static android.car.settings.CarSettings.Secure.KEY_PACKAGES_DISABLED_ON_RESOURCE_OVERUSE;
+
import static java.lang.annotation.RetentionPolicy.SOURCE;
-import android.annotation.Nullable;
import android.app.Activity;
import android.app.ActivityOptions;
import android.car.Car;
@@ -26,36 +27,49 @@
import android.car.content.pm.CarPackageManager;
import android.car.media.CarMediaManager;
import android.content.ComponentName;
+import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
+import android.content.pm.ApplicationInfo;
import android.content.pm.LauncherActivityInfo;
import android.content.pm.LauncherApps;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
+import android.content.res.Resources;
+import android.content.res.XmlResourceParser;
import android.os.Process;
+import android.os.UserHandle;
+import android.provider.Settings;
import android.service.media.MediaBrowserService;
import android.text.TextUtils;
+import android.util.ArraySet;
import android.util.Log;
-import com.android.car.media.common.source.MediaSourceViewModel;
-
import androidx.annotation.IntDef;
import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.annotation.VisibleForTesting;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import java.io.IOException;
import java.lang.annotation.Retention;
+import java.util.ArrayDeque;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.function.Predicate;
/**
* Util class that contains helper method used by app launcher classes.
*/
-class AppLauncherUtils {
+public class AppLauncherUtils {
private static final String TAG = "AppLauncherUtils";
@Retention(SOURCE)
@@ -64,6 +78,16 @@
static final int APP_TYPE_LAUNCHABLES = 1;
static final int APP_TYPE_MEDIA_SERVICES = 2;
+ private static final String TAG_AUTOMOTIVE_APP = "automotiveApp";
+ private static final String TAG_USES = "uses";
+ private static final String ATTRIBUTE_NAME = "name";
+ private static final String TYPE_VIDEO = "video";
+ static final String PACKAGES_DISABLED_ON_RESOURCE_OVERUSE_SEPARATOR = ";";
+
+ // Max no. of uses tags in automotiveApp XML. This is an arbitrary limit to be defensive
+ // to bad input.
+ private static final int MAX_APP_TYPES = 64;
+
private AppLauncherUtils() {
}
@@ -157,7 +181,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
@@ -167,17 +191,23 @@
* @param launcherApps The {@link LauncherApps} system service
* @param carPackageManager The {@link CarPackageManager} system service
* @param packageManager The {@link PackageManager} system service
+ * @param videoAppPredicate Predicate that checks if a given {@link ResolveInfo} resolves
+ * to a video app. See {@link #VideoAppPredicate}. Media-services
+ * of such apps are always excluded.
+ * @param carMediaManager The {@link CarMediaManager} system service
* @return a new {@link LauncherAppsInfo}
*/
@NonNull
static LauncherAppsInfo getLauncherApps(
- @NonNull Set<String> blackList,
+ Context context,
+ @NonNull Set<String> appsToHide,
@NonNull Set<String> customMediaComponents,
@AppTypes int appTypes,
boolean openMediaCenter,
LauncherApps launcherApps,
CarPackageManager carPackageManager,
PackageManager packageManager,
+ @NonNull Predicate<ResolveInfo> videoAppPredicate,
CarMediaManager carMediaManager) {
if (launcherApps == null || carPackageManager == null || packageManager == null
@@ -185,15 +215,23 @@
return EMPTY_APPS_INFO;
}
- List<ResolveInfo> mediaServices = packageManager.queryIntentServices(
- new Intent(MediaBrowserService.SERVICE_INTERFACE),
- PackageManager.GET_RESOLVED_FILTER);
+ // Using new list since we require a mutable list to do removeIf.
+ List<ResolveInfo> mediaServices = new ArrayList<>();
+ mediaServices.addAll(
+ packageManager.queryIntentServices(
+ new Intent(MediaBrowserService.SERVICE_INTERFACE),
+ PackageManager.GET_RESOLVED_FILTER));
+ // Exclude Media Services from Video apps from being considered. These apps should offer a
+ // normal Launcher Activity as an entry point.
+ mediaServices.removeIf(videoAppPredicate);
+
List<LauncherActivityInfo> availableActivities =
launcherApps.getActivityList(null, Process.myUserHandle());
- Map<ComponentName, AppMetaData> launchablesMap = new HashMap<>(
- mediaServices.size() + availableActivities.size());
+ int launchablesSize = mediaServices.size() + availableActivities.size();
+ Map<ComponentName, AppMetaData> launchablesMap = new HashMap<>(launchablesSize);
Map<ComponentName, ResolveInfo> mediaServicesMap = new HashMap<>(mediaServices.size());
+ Set<String> mEnabledPackages = new ArraySet<>(launchablesSize);
// Process media services
if ((appTypes & APP_TYPE_MEDIA_SERVICES) != 0) {
@@ -202,7 +240,8 @@
String className = info.serviceInfo.name;
ComponentName componentName = new ComponentName(packageName, className);
mediaServicesMap.put(componentName, info);
- if (shouldAddToLaunchables(componentName, blackList, customMediaComponents,
+ mEnabledPackages.add(packageName);
+ if (shouldAddToLaunchables(componentName, appsToHide, customMediaComponents,
appTypes, APP_TYPE_MEDIA_SERVICES)) {
final boolean isDistractionOptimized = true;
@@ -214,15 +253,23 @@
componentName,
info.serviceInfo.loadIcon(packageManager),
isDistractionOptimized,
- context -> {
+ contextArg -> {
if (openMediaCenter) {
- AppLauncherUtils.launchApp(context, intent);
+ AppLauncherUtils.launchApp(contextArg, intent);
} else {
- selectMediaSourceAndFinish(context, componentName, carMediaManager);
+ selectMediaSourceAndFinish(contextArg, componentName,
+ carMediaManager);
}
},
- context -> AppLauncherUtils.launchApp(context,
- packageManager.getLaunchIntentForPackage(packageName)));
+ contextArg -> {
+ // getLaunchIntentForPackage looks for a main activity in the category
+ // Intent.CATEGORY_INFO, then Intent.CATEGORY_LAUNCHER, and returns null
+ // if neither are found
+ Intent packageLaunchIntent =
+ packageManager.getLaunchIntentForPackage(packageName);
+ AppLauncherUtils.launchApp(contextArg,
+ packageLaunchIntent != null ? packageLaunchIntent : intent);
+ });
launchablesMap.put(componentName, appMetaData);
}
}
@@ -233,7 +280,8 @@
for (LauncherActivityInfo info : availableActivities) {
ComponentName componentName = info.getComponentName();
String packageName = componentName.getPackageName();
- if (shouldAddToLaunchables(componentName, blackList, customMediaComponents,
+ mEnabledPackages.add(packageName);
+ if (shouldAddToLaunchables(componentName, appsToHide, customMediaComponents,
appTypes, APP_TYPE_LAUNCHABLES)) {
boolean isDistractionOptimized =
isActivityDistractionOptimized(carPackageManager, packageName,
@@ -249,22 +297,239 @@
componentName,
info.getBadgedIcon(0),
isDistractionOptimized,
- context -> AppLauncherUtils.launchApp(context, intent),
+ contextArg -> AppLauncherUtils.launchApp(contextArg, intent),
null);
launchablesMap.put(componentName, appMetaData);
}
}
+
+ List<ResolveInfo> disabledActivities = getDisabledActivities(context, packageManager,
+ mEnabledPackages);
+ for (ResolveInfo info : disabledActivities) {
+ String packageName = info.activityInfo.packageName;
+ String className = info.activityInfo.name;
+ ComponentName componentName = new ComponentName(packageName, className);
+ if (!shouldAddToLaunchables(componentName, appsToHide, customMediaComponents,
+ appTypes, APP_TYPE_LAUNCHABLES)) {
+ continue;
+ }
+ boolean isDistractionOptimized =
+ isActivityDistractionOptimized(carPackageManager, packageName, className);
+
+ Intent intent = new Intent(Intent.ACTION_MAIN)
+ .setComponent(componentName)
+ .addCategory(Intent.CATEGORY_LAUNCHER)
+ .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+
+ AppMetaData appMetaData = new AppMetaData(
+ info.activityInfo.loadLabel(packageManager),
+ componentName,
+ info.activityInfo.loadIcon(packageManager),
+ isDistractionOptimized,
+ contextArg -> {
+ packageManager.setApplicationEnabledSetting(packageName,
+ PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0);
+ /* Fetch the current enabled setting to make sure the setting is synced
+ * before launching the activity. Otherwise, the activity may not
+ * launch.
+ */
+ if (packageManager.getApplicationEnabledSetting(packageName)
+ != PackageManager.COMPONENT_ENABLED_STATE_ENABLED) {
+ throw new IllegalStateException(
+ "Failed to enable the disabled package [" + packageName
+ + "]");
+ }
+ Log.i(TAG, "Successfully enabled package [" + packageName + "]");
+ AppLauncherUtils.launchApp(contextArg, intent);
+ },
+ null);
+ launchablesMap.put(componentName, appMetaData);
+ }
}
return new LauncherAppsInfo(launchablesMap, mediaServicesMap);
}
+ /**
+ * Predicate that can be used to check if a given {@link ResolveInfo} resolves to a Video app.
+ */
+ static class VideoAppPredicate implements Predicate<ResolveInfo> {
+ private final PackageManager mPackageManager;
+
+ VideoAppPredicate(PackageManager packageManager) {
+ mPackageManager = packageManager;
+ }
+
+ @Override
+ public boolean test(ResolveInfo resolveInfo) {
+ String packageName = resolveInfo != null ? getPackageName(resolveInfo) : null;
+ if (packageName == null) {
+ Log.w(TAG, "Unable to determine packageName from resolveInfo");
+ return false;
+ }
+ List<String> automotiveAppTypes =
+ getAutomotiveAppTypes(mPackageManager, getPackageName(resolveInfo));
+ return automotiveAppTypes.contains(TYPE_VIDEO);
+ }
+
+ protected String getPackageName(ResolveInfo resolveInfo) {
+ // A valid ResolveInfo should have exactly one of these set.
+ if (resolveInfo.activityInfo != null) {
+ return resolveInfo.activityInfo.packageName;
+ }
+ if (resolveInfo.serviceInfo != null) {
+ return resolveInfo.serviceInfo.packageName;
+ }
+ if (resolveInfo.providerInfo != null) {
+ return resolveInfo.providerInfo.packageName;
+ }
+ // Unexpected case.
+ return null;
+ }
+ }
+
+
+ /**
+ * Returns whether app identified by {@code packageName} declares itself as a video app.
+ */
+ public static boolean isVideoApp(PackageManager packageManager, String packageName) {
+ return getAutomotiveAppTypes(packageManager, packageName).contains(TYPE_VIDEO);
+ }
+
+ /**
+ * Queries an app manifest and resources to determine the types of AAOS app it declares itself
+ * as.
+ *
+ * @param packageManager {@link PackageManager} to query.
+ * @param packageName App package.
+ * @return List of AAOS app-types from XML resources.
+ */
+ public static List<String> getAutomotiveAppTypes(PackageManager packageManager,
+ String packageName) {
+ ApplicationInfo appInfo;
+ Resources appResources;
+ try {
+ appInfo = packageManager.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
+ appResources = packageManager.getResourcesForApplication(appInfo);
+ } catch (PackageManager.NameNotFoundException e) {
+ Log.w(TAG, "Unexpected package not found for: " + packageName, e);
+ return new ArrayList<>();
+ }
+
+ int resourceId =
+ appInfo.metaData != null
+ ? appInfo.metaData.getInt("com.android.automotive", -1) : -1;
+ if (resourceId == -1) {
+ return new ArrayList<>();
+ }
+ try (XmlResourceParser parser = appResources.getXml(resourceId)) {
+ return parseAutomotiveAppTypes(parser);
+ }
+ }
+
+ @VisibleForTesting
+ static List<String> parseAutomotiveAppTypes(XmlPullParser parser) {
+ try {
+ // This pattern for parsing can be seen in Javadocs for XmlPullParser.
+ List<String> appTypes = new ArrayList<>();
+ ArrayDeque<String> tagStack = new ArrayDeque<>();
+ int eventType = parser.getEventType();
+ while (eventType != XmlPullParser.END_DOCUMENT) {
+ if (eventType == XmlPullParser.START_TAG) {
+ String tag = parser.getName();
+ if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ Log.v(TAG, "Start tag " + tag);
+ }
+ tagStack.addFirst(tag);
+ if (!validTagStack(tagStack)) {
+ Log.w(TAG, "Invalid XML; tagStack: " + tagStack);
+ return new ArrayList<>();
+ }
+ if (TAG_USES.equals(tag)) {
+ String nameValue =
+ parser.getAttributeValue(/* namespace= */ null , ATTRIBUTE_NAME);
+ if (TextUtils.isEmpty(nameValue)) {
+ Log.w(TAG, "Invalid XML; uses tag with missing/empty name attribute");
+ return new ArrayList<>();
+ }
+ appTypes.add(nameValue);
+ if (appTypes.size() > MAX_APP_TYPES) {
+ Log.w(TAG, "Too many uses tags in automotiveApp tag");
+ return new ArrayList<>();
+ }
+ if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ Log.v(TAG, "Found appType: " + nameValue);
+ }
+ }
+ } else if (eventType == XmlPullParser.END_TAG) {
+ if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ Log.v(TAG, "End tag " + parser.getName());
+ }
+ tagStack.removeFirst();
+ }
+ eventType = parser.next();
+ }
+ return appTypes;
+ } catch (XmlPullParserException | IOException e) {
+ Log.w(TAG, "Unexpected exception whiling parsing XML resource", e);
+ return new ArrayList<>();
+ }
+ }
+
+ private static boolean validTagStack(ArrayDeque<String> tagStack) {
+ // Expected to be called after a new tag is pushed on this stack.
+ // Ensures that XML is of form:
+ // <automotiveApp>
+ // <uses/>
+ // <uses/>
+ // ....
+ // </automotiveApp>
+ switch (tagStack.size()) {
+ case 1:
+ return TAG_AUTOMOTIVE_APP.equals(tagStack.peekFirst());
+ case 2:
+ return TAG_USES.equals(tagStack.peekFirst());
+ default:
+ return false;
+ }
+ }
+
+ private static List<ResolveInfo> getDisabledActivities(Context context,
+ PackageManager packageManager, Set<String> enabledPackages) {
+ ContentResolver contentResolverForUser = context.createContextAsUser(
+ UserHandle.getUserHandleForUid(Process.myUid()), /* flags= */ 0)
+ .getContentResolver();
+ String settingsValue = Settings.Secure.getString(contentResolverForUser,
+ KEY_PACKAGES_DISABLED_ON_RESOURCE_OVERUSE);
+ Set<String> disabledPackages = TextUtils.isEmpty(settingsValue) ? new ArraySet<>()
+ : new ArraySet<>(Arrays.asList(settingsValue.split(
+ PACKAGES_DISABLED_ON_RESOURCE_OVERUSE_SEPARATOR)));
+ if (disabledPackages.isEmpty()) {
+ return Collections.emptyList();
+ }
+
+ List<ResolveInfo> allActivities = packageManager.queryIntentActivities(
+ new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_LAUNCHER),
+ PackageManager.ResolveInfoFlags.of(PackageManager.GET_RESOLVED_FILTER
+ | PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS));
+
+ List<ResolveInfo> disabledActivities = new ArrayList<>();
+ for (int i = 0; i < allActivities.size(); ++i) {
+ ResolveInfo info = allActivities.get(i);
+ if (!enabledPackages.contains(info.activityInfo.packageName)
+ && disabledPackages.contains(info.activityInfo.packageName)) {
+ disabledActivities.add(info);
+ }
+ }
+ return disabledActivities;
+ }
+
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/AppMetaData.java b/src/com/android/car/carlauncher/AppMetaData.java
index 5360df3..4de30fc 100644
--- a/src/com/android/car/carlauncher/AppMetaData.java
+++ b/src/com/android/car/carlauncher/AppMetaData.java
@@ -16,12 +16,12 @@
package com.android.car.carlauncher;
-import android.annotation.Nullable;
import android.content.ComponentName;
import android.content.Context;
-import android.content.Intent;
import android.graphics.drawable.Drawable;
+import androidx.annotation.Nullable;
+
import java.util.function.Consumer;
/**
diff --git a/src/com/android/car/carlauncher/CarFullscreenTaskMonitorListener.java b/src/com/android/car/carlauncher/CarFullscreenTaskMonitorListener.java
new file mode 100644
index 0000000..90c6224
--- /dev/null
+++ b/src/com/android/car/carlauncher/CarFullscreenTaskMonitorListener.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.car.carlauncher;
+
+import android.app.ActivityManager;
+import android.car.app.CarActivityManager;
+import android.util.Log;
+import android.view.SurfaceControl;
+
+import com.android.wm.shell.common.SyncTransactionQueue;
+import com.android.wm.shell.fullscreen.FullscreenTaskListener;
+import com.android.wm.shell.fullscreen.FullscreenUnfoldController;
+
+import java.util.Optional;
+import java.util.concurrent.atomic.AtomicReference;
+
+/**
+ * The Car version of FullscreenTaskListener, which reports Task lifecycle to CarService.
+ */
+public class CarFullscreenTaskMonitorListener extends FullscreenTaskListener {
+ private static final String TAG = CarFullscreenTaskMonitorListener.class.getSimpleName();
+ private final AtomicReference<CarActivityManager> mCarActivityManagerRef;
+
+ public CarFullscreenTaskMonitorListener(
+ AtomicReference<CarActivityManager> carActivityManagerRef,
+ SyncTransactionQueue syncQueue,
+ Optional<FullscreenUnfoldController> unfoldController) {
+ super(syncQueue, unfoldController);
+ mCarActivityManagerRef = carActivityManagerRef;
+ }
+ @Override
+ public void onTaskAppeared(ActivityManager.RunningTaskInfo taskInfo,
+ SurfaceControl leash) {
+ super.onTaskAppeared(taskInfo, leash);
+ CarActivityManager carAM = mCarActivityManagerRef.get();
+ if (carAM != null) {
+ carAM.onTaskAppeared(taskInfo);
+ } else {
+ Log.w(TAG, "CarActivityManager is null, skip onTaskAppeared: taskInfo=" + taskInfo);
+ }
+ }
+
+ @Override
+ public void onTaskInfoChanged(ActivityManager.RunningTaskInfo taskInfo) {
+ super.onTaskInfoChanged(taskInfo);
+ CarActivityManager carAM = mCarActivityManagerRef.get();
+ if (carAM != null) {
+ carAM.onTaskInfoChanged(taskInfo);
+ } else {
+ Log.w(TAG, "CarActivityManager is null, skip onTaskInfoChanged: taskInfo=" + taskInfo);
+ }
+ }
+
+ @Override
+ public void onTaskVanished(ActivityManager.RunningTaskInfo taskInfo) {
+ super.onTaskVanished(taskInfo);
+ CarActivityManager carAM = mCarActivityManagerRef.get();
+ if (carAM != null) {
+ carAM.onTaskVanished(taskInfo);
+ } else {
+ Log.w(TAG, "CarActivityManager is null, skip onTaskVanished: taskInfo=" + taskInfo);
+ }
+ }
+}
diff --git a/src/com/android/car/carlauncher/CarLauncher.java b/src/com/android/car/carlauncher/CarLauncher.java
index 9258b54..1842d15 100644
--- a/src/com/android/car/carlauncher/CarLauncher.java
+++ b/src/com/android/car/carlauncher/CarLauncher.java
@@ -16,110 +16,243 @@
package com.android.car.carlauncher;
+import static android.app.ActivityTaskManager.INVALID_TASK_ID;
+import static android.car.user.CarUserManager.USER_LIFECYCLE_EVENT_TYPE_SWITCHING;
+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY;
+
import android.app.ActivityManager;
-import android.app.ActivityView;
-import android.car.app.CarActivityView;
+import android.app.ActivityOptions;
+import android.app.PendingIntent;
+import android.app.TaskStackListener;
+import android.car.Car;
+import android.car.app.CarActivityManager;
+import android.car.user.CarUserManager;
+import android.car.user.CarUserManager.UserLifecycleListener;
+import android.car.user.UserLifecycleEventFilter;
import android.content.ActivityNotFoundException;
+import android.content.BroadcastReceiver;
+import android.content.ComponentName;
+import android.content.Context;
import android.content.Intent;
+import android.content.IntentFilter;
import android.content.res.Configuration;
-import android.hardware.display.DisplayManager;
-import android.hardware.display.DisplayManager.DisplayListener;
+import android.graphics.Rect;
import android.os.Bundle;
-import android.os.Handler;
-import android.os.Looper;
import android.util.Log;
import android.view.Display;
-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.Lifecycle;
+import androidx.lifecycle.ViewModelProvider;
-import com.android.car.media.common.PlaybackFragment;
+import com.android.car.carlauncher.homescreen.HomeCardModule;
+import com.android.car.carlauncher.taskstack.TaskStackChangeListeners;
+import com.android.car.internal.common.UserHelperLite;
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.wm.shell.TaskView;
+import com.android.wm.shell.common.HandlerExecutor;
+
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
/**
- * 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 static final String SCHEME_PACKAGE = "package";
- private CarActivityView mActivityView;
- private boolean mActivityViewReady;
- private boolean mIsStarted;
- private DisplayManager mDisplayManager;
- private final Handler mMainHandler = new Handler(Looper.getMainLooper());
+ private final AtomicReference<CarActivityManager> mCarActivityManagerRef =
+ new AtomicReference<>();
+
+ private ActivityManager mActivityManager;
+ private CarUserManager mCarUserManager;
+ 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 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();
- }
+ private boolean mUseSmallCanvasOptimizedMap;
- @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;
+ if (isResumed()) {
+ maybeBringEmbeddedTaskToForeground();
}
- // startMapsInActivityView() will check Display's State.
- startMapsInActivityView();
+ }
+
+ @Override
+ public void onTaskRemovalStarted(int taskId) {
+ if (DEBUG) Log.d(TAG, "onTaskRemovalStarted: taskId=" + taskId);
+ mTaskViewTaskId = INVALID_TASK_ID;
+ // Don't restart the crashed Maps automatically, because it hinders lots of MultiXXX
+ // CTS tests which cleans up all tasks but Home, then monitor Activity state
+ // changes. If it restarts Maps, which causes unexpected Activity state changes.
}
};
+ private final TaskStackListener mTaskStackListener = new TaskStackListener() {
+ @Override
+ public void onTaskFocusChanged(int taskId, boolean focused) {
+ boolean launcherFocused = taskId == mCarLauncherTaskId && focused;
+ if (DEBUG) {
+ Log.d(TAG, "onTaskFocusChanged: taskId=" + taskId
+ + ", launcherFocused=" + launcherFocused
+ + ", mTaskViewTaskId=" + mTaskViewTaskId);
+ }
+ if (!launcherFocused) {
+ return;
+ }
+ if (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 and focused.
+ startMapsInTaskView();
+ }
+ }
+
+ @Override
+ public void onActivityRestartAttempt(ActivityManager.RunningTaskInfo task,
+ boolean homeTaskVisible, boolean clearedTask, boolean wasVisible) {
+ if (DEBUG) {
+ Log.d(TAG, "onActivityRestartAttempt: taskId=" + task.taskId
+ + ", homeTaskVisible=" + homeTaskVisible + ", wasVisible=" + wasVisible);
+ }
+ if (!mUseSmallCanvasOptimizedMap
+ && !homeTaskVisible
+ && mTaskViewTaskId == task.taskId) {
+ // The embedded map component received an intent, therefore forcibly bringing the
+ // launcher to the foreground.
+ bringToForeground();
+ return;
+ }
+ if (homeTaskVisible && mCarLauncherTaskId == task.taskId
+ && mTaskViewTaskId == INVALID_TASK_ID) {
+ // Interprets Home Intent while CarLauncher is foreground and Maps is crashed
+ // as restarting Maps.
+ startMapsInTaskView();
+ }
+ }
+ };
+
+ private final UserLifecycleListener mUserLifecycleListener = event -> {
+ if (DEBUG) {
+ Log.d(TAG, "UserLifecycleListener.onEvent: For User " + getUserId()
+ + ", received an event " + event);
+ }
+
+ // When user-switching, onDestroy in the previous user's CarLauncher isn't called.
+ // So tries to release the resource explicitly.
+ if (getUserId() == event.getPreviousUserId()) {
+ release();
+ }
+ };
+
+ private Set<String> mTaskViewPackages;
+ private final BroadcastReceiver mPackageBroadcastReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ if (DEBUG) Log.d(TAG, "onReceive: intent=" + intent);
+ String packageName = intent.getData().getSchemeSpecificPart();
+ boolean started = getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED);
+ if (started // Don't start Maps in STOPPED, because it'll be started onRestart.
+ && mTaskViewTaskId == INVALID_TASK_ID
+ && mTaskViewPackages.contains(packageName)) {
+ startMapsInTaskView();
+ }
+ }
+ };
+
+ @VisibleForTesting
+ void setCarUserManager(CarUserManager carUserManager) {
+ mCarUserManager = carUserManager;
+ }
+
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+
+ if (CarLauncherUtils.isCustomDisplayPolicyDefined(this)) {
+ Intent controlBarIntent = new Intent(this, ControlBarActivity.class);
+ controlBarIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ startActivity(controlBarIntent);
+ startActivity(
+ CarLauncherUtils.getMapsIntent(this).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
+ // Register health check monitor for maps.
+ finish();
+ return;
+ }
+
+ mUseSmallCanvasOptimizedMap =
+ CarLauncherUtils.isSmallCanvasOptimizedMapIntentConfigured(this);
+
+ Car.createCar(/* context= */ this, /* handler= */ null,
+ Car.CAR_WAIT_TIMEOUT_WAIT_FOREVER,
+ (car, ready) -> {
+ if (!ready) {
+ Log.w(TAG, "CarService looks crashed");
+ mCarActivityManagerRef.set(null);
+ return;
+ }
+ setCarUserManager((CarUserManager) car.getCarManager(Car.CAR_USER_SERVICE));
+ // Only listen to user switching events.
+ UserLifecycleEventFilter filter = new UserLifecycleEventFilter.Builder()
+ .addEventType(USER_LIFECYCLE_EVENT_TYPE_SWITCHING).build();
+ mCarUserManager.addListener(getMainExecutor(), filter, mUserLifecycleListener);
+ CarActivityManager carAM = (CarActivityManager) car.getCarManager(
+ Car.CAR_ACTIVITY_SERVICE);
+ mCarActivityManagerRef.set(carAM);
+ carAM.registerTaskMonitor();
+ });
+
+ mActivityManager = getSystemService(ActivityManager.class);
+ mCarLauncherTaskId = getTaskId();
+ TaskStackChangeListeners.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
@@ -127,46 +260,76 @@
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();
+
+ mTaskViewPackages = new ArraySet<>(getResources().getStringArray(
+ R.array.config_taskViewPackages));
+ IntentFilter packageIntentFilter = new IntentFilter(Intent.ACTION_PACKAGE_REPLACED);
+ packageIntentFilter.addDataScheme(SCHEME_PACKAGE);
+ registerReceiver(mPackageBroadcastReceiver, packageIntentFilter);
+ }
+
+ private void setUpTaskView(ViewGroup parent) {
+ mTaskViewManager = new TaskViewManager(this,
+ new HandlerExecutor(getMainThreadHandler()), mCarActivityManagerRef);
+ 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();
maybeLogReady();
- }
-
- @Override
- protected void onStop() {
- super.onStop();
- mIsStarted = false;
+ if (DEBUG) {
+ Log.d(TAG, "onResume(" + getUserId() + "): mTaskViewTaskId=" + mTaskViewTaskId);
+ }
}
@Override
protected void onDestroy() {
super.onDestroy();
- mDisplayManager.unregisterDisplayListener(mDisplayListener);
- if (mActivityView != null && mActivityViewReady) {
- mActivityView.release();
+ if (CarLauncherUtils.isCustomDisplayPolicyDefined(this)) {
+ return;
+ }
+ if (DEBUG) {
+ Log.d(TAG, "onDestroy(" + getUserId() + "): mTaskViewTaskId=" + mTaskViewTaskId);
+ }
+ unregisterReceiver(mPackageBroadcastReceiver);
+ TaskStackChangeListeners.getInstance().unregisterTaskStackListener(mTaskStackListener);
+ if (mCarUserManager != null) {
+ mCarUserManager.removeListener(mUserLifecycleListener);
+ }
+ release();
+ }
+
+ private void release() {
+ if (mTaskView != null && mTaskViewReady) {
+ mTaskView.release();
+ mTaskView = null;
+ }
+ if (mTaskViewManager != null) {
+ mTaskViewManager.release();
+ }
+ CarActivityManager carAM = mCarActivityManagerRef.get();
+ if (carAM != null) {
+ carAM.unregisterTaskMonitor();
+ mCarActivityManagerRef.set(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
@@ -179,56 +342,96 @@
return;
}
try {
- mActivityView.startActivity(getMapsIntent());
+ ActivityOptions options = ActivityOptions.makeCustomAnimation(this,
+ /* enterResId= */ 0, /* exitResId= */ 0);
+ Intent mapIntent = mUseSmallCanvasOptimizedMap
+ ? CarLauncherUtils.getSmallCanvasOptimizedMapIntent(this)
+ : CarLauncherUtils.getMapsIntent(this);
+ Rect launchBounds = new Rect();
+ mTaskView.getBoundsOnScreen(launchBounds);
+ mTaskView.startActivity(
+ PendingIntent.getActivity(this, /* requestCode= */ 0,
+ mapIntent,
+ PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT),
+ /* fillInIntent= */ null, options, 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);
- }
-
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
- initializeFragments();
+ if (CarLauncherUtils.isCustomDisplayPolicyDefined(this)) {
+ return;
+ }
+ 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() {
+ boolean isResumed = isResumed();
if (DEBUG) {
- Log.d(TAG, "maybeLogReady(" + getUserId() + "): activityReady=" + mActivityViewReady
- + ", started=" + mIsStarted + ", alreadyLogged: " + mIsReadyLogged);
+ Log.d(TAG, "maybeLogReady(" + getUserId() + "): activityReady=" + mTaskViewReady
+ + ", started=" + isResumed + ", 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 && isResumed) {
+ // 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;
}
}
}
+
+ /** Brings embedded task to front, if the task view is created and the task is launched. */
+ private void maybeBringEmbeddedTaskToForeground() {
+ if (mTaskViewTaskId != INVALID_TASK_ID) {
+ // The task in TaskView should be in top to make it visible.
+ // NOTE: Tried setTaskAlwaysOnTop before, the flag has some side effect to hinder
+ // AccessibilityService from finding the correct window geometry: b/197247311
+ mActivityManager.moveTaskToFront(mTaskViewTaskId, /* flags= */ 0);
+ }
+ }
+
+ /** Brings the Car Launcher to the foreground. */
+ private void bringToForeground() {
+ if (mCarLauncherTaskId != INVALID_TASK_ID) {
+ mActivityManager.moveTaskToFront(mCarLauncherTaskId, /* flags= */ 0);
+ }
+ }
}
diff --git a/src/com/android/car/carlauncher/CarLauncherUtils.java b/src/com/android/car/carlauncher/CarLauncherUtils.java
new file mode 100644
index 0000000..6083a83
--- /dev/null
+++ b/src/com/android/car/carlauncher/CarLauncherUtils.java
@@ -0,0 +1,117 @@
+/*
+ * 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.
+ */
+
+package com.android.car.carlauncher;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.res.Resources;
+import android.util.Log;
+
+import java.net.URISyntaxException;
+
+/**
+ * Utils for CarLauncher package.
+ */
+public class CarLauncherUtils {
+
+ private static final String TAG = "CarLauncherUtils";
+
+ private CarLauncherUtils() {
+ }
+
+ /** Intent used to find/launch the maps activity to run in the relevant DisplayArea. */
+ public static Intent getMapsIntent(Context context) {
+ Intent defaultIntent =
+ Intent.makeMainSelectorActivity(Intent.ACTION_MAIN, Intent.CATEGORY_APP_MAPS);
+ defaultIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ PackageManager pm = context.getPackageManager();
+ ComponentName defaultActivity = defaultIntent.resolveActivity(pm);
+ defaultIntent.setComponent(defaultActivity);
+
+ for (String intentUri : context.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;
+ }
+
+ /**
+ * Returns {@code true} if a proper limited map intent is configured via
+ * {@code config_smallCanvasOptimizedMapIntent} string resource.
+ */
+ public static boolean isSmallCanvasOptimizedMapIntentConfigured(Context context) {
+ String intentString = context.getString(R.string.config_smallCanvasOptimizedMapIntent);
+ if (intentString.isEmpty()) {
+ return false;
+ }
+
+ try {
+ Intent.parseUri(intentString, Intent.URI_INTENT_SCHEME);
+ return true;
+ } catch (URISyntaxException e) {
+ return false;
+ }
+ }
+
+ /**
+ * Returns an intent to trigger a map with a limited functionality (e.g., one to be used when
+ * there's not much screen real estate).
+ */
+ public static Intent getSmallCanvasOptimizedMapIntent(Context context) {
+ String intentString = context.getString(R.string.config_smallCanvasOptimizedMapIntent);
+ try {
+ Intent intent = Intent.parseUri(intentString, Intent.URI_INTENT_SCHEME);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ return intent;
+ } catch (URISyntaxException e) {
+ Log.w(TAG, "Invalid intent URI in config_smallCanvasOptimizedMapIntent: \""
+ + intentString + "\". Falling back to fullscreen map.");
+ return getMapsIntent(context);
+ }
+ }
+
+ static boolean isCustomDisplayPolicyDefined(Context context) {
+ Resources resources = context.getResources();
+ String customPolicyName = null;
+ try {
+ customPolicyName = resources
+ .getString(
+ com.android.internal
+ .R.string.config_deviceSpecificDisplayAreaPolicyProvider);
+ } catch (Resources.NotFoundException ex) {
+ Log.w(TAG, "custom policy provider not defined");
+ }
+ return customPolicyName != null && !customPolicyName.isEmpty();
+ }
+}
diff --git a/src/com/android/car/carlauncher/CarTaskView.java b/src/com/android/car/carlauncher/CarTaskView.java
new file mode 100644
index 0000000..da50f82
--- /dev/null
+++ b/src/com/android/car/carlauncher/CarTaskView.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.car.carlauncher;
+
+import android.app.ActivityManager;
+import android.content.Context;
+import android.view.SurfaceControl;
+import android.view.View;
+import android.window.WindowContainerToken;
+import android.window.WindowContainerTransaction;
+
+import com.android.wm.shell.ShellTaskOrganizer;
+import com.android.wm.shell.TaskView;
+import com.android.wm.shell.common.SyncTransactionQueue;
+
+/**
+ * CarLauncher version of {@link TaskView} which solves some CarLauncehr specific issues.
+ */
+public class CarTaskView extends TaskView {
+ private WindowContainerToken mTaskToken;
+ private final SyncTransactionQueue mSyncQueue;
+
+ public CarTaskView(Context context, ShellTaskOrganizer organizer,
+ SyncTransactionQueue syncQueue) {
+ super(context, organizer, /* taskViewTransitions= */ null, syncQueue);
+ mSyncQueue = syncQueue;
+ }
+
+ @Override
+ public void onTaskAppeared(ActivityManager.RunningTaskInfo taskInfo, SurfaceControl leash) {
+ mTaskToken = taskInfo.token;
+ super.onTaskAppeared(taskInfo, leash);
+ }
+
+ /**
+ * Called when the visibility of the window containing the view has changed.
+ * @param visibility The new visibility of the window.
+ */
+ @Override
+ protected void onWindowVisibilityChanged(int visibility) {
+ super.onWindowVisibilityChanged(visibility);
+ if (visibility == View.VISIBLE && mTaskToken != null) {
+ WindowContainerTransaction wct = new WindowContainerTransaction();
+ // Clears the hidden flag to make it TopFocusedRootTask: b/228092608
+ wct.setHidden(mTaskToken, /* hidden= */false);
+ // Moves the embedded task to the top to make it resumed: b/225388469
+ wct.reorder(mTaskToken, /* onTop= */ true);
+ mSyncQueue.queue(wct);
+ }
+ }
+}
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/ControlBarActivity.java b/src/com/android/car/carlauncher/ControlBarActivity.java
new file mode 100644
index 0000000..0a9e4d8
--- /dev/null
+++ b/src/com/android/car/carlauncher/ControlBarActivity.java
@@ -0,0 +1,91 @@
+/*
+ * 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.
+ */
+
+package com.android.car.carlauncher;
+
+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY;
+
+import android.content.res.Configuration;
+import android.os.Bundle;
+import android.util.Log;
+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.carlauncher.homescreen.HomeCardModule;
+
+import java.util.Set;
+
+/**
+ * Launcher activity that shows only the control bar fragment.
+ */
+public class ControlBarActivity extends FragmentActivity {
+ private static final String TAG = "CarLauncher";
+ private static final boolean DEBUG = false;
+
+ private Set<HomeCardModule> mHomeCardModules;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ // 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);
+
+ setContentView(R.layout.control_bar_container);
+ initializeCards();
+ }
+
+ @Override
+ public void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ initializeCards();
+ }
+
+ 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 transaction = getSupportFragmentManager().beginTransaction();
+ for (HomeCardModule cardModule : mHomeCardModules) {
+ transaction.replace(cardModule.getCardResId(), cardModule.getCardView());
+ }
+ transaction.commitNow();
+ }
+}
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/RecentAppsRowViewHolder.java b/src/com/android/car/carlauncher/RecentAppsRowViewHolder.java
index f0351e1..2e6784b 100644
--- a/src/com/android/car/carlauncher/RecentAppsRowViewHolder.java
+++ b/src/com/android/car/carlauncher/RecentAppsRowViewHolder.java
@@ -16,13 +16,13 @@
package com.android.car.carlauncher;
-import android.annotation.Nullable;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
+import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
diff --git a/src/com/android/car/carlauncher/TaskViewManager.java b/src/com/android/car/carlauncher/TaskViewManager.java
new file mode 100644
index 0000000..f7c403f
--- /dev/null
+++ b/src/com/android/car/carlauncher/TaskViewManager.java
@@ -0,0 +1,103 @@
+/*
+ * 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.car.app.CarActivityManager;
+import android.content.Context;
+import android.util.Slog;
+import android.window.TaskAppearedInfo;
+
+import com.android.launcher3.icons.IconProvider;
+import com.android.wm.shell.ShellTaskOrganizer;
+import com.android.wm.shell.TaskView;
+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.fullscreen.FullscreenTaskListener;
+import com.android.wm.shell.startingsurface.StartingWindowController;
+import com.android.wm.shell.startingsurface.phone.PhoneStartingWindowTypeAlgorithm;
+
+import java.util.List;
+import java.util.Optional;
+import java.util.concurrent.atomic.AtomicReference;
+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 SyncTransactionQueue mSyncQueue;
+ private final ShellTaskOrganizer mTaskOrganizer;
+
+ public TaskViewManager(@UiContext Context context, HandlerExecutor handlerExecutor,
+ AtomicReference<CarActivityManager> carActivityManagerRef) {
+ mContext = context;
+ mExecutor = handlerExecutor;
+ mTaskOrganizer = new ShellTaskOrganizer(mExecutor, mContext);
+ TransactionPool transactionPool = new TransactionPool();
+ mSyncQueue = new SyncTransactionQueue(transactionPool, mExecutor);
+ initTaskOrganizer(carActivityManagerRef, transactionPool);
+ if (DBG) Slog.d(TAG, "TaskViewManager.create");
+ }
+
+ private void initTaskOrganizer(AtomicReference<CarActivityManager> carActivityManagerRef,
+ TransactionPool transactionPool) {
+ FullscreenTaskListener fullscreenTaskListener = new CarFullscreenTaskMonitorListener(
+ carActivityManagerRef, mSyncQueue, Optional.empty());
+ mTaskOrganizer.addListenerForType(fullscreenTaskListener, TASK_LISTENER_TYPE_FULLSCREEN);
+ StartingWindowController startingController =
+ new StartingWindowController(mContext, mExecutor,
+ new PhoneStartingWindowTypeAlgorithm(), new IconProvider(mContext),
+ transactionPool);
+ mTaskOrganizer.initStartingWindow(startingController);
+ List<TaskAppearedInfo> taskAppearedInfos = mTaskOrganizer.registerOrganizer();
+ cleanUpExistingTaskViewTasks(taskAppearedInfos);
+ }
+
+ void release() {
+ if (DBG) Slog.d(TAG, "TaskViewManager.release");
+ mTaskOrganizer.unregisterOrganizer();
+ }
+
+ void createTaskView(Consumer<TaskView> onCreate) {
+ CarTaskView taskView = new CarTaskView(mContext, mTaskOrganizer, mSyncQueue);
+ mExecutor.execute(() -> {
+ onCreate.accept(taskView);
+ });
+ }
+
+ 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..89d8930
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/HomeCardFragment.java
@@ -0,0 +1,318 @@
+/*
+ * 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;
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.util.ArrayUtils;
+
+/**
+ * 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());
+ if (buttonContent.getIcon() != null) {
+ // update the button view according to icon's selected state
+ buttonView.setSelected(
+ ArrayUtils.contains(buttonContent.getIcon().getState(),
+ android.R.attr.state_selected)
+ );
+ }
+ 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 = getRootView().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;
+ }
+
+ @VisibleForTesting
+ void setControlBarLeftButton(ImageButton controlBarLeftButton) {
+ mControlBarLeftButton = controlBarLeftButton;
+ }
+}
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..6818975
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/HomeCardModule.java
@@ -0,0 +1,62 @@
+/*
+ * 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.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..cde8503
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/assistive/ProjectionModel.java
@@ -0,0 +1,207 @@
+/*
+ * 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.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.icu.text.MessageFormat;
+import android.util.Log;
+import android.view.View;
+import android.widget.Toast;
+
+import androidx.annotation.Nullable;
+
+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;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 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;
+ @Nullable
+ private Car mCar;
+ @Nullable
+ 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) {
+ mCar = Car.createCar(context.getApplicationContext(), null,
+ Car.CAR_WAIT_TIMEOUT_DO_NOT_WAIT,
+ (Car car, boolean ready) -> {
+ if (ready) {
+ mCarProjectionManager = (CarProjectionManager)
+ car.getCarManager(Car.PROJECTION_SERVICE);
+ mCarProjectionManager.registerProjectionStatusListener(this);
+ } else {
+ mCarProjectionManager = null;
+ onProjectionStatusChanged(
+ ProjectionStatus.PROJECTION_STATE_INACTIVE, null, null);
+ }
+ });
+ mPackageManager = context.getPackageManager();
+ mResources = context.getResources();
+
+ 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 (mCarProjectionManager != null) {
+ mCarProjectionManager.unregisterProjectionStatusListener(this);
+ mCarProjectionManager = null;
+ }
+ if (mCar != null) {
+ mCar.disconnect();
+ mCar = null;
+ }
+ }
+
+ @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 MessageFormat.format(mResources.getString(R.string.projection_devices),
+ Map.of("count", 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..5dd7813
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/audio/AudioFragment.java
@@ -0,0 +1,153 @@
+/*
+ * 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 (getCardSize() != null) {
+ if (image == null) {
+ image = getContext().getDrawable(R.drawable.default_audio_background);
+ }
+ int maxDimen = Math.max(getCardBackgroundImage().getWidth(),
+ getCardBackgroundImage().getHeight());
+ // Prioritize size of background image view. Otherwise, use size of whole card
+ if (maxDimen == 0) {
+ 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..5d0d664
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/audio/InCallModel.java
@@ -0,0 +1,356 @@
+/*
+ * 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.app.ActivityOptions;
+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.CallAudioState;
+import android.telecom.TelecomManager;
+import android.util.Log;
+import android.view.Display;
+import android.view.View;
+
+import androidx.annotation.NonNull;
+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 com.android.internal.util.ArrayUtils;
+
+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 CompletableFuture<Void> mPhoneNumberInfoFuture;
+
+ private InCallServiceImpl mInCallService;
+ private HomeCardInterface.Presenter mPresenter;
+
+ private CardHeader mCardHeader;
+ private CardContent mCardContent;
+ private CharSequence mOngoingCallSubtitle;
+ private CharSequence mDialingCallSubtitle;
+ 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);
+ handleActiveCall(call);
+ }
+ };
+
+ 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);
+ mDialingCallSubtitle = context.getResources().getString(R.string.dialing_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) {
+ // Launch activity in the default app task container: the display area where
+ // applications are launched by default.
+ // If not set, activity launches in the calling TDA.
+ ActivityOptions options = ActivityOptions.makeBasic();
+ options.setLaunchDisplayId(Display.DEFAULT_DISPLAY);
+ mContext.startActivity(intent, options.toBundle());
+ } 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) {
+ handleActiveCall(call);
+ 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);
+ }
+ }
+
+ /**
+ * When a {@link CallAudioState} is changed, update the model and notify the
+ * {@link HomeCardInterface.Presenter} to update the view.
+ */
+ @Override
+ public void onCallAudioStateChanged(CallAudioState audioState) {
+ // This is implemented to listen to changes to audio from other sources and update the
+ // content accordingly.
+ if (updateMuteButtonIconState(audioState)) {
+ mPresenter.onModelUpdated(this);
+ }
+ }
+
+ /**
+ * Updates the mute button according to the CallAudioState supplied.
+ * returns true if the model was updated and needs to refresh the view
+ */
+ @VisibleForTesting
+ boolean updateMuteButtonIconState(CallAudioState audioState) {
+ int[] iconState = mMuteButton.getIcon().getState();
+ boolean selectedStateExists = ArrayUtils.contains(iconState,
+ android.R.attr.state_selected);
+
+ if (selectedStateExists == audioState.isMuted()) {
+ // no need to update since the drawable was already muted
+ return false;
+ }
+
+ if (audioState.isMuted()) {
+ iconState = ArrayUtils.appendInt(iconState,
+ android.R.attr.state_selected);
+ } else {
+ iconState = ArrayUtils.removeInt(iconState,
+ android.R.attr.state_selected);
+ }
+ mMuteButton
+ .getIcon()
+ .setState(iconState);
+ return true;
+ }
+
+ /**
+ * Updates the model's content using the given phone number.
+ */
+ @VisibleForTesting
+ void updateModelWithPhoneNumber(String number, @Call.CallState int callState) {
+ String formattedNumber = TelecomUtils.getFormattedNumber(mContext, number);
+ mCardContent = createPhoneCardContent(null, formattedNumber, callState);
+ 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,
+ @Call.CallState int callState) {
+ 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 = createPhoneCardContent(contactImage, contactName, callState);
+ mPresenter.onModelUpdated(this);
+ }
+
+ private void handleActiveCall(@NonNull Call call) {
+ @Call.CallState int callState = call.getState();
+ if (callState != Call.STATE_ACTIVE && callState != Call.STATE_DIALING) {
+ return;
+ }
+ mCurrentCall = call;
+ 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(), callState);
+ return;
+ }
+ if (mPhoneNumberInfoFuture != null) {
+ mPhoneNumberInfoFuture.cancel(/* mayInterruptIfRunning= */ true);
+ }
+ mPhoneNumberInfoFuture = TelecomUtils.getPhoneNumberInfo(mContext,
+ callDetails.getNumber())
+ .thenAcceptAsync(x -> updateModelWithContact(x, callState),
+ mContext.getMainExecutor());
+ }
+
+ private CardContent createPhoneCardContent(Drawable image, CharSequence title,
+ @Call.CallState int callState) {
+ switch (callState) {
+ case Call.STATE_DIALING:
+ return new DescriptiveTextWithControlsView(image, title, mDialingCallSubtitle,
+ mMuteButton, mEndCallButton, mDialpadButton);
+ case Call.STATE_ACTIVE:
+ return new DescriptiveTextWithControlsView(image, title, mOngoingCallSubtitle,
+ mElapsedTimeClock.millis(), mMuteButton, mEndCallButton, mDialpadButton);
+ default:
+ if (DEBUG) {
+ Log.d(TAG, "Call State " + callState
+ + " is not currently supported by this model");
+ }
+ return null;
+ }
+ }
+
+ private void initializeAudioControls() {
+ mMuteButton = new DescriptiveTextWithControlsView.Control(
+ mContext.getDrawable(R.drawable.ic_mute_activatable),
+ v -> {
+ boolean toggledValue = !v.isSelected();
+ mInCallService.setMuted(toggledValue);
+ v.setSelected(toggledValue);
+ });
+ 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);
+ }
+
+ @VisibleForTesting
+ void updateMuteButtonDrawableState(int[] state) {
+ mMuteButton.getIcon().setState(state);
+ }
+
+ @VisibleForTesting
+ int[] getMuteButtonDrawableState() {
+ return mMuteButton.getIcon().getState();
+ }
+}
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..4e2ba38
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/audio/MediaViewModel.java
@@ -0,0 +1,238 @@
+/*
+ * 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.ActivityOptions;
+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.Display;
+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.AppLauncherUtils;
+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) {
+ // Launch activity in the default app task container: the display area where
+ // applications are launched by default.
+ // If not set, activity launches in the calling TDA.
+ ActivityOptions options = ActivityOptions.makeBasic();
+ options.setLaunchDisplayId(Display.DEFAULT_DISPLAY);
+ v.getContext().startActivity(new Intent(Car.CAR_INTENT_ACTION_MEDIA_TEMPLATE),
+ options.toBundle());
+ }
+
+ /**
+ * 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()) {
+ // Video apps are not surfaced here, even if they happen to offer MediaBrowse.
+ // Rationale is that very few apps do this and users might be confused why some
+ // apps can be controlled via widget while others can't. For Video apps, the card
+ // will switch to showing "no media playing" case.
+ if (mediaSource != null
+ && !AppLauncherUtils.isVideoApp(mContext.getPackageManager(),
+ mediaSource.getPackageName())) {
+ mAppName = mediaSource.getDisplayName();
+ mAppIcon = mediaSource.getIcon();
+ mCardHeader = new CardHeader(mAppName, mAppIcon);
+ updateMetadata();
+ } else {
+ mAppName = null;
+ mAppIcon = null;
+ mCardHeader = null;
+ clearMetadata();
+ }
+ 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..53a2f8f
--- /dev/null
+++ b/src/com/android/car/carlauncher/homescreen/audio/telecom/InCallServiceImpl.java
@@ -0,0 +1,135 @@
+/*
+ * 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.CallAudioState;
+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 void onCallAudioStateChanged(CallAudioState audioState) {
+ if (DEBUG) Log.d(TAG, "onCallAudioStateChanged: " + audioState);
+ for (InCallListener listener : mInCallListeners) {
+ listener.onCallAudioStateChanged(audioState);
+ }
+ }
+
+ @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);
+
+ /**
+ * Called when {@link CallAudioState} changes.
+ */
+ void onCallAudioStateChanged(CallAudioState audioState);
+ }
+}
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/src/com/android/car/carlauncher/taskstack/TaskStackChangeListeners.java b/src/com/android/car/carlauncher/taskstack/TaskStackChangeListeners.java
new file mode 100644
index 0000000..b3d4c0c
--- /dev/null
+++ b/src/com/android/car/carlauncher/taskstack/TaskStackChangeListeners.java
@@ -0,0 +1,210 @@
+/*
+ * 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.
+ */
+
+package com.android.car.carlauncher.taskstack;
+
+import android.app.ActivityManager;
+import android.app.ActivityTaskManager;
+import android.app.TaskStackListener;
+import android.content.ComponentName;
+import android.os.Build;
+import android.os.Handler;
+import android.os.RemoteException;
+import android.util.Log;
+
+import com.android.wm.shell.common.HandlerExecutor;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.Executor;
+
+/** Organizer of many task stack listeners for the car launcher application. */
+public class TaskStackChangeListeners {
+ private static final String TAG = TaskStackChangeListeners.class.getSimpleName();
+ private static final boolean DEBUG = Build.IS_DEBUGGABLE;
+ private static final TaskStackChangeListeners INSTANCE = new TaskStackChangeListeners(
+ new HandlerExecutor(Handler.getMain()));
+
+ private final Impl mImpl;
+
+ private TaskStackChangeListeners(Executor executor) {
+ mImpl = new Impl(executor);
+ }
+
+ /** Returns a singleton instance of the {@link TaskStackChangeListeners}. */
+ public static TaskStackChangeListeners getInstance() {
+ return INSTANCE;
+ }
+
+ /**
+ * Registers a task stack listener with the system.
+ * This should be called on the main thread.
+ */
+ public void registerTaskStackListener(TaskStackListener listener) {
+ synchronized (mImpl) {
+ mImpl.addListener(listener);
+ }
+ if (DEBUG) {
+ Log.d(TAG, "registerTaskStackListener: " + listener);
+ }
+ }
+
+ /**
+ * Unregisters a task stack listener with the system.
+ * This should be called on the main thread.
+ */
+ public void unregisterTaskStackListener(TaskStackListener listener) {
+ synchronized (mImpl) {
+ mImpl.removeListener(listener);
+ }
+ if (DEBUG) {
+ Log.d(TAG, "unregisterTaskStackListener: " + listener);
+ }
+ }
+
+ private static class Impl extends TaskStackListener {
+
+ private final List<TaskStackListener> mTaskStackListeners = new ArrayList<>();
+
+ private final Executor mExecutor;
+ private boolean mRegistered;
+
+ Impl(Executor executor) {
+ mExecutor = executor;
+ }
+
+ public void addListener(TaskStackListener listener) {
+ synchronized (mTaskStackListeners) {
+ mTaskStackListeners.add(listener);
+ }
+ if (!mRegistered) {
+ // Register mTaskStackListener to IActivityManager only once if needed.
+ try {
+ ActivityTaskManager.getService().registerTaskStackListener(this);
+ mRegistered = true;
+ } catch (Exception e) {
+ Log.w(TAG, "Failed to call registerTaskStackListener", e);
+ }
+ }
+ }
+
+ public void removeListener(TaskStackListener listener) {
+ boolean isEmpty;
+ synchronized (mTaskStackListeners) {
+ mTaskStackListeners.remove(listener);
+ isEmpty = mTaskStackListeners.isEmpty();
+ }
+ if (isEmpty && mRegistered) {
+ // Unregister mTaskStackListener once we have no more listeners
+ try {
+ ActivityTaskManager.getService().unregisterTaskStackListener(this);
+ mRegistered = false;
+ } catch (Exception e) {
+ Log.w(TAG, "Failed to call unregisterTaskStackListener", e);
+ }
+ }
+ }
+
+ @Override
+ public void onTaskStackChanged() throws RemoteException {
+ mExecutor.execute(() -> {
+ synchronized (mTaskStackListeners) {
+ for (int i = 0; i < mTaskStackListeners.size(); i++) {
+ try {
+ mTaskStackListeners.get(i).onTaskStackChanged();
+ } catch (RemoteException e) {
+ Log.e(TAG, "onTaskStackChanged failed", e);
+ }
+ }
+ }
+ });
+ }
+
+ @Override
+ public void onTaskCreated(int taskId, ComponentName componentName) throws RemoteException {
+ mExecutor.execute(() -> {
+ synchronized (mTaskStackListeners) {
+ for (int i = 0; i < mTaskStackListeners.size(); i++) {
+ try {
+ mTaskStackListeners.get(i).onTaskCreated(taskId, componentName);
+ } catch (RemoteException e) {
+ Log.e(TAG, "onTaskCreated failed", e);
+ }
+ }
+ }
+ });
+ }
+
+ @Override
+ public void onTaskRemoved(int taskId) throws RemoteException {
+ mExecutor.execute(() -> {
+ synchronized (mTaskStackListeners) {
+ for (int i = 0; i < mTaskStackListeners.size(); i++) {
+ try {
+ mTaskStackListeners.get(i).onTaskRemoved(taskId);
+ } catch (RemoteException e) {
+ Log.e(TAG, "onTaskRemoved failed", e);
+ }
+ }
+ }
+ });
+ }
+
+ @Override
+ public void onTaskMovedToFront(ActivityManager.RunningTaskInfo taskInfo)
+ throws RemoteException {
+ mExecutor.execute(() -> {
+ synchronized (mTaskStackListeners) {
+ for (int i = 0; i < mTaskStackListeners.size(); i++) {
+ try {
+ mTaskStackListeners.get(i).onTaskMovedToFront(taskInfo);
+ } catch (RemoteException e) {
+ Log.e(TAG, "onTaskMovedToFront failed", e);
+ }
+ }
+ }
+ });
+ }
+
+ @Override
+ public void onTaskFocusChanged(int taskId, boolean focused) {
+ mExecutor.execute(() -> {
+ synchronized (mTaskStackListeners) {
+ for (int i = 0; i < mTaskStackListeners.size(); i++) {
+ mTaskStackListeners.get(i).onTaskFocusChanged(taskId, focused);
+ }
+ }
+ });
+ }
+
+ @Override
+ public void onActivityRestartAttempt(ActivityManager.RunningTaskInfo task,
+ boolean homeTaskVisible, boolean clearedTask, boolean wasVisible) {
+ mExecutor.execute(() -> {
+ synchronized (mTaskStackListeners) {
+ for (TaskStackListener listener : mTaskStackListeners) {
+ try {
+ listener.onActivityRestartAttempt(
+ task, homeTaskVisible, clearedTask, wasVisible);
+ } catch (RemoteException e) {
+ Log.e(TAG, "onActivityRestartAttempt failed", e);
+ }
+ }
+ }
+ });
+ }
+ }
+}
diff --git a/tests/Android.bp b/tests/Android.bp
new file mode 100644
index 0000000..1c79540
--- /dev/null
+++ b/tests/Android.bp
@@ -0,0 +1,63 @@
+//
+// 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"],
+
+ resource_dirs: ["res"],
+
+ libs: [
+ "android.test.base",
+ "android.car-system-stubs",
+ ],
+
+ static_libs: [
+ "android.car.test.utils",
+ "androidx.test.core",
+ "androidx.test.runner",
+ "androidx.test.espresso.core",
+ "androidx.test.espresso.intents",
+ "androidx.test.ext.junit",
+ "hamcrest-library",
+ "mockito-target-extended",
+ "testables",
+ "CarLauncher-core"
+ ],
+
+ platform_apis: true,
+
+ certificate: "platform",
+
+ manifest: "AndroidManifest.xml",
+
+ instrumentation_for: "CarLauncher",
+
+ dex_preopt: {
+ enabled: false,
+ },
+
+ jni_libs: [
+ // For mockito extended
+ "libdexmakerjvmtiagent",
+ "libstaticjvmtiagent",
+ ],
+}
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
new file mode 100644
index 0000000..b27745a
--- /dev/null
+++ b/tests/AndroidManifest.xml
@@ -0,0 +1,33 @@
+<?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.test">
+
+ <application android:label="@string/app_title" android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+
+ <!-- This is used in AppLauncherUtilTests -->
+ <meta-data android:name="com.android.automotive"
+ android:resource="@xml/automotive_app_desc"/>
+ </application>
+
+ <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
+ android:targetPackage="com.android.car.carlauncher.test"
+ android:label="Tests for Car Launcher"/>
+
+</manifest>
diff --git a/tests/AndroidTest.xml b/tests/AndroidTest.xml
new file mode 100644
index 0000000..5c93363
--- /dev/null
+++ b/tests/AndroidTest.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2022 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<configuration description="Car Launcher Tests">
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="install-arg" value="-t" />
+ <option name="test-file-name" value="CarLauncherTests.apk" />
+ </target_preparer>
+
+ <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+ <option name="package" value="com.android.car.carlauncher.test" />
+ <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
+ </test>
+</configuration>
\ No newline at end of file
diff --git a/tests/res/xml/automotive_app_desc.xml b/tests/res/xml/automotive_app_desc.xml
new file mode 100644
index 0000000..6027170
--- /dev/null
+++ b/tests/res/xml/automotive_app_desc.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ~ Copyright (C) 2021 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.
+ -->
+
+<automotiveApp>
+ <uses name="video"/>
+ <uses name="media"/>
+</automotiveApp>
diff --git a/tests/src/com/android/car/carlauncher/AppLauncherUtilsTest.java b/tests/src/com/android/car/carlauncher/AppLauncherUtilsTest.java
new file mode 100644
index 0000000..0599291
--- /dev/null
+++ b/tests/src/com/android/car/carlauncher/AppLauncherUtilsTest.java
@@ -0,0 +1,341 @@
+/*
+ * 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.
+ */
+
+package com.android.car.carlauncher;
+
+import static android.car.settings.CarSettings.Secure.KEY_PACKAGES_DISABLED_ON_RESOURCE_OVERUSE;
+import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_ENABLED;
+import static android.content.pm.PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS;
+
+import static com.android.car.carlauncher.AppLauncherUtils.APP_TYPE_LAUNCHABLES;
+import static com.android.car.carlauncher.AppLauncherUtils.APP_TYPE_MEDIA_SERVICES;
+import static com.android.car.carlauncher.AppLauncherUtils.PACKAGES_DISABLED_ON_RESOURCE_OVERUSE_SEPARATOR;
+import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.car.Car;
+import android.car.content.pm.CarPackageManager;
+import android.car.media.CarMediaManager;
+import android.car.test.mocks.AbstractExtendedMockitoTestCase;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.LauncherApps;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.content.pm.ServiceInfo;
+import android.os.UserHandle;
+import android.provider.Settings;
+import android.service.media.MediaBrowserService;
+import android.util.ArraySet;
+
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+import androidx.test.filters.SmallTest;
+import androidx.test.platform.app.InstrumentationRegistry;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+import org.xmlpull.v1.XmlPullParserFactory;
+
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.function.Consumer;
+import java.util.function.Predicate;
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public final class AppLauncherUtilsTest extends AbstractExtendedMockitoTestCase {
+ private static final String TEST_DISABLED_APP_1 = "com.android.car.test.disabled1";
+ private static final String TEST_DISABLED_APP_2 = "com.android.car.test.disabled2";
+ private static final String TEST_ENABLED_APP = "com.android.car.test.enabled";
+ private static final String TEST_VIDEO_APP = "com.android.car.test.video";
+
+ private static final Predicate<ResolveInfo> MATCH_NO_APP = (resolveInfo) -> false;
+
+ @Mock private Context mMockContext;
+ @Mock private LauncherApps mMockLauncherApps;
+ @Mock private PackageManager mMockPackageManager;
+
+ private CarMediaManager mCarMediaManager;
+ private CarPackageManager mCarPackageManager;
+ private XmlPullParserFactory mParserFactory;
+
+ @Before
+ public void setUp() throws Exception {
+ Car car = Car.createCar(mMockContext);
+ mCarPackageManager = (CarPackageManager) car.getCarManager(Car.PACKAGE_SERVICE);
+ mCarMediaManager = (CarMediaManager) car.getCarManager(Car.CAR_MEDIA_SERVICE);
+ when(mMockContext.getPackageManager()).thenReturn(mMockPackageManager);
+
+ mParserFactory = XmlPullParserFactory.newInstance();
+ mParserFactory.setNamespaceAware(true);
+ }
+
+ @Test
+ public void testGetLauncherAppsWithEnableAndLaunchDisabledApps() {
+ mockSettingsStringCalls();
+ mockPackageManagerQueries();
+
+ AppLauncherUtils.LauncherAppsInfo launcherAppsInfo = AppLauncherUtils.getLauncherApps(
+ mMockContext, /* appsToHide= */ new ArraySet<>(),
+ /* customMediaComponents= */ new ArraySet<>(),
+ /* appTypes= */ APP_TYPE_LAUNCHABLES + APP_TYPE_MEDIA_SERVICES,
+ /* openMediaCenter= */ false, mMockLauncherApps, mCarPackageManager,
+ mMockPackageManager, MATCH_NO_APP, mCarMediaManager);
+
+ List<AppMetaData> appMetaData = launcherAppsInfo.getLaunchableComponentsList();
+
+ // mMockLauncherApps is never stubbed, only services & disabled activities are expected.
+ assertEquals(3, appMetaData.size());
+
+ mockPmGetApplicationEnabledSetting(COMPONENT_ENABLED_STATE_ENABLED, TEST_DISABLED_APP_1,
+ TEST_DISABLED_APP_2);
+
+ launchAllApps(appMetaData);
+
+ verify(mMockPackageManager).setApplicationEnabledSetting(
+ eq(TEST_DISABLED_APP_1), eq(COMPONENT_ENABLED_STATE_ENABLED), eq(0));
+
+ verify(mMockPackageManager).setApplicationEnabledSetting(
+ eq(TEST_DISABLED_APP_2), eq(COMPONENT_ENABLED_STATE_ENABLED), eq(0));
+
+ verify(mMockContext, times(2)).startActivity(any(), any());
+ }
+
+ @Test
+ public void testGetLauncherAppsWithNotEnablingEnabledApps() {
+ mockSettingsStringCalls();
+ mockPackageManagerQueries();
+
+ AppLauncherUtils.LauncherAppsInfo launcherAppsInfo = AppLauncherUtils.getLauncherApps(
+ mMockContext, /* appsToHide= */ new ArraySet<>(),
+ /* customMediaComponents= */ new ArraySet<>(),
+ /* appTypes= */ APP_TYPE_LAUNCHABLES + APP_TYPE_MEDIA_SERVICES,
+ /* openMediaCenter= */ false, mMockLauncherApps, mCarPackageManager,
+ mMockPackageManager, MATCH_NO_APP, mCarMediaManager);
+
+ List<AppMetaData> appMetaData = launcherAppsInfo.getLaunchableComponentsList();
+
+ // mMockLauncherApps is never stubbed, only services & disabled activities are expected.
+ assertEquals(3, appMetaData.size());
+
+ mockPmGetApplicationEnabledSetting(COMPONENT_ENABLED_STATE_ENABLED, TEST_DISABLED_APP_1,
+ TEST_DISABLED_APP_2);
+
+ launchAllApps(appMetaData);
+
+ verify(mMockPackageManager, never()).setApplicationEnabledSetting(
+ eq(TEST_ENABLED_APP), anyInt(), eq(0));
+ }
+
+ @Test
+ public void testGetLauncherAppsWithEnabledAndVideoApps() {
+ mockSettingsStringCalls();
+ mockPackageManagerQueriesForVideo();
+
+ AppLauncherUtils.LauncherAppsInfo launcherAppsInfo = AppLauncherUtils.getLauncherApps(
+ mMockContext, /* appsToHide= */ new ArraySet<>(),
+ /* customMediaComponents= */ new ArraySet<>(),
+ /* appTypes= */ APP_TYPE_LAUNCHABLES + APP_TYPE_MEDIA_SERVICES,
+ /* openMediaCenter= */ false, mMockLauncherApps, mCarPackageManager,
+ mMockPackageManager, new TestVideoAppPredicate(), mCarMediaManager);
+
+ // mMockLauncherApps is never stubbed, only services & disabled activities are expected.
+ List<AppMetaData> appMetaData = launcherAppsInfo.getLaunchableComponentsList();
+
+ // TEST_VIDEO_APP should be filtered by TestVideoAppPredicate above.
+ assertEquals(1, appMetaData.size());
+ assertEquals(TEST_ENABLED_APP, appMetaData.get(0).getPackageName());
+ }
+
+ @Test
+ public void getAutomotiveAppTypes() {
+ // This test relies on test app's manifest & xml resources.
+ Context testContext =
+ InstrumentationRegistry.getInstrumentation().getContext();
+ assertEquals(
+ Arrays.asList("video", "media"),
+ AppLauncherUtils.getAutomotiveAppTypes(
+ testContext.getPackageManager(),
+ testContext.getPackageName()));
+ }
+
+ @Test
+ public void videoAppPredicate() {
+ // This test relies on test app's manifest & xml resources.
+ Context testContext =
+ InstrumentationRegistry.getInstrumentation().getContext();
+ Predicate<ResolveInfo> predicate =
+ new AppLauncherUtils.VideoAppPredicate(testContext.getPackageManager());
+
+ assertTrue(predicate.test(constructServiceResolveInfo(testContext.getPackageName())));
+ }
+
+ @Test
+ public void invalidAutomotiveXml() {
+ StringBuilder hugeInvalidXml = new StringBuilder("<automotiveApp>");
+ for (int i = 0; i < 65; i++) {
+ hugeInvalidXml.append("<uses name=\"video\"/>");
+ }
+ hugeInvalidXml.append("</automotiveApp>");
+
+ String[] invalidXmls = {
+ "NoTagsHere",
+ // Unknown tag.
+ "<foo/>",
+ // Manifest tag not expected.
+ "<automotiveApp><manifest/></automotiveApp>",
+ // Uses tag has missing name attribute.
+ "<automotiveApp><uses/></automotiveApp>",
+ // Uses tag has empty name attribute.
+ "<automotiveApp><uses name=\"\"/></automotiveApp>",
+ // Uses tag nested inside uses tag.
+ "<automotiveApp><uses name=\"video\"><uses name=\"media\"/></uses></automotiveApp>",
+ // Too many uses tags
+ hugeInvalidXml.toString()
+ };
+
+ for (String invalidXml : invalidXmls) {
+ List<String> appTypes =
+ AppLauncherUtils.parseAutomotiveAppTypes(createPullParser(invalidXml));
+ assertEquals(0, appTypes.size());
+ }
+ }
+
+ private XmlPullParser createPullParser(String xmlText) {
+ try {
+ XmlPullParser parser = mParserFactory.newPullParser();
+ parser.setInput(new StringReader(xmlText));
+ return parser;
+ } catch (XmlPullParserException e) {
+ fail("Unexpected failure");
+ return null;
+ }
+ }
+
+ private void mockPackageManagerQueriesForVideo() {
+ when(mMockPackageManager.queryIntentServices(any(), anyInt())).thenAnswer(args -> {
+ Intent intent = args.getArgument(0);
+ if (intent.getAction().equals(MediaBrowserService.SERVICE_INTERFACE)) {
+ return Arrays.asList(
+ constructServiceResolveInfo(TEST_ENABLED_APP),
+ constructServiceResolveInfo(TEST_VIDEO_APP));
+ }
+ return new ArrayList<>();
+ });
+ }
+
+ private void mockPackageManagerQueries() {
+ when(mMockPackageManager.queryIntentServices(any(), anyInt())).thenAnswer(args -> {
+ Intent intent = args.getArgument(0);
+ if (intent.getAction().equals(MediaBrowserService.SERVICE_INTERFACE)) {
+ return Collections.singletonList(constructServiceResolveInfo(TEST_ENABLED_APP));
+ }
+ return new ArrayList<>();
+ });
+ when(mMockPackageManager.queryIntentActivities(any(), any())).thenAnswer(args -> {
+ Intent intent = args.getArgument(0);
+ PackageManager.ResolveInfoFlags flags = args.getArgument(1);
+ List<ResolveInfo> resolveInfoList = new ArrayList<>();
+ if (intent.getAction().equals(Intent.ACTION_MAIN)) {
+ if ((flags.getValue() & MATCH_DISABLED_UNTIL_USED_COMPONENTS) != 0) {
+ resolveInfoList.add(constructActivityResolveInfo(TEST_DISABLED_APP_1));
+ resolveInfoList.add(constructActivityResolveInfo(TEST_DISABLED_APP_2));
+ }
+ resolveInfoList.add(constructActivityResolveInfo(TEST_ENABLED_APP));
+ }
+ return resolveInfoList;
+ });
+ }
+
+ private void mockPmGetApplicationEnabledSetting(int enabledState, String... packages) {
+ for (String pkg : packages) {
+ when(mMockPackageManager.getApplicationEnabledSetting(pkg)).thenReturn(enabledState);
+ }
+ }
+
+ private void mockSettingsStringCalls() {
+ when(mMockContext.createContextAsUser(any(UserHandle.class), anyInt()))
+ .thenAnswer(args -> {
+ Context context = mock(Context.class);
+ ContentResolver contentResolver = mock(ContentResolver.class);
+ when(context.getContentResolver()).thenReturn(contentResolver);
+ return context;
+ });
+
+ doReturn(TEST_DISABLED_APP_1 + PACKAGES_DISABLED_ON_RESOURCE_OVERUSE_SEPARATOR
+ + TEST_DISABLED_APP_2)
+ .when(() -> Settings.Secure.getString(any(ContentResolver.class),
+ eq(KEY_PACKAGES_DISABLED_ON_RESOURCE_OVERUSE)));
+ }
+
+ private void launchAllApps(List<AppMetaData> appMetaData) {
+ for (AppMetaData meta : appMetaData) {
+ Consumer<Context> launchCallback = meta.getLaunchCallback();
+ launchCallback.accept(mMockContext);
+ }
+ }
+
+ private static ResolveInfo constructActivityResolveInfo(String packageName) {
+ ResolveInfo info = new ResolveInfo();
+ info.activityInfo = new ActivityInfo();
+ info.activityInfo.packageName = packageName;
+ info.activityInfo.name = packageName + ".activity";
+ info.activityInfo.applicationInfo = new ApplicationInfo();
+ return info;
+ }
+
+ private static ResolveInfo constructServiceResolveInfo(String packageName) {
+ ResolveInfo info = new ResolveInfo();
+ info.serviceInfo = new ServiceInfo();
+ info.serviceInfo.packageName = packageName;
+ info.serviceInfo.name = packageName + ".service";
+ info.serviceInfo.applicationInfo = new ApplicationInfo();
+ return info;
+ }
+
+ /** Test sub-class of VideoAppPredicate that only matches TEST_VIDEO_APP package-name */
+ static class TestVideoAppPredicate extends AppLauncherUtils.VideoAppPredicate {
+ TestVideoAppPredicate() {
+ super(/* packageManager= */ null);
+ }
+
+ @Override
+ public boolean test(ResolveInfo resolveInfo) {
+ return TEST_VIDEO_APP.equals(super.getPackageName(resolveInfo));
+ }
+ }
+}
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..725ced2
--- /dev/null
+++ b/tests/src/com/android/car/carlauncher/CarLauncherTest.java
@@ -0,0 +1,99 @@
+/*
+ * 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 static org.mockito.Mockito.any;
+import static org.mockito.Mockito.verify;
+
+import android.car.user.CarUserManager;
+import android.car.user.CarUserManager.UserLifecycleListener;
+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;
+import org.mockito.Mock;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class CarLauncherTest {
+
+ @Rule
+ public final MockitoRule rule = MockitoJUnit.rule();
+
+ @Rule
+ public TestableContext mContext = new TestableContext(InstrumentationRegistry.getContext());
+ private ActivityScenario<CarLauncher> mActivityScenario;
+
+ @Mock
+ private CarUserManager mMockCarUserManager;
+
+ @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()));
+ }
+
+ @Test
+ public void onDestroy_unregistersUserLifecycleListener() {
+ mActivityScenario = ActivityScenario.launch(CarLauncher.class);
+ mActivityScenario.onActivity(activity -> activity.setCarUserManager(mMockCarUserManager));
+
+ mActivityScenario.moveToState(Lifecycle.State.DESTROYED);
+
+ verify(mMockCarUserManager).removeListener(any(UserLifecycleListener.class));
+ }
+}
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..2f35aaf
--- /dev/null
+++ b/tests/src/com/android/car/carlauncher/homescreen/HomeCardFragmentTest.java
@@ -0,0 +1,186 @@
+/*
+ * 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 static org.junit.Assert.assertNotNull;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.graphics.drawable.Drawable;
+import android.widget.ImageButton;
+
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+import androidx.test.platform.app.InstrumentationRegistry;
+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.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 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())));
+ }
+
+ @Test
+ public void updateControlBarButton_updatesButtonSelectedState() {
+ HomeCardFragment fragment = (HomeCardFragment) mActivityTestRule.getActivity()
+ .getSupportFragmentManager().findFragmentById(R.id.top_card);
+ assertNotNull(fragment);
+
+ ImageButton leftImageButton = mock(ImageButton.class);
+ fragment.setControlBarLeftButton(leftImageButton);
+
+ Drawable mockIcon = mock(Drawable.class);
+ DescriptiveTextWithControlsView.Control buttonControl = mock(
+ DescriptiveTextWithControlsView.Control.class);
+ DescriptiveTextWithControlsView.Control leftButtonControl = mock(
+ DescriptiveTextWithControlsView.Control.class);
+
+ // unselects the button in case the icon doesn't have a selected state
+ when(mockIcon.getState()).thenReturn(new int[0]);
+ when(leftButtonControl.getIcon()).thenReturn(mockIcon);
+ DescriptiveTextWithControlsView controlView = new DescriptiveTextWithControlsView(null,
+ "test", "test", leftButtonControl, buttonControl, buttonControl);
+ fragment.updateHeaderView(CARD_HEADER);
+ fragment.updateContentView(controlView);
+ InstrumentationRegistry.getInstrumentation().waitForIdleSync();
+ verify(leftImageButton).setSelected(false);
+
+ // selects the button in case the icon have a selected state
+ when(mockIcon.getState()).thenReturn(new int[]{android.R.attr.state_selected});
+ when(leftButtonControl.getIcon()).thenReturn(mockIcon);
+ controlView = new DescriptiveTextWithControlsView(null,
+ "test", "test", leftButtonControl, buttonControl, buttonControl);
+ fragment.updateContentView(controlView);
+ InstrumentationRegistry.getInstrumentation().waitForIdleSync();
+ verify(leftImageButton).setSelected(true);
+ }
+}
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..cbf4530
--- /dev/null
+++ b/tests/src/com/android/car/carlauncher/homescreen/assistive/ProjectionModelTest.java
@@ -0,0 +1,169 @@
+/*
+ * 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.content.Context;
+import android.icu.text.MessageFormat;
+
+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.DescriptiveTextView;
+
+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.util.Collections;
+import java.util.Map;
+
+@RunWith(JUnit4.class)
+public class ProjectionModelTest {
+
+ public Context mContext = ApplicationProvider.getApplicationContext();
+
+ 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 final ProjectionStatus mProjectingAndNonProjectingDeviceProjectionStatus =
+ ProjectionStatus.builder(
+ mContext.getPackageName(),
+ ProjectionStatus.PROJECTION_STATE_READY_TO_PROJECT).addMobileDevice(
+ PROJECTING_DEVICE).addMobileDevice(NONPROJECTING_DEVICE).build();
+ private final ProjectionStatus mProjectingMultipleAndNonProjectingDeviceProjectionStatus =
+ ProjectionStatus.builder(
+ mContext.getPackageName(),
+ ProjectionStatus.PROJECTION_STATE_READY_TO_PROJECT).addMobileDevice(
+ PROJECTING_DEVICE).addMobileDevice(PROJECTING_DEVICE).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(PROJECTING_DEVICE_NAME, String.valueOf(content.getSubtitle()));
+ }
+
+ @Test
+ public void changeProjectionStatusToNonProjectingDevice_callsPresenter() {
+ sendProjectionStatus(mNonProjectingDeviceProjectionStatus);
+
+ verify(mPresenter).onModelUpdated(mModel);
+ DescriptiveTextView content = (DescriptiveTextView) mModel.getCardContent();
+ assertEquals(NONPROJECTING_DEVICE_NAME, String.valueOf(content.getSubtitle()));
+ }
+
+ @Test
+ public void changeProjectionStatusToSingleProjectingAndNonProjectingDevice_callsPresenter() {
+ sendProjectionStatus(mProjectingAndNonProjectingDeviceProjectionStatus);
+
+ verify(mPresenter).onModelUpdated(mModel);
+ DescriptiveTextView content = (DescriptiveTextView) mModel.getCardContent();
+ assertEquals(PROJECTING_DEVICE_NAME, String.valueOf(content.getSubtitle()));
+ }
+
+ @Test
+ public void changeProjectionStatusToMultipleProjectingAndNonProjectingDevice_callsPresenter() {
+ sendProjectionStatus(mProjectingMultipleAndNonProjectingDeviceProjectionStatus);
+
+ verify(mPresenter).onModelUpdated(mModel);
+ DescriptiveTextView content = (DescriptiveTextView) mModel.getCardContent();
+
+ String formattedPluralString = MessageFormat.format(mContext.getString(
+ R.string.projection_devices),
+ Map.of("count",
+ mProjectingMultipleAndNonProjectingDeviceProjectionStatus
+ .getConnectedMobileDevices().size()));
+ assertEquals(formattedPluralString, String.valueOf(content.getSubtitle()));
+ }
+
+ @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..549e8d0
--- /dev/null
+++ b/tests/src/com/android/car/carlauncher/homescreen/audio/InCallModelTest.java
@@ -0,0 +1,237 @@
+/*
+ * 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.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.net.Uri;
+import android.telecom.Call;
+import android.telecom.CallAudioState;
+
+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 com.android.internal.util.ArrayUtils;
+
+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 String mDialingCallSecondaryText;
+
+ 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);
+ Resources resources = ApplicationProvider.getApplicationContext().getResources();
+ mOngoingCallSecondaryText = resources.getString(R.string.ongoing_call_text);
+ mDialingCallSecondaryText = resources.getString(R.string.dialing_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_active_setsPhoneNumberAndSubtitle() {
+ mInCallModel.updateModelWithPhoneNumber(PHONE_NUMBER, Call.STATE_ACTIVE);
+
+ 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 updateModelWithPhoneNumber_dialing_setsPhoneNumberAndSubtitle() {
+ mInCallModel.updateModelWithPhoneNumber(PHONE_NUMBER, Call.STATE_DIALING);
+
+ verify(mPresenter).onModelUpdated(mInCallModel);
+ DescriptiveTextWithControlsView content =
+ (DescriptiveTextWithControlsView) mInCallModel.getCardContent();
+ String formattedNumber = TelecomUtils.getFormattedNumber(
+ ApplicationProvider.getApplicationContext(), PHONE_NUMBER);
+ assertEquals(content.getTitle(), formattedNumber);
+ assertEquals(content.getSubtitle(), mDialingCallSecondaryText);
+ }
+
+ @Test
+ public void updateModelWithContact_active_noAvatarUri_setsContactNameAndInitialsIcon() {
+ TelecomUtils.PhoneNumberInfo phoneInfo = new TelecomUtils.PhoneNumberInfo(PHONE_NUMBER,
+ DISPLAY_NAME, DISPLAY_NAME, INITIALS, /* avatarUri = */ null,
+ /* typeLabel = */ null, /* lookupKey = */ null);
+ mInCallModel.updateModelWithContact(phoneInfo, Call.STATE_ACTIVE);
+
+ 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_active_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, Call.STATE_ACTIVE);
+
+ 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_dialing_setsCardContent() {
+ TelecomUtils.PhoneNumberInfo phoneInfo = new TelecomUtils.PhoneNumberInfo(PHONE_NUMBER,
+ DISPLAY_NAME, DISPLAY_NAME, INITIALS, /* avatarUri = */ null,
+ /* typeLabel = */ null, /* lookupKey = */ null);
+ mInCallModel.updateModelWithContact(phoneInfo, Call.STATE_DIALING);
+
+ verify(mPresenter).onModelUpdated(mInCallModel);
+ DescriptiveTextWithControlsView content =
+ (DescriptiveTextWithControlsView) mInCallModel.getCardContent();
+ assertEquals(content.getTitle(), DISPLAY_NAME);
+ assertEquals(content.getSubtitle(), mDialingCallSecondaryText);
+ assertNotNull(content.getImage());
+ }
+
+ @Test
+ public void onCallAudioStateChanged_callsPresenterWhenMuteButtonIsOutOfSync() {
+ // calls the mPresenter.onModelUpdated only when there is a change in the mute state
+ // which is not reflected in the button's state
+
+ CallAudioState callAudioState = new CallAudioState(true,
+ CallAudioState.ROUTE_WIRED_OR_EARPIECE, CallAudioState.ROUTE_WIRED_OR_EARPIECE);
+ mInCallModel.updateMuteButtonDrawableState(new int[0]);
+ mInCallModel.onCallAudioStateChanged(callAudioState);
+ verify(mPresenter, times(1)).onModelUpdated(mInCallModel);
+
+ }
+
+ @Test
+ public void onCallAudioStateChanged_doesNotCallPresenterWhenMuteButtonIsInSync() {
+ // calls the mPresenter.onModelUpdated only when there is a change in the mute state
+ // which is not reflected in the button's state
+
+ CallAudioState callAudioState = new CallAudioState(false,
+ CallAudioState.ROUTE_WIRED_OR_EARPIECE, CallAudioState.ROUTE_WIRED_OR_EARPIECE);
+ mInCallModel.updateMuteButtonDrawableState(new int[0]);
+ mInCallModel.onCallAudioStateChanged(callAudioState);
+ verify(mPresenter, times(0)).onModelUpdated(mInCallModel);
+ }
+
+ @Test
+ public void updateMuteButtonIconState_outOfSync_updatesIconState() {
+ boolean isUpdateRequired;
+ CallAudioState callAudioState;
+
+ // case callAudioState muted but mute icon state not contain selected
+ // expected: update mute icon state to contain selected state and return true
+ callAudioState = new CallAudioState(true,
+ CallAudioState.ROUTE_WIRED_OR_EARPIECE, CallAudioState.ROUTE_WIRED_OR_EARPIECE);
+ mInCallModel.updateMuteButtonDrawableState(new int[0]);
+ isUpdateRequired = mInCallModel.updateMuteButtonIconState(callAudioState);
+ assertTrue(isUpdateRequired);
+ assertTrue(ArrayUtils.contains(mInCallModel.getMuteButtonDrawableState(),
+ android.R.attr.state_selected));
+
+ // case callAudioState not muted but mute icon state contains selected state
+ // expected: update mute icon state to not contain selected state and return true
+ callAudioState = new CallAudioState(false,
+ CallAudioState.ROUTE_WIRED_OR_EARPIECE, CallAudioState.ROUTE_WIRED_OR_EARPIECE);
+ mInCallModel.updateMuteButtonDrawableState(new int[]{android.R.attr.state_selected});
+ isUpdateRequired = mInCallModel.updateMuteButtonIconState(callAudioState);
+ assertTrue(isUpdateRequired);
+ assertFalse(ArrayUtils.contains(mInCallModel.getMuteButtonDrawableState(),
+ android.R.attr.state_selected));
+ }
+
+ @Test
+ public void updateMuteButtonIconState_inSync_doesNotUpdateIconState() {
+ boolean isUpdateRequired;
+ CallAudioState callAudioState;
+
+ // case callAudioState is muted and mute icon state contains selected state
+ // expected: return false
+ callAudioState = new CallAudioState(true,
+ CallAudioState.ROUTE_WIRED_OR_EARPIECE, CallAudioState.ROUTE_WIRED_OR_EARPIECE);
+ mInCallModel.updateMuteButtonDrawableState(new int[]{android.R.attr.state_selected});
+ isUpdateRequired = mInCallModel.updateMuteButtonIconState(callAudioState);
+ assertFalse(isUpdateRequired);
+ }
+}
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..f4a99b1
--- /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.apps.common.testutils.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..461784d
--- /dev/null
+++ b/tests/src/com/android/car/carlauncher/homescreen/audio/telecom/InCallServiceImplTest.java
@@ -0,0 +1,89 @@
+/*
+ * 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 android.telecom.CallAudioState;
+
+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);
+ }
+
+ @Test
+ public void onCallAudioStateChanged_callsListeners() {
+ CallAudioState callAudioState = new CallAudioState(false,
+ CallAudioState.ROUTE_WIRED_OR_EARPIECE, CallAudioState.ROUTE_WIRED_OR_EARPIECE);
+ mService.addListener(mInCallModel);
+ mService.onCallAudioStateChanged(callAudioState);
+
+ verify(mInCallModel).onCallAudioStateChanged(callAudioState);
+ }
+}
diff --git a/tools/generate-overlayable.sh b/tools/generate-overlayable.sh
new file mode 100755
index 0000000..82be1b5
--- /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
+
+python3 $ANDROID_BUILD_TOP/packages/apps/Car/systemlibs/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