Merge "Implement the Copyable interface to ImeiInfoPreferenceController"
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 69a67ad..213e5a4 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1477,7 +1477,7 @@
<activity android:name=".SetupRedactionInterstitial"
android:enabled="false"
android:exported="true"
- android:theme="@style/SuwThemeGlif.DayNight"
+ android:theme="@style/SudThemeGlif.DayNight"
android:label="@string/lock_screen_notifications_interstitial_title"
android:icon="@drawable/ic_suggested_notifications">
<intent-filter>
diff --git a/res/drawable/ic_fingerprint_list_icon.xml b/res/drawable/ic_fingerprint_list_icon.xml
index ce1ce5e..6a563aa 100644
--- a/res/drawable/ic_fingerprint_list_icon.xml
+++ b/res/drawable/ic_fingerprint_list_icon.xml
@@ -19,6 +19,6 @@
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
- android:fillColor="?attr/suwListItemIconColor"
+ android:fillColor="?attr/sudListItemIconColor"
android:pathData="M17.81,4.47c-0.08,0 -0.16,-0.02 -0.23,-0.06C15.66,3.42 14,3 12.01,3c-1.98,0 -3.86,0.47 -5.57,1.41 -0.24,0.13 -0.54,0.04 -0.68,-0.2 -0.13,-0.24 -0.04,-0.55 0.2,-0.68C7.82,2.52 9.86,2 12.01,2c2.13,0 3.99,0.47 6.03,1.52 0.25,0.13 0.34,0.43 0.21,0.67 -0.09,0.18 -0.26,0.28 -0.44,0.28zM3.5,9.72c-0.1,0 -0.2,-0.03 -0.29,-0.09 -0.23,-0.16 -0.28,-0.47 -0.12,-0.7 0.99,-1.4 2.25,-2.5 3.75,-3.27C9.98,4.04 14,4.03 17.15,5.65c1.5,0.77 2.76,1.86 3.75,3.25 0.16,0.22 0.11,0.54 -0.12,0.7 -0.23,0.16 -0.54,0.11 -0.7,-0.12 -0.9,-1.26 -2.04,-2.25 -3.39,-2.94 -2.87,-1.47 -6.54,-1.47 -9.4,0.01 -1.36,0.7 -2.5,1.7 -3.4,2.96 -0.08,0.14 -0.23,0.21 -0.39,0.21zM9.75,21.79c-0.13,0 -0.26,-0.05 -0.35,-0.15 -0.87,-0.87 -1.34,-1.43 -2.01,-2.64 -0.69,-1.23 -1.05,-2.73 -1.05,-4.34 0,-2.97 2.54,-5.39 5.66,-5.39s5.66,2.42 5.66,5.39c0,0.28 -0.22,0.5 -0.5,0.5s-0.5,-0.22 -0.5,-0.5c0,-2.42 -2.09,-4.39 -4.66,-4.39 -2.57,0 -4.66,1.97 -4.66,4.39 0,1.44 0.32,2.77 0.93,3.85 0.64,1.15 1.08,1.64 1.85,2.42 0.19,0.2 0.19,0.51 0,0.71 -0.11,0.1 -0.24,0.15 -0.37,0.15zM16.92,19.94c-1.19,0 -2.24,-0.3 -3.1,-0.89 -1.49,-1.01 -2.38,-2.65 -2.38,-4.39 0,-0.28 0.22,-0.5 0.5,-0.5s0.5,0.22 0.5,0.5c0,1.41 0.72,2.74 1.94,3.56 0.71,0.48 1.54,0.71 2.54,0.71 0.24,0 0.64,-0.03 1.04,-0.1 0.27,-0.05 0.53,0.13 0.58,0.41 0.05,0.27 -0.13,0.53 -0.41,0.58 -0.57,0.11 -1.07,0.12 -1.21,0.12zM14.91,22c-0.04,0 -0.09,-0.01 -0.13,-0.02 -1.59,-0.44 -2.63,-1.03 -3.72,-2.1 -1.4,-1.39 -2.17,-3.24 -2.17,-5.22 0,-1.62 1.38,-2.94 3.08,-2.94 1.7,0 3.08,1.32 3.08,2.94 0,1.07 0.93,1.94 2.08,1.94s2.08,-0.87 2.08,-1.94c0,-3.77 -3.25,-6.83 -7.25,-6.83 -2.84,0 -5.44,1.58 -6.61,4.03 -0.39,0.81 -0.59,1.76 -0.59,2.8 0,0.78 0.07,2.01 0.67,3.61 0.1,0.26 -0.03,0.55 -0.29,0.64 -0.26,0.1 -0.55,-0.04 -0.64,-0.29 -0.49,-1.31 -0.73,-2.61 -0.73,-3.96 0,-1.2 0.23,-2.29 0.68,-3.24 1.33,-2.79 4.28,-4.6 7.51,-4.6 4.55,0 8.25,3.51 8.25,7.83 0,1.62 -1.38,2.94 -3.08,2.94s-3.08,-1.32 -3.08,-2.94c0,-1.07 -0.93,-1.94 -2.08,-1.94s-2.08,0.87 -2.08,1.94c0,1.71 0.66,3.31 1.87,4.51 0.95,0.94 1.86,1.46 3.27,1.85 0.27,0.07 0.42,0.35 0.35,0.61 -0.05,0.23 -0.26,0.38 -0.47,0.38z"/>
</vector>
diff --git a/res/drawable/ic_lock_list_icon.xml b/res/drawable/ic_lock_list_icon.xml
index 7a323f2..9660f9c 100644
--- a/res/drawable/ic_lock_list_icon.xml
+++ b/res/drawable/ic_lock_list_icon.xml
@@ -18,7 +18,7 @@
android:height="24.0dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
- android:tint="?attr/suwListItemIconColor">
+ android:tint="?attr/sudListItemIconColor">
<path
android:fillColor="@android:color/white"
android:pathData="M18.0,8.0l-1.0,0.0L17.0,6.0c0.0,-2.76 -2.24,-5.0 -5.0,-5.0S7.0,3.24 7.0,6.0l0.0,2.0L6.0,8.0c-1.1,0.0 -2.0,0.9 -2.0,2.0l0.0,10.0c0.0,1.0 0.9,2.0 2.0,2.0l12.0,0.0c1.1,0.0 2.0,-0.9 2.0,-2.0L20.0,10.0c0.0,-1.1 -0.9,-2.0 -2.0,-2.0zm-6.0,9.0c-1.1,0.0 -2.0,-0.9 -2.0,-2.0s0.9,-2.0 2.0,-2.0 2.0,0.9 2.0,2.0 -0.9,2.0 -2.0,2.0zm3.1,-9.0L8.9,8.0L8.9,6.0c0.0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0.0 3.1,1.39 3.1,3.1l0.0,2.0z"/>
diff --git a/res/drawable/ic_password.xml b/res/drawable/ic_password.xml
index 57591c2..7d5f471 100644
--- a/res/drawable/ic_password.xml
+++ b/res/drawable/ic_password.xml
@@ -20,15 +20,15 @@
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
- android:fillColor="?attr/suwListItemIconColor"
+ android:fillColor="?attr/sudListItemIconColor"
android:pathData="M21.5,9.39l-1.63,0l0.81,-1.42l-0.86,-0.5l-0.82,1.42l-0.82,-1.42l-0.86,0.5l0.81,1.42l-1.63,0l0,1l1.63,0l-0.81,1.41l0.86,0.5l0.82,-1.41l0.82,1.41l0.86,-0.5l-0.81,-1.41l1.63,0z" />
<path
- android:fillColor="?attr/suwListItemIconColor"
+ android:fillColor="?attr/sudListItemIconColor"
android:pathData="M13.68,7.97l-0.86,-0.5l-0.82,1.42l-0.82,-1.42l-0.86,0.5l0.81,1.42l-1.63,0l0,1l1.63,0l-0.81,1.41l0.86,0.5l0.82,-1.41l0.82,1.41l0.86,-0.5l-0.81,-1.41l1.63,0l0,-1l-1.63,0z" />
<path
- android:fillColor="?attr/suwListItemIconColor"
+ android:fillColor="?attr/sudListItemIconColor"
android:pathData="M6.68,7.97l-0.86,-0.5l-0.82,1.42l-0.82,-1.42l-0.86,0.5l0.81,1.42l-1.63,0l0,1l1.63,0l-0.81,1.41l0.86,0.5l0.82,-1.41l0.82,1.41l0.86,-0.5l-0.81,-1.41l1.63,0l0,-1l-1.63,0z" />
<path
- android:fillColor="?attr/suwListItemIconColor"
+ android:fillColor="?attr/sudListItemIconColor"
android:pathData="M21,17.89H3c-0.28,0 -0.5,-0.22 -0.5,-0.5v-1c0,-0.28 0.22,-0.5 0.5,-0.5h18c0.28,0 0.5,0.22 0.5,0.5v1C21.5,17.66 21.28,17.89 21,17.89z" />
</vector>
diff --git a/res/drawable/ic_pattern.xml b/res/drawable/ic_pattern.xml
index 003111e..b41129f 100644
--- a/res/drawable/ic_pattern.xml
+++ b/res/drawable/ic_pattern.xml
@@ -20,18 +20,18 @@
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
- android:fillColor="?attr/suwListItemIconColor"
+ android:fillColor="?attr/sudListItemIconColor"
android:pathData="M4,4m-2,0a2,2 0,1 1,4 0a2,2 0,1 1,-4 0" />
<path
- android:fillColor="?attr/suwListItemIconColor"
+ android:fillColor="?attr/sudListItemIconColor"
android:pathData="M4,12m-2,0a2,2 0,1 1,4 0a2,2 0,1 1,-4 0" />
<path
- android:fillColor="?attr/suwListItemIconColor"
+ android:fillColor="?attr/sudListItemIconColor"
android:pathData="M12,4m-2,0a2,2 0,1 1,4 0a2,2 0,1 1,-4 0" />
<path
- android:fillColor="?attr/suwListItemIconColor"
+ android:fillColor="?attr/sudListItemIconColor"
android:pathData="M20,12m-2,0a2,2 0,1 1,4 0a2,2 0,1 1,-4 0" />
<path
- android:fillColor="?attr/suwListItemIconColor"
+ android:fillColor="?attr/sudListItemIconColor"
android:pathData="M20,18c-0.93,0 -1.7,0.64 -1.93,1.5h-4.14c-0.22,-0.86 -1,-1.5 -1.93,-1.5s-1.7,0.64 -1.93,1.5H5.93c-0.05,-0.18 -0.12,-0.35 -0.21,-0.51l5.28,-5.28C11.29,13.89 11.63,14 12,14c1.1,0 2,-0.9 2,-2c0,-0.37 -0.11,-0.71 -0.28,-1.01l5.28,-5.28C19.29,5.89 19.63,6 20,6c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2s-2,0.9 -2,2c0,0.37 0.11,0.71 0.28,1.01l-5.28,5.28C12.71,10.11 12.37,10 12,10c-1.1,0 -2,0.9 -2,2c0,0.37 0.11,0.71 0.28,1.01l-5.28,5.28C4.71,18.11 4.37,18 4,18c-1.1,0 -2,0.9 -2,2s0.9,2 2,2c0.93,0 1.7,-0.64 1.93,-1.5h4.14c0.22,0.86 1,1.5 1.93,1.5s1.7,-0.64 1.93,-1.5h4.14c0.22,0.86 1,1.5 1.93,1.5c1.1,0 2,-0.9 2,-2S21.1,18 20,18z" />
</vector>
diff --git a/res/drawable/ic_pin.xml b/res/drawable/ic_pin.xml
index 0176019..577e04f 100644
--- a/res/drawable/ic_pin.xml
+++ b/res/drawable/ic_pin.xml
@@ -20,6 +20,6 @@
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
- android:fillColor="?attr/suwListItemIconColor"
+ android:fillColor="?attr/sudListItemIconColor"
android:pathData="M20,4L4,4A2,2 0,0 0,2 6L2,18a2,2 0,0 0,2 2L20,20a2,2 0,0 0,2 -2L22,6A2,2 0,0 0,20 4ZM7.1,15L5.9,15L5.9,10.2L4.7,10.2L4.7,9L7.1,9v6ZM13.2,11.4A1.2,1.2 0,0 1,12 12.6L10.8,12.6v1.2h2.4L13.2,15L9.6,15L9.6,12.6a1.2,1.2 0,0 1,1.2 -1.2L12,11.4L12,10.2L9.6,10.2L9.6,9L12,9a1.2,1.2 0,0 1,1.2 1.2v1.2ZM19.3,11.1a0.9,0.9 0,0 1,-0.9 0.9,0.9 0.9,0 0,1 0.9,0.9v0.9A1.2,1.2 0,0 1,18.1 15L15.7,15L15.7,13.8h2.4L18.1,12.6L16.9,12.6L16.9,11.4h1.2L18.1,10.2L15.7,10.2L15.7,9h2.4a1.2,1.2 0,0 1,1.2 1.2v0.9Z" />
</vector>
diff --git a/res/drawable/ic_skip.xml b/res/drawable/ic_skip.xml
index 4376215..9d8ae2b 100644
--- a/res/drawable/ic_skip.xml
+++ b/res/drawable/ic_skip.xml
@@ -21,6 +21,6 @@
android:viewportHeight="24"
android:autoMirrored="true">
<path
- android:fillColor="?attr/suwListItemIconColor"
+ android:fillColor="?attr/sudListItemIconColor"
android:pathData="M18.4,10.6C16.55,8.99 14.15,8 11.5,8c-4.65,0 -8.58,3.03 -9.96,7.22L3.9,16c1.05,-3.19 4.05,-5.5 7.6,-5.5 1.95,0 3.73,0.72 5.12,1.88L13,16h9V7l-3.6,3.6z"/>
</vector>
diff --git a/res/drawable/ic_suggested_notifications.xml b/res/drawable/ic_suggested_notifications.xml
index d15d13a..5bce000 100644
--- a/res/drawable/ic_suggested_notifications.xml
+++ b/res/drawable/ic_suggested_notifications.xml
@@ -19,9 +19,9 @@
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
- android:fillColor="@color/suw_color_accent_light"
+ android:fillColor="@color/sud_color_accent_light"
android:pathData="M18,17v-6c0,-3.07 -1.63,-5.64 -4.5,-6.32V4c0,-0.83 -0.67,-1.5 -1.5,-1.5S10.5,3.17 10.5,4v0.68C7.64,5.36 6,7.92 6,11v6H4v2h10h0.38H20v-2H18zM16,17H8v-6c0,-2.48 1.51,-4.5 4,-4.5s4,2.02 4,4.5V17z"/>
<path
- android:fillColor="@color/suw_color_accent_light"
+ android:fillColor="@color/sud_color_accent_light"
android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4C10,21.1 10.9,22 12,22z"/>
</vector>
diff --git a/res/layout-land/choose_lock_pattern.xml b/res/layout-land/choose_lock_pattern.xml
index d2d436f..1cc4352 100644
--- a/res/layout-land/choose_lock_pattern.xml
+++ b/res/layout-land/choose_lock_pattern.xml
@@ -22,7 +22,7 @@
android:layout_height="match_parent"
android:icon="@drawable/ic_lock"
android:layout="@layout/sud_glif_blank_template"
- settings:suwHeaderText="@string/lock_settings_picker_title">
+ settings:sucHeaderText="@string/lock_settings_picker_title">
<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
android:id="@+id/topLayout"
@@ -37,18 +37,18 @@
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1.0"
- android:layout_marginStart="?attr/suwMarginSides"
- android:layout_marginBottom="@dimen/suw_content_frame_padding_bottom"
+ android:layout_marginStart="?attr/sudMarginSides"
+ android:layout_marginBottom="@dimen/sud_content_frame_padding_bottom"
android:clipChildren="false"
android:clipToPadding="false"
android:orientation="vertical">
<ImageView
- android:id="@+id/suw_layout_icon"
- style="@style/SuwGlifIcon"
+ android:id="@+id/suc_layout_icon"
+ style="@style/SudGlifIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="?attr/suwGlifHeaderGravity"
+ android:layout_gravity="?attr/sudGlifHeaderGravity"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp"
android:src="@drawable/ic_lock"/>
@@ -65,8 +65,8 @@
android:orientation="vertical">
<TextView
- android:id="@+id/suw_layout_title"
- style="@style/SuwGlifHeaderTitle"
+ android:id="@+id/suc_layout_title"
+ style="@style/SudGlifHeaderTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="0dp"
@@ -74,7 +74,7 @@
<TextView
android:id="@+id/message"
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minLines="2" />
@@ -85,16 +85,16 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
- android:gravity="?attr/suwGlifHeaderGravity"
+ android:gravity="?attr/sudGlifHeaderGravity"
android:textSize="18sp"/>
<Button
android:id="@+id/screen_lock_options"
- style="@style/SuwGlifButton.Tertiary"
+ style="@style/SudGlifButton.Tertiary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
- android:gravity="?attr/suwGlifHeaderGravity"
+ android:gravity="?attr/sudGlifHeaderGravity"
android:text="@string/setup_lock_settings_options_button_label"
android:visibility="gone" />
@@ -122,7 +122,7 @@
<!-- left : skip -->
<Button android:id="@+id/skip_button"
- style="@style/SuwGlifButton.Secondary"
+ style="@style/SudGlifButton.Secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/skip_label"
diff --git a/res/layout-land/confirm_lock_pattern_normal.xml b/res/layout-land/confirm_lock_pattern_normal.xml
index 993a84e..21c9b1e 100644
--- a/res/layout-land/confirm_lock_pattern_normal.xml
+++ b/res/layout-land/confirm_lock_pattern_normal.xml
@@ -40,34 +40,34 @@
android:paddingBottom="24dp">
<ImageView
- android:id="@+id/suw_layout_icon"
- style="@style/SuwGlifIcon"
+ android:id="@+id/suc_layout_icon"
+ style="@style/SudGlifIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="?attr/suwGlifHeaderGravity"
+ android:layout_gravity="?attr/sudGlifHeaderGravity"
android:src="@drawable/ic_lock" />
<TextView
android:id="@+id/headerText"
- style="@style/SuwGlifHeaderTitle"
+ style="@style/SudGlifHeaderTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:id="@+id/detailsText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginStart="?attr/suwMarginSides"
- android:layout_marginEnd="?attr/suwMarginSides" />
+ android:layout_marginStart="?attr/sudMarginSides"
+ android:layout_marginEnd="?attr/sudMarginSides" />
<Button
android:id="@+id/cancelButton"
style="@style/SetupWizardButton.Negative"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="?attr/suwMarginSides"
- android:layout_marginEnd="?attr/suwMarginSides"
+ android:layout_marginStart="?attr/sudMarginSides"
+ android:layout_marginEnd="?attr/sudMarginSides"
android:text="@string/cancel" />
<Space
@@ -81,8 +81,8 @@
android:id="@+id/errorText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="?attr/suwMarginSides"
- android:layout_marginEnd="?attr/suwMarginSides"
+ android:layout_marginStart="?attr/sudMarginSides"
+ android:layout_marginEnd="?attr/sudMarginSides"
android:layout_marginBottom="24dp"
android:gravity="center_vertical"/>
</LinearLayout>
diff --git a/res/layout-land/fingerprint_enroll_enrolling.xml b/res/layout-land/fingerprint_enroll_enrolling.xml
index e71725e..f96bdde 100644
--- a/res/layout-land/fingerprint_enroll_enrolling.xml
+++ b/res/layout-land/fingerprint_enroll_enrolling.xml
@@ -28,7 +28,7 @@
android:layout_height="match_parent"
android:fillViewport="true">
<LinearLayout
- style="@style/SuwContentFrame"
+ style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
@@ -42,25 +42,25 @@
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
- android:layout_marginStart="?attr/suwMarginSides"
- android:layout_marginBottom="@dimen/suw_content_frame_padding_bottom"
+ android:layout_marginStart="?attr/sudMarginSides"
+ android:layout_marginBottom="@dimen/sud_content_frame_padding_bottom"
android:clipChildren="false"
android:clipToPadding="false"
android:orientation="vertical">
<ImageView
- android:id="@+id/suw_layout_icon"
- style="@style/SuwGlifIcon"
+ android:id="@+id/suc_layout_icon"
+ style="@style/SudGlifIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="?attr/suwGlifHeaderGravity"
+ android:layout_gravity="?attr/sudGlifHeaderGravity"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp"
android:src="@drawable/ic_fingerprint_header" />
<TextView
- android:id="@+id/suw_layout_title"
- style="@style/SuwGlifHeaderTitle"
+ android:id="@+id/suc_layout_title"
+ style="@style/SudGlifHeaderTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="0dp"
@@ -71,14 +71,14 @@
android:layout_height="wrap_content">
<TextView
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:id="@+id/start_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/security_settings_fingerprint_enroll_start_message"/>
<TextView
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:id="@+id/repeat_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -94,7 +94,7 @@
<Button
android:id="@+id/skip_button"
- style="@style/SuwGlifButton.Secondary"
+ style="@style/SudGlifButton.Secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/security_settings_fingerprint_enroll_enrolling_skip" />
diff --git a/res/layout-land/fingerprint_enroll_find_sensor.xml b/res/layout-land/fingerprint_enroll_find_sensor.xml
index 0decbf2..f4c97a3 100644
--- a/res/layout-land/fingerprint_enroll_find_sensor.xml
+++ b/res/layout-land/fingerprint_enroll_find_sensor.xml
@@ -34,8 +34,8 @@
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
- android:layout_marginStart="?attr/suwMarginSides"
- android:layout_marginBottom="@dimen/suw_content_frame_padding_bottom"
+ android:layout_marginStart="?attr/sudMarginSides"
+ android:layout_marginBottom="@dimen/sud_content_frame_padding_bottom"
android:clipChildren="false"
android:clipToPadding="false"
android:orientation="vertical">
@@ -55,25 +55,25 @@
android:clipToPadding="false">
<ImageView
- android:id="@+id/suw_layout_icon"
- style="@style/SuwGlifIcon"
+ android:id="@+id/suc_layout_icon"
+ style="@style/SudGlifIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="?attr/suwGlifHeaderGravity"
+ android:layout_gravity="?attr/sudGlifHeaderGravity"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp"
android:src="@drawable/ic_fingerprint_header" />
<TextView
- android:id="@+id/suw_layout_title"
- style="@style/SuwGlifHeaderTitle"
+ android:id="@+id/suc_layout_title"
+ style="@style/SudGlifHeaderTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp" />
<TextView
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/security_settings_fingerprint_enroll_find_sensor_message"/>
diff --git a/res/layout-land/fingerprint_enroll_finish.xml b/res/layout-land/fingerprint_enroll_finish.xml
index 53e430e..7d292c6 100644
--- a/res/layout-land/fingerprint_enroll_finish.xml
+++ b/res/layout-land/fingerprint_enroll_finish.xml
@@ -29,7 +29,7 @@
android:fillViewport="true">
<LinearLayout
- style="@style/SuwContentFrame"
+ style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
@@ -45,19 +45,19 @@
android:orientation="vertical">
<ImageView
- android:id="@+id/suw_layout_icon"
- style="@style/SuwGlifIcon"
+ android:id="@+id/suc_layout_icon"
+ style="@style/SudGlifIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="?attr/suwGlifHeaderGravity"
+ android:layout_gravity="?attr/sudGlifHeaderGravity"
android:layout_marginLeft="0dp"
android:layout_marginRight="0dp"
android:contentDescription="@null"
android:src="@drawable/ic_fingerprint_header"/>
<TextView
- android:id="@+id/suw_layout_title"
- style="@style/SuwGlifHeaderTitle"
+ android:id="@+id/suc_layout_title"
+ style="@style/SudGlifHeaderTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="0dp"
@@ -65,7 +65,7 @@
<TextView
android:id="@+id/message"
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/security_settings_fingerprint_enroll_finish_message"/>
@@ -79,7 +79,7 @@
<ImageView
android:id="@+id/fingerprint_in_app_indicator"
- style="@style/SuwContentIllustration"
+ style="@style/SudContentIllustration"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@android:string/fingerprint_icon_content_description"
diff --git a/res/layout/choose_lock_password.xml b/res/layout/choose_lock_password.xml
index 1962ee0..68583b5 100644
--- a/res/layout/choose_lock_password.xml
+++ b/res/layout/choose_lock_password.xml
@@ -22,10 +22,10 @@
android:icon="@drawable/ic_lock"
android:importantForAutofill="noExcludeDescendants"
settings:sucFooter="@layout/choose_lock_password_footer"
- settings:suwHeaderText="@string/lockpassword_choose_your_screen_lock_header">
+ settings:sucHeaderText="@string/lockpassword_choose_your_screen_lock_header">
<LinearLayout
- style="@style/SuwContentFrame"
+ style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="false"
@@ -35,7 +35,7 @@
<TextView
android:id="@+id/message"
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minLines="2"/>
@@ -71,7 +71,7 @@
<Button
android:id="@+id/screen_lock_options"
- style="@style/SuwGlifButton.Tertiary"
+ style="@style/SudGlifButton.Tertiary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/setup_lock_settings_options_button_label"
diff --git a/res/layout/choose_lock_password_footer.xml b/res/layout/choose_lock_password_footer.xml
index 0b7791c..58d80cf 100644
--- a/res/layout/choose_lock_password_footer.xml
+++ b/res/layout/choose_lock_password_footer.xml
@@ -17,13 +17,13 @@
<!-- TODO: Use aapt:attr when it is fixed (b/36809755) -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- style="@style/SuwGlifButtonBar"
+ style="@style/SudGlifButtonBar"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- left : skip -->
<Button android:id="@+id/skip_button"
- style="@style/SuwGlifButton.Secondary"
+ style="@style/SudGlifButton.Secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/skip_label"
@@ -32,7 +32,7 @@
<!-- left : clear -->
<Button android:id="@+id/clear_button"
- style="@style/SuwGlifButton.Secondary"
+ style="@style/SudGlifButton.Secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
@@ -45,7 +45,7 @@
<!-- right : continue -->
<Button android:id="@+id/next_button"
- style="@style/SuwGlifButton.Primary"
+ style="@style/SudGlifButton.Primary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/next_label" />
diff --git a/res/layout/choose_lock_pattern_common.xml b/res/layout/choose_lock_pattern_common.xml
index 6d64b88..b31062e 100644
--- a/res/layout/choose_lock_pattern_common.xml
+++ b/res/layout/choose_lock_pattern_common.xml
@@ -24,7 +24,7 @@
android:icon="@drawable/ic_lock"
android:layout="@layout/sud_glif_blank_template"
settings:sucFooter="@layout/choose_lock_pattern_common_footer"
- settings:suwHeaderText="@string/lockpassword_choose_your_screen_lock_header">
+ settings:sucHeaderText="@string/lockpassword_choose_your_screen_lock_header">
<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
android:id="@+id/topLayout"
@@ -35,21 +35,21 @@
android:orientation="vertical">
<LinearLayout
- style="@style/SuwGlifHeaderContainer"
+ style="@style/SudGlifHeaderContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
- android:id="@+id/suw_layout_icon"
- style="@style/SuwGlifIcon"
+ android:id="@+id/suc_layout_icon"
+ style="@style/SudGlifIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_lock" />
<TextView
- android:id="@+id/suw_layout_title"
- style="@style/SuwGlifHeaderTitle"
+ android:id="@+id/suc_layout_title"
+ style="@style/SudGlifHeaderTitle"
android:accessibilityLiveRegion="polite"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
@@ -58,7 +58,7 @@
<!-- takes up all space above button bar at bottom -->
<LinearLayout
- style="@style/SuwContentFrame"
+ style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
@@ -71,10 +71,10 @@
<TextView
android:id="@+id/message"
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginHorizontal="?attr/suwMarginSides"
+ android:layout_marginHorizontal="?attr/sudMarginSides"
android:minLines="2" />
<TextView android:id="@+id/headerText"
@@ -82,7 +82,7 @@
android:layout_height="wrap_content"
android:minLines="2"
android:gravity="center"
- android:paddingHorizontal="?attr/suwMarginSides"
+ android:paddingHorizontal="?attr/sudMarginSides"
android:textSize="12sp" />
<com.google.android.setupdesign.view.FillContentLayout
@@ -111,7 +111,7 @@
<Button
android:id="@+id/screen_lock_options"
- style="@style/SuwGlifButton.Tertiary"
+ style="@style/SudGlifButton.Tertiary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/setup_lock_settings_options_button_label"
diff --git a/res/layout/choose_lock_pattern_common_footer.xml b/res/layout/choose_lock_pattern_common_footer.xml
index b0397ea..b582854 100644
--- a/res/layout/choose_lock_pattern_common_footer.xml
+++ b/res/layout/choose_lock_pattern_common_footer.xml
@@ -18,13 +18,13 @@
<!-- TODO: Use aapt:attr when it is fixed (b/36809755) -->
<com.google.android.setupdesign.view.ButtonBarLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- style="@style/SuwGlifButtonBar.Stackable"
+ style="@style/SudGlifButtonBar.Stackable"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- left : skip -->
<Button android:id="@+id/skip_button"
- style="@style/SuwGlifButton.Secondary"
+ style="@style/SudGlifButton.Secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/skip_label"
@@ -32,7 +32,7 @@
<!-- left : retry -->
<Button android:id="@+id/footerLeftButton"
- style="@style/SuwGlifButton.Secondary"
+ style="@style/SudGlifButton.Secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/lockpattern_tutorial_cancel_label" />
@@ -44,7 +44,7 @@
<!-- right : confirm or ok -->
<Button android:id="@+id/footerRightButton"
- style="@style/SuwGlifButton.Primary"
+ style="@style/SudGlifButton.Primary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/lockpattern_tutorial_continue_label" />
diff --git a/res/layout/confirm_lock_password_normal.xml b/res/layout/confirm_lock_password_normal.xml
index 44d96e0..7b04127 100644
--- a/res/layout/confirm_lock_password_normal.xml
+++ b/res/layout/confirm_lock_password_normal.xml
@@ -29,11 +29,11 @@
<TextView
android:id="@+id/detailsText"
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginStart="?attr/suwMarginSides"
- android:layout_marginEnd="?attr/suwMarginSides" />
+ android:layout_marginStart="?attr/sudMarginSides"
+ android:layout_marginEnd="?attr/sudMarginSides" />
<Space
android:layout_width="match_parent"
@@ -72,11 +72,11 @@
<Button
android:id="@+id/cancelButton"
- style="@style/SuwGlifButton.Secondary"
+ style="@style/SudGlifButton.Secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="?attr/suwMarginSides"
- android:layout_marginEnd="?attr/suwMarginSides"
+ android:layout_marginStart="?attr/sudMarginSides"
+ android:layout_marginEnd="?attr/sudMarginSides"
android:layout_marginBottom="80dp"
android:layout_gravity="center_horizontal"
android:text="@string/cancel" />
diff --git a/res/layout/confirm_lock_pattern_normal_base.xml b/res/layout/confirm_lock_pattern_normal_base.xml
index 8cf8f87..a08d516 100644
--- a/res/layout/confirm_lock_pattern_normal_base.xml
+++ b/res/layout/confirm_lock_pattern_normal_base.xml
@@ -33,31 +33,31 @@
android:orientation="vertical">
<ImageView
- android:id="@+id/suw_layout_icon"
- style="@style/SuwGlifIcon"
+ android:id="@+id/suc_layout_icon"
+ style="@style/SudGlifIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="?attr/suwGlifHeaderGravity"
+ android:layout_gravity="?attr/sudGlifHeaderGravity"
android:src="@drawable/ic_lock" />
<TextView
android:id="@+id/headerText"
- style="@style/SuwGlifHeaderTitle"
+ style="@style/SudGlifHeaderTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:id="@+id/detailsText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginStart="?attr/suwMarginSides"
- android:layout_marginEnd="?attr/suwMarginSides" />
+ android:layout_marginStart="?attr/sudMarginSides"
+ android:layout_marginEnd="?attr/sudMarginSides" />
</LinearLayout>
<LinearLayout
- style="@style/SuwContentFrame"
+ style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
@@ -86,17 +86,17 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
- android:layout_marginHorizontal="?attr/suwMarginSides"
+ android:layout_marginHorizontal="?attr/sudMarginSides"
android:layout_marginTop="12dp"
android:gravity="center_vertical"/>
<Button
android:id="@+id/cancelButton"
- style="@style/SuwGlifButton.Secondary"
+ style="@style/SudGlifButton.Secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="?attr/suwMarginSides"
- android:layout_marginEnd="?attr/suwMarginSides"
+ android:layout_marginStart="?attr/sudMarginSides"
+ android:layout_marginEnd="?attr/sudMarginSides"
android:layout_marginBottom="80dp"
android:text="@string/cancel" />
diff --git a/res/layout/encryption_interstitial.xml b/res/layout/encryption_interstitial.xml
index 5acc7b1..3e227cb1 100644
--- a/res/layout/encryption_interstitial.xml
+++ b/res/layout/encryption_interstitial.xml
@@ -23,7 +23,7 @@
android:icon="@drawable/ic_lock">
<LinearLayout
- style="@style/SuwContentFrame"
+ style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false"
@@ -32,7 +32,7 @@
<TextView
android:id="@+id/encryption_message"
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
diff --git a/res/layout/face_enroll_enrolling.xml b/res/layout/face_enroll_enrolling.xml
index 38a26a2..e7af493 100644
--- a/res/layout/face_enroll_enrolling.xml
+++ b/res/layout/face_enroll_enrolling.xml
@@ -24,7 +24,7 @@
style="?attr/face_layout_theme">
<LinearLayout
- style="@style/SuwContentFrame"
+ style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
diff --git a/res/layout/face_enroll_finish.xml b/res/layout/face_enroll_finish.xml
index df46098..62176a7 100644
--- a/res/layout/face_enroll_finish.xml
+++ b/res/layout/face_enroll_finish.xml
@@ -24,7 +24,7 @@
android:layout_height="match_parent">
<LinearLayout
- style="@style/SuwContentFrame"
+ style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
@@ -44,7 +44,7 @@
android:layout_weight="1">
<ImageView
- style="@style/SuwContentIllustration"
+ style="@style/SudContentIllustration"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@null"
diff --git a/res/layout/face_enroll_introduction.xml b/res/layout/face_enroll_introduction.xml
index df3cf72..69b00fe 100644
--- a/res/layout/face_enroll_introduction.xml
+++ b/res/layout/face_enroll_introduction.xml
@@ -25,7 +25,7 @@
android:layout_height="match_parent">
<LinearLayout
- style="@style/SuwContentFrame"
+ style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false"
@@ -34,14 +34,14 @@
<com.google.android.setupdesign.view.RichTextView
android:id="@+id/description_text"
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/security_settings_face_enroll_introduction_message" />
<com.google.android.setupdesign.view.RichTextView
android:id="@+id/error_text"
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
@@ -51,7 +51,7 @@
android:layout_weight="1">
<ImageView
- style="@style/SuwContentIllustration"
+ style="@style/SudContentIllustration"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@null"
@@ -65,7 +65,7 @@
android:layout_gravity="center">
<Button
android:id="@+id/accessibility_button"
- style="@style/SuwGlifButton.Secondary"
+ style="@style/SudGlifButton.Secondary"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/res/layout/fingerprint_enroll_enrolling_base.xml b/res/layout/fingerprint_enroll_enrolling_base.xml
index 4439b08..3a476fa 100644
--- a/res/layout/fingerprint_enroll_enrolling_base.xml
+++ b/res/layout/fingerprint_enroll_enrolling_base.xml
@@ -24,7 +24,7 @@
style="?attr/fingerprint_layout_theme">
<LinearLayout
- style="@style/SuwContentFrame"
+ style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
@@ -38,7 +38,7 @@
android:layout_height="wrap_content">
<TextView
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:id="@+id/start_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -46,7 +46,7 @@
android:text="@string/security_settings_fingerprint_enroll_start_message"/>
<TextView
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:id="@+id/repeat_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/res/layout/fingerprint_enroll_find_sensor_base.xml b/res/layout/fingerprint_enroll_find_sensor_base.xml
index 56d3ea4..c03ac5a 100644
--- a/res/layout/fingerprint_enroll_find_sensor_base.xml
+++ b/res/layout/fingerprint_enroll_find_sensor_base.xml
@@ -31,7 +31,7 @@
android:clipChildren="false">
<LinearLayout
- style="@style/SuwContentFrame"
+ style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
@@ -39,10 +39,10 @@
android:clipChildren="false">
<TextView
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/suw_description_glif_margin_top"
+ android:layout_marginTop="@dimen/sud_description_glif_margin_top"
android:text="@string/security_settings_fingerprint_enroll_find_sensor_message"/>
</LinearLayout>
diff --git a/res/layout/fingerprint_enroll_finish_base.xml b/res/layout/fingerprint_enroll_finish_base.xml
index 1849f51..2fa5da6 100644
--- a/res/layout/fingerprint_enroll_finish_base.xml
+++ b/res/layout/fingerprint_enroll_finish_base.xml
@@ -24,7 +24,7 @@
android:layout_height="match_parent">
<LinearLayout
- style="@style/SuwContentFrame"
+ style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
@@ -33,10 +33,10 @@
<TextView
android:id="@+id/message"
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/suw_description_glif_margin_top"
+ android:layout_marginTop="@dimen/sud_description_glif_margin_top"
android:minLines="3"
android:text="@string/security_settings_fingerprint_enroll_finish_message"/>
@@ -57,7 +57,7 @@
<ImageView
android:id="@+id/fingerprint_in_app_indicator"
- style="@style/SuwContentIllustration"
+ style="@style/SudContentIllustration"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="7dp"
diff --git a/res/layout/fingerprint_enroll_introduction.xml b/res/layout/fingerprint_enroll_introduction.xml
index adb46e5..4ee7057 100644
--- a/res/layout/fingerprint_enroll_introduction.xml
+++ b/res/layout/fingerprint_enroll_introduction.xml
@@ -24,7 +24,7 @@
android:layout_height="match_parent">
<LinearLayout
- style="@style/SuwContentFrame"
+ style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false"
@@ -33,14 +33,14 @@
<com.google.android.setupdesign.view.RichTextView
android:id="@+id/description_text"
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/security_settings_fingerprint_enroll_introduction_message" />
<com.google.android.setupdesign.view.RichTextView
android:id="@+id/error_text"
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
@@ -50,7 +50,7 @@
android:layout_weight="1">
<ImageView
- style="@style/SuwContentIllustration"
+ style="@style/SudContentIllustration"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@null"
diff --git a/res/layout/master_clear.xml b/res/layout/master_clear.xml
index 83b02ff..9c1dd80 100644
--- a/res/layout/master_clear.xml
+++ b/res/layout/master_clear.xml
@@ -21,9 +21,9 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:theme="@style/SuwThemeGlifV3.DayNight"
+ android:theme="@style/SudThemeGlifV3.DayNight"
android:icon="@drawable/ic_delete_accent"
- app:suwHeaderText="@string/master_clear_title">
+ app:sucHeaderText="@string/master_clear_title">
<ScrollView
android:id="@+id/master_clear_scrollview"
@@ -34,33 +34,33 @@
<LinearLayout
android:id="@+id/master_clear_container"
- style="@style/SuwContentFrame"
+ style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
- style="@style/TextAppearance.SuwGlifItemSummary"
+ style="@style/TextAppearance.SudGlifItemSummary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/master_clear_desc"/>
<TextView
android:id="@+id/also_erases_external"
- style="@style/TextAppearance.SuwGlifItemSummary"
+ style="@style/TextAppearance.SudGlifItemSummary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:text="@string/master_clear_desc_also_erases_external"/>
<TextView
android:id="@+id/also_erases_esim"
- style="@style/TextAppearance.SuwGlifItemSummary"
+ style="@style/TextAppearance.SudGlifItemSummary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:text="@string/master_clear_desc_also_erases_esim"/>
<TextView
android:id="@+id/accounts_label"
- style="@style/TextAppearance.SuwGlifItemSummary"
+ style="@style/TextAppearance.SudGlifItemSummary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
@@ -76,21 +76,21 @@
</LinearLayout>
<TextView
android:id="@+id/other_users_present"
- style="@style/TextAppearance.SuwGlifItemSummary"
+ style="@style/TextAppearance.SudGlifItemSummary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:text="@string/master_clear_other_users_present"/>
<TextView
android:id="@+id/no_cancel_mobile_plan"
- style="@style/TextAppearance.SuwGlifItemSummary"
+ style="@style/TextAppearance.SudGlifItemSummary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:text="@string/master_clear_desc_no_cancel_mobile_plan"/>
<TextView
android:id="@+id/erase_external_option_text"
- style="@style/TextAppearance.SuwGlifItemSummary"
+ style="@style/TextAppearance.SudGlifItemSummary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/master_clear_desc_erase_external_storage"/>
@@ -103,7 +103,7 @@
android:clickable="true">
<CheckBox
android:id="@+id/erase_external"
- style="@style/SuwCheckBox"
+ style="@style/SudCheckBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
@@ -116,12 +116,12 @@
android:layout_gravity="center_vertical"
android:orientation="vertical">
<TextView
- style="@style/TextAppearance.SuwGlifItemTitle"
+ style="@style/TextAppearance.SudGlifItemTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/erase_external_storage"/>
<TextView
- style="@style/TextAppearance.SuwGlifItemSummary"
+ style="@style/TextAppearance.SudGlifItemSummary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/erase_external_storage_description"/>
diff --git a/res/layout/master_clear_account.xml b/res/layout/master_clear_account.xml
index 0b522f2..f95a44f 100644
--- a/res/layout/master_clear_account.xml
+++ b/res/layout/master_clear_account.xml
@@ -20,7 +20,7 @@
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
- style="@style/SuwDescription.Glif" >
+ style="@style/SudDescription.Glif" >
<ImageView
android:id="@android:id/icon"
android:layout_width="56dp"
@@ -30,6 +30,6 @@
android:id="@android:id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- style="@style/TextAppearance.SuwGlifItemSummary"/>
+ style="@style/TextAppearance.SudGlifItemSummary"/>
</LinearLayout>
diff --git a/res/layout/master_clear_confirm.xml b/res/layout/master_clear_confirm.xml
index 2acdfce..b4c0270 100644
--- a/res/layout/master_clear_confirm.xml
+++ b/res/layout/master_clear_confirm.xml
@@ -19,20 +19,20 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:theme="@style/SuwThemeGlifV3.DayNight"
+ android:theme="@style/SudThemeGlifV3.DayNight"
android:id="@+id/setup_wizard_layout"
android:icon="@drawable/ic_delete_accent"
- app:suwHeaderText="@string/master_clear_confirm_title">
+ app:sucHeaderText="@string/master_clear_confirm_title">
<LinearLayout
- style="@style/SuwContentFrame"
+ style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/master_clear_confirm"
- style="@style/SuwItemTitle.GlifDescription"
+ style="@style/SudItemTitle.GlifDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/master_clear_final_desc"/>
diff --git a/res/layout/password_requirement_item.xml b/res/layout/password_requirement_item.xml
index 8080f10..ff7e04c 100644
--- a/res/layout/password_requirement_item.xml
+++ b/res/layout/password_requirement_item.xml
@@ -18,5 +18,5 @@
android:id="@+id/description_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:gravity="?attr/suwGlifHeaderGravity"
+ android:gravity="?attr/sudGlifHeaderGravity"
android:textSize="14sp"/>
diff --git a/res/layout/redaction_interstitial.xml b/res/layout/redaction_interstitial.xml
index ab7e0b3..f911572 100644
--- a/res/layout/redaction_interstitial.xml
+++ b/res/layout/redaction_interstitial.xml
@@ -22,10 +22,10 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:icon="@drawable/ic_suggested_notifications"
- settings:suwHeaderText="@string/lock_screen_notifications_interstitial_title">
+ settings:sucHeaderText="@string/lock_screen_notifications_interstitial_title">
<LinearLayout
- style="@style/SuwContentFrame"
+ style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="false"
@@ -34,7 +34,7 @@
<TextView
android:id="@+id/message"
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/lock_screen_notifications_interstitial_message" />
@@ -48,7 +48,7 @@
<com.android.settings.RestrictedRadioButton
android:id="@+id/show_all"
- style="@style/SuwRadioButton"
+ style="@style/SudRadioButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="0dp"
@@ -57,7 +57,7 @@
<com.android.settings.RestrictedRadioButton
android:id="@+id/redact_sensitive"
- style="@style/SuwRadioButton"
+ style="@style/SudRadioButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="0dp"
@@ -66,7 +66,7 @@
<RadioButton
android:id="@+id/hide_all"
- style="@style/SuwRadioButton"
+ style="@style/SudRadioButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="0dp"
diff --git a/res/layout/reset_esim_checkbox.xml b/res/layout/reset_esim_checkbox.xml
index e2ae4bb..2195435 100644
--- a/res/layout/reset_esim_checkbox.xml
+++ b/res/layout/reset_esim_checkbox.xml
@@ -15,7 +15,7 @@
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- style="@style/SuwDescription"
+ style="@style/SudDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
@@ -25,7 +25,7 @@
<CheckBox
android:id="@+id/erase_esim"
- style="@style/SuwCheckBox"
+ style="@style/SudCheckBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
@@ -42,12 +42,12 @@
<TextView
android:id="@+id/erase_esim_title"
- style="@style/TextAppearance.SuwGlifItemTitle"
+ style="@style/TextAppearance.SudGlifItemTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
- style="@style/TextAppearance.SuwGlifItemSummary"
+ style="@style/TextAppearance.SudGlifItemSummary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/reset_esim_desc"/>
diff --git a/res/layout/setup_choose_lock_generic_biometrics_header.xml b/res/layout/setup_choose_lock_generic_biometrics_header.xml
index ca808e8..daeeedd 100644
--- a/res/layout/setup_choose_lock_generic_biometrics_header.xml
+++ b/res/layout/setup_choose_lock_generic_biometrics_header.xml
@@ -16,11 +16,11 @@
-->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
- android:paddingTop="@dimen/suw_description_glif_margin_top"
- android:paddingBottom="@dimen/suw_description_glif_margin_bottom_lists"
+ android:paddingTop="@dimen/sud_description_glif_margin_top"
+ android:paddingBottom="@dimen/sud_description_glif_margin_bottom_lists"
android:text="@string/lock_settings_picker_biometrics_added_security_message" />
diff --git a/res/layout/setup_choose_lock_generic_header.xml b/res/layout/setup_choose_lock_generic_header.xml
index 8875e1f..7ec16d2 100644
--- a/res/layout/setup_choose_lock_generic_header.xml
+++ b/res/layout/setup_choose_lock_generic_header.xml
@@ -16,11 +16,11 @@
-->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
- android:paddingTop="@dimen/suw_description_glif_margin_top"
- android:paddingBottom="@dimen/suw_description_glif_margin_bottom_lists"
+ android:paddingTop="@dimen/sud_description_glif_margin_top"
+ android:paddingBottom="@dimen/sud_description_glif_margin_bottom_lists"
android:text="@string/setup_lock_settings_picker_message" />
diff --git a/res/layout/setup_screen_lock_fingerprint_details.xml b/res/layout/setup_screen_lock_fingerprint_details.xml
index 06ca778..fc4ed98 100644
--- a/res/layout/setup_screen_lock_fingerprint_details.xml
+++ b/res/layout/setup_screen_lock_fingerprint_details.xml
@@ -20,6 +20,6 @@
android:layout_height="wrap_content"
android:paddingTop="6dip"
android:paddingBottom="6dip"
- android:paddingStart="@dimen/suw_layout_margin_sides"
- android:paddingEnd="@dimen/suw_layout_margin_sides"
+ android:paddingStart="@dimen/sud_layout_margin_sides"
+ android:paddingEnd="@dimen/sud_layout_margin_sides"
android:text="@string/unlock_setup_wizard_fingerprint_details" />
diff --git a/res/layout/storage_internal_forget.xml b/res/layout/storage_internal_forget.xml
index 5ff232a..a2b646e 100644
--- a/res/layout/storage_internal_forget.xml
+++ b/res/layout/storage_internal_forget.xml
@@ -28,11 +28,11 @@
android:id="@+id/body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingTop="@dimen/suw_description_margin_top"
- android:paddingBottom="@dimen/suw_description_margin_bottom"
- android:paddingStart="@dimen/suw_layout_margin_sides"
- android:paddingEnd="@dimen/suw_layout_margin_sides"
- android:lineSpacingExtra="@dimen/suw_description_line_spacing_extra"
+ android:paddingTop="@dimen/sud_description_margin_top"
+ android:paddingBottom="@dimen/sud_description_margin_bottom"
+ android:paddingStart="@dimen/sud_layout_margin_sides"
+ android:paddingEnd="@dimen/sud_layout_margin_sides"
+ android:lineSpacingExtra="@dimen/sud_description_line_spacing_extra"
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body1"
android:textColor="?android:attr/textColorPrimary" />
</ScrollView>
diff --git a/res/layout/storage_internal_format.xml b/res/layout/storage_internal_format.xml
index 500592f..08434b0 100644
--- a/res/layout/storage_internal_format.xml
+++ b/res/layout/storage_internal_format.xml
@@ -28,11 +28,11 @@
android:id="@+id/body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingTop="@dimen/suw_description_margin_top"
- android:paddingBottom="@dimen/suw_description_margin_bottom"
- android:paddingStart="@dimen/suw_layout_margin_sides"
- android:paddingEnd="@dimen/suw_layout_margin_sides"
- android:lineSpacingExtra="@dimen/suw_description_line_spacing_extra"
+ android:paddingTop="@dimen/sud_description_margin_top"
+ android:paddingBottom="@dimen/sud_description_margin_bottom"
+ android:paddingStart="@dimen/sud_layout_margin_sides"
+ android:paddingEnd="@dimen/sud_layout_margin_sides"
+ android:lineSpacingExtra="@dimen/sud_description_line_spacing_extra"
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body1"
android:textColor="?android:attr/textColorPrimary" />
</ScrollView>
diff --git a/res/layout/storage_internal_unmount.xml b/res/layout/storage_internal_unmount.xml
index 2e394df..2ae489c 100644
--- a/res/layout/storage_internal_unmount.xml
+++ b/res/layout/storage_internal_unmount.xml
@@ -28,11 +28,11 @@
android:id="@+id/body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingTop="@dimen/suw_description_margin_top"
- android:paddingBottom="@dimen/suw_description_margin_bottom"
- android:paddingStart="@dimen/suw_layout_margin_sides"
- android:paddingEnd="@dimen/suw_layout_margin_sides"
- android:lineSpacingExtra="@dimen/suw_description_line_spacing_extra"
+ android:paddingTop="@dimen/sud_description_margin_top"
+ android:paddingBottom="@dimen/sud_description_margin_bottom"
+ android:paddingStart="@dimen/sud_layout_margin_sides"
+ android:paddingEnd="@dimen/sud_layout_margin_sides"
+ android:lineSpacingExtra="@dimen/sud_description_line_spacing_extra"
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body1"
android:textColor="?android:attr/textColorPrimary" />
</ScrollView>
diff --git a/res/layout/storage_wizard_checklist.xml b/res/layout/storage_wizard_checklist.xml
index 6f21bb8..842cbdb 100644
--- a/res/layout/storage_wizard_checklist.xml
+++ b/res/layout/storage_wizard_checklist.xml
@@ -22,36 +22,36 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/suw_description_margin_top"
+ android:layout_marginTop="@dimen/sud_description_margin_top"
android:textColor="?android:attr/textColorPrimary"
android:text="@string/storage_wizard_migrate_v2_checklist" />
<TextView
android:id="@+id/storage_wizard_migrate_v2_checklist_media"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/suw_description_margin_top"
- android:layout_marginBottom="@dimen/suw_description_margin_bottom"
+ android:layout_marginTop="@dimen/sud_description_margin_top"
+ android:layout_marginBottom="@dimen/sud_description_margin_bottom"
android:textColor="?android:attr/textColorPrimary"
android:text="@string/storage_wizard_migrate_v2_checklist_media"
android:drawableStart="@drawable/ic_sd_card"
android:drawableTint="?android:attr/textColorSecondary"
- android:drawablePadding="@dimen/suw_description_margin_bottom" />
+ android:drawablePadding="@dimen/sud_description_margin_bottom" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/suw_description_margin_bottom"
+ android:layout_marginBottom="@dimen/sud_description_margin_bottom"
android:textColor="?android:attr/textColorPrimary"
android:text="@string/storage_wizard_migrate_v2_checklist_apps"
android:drawableStart="@drawable/ic_apps_alt"
android:drawableTint="?android:attr/textColorSecondary"
- android:drawablePadding="@dimen/suw_description_margin_bottom" />
+ android:drawablePadding="@dimen/sud_description_margin_bottom" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/suw_description_margin_bottom"
+ android:layout_marginBottom="@dimen/sud_description_margin_bottom"
android:textColor="?android:attr/textColorPrimary"
android:text="@string/storage_wizard_migrate_v2_checklist_battery"
android:drawableStart="@drawable/ic_battery_charging_full"
android:drawableTint="?android:attr/textColorSecondary"
- android:drawablePadding="@dimen/suw_description_margin_bottom" />
+ android:drawablePadding="@dimen/sud_description_margin_bottom" />
</LinearLayout>
diff --git a/res/layout/storage_wizard_generic.xml b/res/layout/storage_wizard_generic.xml
index 0e7c1fd..2b96101 100644
--- a/res/layout/storage_wizard_generic.xml
+++ b/res/layout/storage_wizard_generic.xml
@@ -22,7 +22,7 @@
android:layout_height="match_parent">
<LinearLayout
- style="@style/SuwContentFrame"
+ style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
@@ -31,8 +31,8 @@
android:id="@+id/storage_wizard_body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/suw_description_margin_top"
- android:lineSpacingExtra="@dimen/suw_description_line_spacing_extra"
+ android:layout_marginTop="@dimen/sud_description_margin_top"
+ android:lineSpacingExtra="@dimen/sud_description_line_spacing_extra"
android:textColor="?android:attr/textColorPrimary" />
<FrameLayout
diff --git a/res/layout/storage_wizard_init.xml b/res/layout/storage_wizard_init.xml
index bca2676..d02e871 100644
--- a/res/layout/storage_wizard_init.xml
+++ b/res/layout/storage_wizard_init.xml
@@ -22,7 +22,7 @@
android:layout_height="match_parent">
<LinearLayout
- style="@style/SuwContentFrame"
+ style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
@@ -30,7 +30,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/suw_description_margin_top"
+ android:layout_marginTop="@dimen/sud_description_margin_top"
android:orientation="horizontal"
android:gravity="center_vertical">
<ImageView
@@ -42,23 +42,23 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:layout_marginStart="@dimen/suw_glif_margin_sides"
+ android:layout_marginStart="@dimen/sud_glif_margin_sides"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/suw_description_margin_bottom"
+ android:layout_marginBottom="@dimen/sud_description_margin_bottom"
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Subhead"
android:text="@string/storage_wizard_init_v2_internal_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/suw_description_margin_bottom"
+ android:layout_marginBottom="@dimen/sud_description_margin_bottom"
android:textColor="?android:attr/textColorSecondary"
android:text="@string/storage_wizard_init_v2_internal_summary" />
<Button
android:id="@+id/storage_wizard_init_internal"
- style="@style/SuwGlifButton.Primary"
+ style="@style/SudGlifButton.Primary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/storage_wizard_init_v2_internal_action"
@@ -69,7 +69,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/suw_description_margin_top"
+ android:layout_marginTop="@dimen/sud_description_margin_top"
android:orientation="horizontal"
android:gravity="center_vertical">
<View
@@ -97,7 +97,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/suw_description_margin_top"
+ android:layout_marginTop="@dimen/sud_description_margin_top"
android:orientation="horizontal"
android:gravity="center_vertical">
<ImageView
@@ -109,23 +109,23 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:layout_marginStart="@dimen/suw_glif_margin_sides"
+ android:layout_marginStart="@dimen/sud_glif_margin_sides"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/suw_description_margin_bottom"
+ android:layout_marginBottom="@dimen/sud_description_margin_bottom"
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Subhead"
android:text="@string/storage_wizard_init_v2_external_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/suw_description_margin_bottom"
+ android:layout_marginBottom="@dimen/sud_description_margin_bottom"
android:textColor="?android:attr/textColorSecondary"
android:text="@string/storage_wizard_init_v2_external_summary" />
<Button
android:id="@+id/storage_wizard_init_external"
- style="@style/SuwGlifButton.Primary"
+ style="@style/SudGlifButton.Primary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/storage_wizard_init_v2_external_action"
diff --git a/res/layout/storage_wizard_progress.xml b/res/layout/storage_wizard_progress.xml
index a68750f..cf5bc43 100644
--- a/res/layout/storage_wizard_progress.xml
+++ b/res/layout/storage_wizard_progress.xml
@@ -22,7 +22,7 @@
android:layout_height="match_parent">
<LinearLayout
- style="@style/SuwContentFrame"
+ style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
@@ -31,22 +31,22 @@
android:id="@+id/storage_wizard_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/suw_description_margin_top"
+ android:layout_marginTop="@dimen/sud_description_margin_top"
android:indeterminate="false"
style="?android:attr/progressBarStyleHorizontal" />
<TextView
android:id="@+id/storage_wizard_progress_summary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:lineSpacingExtra="@dimen/suw_description_line_spacing_extra"
+ android:lineSpacingExtra="@dimen/sud_description_line_spacing_extra"
android:textColor="?android:attr/textColorSecondary" />
<TextView
android:id="@+id/storage_wizard_body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/suw_description_margin_top"
- android:lineSpacingExtra="@dimen/suw_description_line_spacing_extra"
+ android:layout_marginTop="@dimen/sud_description_margin_top"
+ android:lineSpacingExtra="@dimen/sud_description_line_spacing_extra"
android:textColor="?android:attr/textColorPrimary"
android:visibility="gone" />
diff --git a/res/values/colors.xml b/res/values/colors.xml
index a1381c3..da01be0 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -30,7 +30,7 @@
<color name="title_color">@android:color/holo_blue_light</color>
<color name="setup_lock_pattern_view_regular_color_light">@color/lock_pattern_view_regular_color</color>
<color name="setup_lock_pattern_view_success_color_dark">#ff84ffff</color>
- <color name="setup_lock_pattern_view_success_color_light">@color/suw_color_accent_light</color>
+ <color name="setup_lock_pattern_view_success_color_light">@color/sud_color_accent_light</color>
<color name="setup_lock_pattern_view_error_color_dark">#fff44336</color>
<color name="setup_wizard_wifi_color_dark">#89ffffff</color>
<color name="setup_wizard_wifi_color_light">#89000000</color>
diff --git a/res/values/config.xml b/res/values/config.xml
index 8efa6b2..1a504dd 100755
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -174,4 +174,7 @@
<!-- Max allowed value for screen timeout, in milliseconds -->
<integer name="max_lock_after_timeout_ms">1800000</integer>
+
+ <!-- App intent -->
+ <string name="config_account_intent_uri" translatable="false"></string>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 9698dcb..89a18b4 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2104,6 +2104,12 @@
<string name="wifi_dpp_add_another_device">Add another device</string>
<!-- Button label to choose different Wi-Fi network [CHAR LIMIT=80] -->
<string name="wifi_dpp_choose_different_network">Choose different network</string>
+ <!-- Hint for QR code detection [CHAR LIMIT=50] -->
+ <string name="wifi_dpp_could_not_add_device">Couldn\u2019t add device</string>
+ <!-- Title for the fragment to show that device found but naming known [CHAR LIMIT=50] -->
+ <string name="wifi_dpp_device_found">Device found</string>
+ <!-- Label for the try again button [CHAR LIMIT=20]-->
+ <string name="retry">Retry</string>
<!-- Label for the check box to share a network with other users on the same device -->
<string name="wifi_shared">Share with other device users</string>
<!-- Hint for unchanged fields -->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 111cdbd..1668b37 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -174,13 +174,13 @@
<item name="android:background">#ff000000</item>
</style>
- <style name="SetupWizardButton.Negative" parent="@style/SuwGlifButton.Secondary">
+ <style name="SetupWizardButton.Negative" parent="@style/SudGlifButton.Secondary">
<!-- Negative margin to offset for padding of the button itself. We want the label to be
aligned with the text above it -->
<item name="android:layout_marginStart">-16dp</item>
</style>
- <style name="SetupWizardButton.Positive" parent="@style/SuwGlifButton.Primary"/>
+ <style name="SetupWizardButton.Positive" parent="@style/SudGlifButton.Primary"/>
<style name="AccentColorHighlightBorderlessButton">
<item name="android:colorControlHighlight">?android:attr/colorAccent</item>
diff --git a/res/values/themes.xml b/res/values/themes.xml
index 6041ef8..c7fafad 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -39,7 +39,7 @@
<item name="wifi_friction">@drawable/wifi_friction</item>
<item name="side_margin">@dimen/settings_side_margin</item>
- <item name="suwListItemIconColor">?android:attr/colorAccent</item>
+ <item name="sudListItemIconColor">?android:attr/colorAccent</item>
<!-- Redefine the ActionBar style for contentInsetStart -->
<item name="android:actionBarStyle">@style/Widget.ActionBar</item>
diff --git a/res/values/themes_suw.xml b/res/values/themes_suw.xml
index e0d25c9..9bb67cf 100644
--- a/res/values/themes_suw.xml
+++ b/res/values/themes_suw.xml
@@ -17,7 +17,7 @@
<!-- SUW related themes -->
<resources>
- <style name="GlifTheme" parent="SuwThemeGlif.DayNight">
+ <style name="GlifTheme" parent="SudThemeGlif.DayNight">
<!-- For all AndroidX Alert Dialogs -->
<item name="alertDialogTheme">@style/ThemeOverlay.AlertDialog</item>
<item name="android:windowBackground">?android:attr/colorBackground</item>
@@ -36,7 +36,7 @@
<item name="*android:lockPatternStyle">@style/LockPatternStyle.Setup</item>
</style>
- <style name="GlifTheme.Light" parent="SuwThemeGlif.Light">
+ <style name="GlifTheme.Light" parent="SudThemeGlif.Light">
<!-- For all AndroidX Alert Dialogs -->
<item name="alertDialogTheme">@style/ThemeOverlay.AlertDialog</item>
<item name="android:windowBackground">?android:attr/colorBackground</item>
@@ -55,7 +55,7 @@
<item name="*android:colorError">@color/glif_error_color</item>
</style>
- <style name="GlifV2Theme" parent="SuwThemeGlifV2.DayNight">
+ <style name="GlifV2Theme" parent="SudThemeGlifV2.DayNight">
<!-- For all AndroidX Alert Dialogs -->
<item name="alertDialogTheme">@style/GlifV2ThemeAlertDialog</item>
<item name="android:windowBackground">?android:attr/colorBackground</item>
@@ -74,7 +74,7 @@
<item name="*android:lockPatternStyle">@style/LockPatternStyle.Setup</item>
</style>
- <style name="GlifV2Theme.Light" parent="SuwThemeGlifV2.Light">
+ <style name="GlifV2Theme.Light" parent="SudThemeGlifV2.Light">
<!-- For all AndroidX Alert Dialogs -->
<item name="alertDialogTheme">@style/GlifV2ThemeAlertDialog.Light</item>
<item name="android:windowBackground">?android:attr/colorBackground</item>
@@ -93,7 +93,7 @@
<item name="*android:colorError">@color/glif_error_color</item>
</style>
- <style name="GlifV3Theme" parent="SuwThemeGlifV3.DayNight">
+ <style name="GlifV3Theme" parent="SudThemeGlifV3.DayNight">
<!-- For all AndroidX Alert Dialogs -->
<item name="alertDialogTheme">@style/GlifV2ThemeAlertDialog</item>
<item name="android:windowBackground">?android:attr/colorBackground</item>
@@ -112,7 +112,7 @@
<item name="*android:lockPatternStyle">@style/LockPatternStyle.Setup</item>
</style>
- <style name="GlifV3Theme.Light" parent="SuwThemeGlifV3.Light">
+ <style name="GlifV3Theme.Light" parent="SudThemeGlifV3.Light">
<!-- For all AndroidX Alert Dialogs -->
<item name="alertDialogTheme">@style/GlifV2ThemeAlertDialog.Light</item>
<item name="android:windowBackground">?android:attr/colorBackground</item>
diff --git a/src/com/android/settings/EncryptionInterstitial.java b/src/com/android/settings/EncryptionInterstitial.java
index 656b18c..6060892 100644
--- a/src/com/android/settings/EncryptionInterstitial.java
+++ b/src/com/android/settings/EncryptionInterstitial.java
@@ -156,7 +156,7 @@
.setText(R.string.encryption_interstitial_no)
.setListener(this::onNoButtonClicked)
.setButtonType(FooterButton.ButtonType.SKIP)
- .setTheme(R.style.SuwGlifButton_Secondary)
+ .setTheme(R.style.SudGlifButton_Secondary)
.build()
);
@@ -165,7 +165,7 @@
.setText(R.string.encryption_interstitial_yes)
.setListener(this::onYesButtonClicked)
.setButtonType(FooterButton.ButtonType.NEXT)
- .setTheme(R.style.SuwGlifButton_Primary)
+ .setTheme(R.style.SudGlifButton_Primary)
.build()
);
}
diff --git a/src/com/android/settings/MasterClear.java b/src/com/android/settings/MasterClear.java
index e4ce6443..c03d499 100644
--- a/src/com/android/settings/MasterClear.java
+++ b/src/com/android/settings/MasterClear.java
@@ -423,7 +423,7 @@
.setText(R.string.master_clear_button_text)
.setListener(mInitiateListener)
.setButtonType(ButtonType.OTHER)
- .setTheme(R.style.SuwGlifButton_Primary)
+ .setTheme(R.style.SudGlifButton_Primary)
.build()
);
mInitiateButton = buttonFooterMixin.getPrimaryButton();
diff --git a/src/com/android/settings/MasterClearConfirm.java b/src/com/android/settings/MasterClearConfirm.java
index 0750cb1..cbd4924 100644
--- a/src/com/android/settings/MasterClearConfirm.java
+++ b/src/com/android/settings/MasterClearConfirm.java
@@ -160,7 +160,7 @@
.setText(R.string.master_clear_button_text)
.setListener(mFinalClickListener)
.setButtonType(ButtonType.OTHER)
- .setTheme(R.style.SuwGlifButton_Primary)
+ .setTheme(R.style.SudGlifButton_Primary)
.build()
);
}
diff --git a/src/com/android/settings/accounts/AccountFeatureProvider.java b/src/com/android/settings/accounts/AccountFeatureProvider.java
index fd65095..ef14fa0 100644
--- a/src/com/android/settings/accounts/AccountFeatureProvider.java
+++ b/src/com/android/settings/accounts/AccountFeatureProvider.java
@@ -23,5 +23,4 @@
public interface AccountFeatureProvider {
String getAccountType();
Account[] getAccounts(Context context);
- Intent getAccountSettingsDeeplinkIntent();
}
diff --git a/src/com/android/settings/accounts/AccountFeatureProviderImpl.java b/src/com/android/settings/accounts/AccountFeatureProviderImpl.java
index 2e0f432..90b581b 100644
--- a/src/com/android/settings/accounts/AccountFeatureProviderImpl.java
+++ b/src/com/android/settings/accounts/AccountFeatureProviderImpl.java
@@ -2,7 +2,6 @@
import android.accounts.Account;
import android.content.Context;
-import android.content.Intent;
public class AccountFeatureProviderImpl implements AccountFeatureProvider {
@Override
@@ -14,9 +13,4 @@
public Account[] getAccounts(Context context) {
return new Account[0];
}
-
- @Override
- public Intent getAccountSettingsDeeplinkIntent() {
- return null;
- }
}
diff --git a/src/com/android/settings/accounts/AvatarViewMixin.java b/src/com/android/settings/accounts/AvatarViewMixin.java
index 35a3cbf..43531b3 100644
--- a/src/com/android/settings/accounts/AvatarViewMixin.java
+++ b/src/com/android/settings/accounts/AvatarViewMixin.java
@@ -40,6 +40,7 @@
import com.android.settings.overlay.FeatureFactory;
import com.android.settingslib.utils.ThreadUtils;
+import java.net.URISyntaxException;
import java.util.List;
/**
@@ -57,7 +58,6 @@
private static final String KEY_AVATAR_BITMAP = "account_avatar";
private static final String KEY_ACCOUNT_NAME = "account_name";
private static final String EXTRA_ACCOUNT_NAME = "extra.accountName";
- private static final int REQUEST_CODE = 1013;
private final Context mContext;
private final ImageView mAvatarView;
@@ -69,23 +69,32 @@
mContext = activity.getApplicationContext();
mAvatarView = avatarView;
mAvatarView.setOnClickListener(v -> {
- final Intent intent = FeatureFactory.getFactory(mContext)
- .getAccountFeatureProvider()
- .getAccountSettingsDeeplinkIntent();
-
- if (intent == null) {
+ Intent intent;
+ try {
+ final String uri = mContext.getResources().getString(
+ R.string.config_account_intent_uri);
+ intent = Intent.parseUri(uri, Intent.URI_INTENT_SCHEME);
+ } catch (URISyntaxException e) {
+ Log.w(TAG, "Error parsing avatar mixin intent, skipping", e);
return;
}
if (!TextUtils.isEmpty(mAccountName)) {
- //TODO(b/117509285) launch the new page of the MeCard
intent.putExtra(EXTRA_ACCOUNT_NAME, mAccountName);
}
+ final List<ResolveInfo> matchedIntents =
+ mContext.getPackageManager().queryIntentActivities(intent,
+ PackageManager.MATCH_SYSTEM_ONLY);
+ if (matchedIntents.isEmpty()) {
+ Log.w(TAG, "Cannot find any matching action VIEW_ACCOUNT intent.");
+ return;
+ }
+
// Here may have two different UI while start the activity.
// It will display adding account UI when device has no any account.
// It will display account information page when intent added the specified account.
- activity.startActivityForResult(intent, REQUEST_CODE);
+ activity.startActivity(intent);
});
mAvatarImage = new MutableLiveData<>();
diff --git a/src/com/android/settings/applications/defaultapps/RolesPreferenceController.java b/src/com/android/settings/applications/defaultapps/RolesPreferenceController.java
index 59166dd..c7cab15 100644
--- a/src/com/android/settings/applications/defaultapps/RolesPreferenceController.java
+++ b/src/com/android/settings/applications/defaultapps/RolesPreferenceController.java
@@ -16,31 +16,44 @@
package com.android.settings.applications.defaultapps;
+import android.app.role.RoleManager;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
+import android.icu.text.ListFormatter;
import android.provider.Settings;
import android.text.TextUtils;
import androidx.preference.Preference;
import com.android.settings.core.BasePreferenceController;
+import com.android.settingslib.applications.AppUtils;
+
+import java.util.ArrayList;
+import java.util.List;
/**
* STOPSHIP(b/110557011): Remove once the new UI is ready.
*/
public class RolesPreferenceController extends BasePreferenceController {
- private Intent mIntent;
+ private final PackageManager mPackageManager;
+ private final RoleManager mRoleManager;
+
+ private final Intent mIntent;
public RolesPreferenceController(Context context, String preferenceKey) {
super(context, preferenceKey);
- PackageManager packageManager = context.getPackageManager();
- String packageName = packageManager.getPermissionControllerPackageName();
+ mPackageManager = context.getPackageManager();
+ mRoleManager = context.getSystemService(RoleManager.class);
+
+ final String packageName = mPackageManager.getPermissionControllerPackageName();
if (packageName != null) {
mIntent = new Intent(Settings.ACTION_MANAGE_DEFAULT_APPS_SETTINGS)
.setPackage(packageName);
+ } else {
+ mIntent = null;
}
}
@@ -59,4 +72,34 @@
}
return false;
}
+
+ @Override
+ public CharSequence getSummary() {
+ final List<CharSequence> defaultAppLabels = new ArrayList<>();
+ final CharSequence defaultBrowserLabel = getDefaultAppLabel(RoleManager.ROLE_BROWSER);
+ if(!TextUtils.isEmpty(defaultBrowserLabel)) {
+ defaultAppLabels.add(defaultBrowserLabel);
+ }
+ final CharSequence defaultPhoneLabel = getDefaultAppLabel(RoleManager.ROLE_DIALER);
+ if(!TextUtils.isEmpty(defaultPhoneLabel)) {
+ defaultAppLabels.add(defaultPhoneLabel);
+ }
+ final CharSequence defaultSmsLabel = getDefaultAppLabel(RoleManager.ROLE_SMS);
+ if(!TextUtils.isEmpty(defaultSmsLabel)) {
+ defaultAppLabels.add(defaultSmsLabel);
+ }
+ if (defaultAppLabels.isEmpty()) {
+ return null;
+ }
+ return ListFormatter.getInstance().format(defaultAppLabels);
+ }
+
+ private CharSequence getDefaultAppLabel(String roleName) {
+ final List<String> packageNames = mRoleManager.getRoleHolders(roleName);
+ if (packageNames.isEmpty()) {
+ return null;
+ }
+ final String packageName = packageNames.get(0);
+ return AppUtils.getApplicationLabel(mPackageManager, packageName);
+ }
}
diff --git a/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java b/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java
index 798c188..79e699d 100644
--- a/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java
+++ b/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java
@@ -217,7 +217,7 @@
updatePasswordQuality();
mToken = data.getByteArrayExtra(
ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE_TOKEN);
- overridePendingTransition(R.anim.suw_slide_next_in, R.anim.suw_slide_next_out);
+ overridePendingTransition(R.anim.sud_slide_next_in, R.anim.sud_slide_next_out);
return;
} else {
setResult(result, data);
@@ -226,13 +226,13 @@
} else if (requestCode == CONFIRM_REQUEST) {
if (resultCode == RESULT_OK && data != null) {
mToken = data.getByteArrayExtra(ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE_TOKEN);
- overridePendingTransition(R.anim.suw_slide_next_in, R.anim.suw_slide_next_out);
+ overridePendingTransition(R.anim.sud_slide_next_in, R.anim.sud_slide_next_out);
} else {
setResult(result, data);
finish();
}
} else if (requestCode == LEARN_MORE_REQUEST) {
- overridePendingTransition(R.anim.suw_slide_back_in, R.anim.suw_slide_back_out);
+ overridePendingTransition(R.anim.sud_slide_back_in, R.anim.sud_slide_back_out);
}
super.onActivityResult(requestCode, resultCode, data);
}
diff --git a/src/com/android/settings/biometrics/BiometricsEnrollEnrolling.java b/src/com/android/settings/biometrics/BiometricsEnrollEnrolling.java
index 7ad2d17..12ffc6b 100644
--- a/src/com/android/settings/biometrics/BiometricsEnrollEnrolling.java
+++ b/src/com/android/settings/biometrics/BiometricsEnrollEnrolling.java
@@ -111,7 +111,7 @@
intent.putExtra(Intent.EXTRA_USER_ID, mUserId);
}
startActivity(intent);
- overridePendingTransition(R.anim.suw_slide_next_in, R.anim.suw_slide_next_out);
+ overridePendingTransition(R.anim.sud_slide_next_in, R.anim.sud_slide_next_out);
finish();
}
diff --git a/src/com/android/settings/biometrics/face/FaceEnrollEnrolling.java b/src/com/android/settings/biometrics/face/FaceEnrollEnrolling.java
index ec75266..2323afc 100644
--- a/src/com/android/settings/biometrics/face/FaceEnrollEnrolling.java
+++ b/src/com/android/settings/biometrics/face/FaceEnrollEnrolling.java
@@ -97,7 +97,7 @@
.setText(R.string.security_settings_face_enroll_enrolling_skip)
.setListener(this::onSkipButtonClick)
.setButtonType(FooterButton.ButtonType.SKIP)
- .setTheme(R.style.SuwGlifButton_Secondary)
+ .setTheme(R.style.SudGlifButton_Secondary)
.build()
);
diff --git a/src/com/android/settings/biometrics/face/FaceEnrollFinish.java b/src/com/android/settings/biometrics/face/FaceEnrollFinish.java
index afd6f55..c347d0f 100644
--- a/src/com/android/settings/biometrics/face/FaceEnrollFinish.java
+++ b/src/com/android/settings/biometrics/face/FaceEnrollFinish.java
@@ -43,7 +43,7 @@
.setText(R.string.security_settings_face_enroll_done)
.setListener(this::onNextButtonClick)
.setButtonType(FooterButton.ButtonType.NEXT)
- .setTheme(R.style.SuwGlifButton_Primary)
+ .setTheme(R.style.SudGlifButton_Primary)
.build()
);
}
diff --git a/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java b/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java
index 9311810..ba5a85e 100644
--- a/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java
+++ b/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java
@@ -66,7 +66,7 @@
.setText(R.string.security_settings_face_enroll_introduction_cancel)
.setListener(this::onCancelButtonClick)
.setButtonType(FooterButton.ButtonType.SKIP)
- .setTheme(R.style.SuwGlifButton_Secondary)
+ .setTheme(R.style.SudGlifButton_Secondary)
.build()
);
@@ -75,7 +75,7 @@
.setText(R.string.wizard_next)
.setListener(this::onNextButtonClick)
.setButtonType(FooterButton.ButtonType.NEXT)
- .setTheme(R.style.SuwGlifButton_Primary)
+ .setTheme(R.style.SudGlifButton_Primary)
.build()
);
}
diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java
index 88e1c6a..4c1ca62 100644
--- a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java
+++ b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java
@@ -143,7 +143,7 @@
.setText(R.string.security_settings_fingerprint_enroll_enrolling_skip)
.setListener(this::onSkipButtonClick)
.setButtonType(FooterButton.ButtonType.SKIP)
- .setTheme(R.style.SuwGlifButton_Secondary)
+ .setTheme(R.style.SudGlifButton_Secondary)
.build()
);
diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensor.java b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensor.java
index 1b97d19..72e115b 100644
--- a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensor.java
+++ b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensor.java
@@ -53,7 +53,7 @@
.setText(R.string.skip_label)
.setListener(this::onSkipButtonClick)
.setButtonType(FooterButton.ButtonType.SKIP)
- .setTheme(R.style.SuwGlifButton_Secondary)
+ .setTheme(R.style.SudGlifButton_Secondary)
.build()
);
@@ -155,7 +155,7 @@
if (requestCode == CONFIRM_REQUEST) {
if (resultCode == RESULT_OK && data != null) {
mToken = data.getByteArrayExtra(ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE_TOKEN);
- overridePendingTransition(R.anim.suw_slide_next_in, R.anim.suw_slide_next_out);
+ overridePendingTransition(R.anim.sud_slide_next_in, R.anim.sud_slide_next_out);
getIntent().putExtra(ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE_TOKEN, mToken);
startLookingForFingerprint();
} else {
diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFinish.java b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFinish.java
index db7d92e..4cf3a46 100644
--- a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFinish.java
+++ b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFinish.java
@@ -47,7 +47,7 @@
new FooterButton.Builder(this)
.setText(R.string.fingerprint_enroll_button_add)
.setButtonType(FooterButton.ButtonType.SKIP)
- .setTheme(R.style.SuwGlifButton_Secondary)
+ .setTheme(R.style.SudGlifButton_Secondary)
.build()
);
@@ -56,7 +56,7 @@
.setText(R.string.security_settings_fingerprint_enroll_done)
.setListener(this::onNextButtonClick)
.setButtonType(FooterButton.ButtonType.NEXT)
- .setTheme(R.style.SuwGlifButton_Primary)
+ .setTheme(R.style.SudGlifButton_Primary)
.build()
);
}
diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollIntroduction.java b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollIntroduction.java
index 1ad11e3..f603e24 100644
--- a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollIntroduction.java
+++ b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollIntroduction.java
@@ -53,7 +53,7 @@
.setText(R.string.security_settings_face_enroll_introduction_cancel)
.setListener(this::onCancelButtonClick)
.setButtonType(FooterButton.ButtonType.SKIP)
- .setTheme(R.style.SuwGlifButton_Secondary)
+ .setTheme(R.style.SudGlifButton_Secondary)
.build()
);
@@ -62,7 +62,7 @@
.setText(R.string.wizard_next)
.setListener(this::onNextButtonClick)
.setButtonType(FooterButton.ButtonType.NEXT)
- .setTheme(R.style.SuwGlifButton_Primary)
+ .setTheme(R.style.SudGlifButton_Primary)
.build()
);
}
diff --git a/src/com/android/settings/deviceinfo/StorageWizardBase.java b/src/com/android/settings/deviceinfo/StorageWizardBase.java
index 4d6ded1..db0d0d0 100644
--- a/src/com/android/settings/deviceinfo/StorageWizardBase.java
+++ b/src/com/android/settings/deviceinfo/StorageWizardBase.java
@@ -100,7 +100,7 @@
.setText(R.string.wizard_back)
.setListener(this::onNavigateBack)
.setButtonType(FooterButton.ButtonType.OTHER)
- .setTheme(R.style.SuwGlifButton_Secondary)
+ .setTheme(R.style.SudGlifButton_Secondary)
.build()
);
mButtonFooterMixin.setPrimaryButton(
@@ -108,7 +108,7 @@
.setText(R.string.wizard_next)
.setListener(this::onNavigateNext)
.setButtonType(FooterButton.ButtonType.NEXT)
- .setTheme(R.style.SuwGlifButton_Primary)
+ .setTheme(R.style.SudGlifButton_Primary)
.build()
);
mBack = mButtonFooterMixin.getSecondaryButton();
diff --git a/src/com/android/settings/notification/RedactionInterstitial.java b/src/com/android/settings/notification/RedactionInterstitial.java
index b2f2d25..11861e0 100644
--- a/src/com/android/settings/notification/RedactionInterstitial.java
+++ b/src/com/android/settings/notification/RedactionInterstitial.java
@@ -139,7 +139,7 @@
.setText(R.string.app_notifications_dialog_done)
.setListener(this::onDoneButtonClicked)
.setButtonType(FooterButton.ButtonType.NEXT)
- .setTheme(R.style.SuwGlifButton_Primary)
+ .setTheme(R.style.SudGlifButton_Primary)
.build()
);
}
diff --git a/src/com/android/settings/password/ChooseLockPattern.java b/src/com/android/settings/password/ChooseLockPattern.java
index 1c9e3ff..2738a26 100644
--- a/src/com/android/settings/password/ChooseLockPattern.java
+++ b/src/com/android/settings/password/ChooseLockPattern.java
@@ -476,7 +476,7 @@
R.layout.choose_lock_pattern, container, false);
layout.setHeaderText(getActivity().getTitle());
if (getResources().getBoolean(R.bool.config_lock_pattern_minimal_ui)) {
- View iconView = layout.findViewById(R.id.suw_layout_icon);
+ View iconView = layout.findViewById(R.id.suc_layout_icon);
if (iconView != null) {
iconView.setVisibility(View.GONE);
}
@@ -494,7 +494,7 @@
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
- mTitleText = view.findViewById(R.id.suw_layout_title);
+ mTitleText = view.findViewById(R.id.suc_layout_title);
mHeaderText = (TextView) view.findViewById(R.id.headerText);
mDefaultHeaderColorList = mHeaderText.getTextColors();
mMessageText = view.findViewById(R.id.message);
diff --git a/src/com/android/settings/password/ConfirmLockPassword.java b/src/com/android/settings/password/ConfirmLockPassword.java
index 45b8129..b5bca15 100644
--- a/src/com/android/settings/password/ConfirmLockPassword.java
+++ b/src/com/android/settings/password/ConfirmLockPassword.java
@@ -135,7 +135,7 @@
mHeaderTextView = (TextView) view.findViewById(R.id.headerText);
if (mHeaderTextView == null) {
- mHeaderTextView = view.findViewById(R.id.suw_layout_title);
+ mHeaderTextView = view.findViewById(R.id.suc_layout_title);
}
mDetailsTextView = (TextView) view.findViewById(R.id.detailsText);
mErrorTextView = (TextView) view.findViewById(R.id.errorText);
diff --git a/src/com/android/settings/password/SetupChooseLockGeneric.java b/src/com/android/settings/password/SetupChooseLockGeneric.java
index 8cd40d5..a0f8bae 100644
--- a/src/com/android/settings/password/SetupChooseLockGeneric.java
+++ b/src/com/android/settings/password/SetupChooseLockGeneric.java
@@ -86,7 +86,7 @@
GlifPreferenceLayout layout = (GlifPreferenceLayout) view;
layout.setDividerItemDecoration(new SettingsDividerItemDecoration(getContext()));
layout.setDividerInset(getContext().getResources().getDimensionPixelSize(
- R.dimen.suw_items_glif_text_divider_inset));
+ R.dimen.sud_items_glif_text_divider_inset));
layout.setIcon(getContext().getDrawable(R.drawable.ic_lock));
diff --git a/src/com/android/settings/wifi/dpp/WifiDppAddDeviceFragment.java b/src/com/android/settings/wifi/dpp/WifiDppAddDeviceFragment.java
index 9264ad9..0821ec0 100644
--- a/src/com/android/settings/wifi/dpp/WifiDppAddDeviceFragment.java
+++ b/src/com/android/settings/wifi/dpp/WifiDppAddDeviceFragment.java
@@ -21,6 +21,7 @@
import android.content.Context;
import android.net.wifi.WifiManager;
import android.os.Bundle;
+import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
@@ -55,6 +56,7 @@
// Update success UI.
mTitle.setText(R.string.wifi_dpp_wifi_shared_with_device);
mSummary.setVisibility(View.INVISIBLE);
+ mChooseDifferentNetwork.setVisibility(View.INVISIBLE);
mButtonLeft.setText(R.string.wifi_dpp_add_another_device);
mButtonLeft.setOnClickListener(v -> getFragmentManager().popBackStack());
mButtonRight.setText(R.string.done);
@@ -63,8 +65,13 @@
@Override
public void onFailure(int code) {
- //TODO(b/122429170): Show DPP configuration error state UI
Log.d(TAG, "DppStatusCallback.onFailure " + code);
+
+ // Update fail UI.
+ mTitle.setText(R.string.wifi_dpp_could_not_add_device);
+ mSummary.setVisibility(View.INVISIBLE);
+ mChooseDifferentNetwork.setVisibility(View.INVISIBLE);
+ mButtonRight.setText(R.string.retry);
}
@Override
@@ -99,6 +106,15 @@
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
+ final WifiQrCode wifiQrCode = ((WifiDppConfiguratorActivity) getActivity())
+ .getWifiDppQrCode();
+ final String information = wifiQrCode.getInformation();
+ if (TextUtils.isEmpty(information)) {
+ mTitle.setText(R.string.wifi_dpp_device_found);
+ } else {
+ mTitle.setText(information);
+ }
+
final WifiNetworkConfig wifiNetworkConfig = ((WifiDppConfiguratorActivity) getActivity())
.getWifiNetworkConfig();
if (!WifiNetworkConfig.isValidConfig(wifiNetworkConfig)) {
@@ -110,7 +126,8 @@
mWifiApPictureView = view.findViewById(R.id.wifi_ap_picture_view);
mChooseDifferentNetwork = view.findViewById(R.id.choose_different_network);
- mChooseDifferentNetwork.setOnClickListener(v -> getFragmentManager().popBackStack());
+ mChooseDifferentNetwork.setOnClickListener(v ->
+ mClickChooseDifferentNetworkListener.onClickChooseDifferentNetwork());
mButtonLeft = view.findViewById(R.id.button_left);
mButtonLeft.setText(R.string.cancel);
@@ -125,11 +142,34 @@
}
private void startWifiDppInitiator() {
- final String enrolleeUri = ((WifiDppConfiguratorActivity) getActivity()).getDppUri();
+ final WifiQrCode wifiQrCode = ((WifiDppConfiguratorActivity) getActivity())
+ .getWifiDppQrCode();
+ final String qrCode = wifiQrCode.getQrCode();
final int networkId =
((WifiDppConfiguratorActivity) getActivity()).getWifiNetworkConfig().getNetworkId();
final WifiManager wifiManager = getContext().getSystemService(WifiManager.class);
- wifiManager.startDppAsConfiguratorInitiator(enrolleeUri, networkId,
+
+ wifiManager.startDppAsConfiguratorInitiator(qrCode, networkId,
WifiManager.DPP_NETWORK_ROLE_STA, /* handler */ null, new DppStatusCallback());
}
+
+ // Container Activity must implement this interface
+ public interface OnClickChooseDifferentNetworkListener {
+ public void onClickChooseDifferentNetwork();
+ }
+ OnClickChooseDifferentNetworkListener mClickChooseDifferentNetworkListener;
+
+ @Override
+ public void onAttach(Context context) {
+ super.onAttach(context);
+
+ mClickChooseDifferentNetworkListener = (OnClickChooseDifferentNetworkListener) context;
+ }
+
+ @Override
+ public void onDetach() {
+ mClickChooseDifferentNetworkListener = null;
+
+ super.onDetach();
+ }
}
diff --git a/src/com/android/settings/wifi/dpp/WifiDppConfiguratorActivity.java b/src/com/android/settings/wifi/dpp/WifiDppConfiguratorActivity.java
index b08546c..97ee71a 100644
--- a/src/com/android/settings/wifi/dpp/WifiDppConfiguratorActivity.java
+++ b/src/com/android/settings/wifi/dpp/WifiDppConfiguratorActivity.java
@@ -22,6 +22,7 @@
import android.os.Bundle;
import android.util.Log;
+import androidx.annotation.VisibleForTesting;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
@@ -51,7 +52,8 @@
WifiNetworkConfig.Retriever,
WifiDppQrCodeGeneratorFragment.OnQrCodeGeneratorFragmentAddButtonClickedListener,
WifiDppQrCodeScannerFragment.OnScanWifiDppSuccessListener,
- WifiDppQrCodeScannerFragment.OnScanZxingWifiFormatSuccessListener {
+ WifiDppQrCodeScannerFragment.OnScanZxingWifiFormatSuccessListener,
+ WifiDppAddDeviceFragment.OnClickChooseDifferentNetworkListener {
private static final String TAG = "WifiDppConfiguratorActivity";
public static final String ACTION_CONFIGURATOR_QR_CODE_SCANNER =
@@ -61,14 +63,19 @@
public static final String ACTION_PROCESS_WIFI_DPP_QR_CODE =
"android.settings.PROCESS_WIFI_DPP_QR_CODE";
+ // Key for Bundle usage
+ private static final String KEY_QR_CODE = "key_qr_code";
+ private static final String KEY_WIFI_SECURITY = "key_wifi_security";
+ private static final String KEY_WIFI_SSID = "key_wifi_ssid";
+ private static final String KEY_WIFI_PRESHARED_KEY = "key_wifi_preshared_key";
+ private static final String KEY_WIFI_HIDDEN_SSID = "key_wifi_hidden_ssid";
+ private static final String KEY_WIFI_NETWORK_ID = "key_wifi_network_id";
+
private FragmentManager mFragmentManager;
/** The Wi-Fi network which will be configured */
private WifiNetworkConfig mWifiNetworkConfig;
- /** The uri from Wi-Fi DPP QR code */
- private String mDppUri;
-
/** The Wi-Fi DPP QR code from intent ACTION_PROCESS_WIFI_DPP_QR_CODE */
private WifiQrCode mWifiDppQrCode;
@@ -81,6 +88,21 @@
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ if (savedInstanceState != null) {
+ String qrCode = savedInstanceState.getString(KEY_QR_CODE);
+
+ mWifiDppQrCode = getValidWifiDppQrCodeOrNull(qrCode);
+
+ String security = savedInstanceState.getString(KEY_WIFI_SECURITY);
+ String ssid = savedInstanceState.getString(KEY_WIFI_SSID);
+ String preSharedKey = savedInstanceState.getString(KEY_WIFI_PRESHARED_KEY);
+ boolean hiddenSsid = savedInstanceState.getBoolean(KEY_WIFI_HIDDEN_SSID);
+ int networkId = savedInstanceState.getInt(KEY_WIFI_NETWORK_ID);
+
+ mWifiNetworkConfig = WifiNetworkConfig.getValidConfigOrNull(security, ssid,
+ preSharedKey, hiddenSsid, networkId);
+ }
+
setContentView(R.layout.wifi_dpp_activity);
mFragmentManager = getSupportFragmentManager();
@@ -117,7 +139,7 @@
break;
case ACTION_PROCESS_WIFI_DPP_QR_CODE:
String qrCode = intent.getStringExtra(WifiDppUtils.EXTRA_QR_CODE);
- mWifiDppQrCode = getValidWiFiDppQrCodeOrNull(qrCode);
+ mWifiDppQrCode = getValidWifiDppQrCodeOrNull(qrCode);
if (mWifiDppQrCode == null) {
cancelActivity = true;
} else {
@@ -205,7 +227,7 @@
fragmentTransaction.commit();
}
- private WifiQrCode getValidWiFiDppQrCodeOrNull(String qrCode) {
+ private WifiQrCode getValidWifiDppQrCodeOrNull(String qrCode) {
WifiQrCode wifiQrCode;
try {
wifiQrCode = new WifiQrCode(qrCode);
@@ -225,16 +247,12 @@
return mWifiNetworkConfig;
}
- public String getDppUri() {
- return mDppUri;
- }
-
public WifiQrCode getWifiDppQrCode() {
return mWifiDppQrCode;
}
- @Override
- public boolean setWifiNetworkConfig(WifiNetworkConfig config) {
+ @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
+ protected boolean setWifiNetworkConfig(WifiNetworkConfig config) {
if(!WifiNetworkConfig.isValidConfig(config)) {
return false;
} else {
@@ -243,6 +261,20 @@
}
}
+ @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
+ protected boolean setWifiDppQrCode(WifiQrCode wifiQrCode) {
+ if (wifiQrCode == null) {
+ return false;
+ }
+
+ if (!WifiQrCode.SCHEME_DPP.equals(wifiQrCode.getScheme())) {
+ return false;
+ }
+
+ mWifiDppQrCode = new WifiQrCode(wifiQrCode.getQrCode());
+ return true;
+ }
+
@Override
public boolean onNavigateUp() {
Fragment fragment = mFragmentManager.findFragmentById(R.id.fragment_container);
@@ -263,17 +295,38 @@
}
@Override
- public void onScanWifiDppSuccess(String uri) {
- mDppUri = uri;
+ public void onScanWifiDppSuccess(WifiQrCode wifiQrCode) {
+ mWifiDppQrCode = wifiQrCode;
showAddDeviceFragment(/* addToBackStack */ true);
}
@Override
public void onScanZxingWifiFormatSuccess(WifiNetworkConfig wifiNetworkConfig) {
- mDppUri = null;
- mWifiNetworkConfig = new WifiNetworkConfig(wifiNetworkConfig);
+ // Do nothing, it's impossible to be a configurator without a Wi-Fi DPP QR code
+ }
- showAddDeviceFragment(/* addToBackStack */ true);
+ @Override
+ public void onClickChooseDifferentNetwork() {
+ mWifiNetworkConfig = null;
+
+ showChooseSavedWifiNetworkFragment(/* addToBackStack */ true);
+ }
+
+ @Override
+ public void onSaveInstanceState(Bundle outState) {
+ if (mWifiDppQrCode != null) {
+ outState.putString(KEY_QR_CODE, mWifiDppQrCode.getQrCode());
+ }
+
+ if (mWifiNetworkConfig != null) {
+ outState.putString(KEY_WIFI_SECURITY, mWifiNetworkConfig.getSecurity());
+ outState.putString(KEY_WIFI_SSID, mWifiNetworkConfig.getSsid());
+ outState.putString(KEY_WIFI_PRESHARED_KEY, mWifiNetworkConfig.getPreSharedKey());
+ outState.putBoolean(KEY_WIFI_HIDDEN_SSID, mWifiNetworkConfig.getHiddenSsid());
+ outState.putInt(KEY_WIFI_NETWORK_ID, mWifiNetworkConfig.getNetworkId());
+ }
+
+ super.onSaveInstanceState(outState);
}
}
diff --git a/src/com/android/settings/wifi/dpp/WifiDppEnrolleeActivity.java b/src/com/android/settings/wifi/dpp/WifiDppEnrolleeActivity.java
index 8c0e1f0..3a1b6bc 100644
--- a/src/com/android/settings/wifi/dpp/WifiDppEnrolleeActivity.java
+++ b/src/com/android/settings/wifi/dpp/WifiDppEnrolleeActivity.java
@@ -145,9 +145,10 @@
}
@Override
- public void onScanWifiDppSuccess(String uri) {
+ public void onScanWifiDppSuccess(WifiQrCode wifiQrCode) {
final WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
- wifiManager.startDppAsEnrolleeInitiator(uri, /* handler */ null, new DppStatusCallback());
+ wifiManager.startDppAsEnrolleeInitiator(wifiQrCode.getQrCode(), /* handler */ null,
+ new DppStatusCallback());
}
@Override
diff --git a/src/com/android/settings/wifi/dpp/WifiDppQrCodeScannerFragment.java b/src/com/android/settings/wifi/dpp/WifiDppQrCodeScannerFragment.java
index 45d753c..21534dc 100644
--- a/src/com/android/settings/wifi/dpp/WifiDppQrCodeScannerFragment.java
+++ b/src/com/android/settings/wifi/dpp/WifiDppQrCodeScannerFragment.java
@@ -100,7 +100,7 @@
// Container Activity must implement this interface
public interface OnScanWifiDppSuccessListener {
- public void onScanWifiDppSuccess(String uri);
+ public void onScanWifiDppSuccess(WifiQrCode wifiQrCode);
}
OnScanWifiDppSuccessListener mScanWifiDppSuccessListener;
@@ -108,7 +108,7 @@
public interface OnScanZxingWifiFormatSuccessListener {
public void onScanZxingWifiFormatSuccess(WifiNetworkConfig wifiNetworkConfig);
}
- OnScanZxingWifiFormatSuccessListener mScanScanZxingWifiFormatSuccessListener;
+ OnScanZxingWifiFormatSuccessListener mScanZxingWifiFormatSuccessListener;
/**
* Configurator container activity of the fragment should create instance with this constructor.
@@ -146,13 +146,13 @@
super.onAttach(context);
mScanWifiDppSuccessListener = (OnScanWifiDppSuccessListener) context;
- mScanScanZxingWifiFormatSuccessListener = (OnScanZxingWifiFormatSuccessListener) context;
+ mScanZxingWifiFormatSuccessListener = (OnScanZxingWifiFormatSuccessListener) context;
}
@Override
public void onDetach() {
mScanWifiDppSuccessListener = null;
- mScanScanZxingWifiFormatSuccessListener = null;
+ mScanZxingWifiFormatSuccessListener = null;
super.onDetach();
}
@@ -272,17 +272,17 @@
}
/**
- * This method is only called when QrCamera.ScannerCallback.isValid returns true;
+ * This method is only called when QrCamera.ScannerCallback.isValid returns true;
*/
@Override
public void handleSuccessfulResult(String qrCode) {
switch (mWifiQrCode.getScheme()) {
case WifiQrCode.SCHEME_DPP:
- handleWifiDpp(qrCode);
+ handleWifiDpp();
break;
case WifiQrCode.SCHEME_ZXING_WIFI_NETWORK_CONFIG:
- handleZxingWifiFormat(mWifiQrCode.getWifiNetworkConfig());
+ handleZxingWifiFormat();
break;
default:
@@ -290,25 +290,22 @@
}
}
- private void handleWifiDpp(String uri) {
+ private void handleWifiDpp() {
destroyCamera();
mDecorateView.setFocused(true);
- final Bundle bundle = new Bundle();
- bundle.putString(KEY_PUBLIC_URI, uri);
-
Message message = mHandler.obtainMessage(MESSAGE_SCAN_WIFI_DPP_SUCCESS);
- message.setData(bundle);
+ message.obj = new WifiQrCode(mWifiQrCode.getQrCode());
mHandler.sendMessageDelayed(message, SHOW_SUCCESS_SQUARE_INTERVAL);
}
- private void handleZxingWifiFormat(WifiNetworkConfig wifiNetworkConfig) {
+ private void handleZxingWifiFormat() {
destroyCamera();
mDecorateView.setFocused(true);
Message message = mHandler.obtainMessage(MESSAGE_SCAN_ZXING_WIFI_FORMAT_SUCCESS);
- message.obj = wifiNetworkConfig;
+ message.obj = new WifiQrCode(mWifiQrCode.getQrCode()).getWifiNetworkConfig();
mHandler.sendMessageDelayed(message, SHOW_SUCCESS_SQUARE_INTERVAL);
}
@@ -359,17 +356,14 @@
if (mScanWifiDppSuccessListener == null) {
return;
}
- final Bundle bundle = msg.getData();
- final String uri = bundle.getString(KEY_PUBLIC_URI);
-
- mScanWifiDppSuccessListener.onScanWifiDppSuccess(uri);
+ mScanWifiDppSuccessListener.onScanWifiDppSuccess((WifiQrCode)msg.obj);
break;
case MESSAGE_SCAN_ZXING_WIFI_FORMAT_SUCCESS:
- if (mScanScanZxingWifiFormatSuccessListener == null) {
+ if (mScanZxingWifiFormatSuccessListener == null) {
return;
}
- mScanScanZxingWifiFormatSuccessListener.onScanZxingWifiFormatSuccess(
+ mScanZxingWifiFormatSuccessListener.onScanZxingWifiFormatSuccess(
(WifiNetworkConfig)msg.obj);
break;
@@ -381,8 +375,8 @@
@Override
public void onSaveInstanceState(Bundle outState) {
- outState.putBoolean(KEY_IS_CONFIGURATOR_MODE, mIsConfiguratorMode);
+ outState.putBoolean(KEY_IS_CONFIGURATOR_MODE, mIsConfiguratorMode);
- super.onSaveInstanceState(outState);
+ super.onSaveInstanceState(outState);
}
}
diff --git a/src/com/android/settings/wifi/dpp/WifiNetworkConfig.java b/src/com/android/settings/wifi/dpp/WifiNetworkConfig.java
index a9e88a9..915e90d 100644
--- a/src/com/android/settings/wifi/dpp/WifiNetworkConfig.java
+++ b/src/com/android/settings/wifi/dpp/WifiNetworkConfig.java
@@ -30,6 +30,7 @@
import android.util.Log;
import androidx.annotation.Keep;
+import androidx.annotation.VisibleForTesting;
/**
* Wraps the parameters of ZXing reader library's Wi-Fi Network config format.
@@ -48,8 +49,9 @@
private boolean mHiddenSsid;
private int mNetworkId;
- private WifiNetworkConfig(String security, String ssid, String preSharedKey, boolean hiddenSsid,
- int networkId) {
+ @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
+ protected WifiNetworkConfig(String security, String ssid, String preSharedKey,
+ boolean hiddenSsid, int networkId) {
mSecurity = security;
mSsid = ssid;
mPreSharedKey = preSharedKey;
@@ -71,7 +73,6 @@
*/
public interface Retriever {
public WifiNetworkConfig getWifiNetworkConfig();
- public boolean setWifiNetworkConfig(WifiNetworkConfig config);
}
/**
diff --git a/src/com/android/settings/wifi/dpp/WifiQrCode.java b/src/com/android/settings/wifi/dpp/WifiQrCode.java
index 8eae3a4..b60289f 100644
--- a/src/com/android/settings/wifi/dpp/WifiQrCode.java
+++ b/src/com/android/settings/wifi/dpp/WifiQrCode.java
@@ -20,7 +20,6 @@
import android.net.wifi.WifiConfiguration;
import android.text.TextUtils;
-import androidx.annotation.Keep;
import androidx.annotation.VisibleForTesting;
import java.util.Arrays;
@@ -49,7 +48,6 @@
* H true Optional. True if the network SSID is hidden.
*
*/
-@Keep
public class WifiQrCode {
public static final String SCHEME_DPP = "DPP";
public static final String SCHEME_ZXING_WIFI_NETWORK_CONFIG = "WIFI";
@@ -86,7 +84,6 @@
// Data from parsed ZXing reader library's Wi-Fi Network config format
private WifiNetworkConfig mWifiNetworkConfig;
- @Keep
public WifiQrCode(String qrCode) throws IllegalArgumentException {
if (TextUtils.isEmpty(qrCode)) {
throw new IllegalArgumentException("Empty QR code");
@@ -172,7 +169,6 @@
return null;
}
- @Keep
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
protected String removeBackSlash(String input) {
if (input == null) {
@@ -199,7 +195,6 @@
return sb.toString();
}
- @Keep
public String getQrCode() {
return mQrCode;
}
@@ -210,25 +205,22 @@
* SCHEME_DPP for standard Wi-Fi device provision protocol; SCHEME_ZXING_WIFI_NETWORK_CONFIG
* for ZXing reader library' Wi-Fi Network config format
*/
- @Keep
public String getScheme() {
return mScheme;
}
/** Available when {@code getScheme()} returns SCHEME_DPP */
- @Keep
- public String getPublicKey() {
+ @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
+ protected String getPublicKey() {
return mPublicKey;
}
/** May be available when {@code getScheme()} returns SCHEME_DPP */
- @Keep
public String getInformation() {
return mInformation;
}
/** Available when {@code getScheme()} returns SCHEME_ZXING_WIFI_NETWORK_CONFIG */
- @Keep
public WifiNetworkConfig getWifiNetworkConfig() {
if (mWifiNetworkConfig == null) {
return null;
diff --git a/tests/robotests/res/layout-mcc999/fingerprint_enroll_find_sensor.xml b/tests/robotests/res/layout-mcc999/fingerprint_enroll_find_sensor.xml
index 83eb781..595cfb4 100644
--- a/tests/robotests/res/layout-mcc999/fingerprint_enroll_find_sensor.xml
+++ b/tests/robotests/res/layout-mcc999/fingerprint_enroll_find_sensor.xml
@@ -46,7 +46,7 @@
</FrameLayout>
<LinearLayout
- style="@style/SuwContentFrame"
+ style="@style/SudContentFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
@@ -54,10 +54,10 @@
android:clipChildren="false">
<TextView
- style="@style/SuwDescription.Glif"
+ style="@style/SudDescription.Glif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/suw_description_glif_margin_top"
+ android:layout_marginTop="@dimen/sud_description_glif_margin_top"
android:text="@string/security_settings_fingerprint_enroll_find_sensor_message"/>
<View
@@ -66,7 +66,7 @@
android:layout_weight="1"/>
<Button
- style="@style/SuwGlifButton.Secondary"
+ style="@style/SudGlifButton.Secondary"
android:id="@+id/next_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/tests/robotests/src/com/android/settings/accounts/AvatarViewMixinTest.java b/tests/robotests/src/com/android/settings/accounts/AvatarViewMixinTest.java
index 7b4fb6f..6a2348c 100644
--- a/tests/robotests/src/com/android/settings/accounts/AvatarViewMixinTest.java
+++ b/tests/robotests/src/com/android/settings/accounts/AvatarViewMixinTest.java
@@ -30,6 +30,7 @@
import android.content.ContentProvider;
import android.content.ContentResolver;
import android.content.Context;
+import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.ProviderInfo;
@@ -167,12 +168,22 @@
assertThat(bundle.getString("account_name")).isEqualTo(DUMMY_ACCOUNT);
}
+ @Test
+ public void onClickAvatar_withEmptyUri_startActivityShouldNotBeExecuted() {
+ final SettingsHomepageActivity activity = spy((SettingsHomepageActivity) mController.get());
+ final AvatarViewMixin avatarViewMixin = new AvatarViewMixin(activity, mImageView);
+
+ mImageView.performClick();
+
+ verify(activity, never()).startActivity(any(Intent.class));
+ }
+
@Implements(value = AccountFeatureProviderImpl.class)
public static class ShadowAccountFeatureProviderImpl {
@Implementation
protected Account[] getAccounts(Context context) {
- return new Account[] {new Account(DUMMY_ACCOUNT, DUMMY_DOMAIN)};
+ return new Account[]{new Account(DUMMY_ACCOUNT, DUMMY_DOMAIN)};
}
}
}
diff --git a/tests/robotests/src/com/android/settings/applications/defaultapps/RolesPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/applications/defaultapps/RolesPreferenceControllerTest.java
index 5bf2b7e..92468a0 100644
--- a/tests/robotests/src/com/android/settings/applications/defaultapps/RolesPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/applications/defaultapps/RolesPreferenceControllerTest.java
@@ -19,13 +19,17 @@
import static com.google.common.truth.Truth.assertThat;
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.verify;
import static org.mockito.Mockito.when;
+import android.app.role.RoleManager;
import android.content.Context;
import android.content.Intent;
+import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.provider.Settings;
@@ -41,32 +45,59 @@
import org.mockito.MockitoAnnotations;
import org.robolectric.RobolectricTestRunner;
+import java.util.Collections;
+
@RunWith(RobolectricTestRunner.class)
public class RolesPreferenceControllerTest {
private static final String PREFERENCE_KEY = "roles";
private static final String DIFFERENT_PREFERENCE_KEY = "different";
+
private static final String PERMISSION_CONTROLLER_PACKAGE_NAME =
"com.android.permissioncontroller";
+ private static final String BROWSER_PACKAGE_NAME = "com.example.browser1";
+ private static final String DIALER_PACKAGE_NAME = "com.example.dialer1";
+ private static final String SMS_PACKAGE_NAME = "com.example.sms1";
+
@Mock
private Context mContext;
@Mock
private PackageManager mPackageManager;
+ @Mock
+ private RoleManager mRoleManager;
+ @Mock
+ private ApplicationInfo mBrowserApplicationInfo;
+ @Mock
+ private ApplicationInfo mDialerApplicationInfo;
+ @Mock
+ private ApplicationInfo mSmsApplicationInfo;
@Before
- public void setUp() {
+ public void setUp() throws PackageManager.NameNotFoundException {
MockitoAnnotations.initMocks(this);
+
when(mContext.getPackageManager()).thenReturn(mPackageManager);
+ when(mContext.getSystemService(RoleManager.class)).thenReturn(mRoleManager);
+
+ when(mBrowserApplicationInfo.loadLabel(mPackageManager)).thenReturn("Browser1");
+ when(mPackageManager.getApplicationInfo(eq(BROWSER_PACKAGE_NAME), anyInt())).thenReturn(
+ mBrowserApplicationInfo);
+ when(mDialerApplicationInfo.loadLabel(mPackageManager)).thenReturn("Phone1");
+ when(mPackageManager.getApplicationInfo(eq(DIALER_PACKAGE_NAME), anyInt())).thenReturn(
+ mDialerApplicationInfo);
+ when(mSmsApplicationInfo.loadLabel(mPackageManager)).thenReturn("Sms1");
+ when(mPackageManager.getApplicationInfo(eq(SMS_PACKAGE_NAME), anyInt())).thenReturn(
+ mSmsApplicationInfo);
}
@Test
public void getAvailabilityStatus_noPermissionController_shouldReturnUnsupportedOnDevice() {
when(mPackageManager.getPermissionControllerPackageName()).thenReturn(null);
- RolesPreferenceController controller = new RolesPreferenceController(mContext,
+ RolesPreferenceController preferenceController = new RolesPreferenceController(mContext,
PREFERENCE_KEY);
- assertThat(controller.getAvailabilityStatus())
+ assertThat(preferenceController.getAvailabilityStatus())
.isEqualTo(BasePreferenceController.UNSUPPORTED_ON_DEVICE);
}
@@ -74,10 +105,10 @@
public void getAvailabilityStatus_hasPermissionController_shouldReturnAvailableUnsearchable() {
when(mPackageManager.getPermissionControllerPackageName())
.thenReturn(PERMISSION_CONTROLLER_PACKAGE_NAME);
- RolesPreferenceController controller = new RolesPreferenceController(mContext,
+ RolesPreferenceController preferenceController = new RolesPreferenceController(mContext,
PREFERENCE_KEY);
- assertThat(controller.getAvailabilityStatus())
+ assertThat(preferenceController.getAvailabilityStatus())
.isEqualTo(BasePreferenceController.AVAILABLE_UNSEARCHABLE);
}
@@ -85,34 +116,34 @@
public void handlePreferenceTreeClick_differentKey_shouldReturnFalse() {
when(mPackageManager.getPermissionControllerPackageName())
.thenReturn(PERMISSION_CONTROLLER_PACKAGE_NAME);
- RolesPreferenceController controller = new RolesPreferenceController(mContext,
+ RolesPreferenceController preferenceController = new RolesPreferenceController(mContext,
PREFERENCE_KEY);
Preference preference = mock(Preference.class);
when(preference.getKey()).thenReturn(DIFFERENT_PREFERENCE_KEY);
- assertThat(controller.handlePreferenceTreeClick(preference)).isFalse();
+ assertThat(preferenceController.handlePreferenceTreeClick(preference)).isFalse();
}
@Test
public void handlePreferenceTreeClick_sameKey_shouldReturnTrue() {
when(mPackageManager.getPermissionControllerPackageName())
.thenReturn(PERMISSION_CONTROLLER_PACKAGE_NAME);
- RolesPreferenceController controller = new RolesPreferenceController(mContext,
+ RolesPreferenceController preferenceController = new RolesPreferenceController(mContext,
PREFERENCE_KEY);
Preference preference = mock(Preference.class);
when(preference.getKey()).thenReturn(PREFERENCE_KEY);
- assertThat(controller.handlePreferenceTreeClick(preference)).isTrue();
+ assertThat(preferenceController.handlePreferenceTreeClick(preference)).isTrue();
}
@Test
public void handlePreferenceTreeClick_noPermissionController_shouldNotStartActivity() {
when(mPackageManager.getPermissionControllerPackageName()).thenReturn(null);
- RolesPreferenceController controller = new RolesPreferenceController(mContext,
+ RolesPreferenceController preferenceController = new RolesPreferenceController(mContext,
PREFERENCE_KEY);
Preference preference = mock(Preference.class);
when(preference.getKey()).thenReturn(PREFERENCE_KEY);
- controller.handlePreferenceTreeClick(preference);
+ preferenceController.handlePreferenceTreeClick(preference);
verify(mContext, never()).startActivity(any(Intent.class));
}
@@ -121,11 +152,11 @@
public void handlePreferenceTreeClick_hasPermissionController_shouldStartActivityWithIntent() {
when(mPackageManager.getPermissionControllerPackageName())
.thenReturn(PERMISSION_CONTROLLER_PACKAGE_NAME);
- RolesPreferenceController controller = new RolesPreferenceController(mContext,
+ RolesPreferenceController preferenceController = new RolesPreferenceController(mContext,
PREFERENCE_KEY);
Preference preference = mock(Preference.class);
when(preference.getKey()).thenReturn(PREFERENCE_KEY);
- controller.handlePreferenceTreeClick(preference);
+ preferenceController.handlePreferenceTreeClick(preference);
ArgumentCaptor<Intent> intent = ArgumentCaptor.forClass(Intent.class);
verify(mContext).startActivity(intent.capture());
@@ -133,4 +164,112 @@
.isEqualTo(Settings.ACTION_MANAGE_DEFAULT_APPS_SETTINGS);
assertThat(intent.getValue().getPackage()).isEqualTo(PERMISSION_CONTROLLER_PACKAGE_NAME);
}
+
+ @Test
+ public void getSummary_allAvailable_shouldReturnAll() {
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_BROWSER)).thenReturn(
+ Collections.singletonList(BROWSER_PACKAGE_NAME));
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_DIALER)).thenReturn(
+ Collections.singletonList(DIALER_PACKAGE_NAME));
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_SMS)).thenReturn(
+ Collections.singletonList(SMS_PACKAGE_NAME));
+ RolesPreferenceController preferenceController = new RolesPreferenceController(mContext,
+ PREFERENCE_KEY);
+
+ assertThat(preferenceController.getSummary()).isEqualTo("Browser1, Phone1, and Sms1");
+ }
+
+ @Test
+ public void getSummary_browserAndDialerAvailable_shouldReturnBrowserAndDialer() {
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_BROWSER)).thenReturn(
+ Collections.singletonList(BROWSER_PACKAGE_NAME));
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_DIALER)).thenReturn(
+ Collections.singletonList(DIALER_PACKAGE_NAME));
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_SMS)).thenReturn(Collections.emptyList());
+ RolesPreferenceController preferenceController = new RolesPreferenceController(mContext,
+ PREFERENCE_KEY);
+
+ assertThat(preferenceController.getSummary()).isEqualTo("Browser1 and Phone1");
+ }
+
+ @Test
+ public void getSummary_browserAndSmsAvailable_shouldReturnBrowserAndSms() {
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_BROWSER)).thenReturn(
+ Collections.singletonList(BROWSER_PACKAGE_NAME));
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_DIALER)).thenReturn(
+ Collections.emptyList());
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_SMS)).thenReturn(
+ Collections.singletonList(SMS_PACKAGE_NAME));
+ RolesPreferenceController preferenceController = new RolesPreferenceController(mContext,
+ PREFERENCE_KEY);
+
+ assertThat(preferenceController.getSummary()).isEqualTo("Browser1 and Sms1");
+ }
+
+ @Test
+ public void getSummary_dialerAndSmsAvailable_shouldReturnDialerAndSms() {
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_BROWSER)).thenReturn(
+ Collections.emptyList());
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_DIALER)).thenReturn(
+ Collections.singletonList(DIALER_PACKAGE_NAME));
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_SMS)).thenReturn(
+ Collections.singletonList(SMS_PACKAGE_NAME));
+ RolesPreferenceController preferenceController = new RolesPreferenceController(mContext,
+ PREFERENCE_KEY);
+
+ assertThat(preferenceController.getSummary()).isEqualTo("Phone1 and Sms1");
+ }
+
+ @Test
+ public void getSummary_browserAvailable_shouldReturnBrowser() {
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_BROWSER)).thenReturn(
+ Collections.singletonList(BROWSER_PACKAGE_NAME));
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_DIALER)).thenReturn(
+ Collections.emptyList());
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_SMS)).thenReturn(Collections.emptyList());
+ RolesPreferenceController preferenceController = new RolesPreferenceController(mContext,
+ PREFERENCE_KEY);
+
+ assertThat(preferenceController.getSummary()).isEqualTo("Browser1");
+ }
+
+ @Test
+ public void getSummary_dialerAvailable_shouldReturnDialer() {
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_BROWSER)).thenReturn(
+ Collections.emptyList());
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_DIALER)).thenReturn(
+ Collections.singletonList(DIALER_PACKAGE_NAME));
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_SMS)).thenReturn(Collections.emptyList());
+ RolesPreferenceController preferenceController = new RolesPreferenceController(mContext,
+ PREFERENCE_KEY);
+
+ assertThat(preferenceController.getSummary()).isEqualTo("Phone1");
+ }
+
+ @Test
+ public void getSummary_smsAvailable_shouldReturnSms() {
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_BROWSER)).thenReturn(
+ Collections.emptyList());
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_DIALER)).thenReturn(
+ Collections.emptyList());
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_SMS)).thenReturn(
+ Collections.singletonList(SMS_PACKAGE_NAME));
+ RolesPreferenceController preferenceController = new RolesPreferenceController(mContext,
+ PREFERENCE_KEY);
+
+ assertThat(preferenceController.getSummary()).isEqualTo("Sms1");
+ }
+
+ @Test
+ public void getSummary_noneAvailable_shouldReturnNull() {
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_BROWSER)).thenReturn(
+ Collections.emptyList());
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_DIALER)).thenReturn(
+ Collections.emptyList());
+ when(mRoleManager.getRoleHolders(RoleManager.ROLE_SMS)).thenReturn(Collections.emptyList());
+ RolesPreferenceController preferenceController = new RolesPreferenceController(mContext,
+ PREFERENCE_KEY);
+
+ assertThat(preferenceController.getSummary()).isNull();
+ }
}
diff --git a/tests/robotests/src/com/android/settings/password/ChooseLockPatternTest.java b/tests/robotests/src/com/android/settings/password/ChooseLockPatternTest.java
index a6a6355..6b1029c 100644
--- a/tests/robotests/src/com/android/settings/password/ChooseLockPatternTest.java
+++ b/tests/robotests/src/com/android/settings/password/ChooseLockPatternTest.java
@@ -107,7 +107,7 @@
ChooseLockPatternFragment fragment = (ChooseLockPatternFragment)
activity.getSupportFragmentManager().findFragmentById(R.id.main_content);
- View iconView = fragment.getView().findViewById(R.id.suw_layout_icon);
+ View iconView = fragment.getView().findViewById(R.id.suc_layout_icon);
assertThat(iconView.getVisibility()).isEqualTo(View.GONE);
}
diff --git a/tests/uitests/src/com/android/settings/ui/StorageWizardTest.java b/tests/uitests/src/com/android/settings/ui/StorageWizardTest.java
index d47cd0d..eefd1eb 100644
--- a/tests/uitests/src/com/android/settings/ui/StorageWizardTest.java
+++ b/tests/uitests/src/com/android/settings/ui/StorageWizardTest.java
@@ -86,7 +86,7 @@
InstrumentationRegistry.getContext().startActivity(buildInitIntent());
// Activity: pick option to use as internal
- waitFor(By.res(PACKAGE, "suw_layout_title").text(containsIgnoringCase("How will you use")));
+ waitFor(By.res(PACKAGE, "suc_layout_title").text(containsIgnoringCase("How will you use")));
waitFor(By.res(PACKAGE, "storage_wizard_init_internal")).click();
// Dialog: acknowledge that we're formatting the card
@@ -94,15 +94,15 @@
waitFor(By.clickable(true).text(containsIgnoringCase("Format"))).click();
// Activity: ack storage device is slow
- waitForLong(By.res(PACKAGE, "suw_layout_title").textContains("Slow"));
+ waitForLong(By.res(PACKAGE, "suc_layout_title").textContains("Slow"));
waitFor(By.res(PACKAGE, "storage_next_button")).click();
// Activity: choose to move content
- waitForLong(By.res(PACKAGE, "suw_layout_title").textContains("Move content"));
+ waitForLong(By.res(PACKAGE, "suc_layout_title").textContains("Move content"));
waitFor(By.res(PACKAGE, "storage_next_button")).click();
// Activity: yay, we're done!
- waitForLong(By.res(PACKAGE, "suw_layout_title").textContains("ready to use"));
+ waitForLong(By.res(PACKAGE, "suc_layout_title").textContains("ready to use"));
waitFor(By.res(PACKAGE, "storage_next_button")).click();
}
@@ -114,11 +114,11 @@
InstrumentationRegistry.getContext().startActivity(buildInitIntent());
// Activity: pick option to use as external
- waitFor(By.res(PACKAGE, "suw_layout_title").textContains("How will you use"));
+ waitFor(By.res(PACKAGE, "suc_layout_title").textContains("How will you use"));
waitFor(By.res(PACKAGE, "storage_wizard_init_external")).click();
// Activity: yay, we're done!
- waitFor(By.res(PACKAGE, "suw_layout_title").textContains("ready to use"));
+ waitFor(By.res(PACKAGE, "suc_layout_title").textContains("ready to use"));
waitFor(By.res(PACKAGE, "storage_next_button")).click();
}
diff --git a/tests/unit/src/com/android/settings/wifi/dpp/WifiDppConfiguratorActivityTest.java b/tests/unit/src/com/android/settings/wifi/dpp/WifiDppConfiguratorActivityTest.java
index 8e64f5f..215b7e2 100644
--- a/tests/unit/src/com/android/settings/wifi/dpp/WifiDppConfiguratorActivityTest.java
+++ b/tests/unit/src/com/android/settings/wifi/dpp/WifiDppConfiguratorActivityTest.java
@@ -19,6 +19,7 @@
import static com.google.common.truth.Truth.assertThat;
import android.content.Intent;
+import android.content.pm.ActivityInfo;
import androidx.test.rule.ActivityTestRule;
import androidx.test.runner.AndroidJUnit4;
@@ -29,6 +30,10 @@
@RunWith(AndroidJUnit4.class)
public class WifiDppConfiguratorActivityTest {
+ // Valid Wi-Fi DPP QR code & it's parameters
+ private static final String VALID_WIFI_DPP_QR_CODE = "DPP:I:SN=4774LH2b4044;M:010203040506;K:"
+ + "MDkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDIgADURzxmttZoIRIPWGoQMV00XHWCAQIhXruVWOz0NjlkIA=;;";
+
@Rule
public final ActivityTestRule<WifiDppConfiguratorActivity> mActivityRule =
new ActivityTestRule<>(WifiDppConfiguratorActivity.class);
@@ -62,9 +67,7 @@
public void launchActivity_chooseSavedWifiNetwork_shouldNotAutoFinish() {
Intent intent = new Intent(
WifiDppConfiguratorActivity.ACTION_PROCESS_WIFI_DPP_QR_CODE);
- String qrCode = "DPP:I:SN=4774LH2b4044;M:010203040506;K:MDkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD"
- + "IgADURzxmttZoIRIPWGoQMV00XHWCAQIhXruVWOz0NjlkIA=;;";
- intent.putExtra(WifiDppUtils.EXTRA_QR_CODE, qrCode);
+ intent.putExtra(WifiDppUtils.EXTRA_QR_CODE, VALID_WIFI_DPP_QR_CODE);
mActivityRule.launchActivity(intent);
@@ -101,4 +104,59 @@
assertThat(activity instanceof WifiDppQrCodeScannerFragment
.OnScanZxingWifiFormatSuccessListener).isEqualTo(true);
}
+
+ @Test
+ public void testActivity_shouldImplementsOnClickChooseDifferentNetworkCallback() {
+ WifiDppConfiguratorActivity activity = mActivityRule.getActivity();
+
+ assertThat(activity instanceof WifiDppAddDeviceFragment
+ .OnClickChooseDifferentNetworkListener).isEqualTo(true);
+ }
+
+ @Test
+ public void rotateScreen_shouldGetCorrectWifiDppQrCode() {
+ WifiQrCode wifiQrCode = new WifiQrCode(VALID_WIFI_DPP_QR_CODE);
+ Intent intent = new Intent(WifiDppConfiguratorActivity.ACTION_CONFIGURATOR_QR_CODE_SCANNER);
+ intent.putExtra(WifiDppUtils.EXTRA_WIFI_SECURITY, "WEP");
+ intent.putExtra(WifiDppUtils.EXTRA_WIFI_SSID, "GoogleGuest");
+ intent.putExtra(WifiDppUtils.EXTRA_WIFI_PRE_SHARED_KEY, "password");
+
+ // setWifiDppQrCode and check if getWifiDppQrCode correctly after rotation
+ mActivityRule.launchActivity(intent);
+ mActivityRule.getActivity().setWifiDppQrCode(wifiQrCode);
+ mActivityRule.getActivity().setRequestedOrientation(
+ ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
+ mActivityRule.getActivity().setRequestedOrientation(
+ ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ WifiQrCode restoredWifiDppQrCode = mActivityRule.getActivity().getWifiDppQrCode();
+
+ assertThat(restoredWifiDppQrCode).isNotNull();
+ assertThat(restoredWifiDppQrCode.getQrCode()).isEqualTo(VALID_WIFI_DPP_QR_CODE);
+ }
+
+ @Test
+ public void rotateScreen_shouldGetCorrectWifiNetworkConfig() {
+ WifiNetworkConfig wifiNetworkConfig = new WifiNetworkConfig("WPA", "WifiSsid", "password",
+ /* hiddenSsid */ false, /* networkId */ 0);
+ Intent intent = new Intent(
+ WifiDppConfiguratorActivity.ACTION_PROCESS_WIFI_DPP_QR_CODE);
+ intent.putExtra(WifiDppUtils.EXTRA_QR_CODE, VALID_WIFI_DPP_QR_CODE);
+
+ // setWifiNetworkConfig and check if getWifiNetworkConfig correctly after rotation
+ mActivityRule.launchActivity(intent);
+ mActivityRule.getActivity().setWifiNetworkConfig(wifiNetworkConfig);
+ mActivityRule.getActivity().setRequestedOrientation(
+ ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
+ mActivityRule.getActivity().setRequestedOrientation(
+ ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ WifiNetworkConfig restoredWifiNetworkConfig =
+ mActivityRule.getActivity().getWifiNetworkConfig();
+
+ assertThat(restoredWifiNetworkConfig).isNotNull();
+ assertThat(restoredWifiNetworkConfig.getSecurity()).isEqualTo("WPA");
+ assertThat(restoredWifiNetworkConfig.getSsid()).isEqualTo("WifiSsid");
+ assertThat(restoredWifiNetworkConfig.getPreSharedKey()).isEqualTo("password");
+ assertThat(restoredWifiNetworkConfig.getHiddenSsid()).isFalse();
+ assertThat(restoredWifiNetworkConfig.getNetworkId()).isEqualTo(0);
+ }
}