Replace all TextView with CarUiTextView

Because of changing TextView to CarUiTextView in `car_ui_list_item.xml`,
some of the apps started seeing crashes because of existing RROs that
were still using TextView. We've decided then replace all TextViews with
CarUiTextViews.

Bug: 203562026
Test: manually
Change-Id: Ife28916eb5c4b057dfab4ce24455e90ff9dafcec
diff --git a/car-ui-lib/car-ui-lib/src/main/java/com/android/car/ui/CarUiLayoutInflaterFactory.java b/car-ui-lib/car-ui-lib/src/main/java/com/android/car/ui/CarUiLayoutInflaterFactory.java
index 8a55cdf..df5d4d7 100644
--- a/car-ui-lib/car-ui-lib/src/main/java/com/android/car/ui/CarUiLayoutInflaterFactory.java
+++ b/car-ui-lib/car-ui-lib/src/main/java/com/android/car/ui/CarUiLayoutInflaterFactory.java
@@ -58,6 +58,10 @@
             // here, but when car-ui-lib is included in one of those apps that uses the old package
             // name, the RecyclerView class is renamed.
             view = new RecyclerView(context, attrs);
+        } else if ("TextView".equals(name)) {
+            // Replace all TextView occurrences with CarUiTextView to support older RROs that still
+            // use TextView where CarUiTextView is now expected. ie. `car_ui_list_item.xml`.
+            view = PluginFactorySingleton.get(context).createTextView(context, attrs);
         }
 
         return view;