Fix LAYOUT_DIRECTION_LTR was incorrectly set on car_setup_wizard_layout instead of toolbar

Fixes: 171428243
Test: CarSetupWizardLibRoboTests
Change-Id: I29b0014610c408316fa4e7d0016ffb90e5e8fe7c
(cherry picked from commit 823a63c67b8188c8832210c5c3fa4f5154932cd8)
diff --git a/library/main/src/com/android/car/setupwizardlib/CarSetupWizardBaseLayout.java b/library/main/src/com/android/car/setupwizardlib/CarSetupWizardBaseLayout.java
index e36980c..ec56bf5 100644
--- a/library/main/src/com/android/car/setupwizardlib/CarSetupWizardBaseLayout.java
+++ b/library/main/src/com/android/car/setupwizardlib/CarSetupWizardBaseLayout.java
@@ -166,9 +166,10 @@
         }
 
         LayoutInflater inflater = LayoutInflater.from(getContext());
-        View view = inflater.inflate(R.layout.car_setup_wizard_layout, this);
-        // The layout will not be mirrored in RTL
-        view.setLayoutDirection(View.LAYOUT_DIRECTION_LTR);
+        inflater.inflate(R.layout.car_setup_wizard_layout, this);
+        View toolbar = findViewById(R.id.application_bar);
+        // The toolbar will not be mirrored in RTL
+        toolbar.setLayoutDirection(View.LAYOUT_DIRECTION_LTR);
 
         setBackButton(findViewById(R.id.back_button));
         Drawable drawable = mPartnerConfigHelper.getDrawable(
diff --git a/library/main/tests/robotests/src/com/android/car/setupwizardlib/CarSetupWizardCompatLayoutTest.java b/library/main/tests/robotests/src/com/android/car/setupwizardlib/CarSetupWizardCompatLayoutTest.java
index cd62072..541cf4c 100644
--- a/library/main/tests/robotests/src/com/android/car/setupwizardlib/CarSetupWizardCompatLayoutTest.java
+++ b/library/main/tests/robotests/src/com/android/car/setupwizardlib/CarSetupWizardCompatLayoutTest.java
@@ -554,6 +554,8 @@
                 .get();
 
         CarSetupWizardCompatLayout layout = activity.findViewById(R.id.car_setup_wizard_layout);
+        View toolbar = layout.findViewById(R.id.application_bar);
+        assertThat(toolbar.getTextDirection()).isEqualTo(View.TEXT_DIRECTION_LTR);
         assertThat(layout.shouldMirrorNavIcons()).isTrue();
     }