Snap for 6841706 from dc5454b668bbae1e5b5022fe4e570527e01f87b0 to rvc-qpr1-release

Change-Id: I8041d357214eeed6fb8133921dfbdbbdd65a7176
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 8b26907..3e582be 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -48,7 +48,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"
diff --git a/res/layout-land/car_launcher.xml b/res/layout-land/car_launcher.xml
index b7d8ed5..1177d8c 100644
--- a/res/layout-land/car_launcher.xml
+++ b/res/layout-land/car_launcher.xml
@@ -20,6 +20,7 @@
     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
@@ -75,9 +76,10 @@
         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">
+        app:layout_constraintRight_toLeftOf="@+id/divider_vertical"
+        app:layout_constraintLeft_toRightOf="@+id/start_edge"
+        app:layout_constraintTop_toBottomOf="@+id/top_edge"
+        android:layoutDirection="locale">
         <android.car.app.CarActivityView
             android:id="@+id/maps"
             android:layout_width="match_parent"
@@ -90,9 +92,10 @@
         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"/>
+        app:layout_constraintRight_toLeftOf="@+id/end_edge"
+        app:layout_constraintLeft_toRightOf="@+id/divider_vertical"
+        app:layout_constraintTop_toBottomOf="@+id/top_edge"
+        android:layoutDirection="locale"/>
 
     <FrameLayout
         android:id="@+id/playback"
@@ -100,9 +103,10 @@
         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"/>
+        app:layout_constraintRight_toLeftOf="@+id/end_edge"
+        app:layout_constraintLeft_toRightOf="@+id/divider_vertical"
+        app:layout_constraintTop_toBottomOf="@+id/divider_horizontal"
+        android:layoutDirection="locale"/>
     <View
         android:id="@+id/bottom_line"
         style="@style/HorizontalLineDivider"
diff --git a/res/layout/car_launcher.xml b/res/layout/car_launcher.xml
index f2cd649..843d8e0 100644
--- a/res/layout/car_launcher.xml
+++ b/res/layout/car_launcher.xml
@@ -20,6 +20,7 @@
     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
@@ -75,8 +76,9 @@
         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_constraintRight_toLeftOf="@+id/end_edge"
+        app:layout_constraintLeft_toRightOf="@+id/start_edge"
+        android:layoutDirection="locale"
         app:layout_constraintTop_toBottomOf="@+id/top_edge">
         <android.car.app.CarActivityView
             android:id="@+id/maps"
@@ -90,18 +92,20 @@
         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"/>
+        app:layout_constraintRight_toLeftOf="@+id/end_edge"
+        app:layout_constraintLeft_toRightOf="@+id/divider_vertical"
+        app:layout_constraintTop_toBottomOf="@+id/divider_horizontal"
+        android:layoutDirection="locale"/>
 
     <FrameLayout
         android:id="@+id/playback"
         android:layout_width="0dp"
         android:layout_height="0dp"
         android:layout_margin="@dimen/main_screen_widget_margin"
+        android:layoutDirection="locale"
         app:layout_constraintBottom_toTopOf="@+id/bottom_edge"
-        app:layout_constraintEnd_toStartOf="@+id/divider_vertical"
-        app:layout_constraintStart_toEndOf="@+id/start_edge"
+        app:layout_constraintRight_toLeftOf="@+id/divider_vertical"
+        app:layout_constraintLeft_toRightOf="@+id/start_edge"
         app:layout_constraintTop_toBottomOf="@+id/divider_horizontal"/>
     <View
         android:id="@+id/bottom_line"
diff --git a/res/layout/car_launcher_multiwindow.xml b/res/layout/car_launcher_multiwindow.xml
index 04924be..23deb08 100644
--- a/res/layout/car_launcher_multiwindow.xml
+++ b/res/layout/car_launcher_multiwindow.xml
@@ -20,6 +20,7 @@
     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
@@ -67,9 +68,10 @@
         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
@@ -77,9 +79,10 @@
         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/contextual_fragment.xml b/res/layout/contextual_fragment.xml
index 307ba27..0193d2c 100644
--- a/res/layout/contextual_fragment.xml
+++ b/res/layout/contextual_fragment.xml
@@ -24,7 +24,8 @@
 
     <androidx.constraintlayout.widget.ConstraintLayout
         android:layout_width="match_parent"
-        android:layout_height="match_parent">
+        android:layout_height="match_parent"
+        android:layout_gravity="center_vertical|start">
 
         <ImageView
             android:id="@+id/icon"
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index bd38f62..1083ea8 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -43,6 +43,8 @@
     <dimen name="panel_margin">@*android:dimen/car_margin</dimen>
     <!-- Height of the text and exit button on the app selection screen -->
     <dimen name="app_bar_height">@*android:dimen/car_app_bar_height</dimen>
+    <!-- Margin between the right edge of the screen and the app bar title -->
+    <dimen name="app_bar_title_right_margin">@*android:dimen/car_padding_5</dimen>
     <dimen name="icon_size">@*android:dimen/car_primary_icon_size</dimen>
     <dimen name="recent_apps_row_height">@*android:dimen/car_list_divider_height</dimen>
     <dimen name="app_grid_touch_target_size">@*android:dimen/car_touch_target_size</dimen>
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">