Snap for 9101843 from e12a9a7a2ddf391cfd7ec2a2310e58d15a800d26 to tm-qpr1-release

Change-Id: I61f9ca0ab99f9bd10bc144420c07433ad64edaa1
diff --git a/main/src/com/google/android/setupdesign/util/DeviceHelper.java b/main/src/com/google/android/setupdesign/util/DeviceHelper.java
index 030d688..5845cbb 100644
--- a/main/src/com/google/android/setupdesign/util/DeviceHelper.java
+++ b/main/src/com/google/android/setupdesign/util/DeviceHelper.java
@@ -24,7 +24,7 @@
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 import androidx.annotation.VisibleForTesting;
-import java.lang.String;
+import com.google.android.setupdesign.R;
 
 /** Helper class to get attributes of the device, like a friendly display name. */
 public final class DeviceHelper {
@@ -37,8 +37,9 @@
   @VisibleForTesting public static final String GET_DEVICE_NAME_METHOD = "getDeviceName";
 
   /**
-   * Get the device name text from these resources, if they are unavailable, return the device
-   * name as null.
+   * Get the device name text from these resources, if they are unavailable or setupwizard apk is
+   * older which does not contains {@link DeviceHelper#GET_DEVICE_NAME_METHOD} method, return the
+   * device name as default value "device".
    *
    * <p>Priority: partner config ({@link
    * com.google.android.setupwizard.util.PartnerResource#DEVICE_NAME}) > {@link
@@ -61,14 +62,14 @@
                   /* arg= */ null,
                   /* extras= */ null);
     } catch (IllegalArgumentException | SecurityException exception) {
-      Log.w(TAG, "device name unknown; return the device name as null");
+      Log.w(TAG, "device name unknown; return the device name as default value");
     }
 
     if (deviceName != null) {
       return deviceName.getCharSequence(GET_DEVICE_NAME_METHOD, null);
     }
 
-    return null;
+    return context.getString(R.string.sud_default_device_name);
   }
 
   private DeviceHelper() {}
diff --git a/strings/res/values/strings.xml b/strings/res/values/strings.xml
index 7608716..0b976a5 100644
--- a/strings/res/values/strings.xml
+++ b/strings/res/values/strings.xml
@@ -22,6 +22,12 @@
     <!-- Button for going to the previous screen or step [CHAR LIMIT=20] -->
     <string name="sud_back_button_label">Back</string>
 
+    <!-- Button for skipping the action on the current screen [CHAR LIMIT=20] -->
+    <string name="sud_skip_button_label">Skip</string>
+
     <!-- Button for scrolling down to reveal more content on the screen [CHAR LIMIT=20] -->
     <string name="sud_more_button_label">More</string>
+
+    <!-- The default device name when other resources get the device name are not available [CHAR LIMIT=20] -->
+    <string name="sud_default_device_name">device</string>
 </resources>