Merge "Import translations. DO NOT MERGE" into rvc-dev
diff --git a/res/layout/panel_slice_slider_row_large_icon.xml b/res/layout/panel_slice_slider_row_large_icon.xml
new file mode 100644
index 0000000..fa5c4cd
--- /dev/null
+++ b/res/layout/panel_slice_slider_row_large_icon.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.
+-->
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/slice_slider_layout"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical">
+
+    <androidx.slice.widget.SliceView
+        android:id="@+id/slice_view"
+        style="@style/Widget.SliceView.Panel.Slider.LargeIcon"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingStart="0dp"
+        android:paddingEnd="0dp"/>
+</LinearLayout>
\ No newline at end of file
diff --git a/res/values-mcc222/strings.xml b/res/values-mcc222/strings.xml
new file mode 100644
index 0000000..0e1f475
--- /dev/null
+++ b/res/values-mcc222/strings.xml
@@ -0,0 +1,19 @@
+<?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 xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Cell Broadcast settings title.  [CHAR LIMIT=50] -->
+    <string name="cell_broadcast_settings">Public warnings</string>
+</resources>
\ No newline at end of file
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 1c60208..bf89a23 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -533,6 +533,10 @@
         <item name="rowStyle">@style/SliceRow.Slider</item>
     </style>
 
+    <style name="Widget.SliceView.Panel.Slider.LargeIcon">
+        <item name="rowStyle">@style/SliceRow.Slider.LargeIcon</item>
+    </style>
+
     <style name="SliceRow">
         <!-- 2dp start padding for the start icon -->
         <item name="titleItemStartPadding">2dp</item>
@@ -580,6 +584,11 @@
         <item name="progressBarEndPadding">16dp</item>
     </style>
 
+    <style name="SliceRow.Slider.LargeIcon">
+        <!-- Layout is 48dp and actual icon size is 48-(iconSize/2) -->
+        <item name="iconSize">12dp</item>
+    </style>
+
     <style name="DisclaimerPositiveButton" parent="@style/SudGlifButton.Primary">
         <item name="android:layout_margin">16dp</item>
         <item name="android:paddingStart">8dp</item>
diff --git a/src/com/android/settings/applications/DefaultAppsPreferenceController.java b/src/com/android/settings/applications/DefaultAppsPreferenceController.java
index 4d4165b..c5b849d 100644
--- a/src/com/android/settings/applications/DefaultAppsPreferenceController.java
+++ b/src/com/android/settings/applications/DefaultAppsPreferenceController.java
@@ -22,6 +22,8 @@
 import android.icu.text.ListFormatter;
 import android.text.TextUtils;
 
+import androidx.core.text.BidiFormatter;
+
 import com.android.settings.core.BasePreferenceController;
 import com.android.settingslib.applications.AppUtils;
 
@@ -72,6 +74,7 @@
             return null;
         }
         final String packageName = packageNames.get(0);
-        return AppUtils.getApplicationLabel(mPackageManager, packageName);
+        return BidiFormatter.getInstance().unicodeWrap(AppUtils.getApplicationLabel(mPackageManager,
+                packageName));
     }
 }
diff --git a/src/com/android/settings/panel/MediaOutputGroupPanel.java b/src/com/android/settings/panel/MediaOutputGroupPanel.java
index d98c0b1..36f779b 100644
--- a/src/com/android/settings/panel/MediaOutputGroupPanel.java
+++ b/src/com/android/settings/panel/MediaOutputGroupPanel.java
@@ -159,6 +159,6 @@
 
     @Override
     public int getViewType() {
-        return PanelContent.VIEW_TYPE_SLIDER;
+        return PanelContent.VIEW_TYPE_SLIDER_LARGE_ICON;
     }
 }
diff --git a/src/com/android/settings/panel/MediaOutputPanel.java b/src/com/android/settings/panel/MediaOutputPanel.java
index 3a4d341..d8dbb34 100644
--- a/src/com/android/settings/panel/MediaOutputPanel.java
+++ b/src/com/android/settings/panel/MediaOutputPanel.java
@@ -246,7 +246,7 @@
 
     @Override
     public int getViewType() {
-        return PanelContent.VIEW_TYPE_SLIDER;
+        return PanelContent.VIEW_TYPE_SLIDER_LARGE_ICON;
     }
 
     private final MediaController.Callback mCb = new MediaController.Callback() {
diff --git a/src/com/android/settings/panel/PanelContent.java b/src/com/android/settings/panel/PanelContent.java
index 6c271fd..9fa4316 100644
--- a/src/com/android/settings/panel/PanelContent.java
+++ b/src/com/android/settings/panel/PanelContent.java
@@ -31,6 +31,7 @@
 public interface PanelContent extends Instrumentable {
 
     int VIEW_TYPE_SLIDER = 1;
+    int VIEW_TYPE_SLIDER_LARGE_ICON = 2;
 
     /**
      * @return a icon for the title of the Panel.
diff --git a/src/com/android/settings/panel/PanelSlicesAdapter.java b/src/com/android/settings/panel/PanelSlicesAdapter.java
index f0a7745..34de834 100644
--- a/src/com/android/settings/panel/PanelSlicesAdapter.java
+++ b/src/com/android/settings/panel/PanelSlicesAdapter.java
@@ -75,6 +75,8 @@
         View view;
         if (viewType == PanelContent.VIEW_TYPE_SLIDER) {
             view = inflater.inflate(R.layout.panel_slice_slider_row, viewGroup, false);
+        } else if (viewType == PanelContent.VIEW_TYPE_SLIDER_LARGE_ICON) {
+            view = inflater.inflate(R.layout.panel_slice_slider_row_large_icon, viewGroup, false);
         } else {
             view = inflater.inflate(R.layout.panel_slice_row, viewGroup, false);
         }
diff --git a/tests/robotests/src/com/android/settings/panel/MediaOutputGroupPanelTest.java b/tests/robotests/src/com/android/settings/panel/MediaOutputGroupPanelTest.java
index 632d10c..003fda7 100644
--- a/tests/robotests/src/com/android/settings/panel/MediaOutputGroupPanelTest.java
+++ b/tests/robotests/src/com/android/settings/panel/MediaOutputGroupPanelTest.java
@@ -72,4 +72,9 @@
     public void getSeeMoreIntent_isNull() {
         assertThat(mPanel.getSeeMoreIntent()).isNull();
     }
+
+    @Test
+    public void getViewType_checkType() {
+        assertThat(mPanel.getViewType()).isEqualTo(PanelContent.VIEW_TYPE_SLIDER_LARGE_ICON);
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/panel/MediaOutputPanelTest.java b/tests/robotests/src/com/android/settings/panel/MediaOutputPanelTest.java
index cdfa87f..2ab428d 100644
--- a/tests/robotests/src/com/android/settings/panel/MediaOutputPanelTest.java
+++ b/tests/robotests/src/com/android/settings/panel/MediaOutputPanelTest.java
@@ -312,4 +312,9 @@
 
         verify(mCallback).forceClose();
     }
+
+    @Test
+    public void getViewType_checkType() {
+        assertThat(mPanel.getViewType()).isEqualTo(PanelContent.VIEW_TYPE_SLIDER_LARGE_ICON);
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/panel/PanelSlicesAdapterTest.java b/tests/robotests/src/com/android/settings/panel/PanelSlicesAdapterTest.java
index 9e682f6..f0567c8 100644
--- a/tests/robotests/src/com/android/settings/panel/PanelSlicesAdapterTest.java
+++ b/tests/robotests/src/com/android/settings/panel/PanelSlicesAdapterTest.java
@@ -17,6 +17,7 @@
 package com.android.settings.panel;
 
 import static com.android.settings.panel.PanelContent.VIEW_TYPE_SLIDER;
+import static com.android.settings.panel.PanelContent.VIEW_TYPE_SLIDER_LARGE_ICON;
 import static com.android.settings.panel.PanelSlicesAdapter.MAX_NUM_OF_SLICES;
 import static com.android.settings.slices.CustomSliceRegistry.MEDIA_OUTPUT_GROUP_SLICE_URI;
 import static com.android.settings.slices.CustomSliceRegistry.MEDIA_OUTPUT_INDICATOR_SLICE_URI;
@@ -207,6 +208,19 @@
     }
 
     @Test
+    public void onCreateViewHolder_viewTypeSliderLargeIcon_verifyLayout() {
+        final PanelSlicesAdapter adapter = new PanelSlicesAdapter(mPanelFragment, mData, 0);
+        final ViewGroup view = new FrameLayout(mContext);
+        final ArgumentCaptor<Integer> intArgumentCaptor = ArgumentCaptor.forClass(Integer.class);
+
+        adapter.onCreateViewHolder(view, VIEW_TYPE_SLIDER_LARGE_ICON);
+
+        verify(sLayoutInflater).inflate(intArgumentCaptor.capture(), eq(view), eq(false));
+        assertThat(intArgumentCaptor.getValue()).isEqualTo(
+                R.layout.panel_slice_slider_row_large_icon);
+    }
+
+    @Test
     public void onCreateViewHolder_viewTypeDefault_verifyLayout() {
         final PanelSlicesAdapter adapter =
                 new PanelSlicesAdapter(mPanelFragment, mData, 0);
diff --git a/tests/robotests/src/com/android/settings/panel/VolumePanelTest.java b/tests/robotests/src/com/android/settings/panel/VolumePanelTest.java
index 4edc2c7..6c0e131 100644
--- a/tests/robotests/src/com/android/settings/panel/VolumePanelTest.java
+++ b/tests/robotests/src/com/android/settings/panel/VolumePanelTest.java
@@ -70,4 +70,9 @@
     public void getSeeMoreIntent_notNull() {
         assertThat(mPanel.getSeeMoreIntent()).isNotNull();
     }
+
+    @Test
+    public void getViewType_checkType() {
+        assertThat(mPanel.getViewType()).isEqualTo(PanelContent.VIEW_TYPE_SLIDER);
+    }
 }