Merge "Update language to comply with Android's inclusive language guidance" am: 4cd108aef6

Original change: https://android-review.googlesource.com/c/platform/developers/samples/android/+/1402487

Change-Id: Ifef7030a615b225ff28bc1de06b4ba69ccf982a1
diff --git a/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/app/StandardAutoCompleteSignInActivity.kt b/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/app/StandardAutoCompleteSignInActivity.kt
index 2e154fb..7ccb9dc 100644
--- a/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/app/StandardAutoCompleteSignInActivity.kt
+++ b/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/app/StandardAutoCompleteSignInActivity.kt
@@ -83,7 +83,7 @@
     }
 
     /**
-     * Dummy implementation for demo purposes. A real service should use secure mechanisms to
+     * Fake implementation for demo purposes. A real service should use secure mechanisms to
      * authenticate users.
      */
     fun isValidCredentials(username: String?, password: String?): Boolean {
diff --git a/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/app/StandardSignInActivity.kt b/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/app/StandardSignInActivity.kt
index 971bd16..1a815d2 100644
--- a/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/app/StandardSignInActivity.kt
+++ b/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/app/StandardSignInActivity.kt
@@ -59,7 +59,7 @@
     }
 
     /**
-     * Dummy implementation for demo purposes. A real service should use secure mechanisms to
+     * Fake implementation for demo purposes. A real service should use secure mechanisms to
      * authenticate users.
      */
     fun isValidCredentials(username: String, password: String): Boolean {
diff --git a/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/app/VirtualSignInActivity.kt b/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/app/VirtualSignInActivity.kt
index 6d86da9..6b5f24f 100644
--- a/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/app/VirtualSignInActivity.kt
+++ b/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/app/VirtualSignInActivity.kt
@@ -58,7 +58,7 @@
     }
 
     /**
-     * Dummy implementation for demo purposes. A real service should use secure mechanisms to
+     * Fake implementation for demo purposes. A real service should use secure mechanisms to
      * authenticate users.
      */
     fun isValidCredentials(username: String?, password: String?): Boolean {
diff --git a/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AuthActivity.kt b/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AuthActivity.kt
index e02a311..1ab2ea5 100644
--- a/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AuthActivity.kt
+++ b/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AuthActivity.kt
@@ -37,7 +37,7 @@
 import com.example.android.autofillframework.multidatasetservice.settings.MyPreferences
 import kotlinx.android.synthetic.main.multidataset_service_auth_activity.cancel
 import kotlinx.android.synthetic.main.multidataset_service_auth_activity.login
-import kotlinx.android.synthetic.main.multidataset_service_auth_activity.master_password
+import kotlinx.android.synthetic.main.multidataset_service_auth_activity.main_password
 
 /**
  * This Activity controls the UI for logging in to the Autofill service.
@@ -59,8 +59,8 @@
     }
 
     private fun submitLogin() {
-        val password = master_password.text
-        if (password.toString() == MyPreferences.getMasterPassword(this@AuthActivity)) {
+        val password = main_password.text
+        if (password.toString() == MyPreferences.getMainPassword(this@AuthActivity)) {
             onSuccess()
         } else {
             Toast.makeText(this, "Password incorrect", Toast.LENGTH_SHORT).show()
diff --git a/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/settings/MyPreferences.kt b/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/settings/MyPreferences.kt
index 1ddf3da..d3a7713 100644
--- a/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/settings/MyPreferences.kt
+++ b/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/settings/MyPreferences.kt
@@ -26,7 +26,7 @@
     private val SHARED_PREF_KEY = "com.example.android.autofillframework.service.settings.MyPreferences"
     private val RESPONSE_AUTH_KEY = "response_auth"
     private val DATASET_AUTH_KEY = "dataset_auth"
-    private val MASTER_PASSWORD_KEY = "master_password"
+    private val MAIN_PASSWORD_KEY = "main_password"
 
     private fun getPrefs(context: Context): SharedPreferences {
         return context.applicationContext.getSharedPreferences(SHARED_PREF_KEY, Context.MODE_PRIVATE)
@@ -55,23 +55,23 @@
     }
 
     /**
-     * Gets autofill master password.
+     * Gets autofill main password.
      */
-    fun getMasterPassword(context: Context): String? {
-        return getPrefs(context).getString(MASTER_PASSWORD_KEY, null)
+    fun getMainPassword(context: Context): String? {
+        return getPrefs(context).getString(MAIN_PASSWORD_KEY, null)
     }
 
     /**
-     * Sets autofill master password.
+     * Sets autofill main password.
      */
-    fun setMasterPassword(context: Context, masterPassword: String) {
-        getPrefs(context).edit().putString(MASTER_PASSWORD_KEY, masterPassword).apply()
+    fun setMainPassword(context: Context, mainPassword: String) {
+        getPrefs(context).edit().putString(MAIN_PASSWORD_KEY, mainPassword).apply()
     }
 
     /**
-     * Removes master password.
+     * Removes main password.
      */
     fun clearCredentials(context: Context) {
-        getPrefs(context).edit().remove(MASTER_PASSWORD_KEY).apply()
+        getPrefs(context).edit().remove(MAIN_PASSWORD_KEY).apply()
     }
 }
diff --git a/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/settings/SettingsActivity.kt b/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/settings/SettingsActivity.kt
index c24a0e9..5eeb901 100644
--- a/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/settings/SettingsActivity.kt
+++ b/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/settings/SettingsActivity.kt
@@ -70,7 +70,7 @@
                 settings_auth_credentials_label,
                 settings_auth_credentials_icon,
                 View.OnClickListener {
-                    if (MyPreferences.getMasterPassword(this@SettingsActivity) != null) {
+                    if (MyPreferences.getMainPassword(this@SettingsActivity) != null) {
                         buildCurrentCredentialsDialog().show()
                     } else {
                         buildNewCredentialsDialog().show()
@@ -101,13 +101,13 @@
         val currentPasswordField = LayoutInflater
                 .from(this@SettingsActivity)
                 .inflate(R.layout.multidataset_service_settings_authentication_dialog, null)
-                .findViewById<EditText>(R.id.master_password_field)
+                .findViewById<EditText>(R.id.main_password_field)
         return prepareCredentialsDialog()
                 .setMessage(R.string.settings_auth_enter_current_password)
                 .setView(currentPasswordField)
                 .setPositiveButton(R.string.ok) { dialog, which ->
                     val password = currentPasswordField.text.toString()
-                    if (MyPreferences.getMasterPassword(this@SettingsActivity) == password) {
+                    if (MyPreferences.getMainPassword(this@SettingsActivity) == password) {
                         buildNewCredentialsDialog().show()
                         dialog.dismiss()
                     }
@@ -119,13 +119,13 @@
         val newPasswordField = LayoutInflater
                 .from(this@SettingsActivity)
                 .inflate(R.layout.multidataset_service_settings_authentication_dialog, null)
-                .findViewById<EditText>(R.id.master_password_field)
+                .findViewById<EditText>(R.id.main_password_field)
         return prepareCredentialsDialog()
                 .setMessage(R.string.settings_auth_enter_new_password)
                 .setView(newPasswordField)
                 .setPositiveButton(R.string.ok) { dialog, which ->
                     val password = newPasswordField.text.toString()
-                    MyPreferences.setMasterPassword(this@SettingsActivity, password)
+                    MyPreferences.setMainPassword(this@SettingsActivity, password)
                     dialog.dismiss()
                 }
                 .create()
diff --git a/input/autofill/AutofillFramework/kotlinApp/Application/src/main/res/layout/multidataset_service_auth_activity.xml b/input/autofill/AutofillFramework/kotlinApp/Application/src/main/res/layout/multidataset_service_auth_activity.xml
index 981dd0d..459d5bc 100644
--- a/input/autofill/AutofillFramework/kotlinApp/Application/src/main/res/layout/multidataset_service_auth_activity.xml
+++ b/input/autofill/AutofillFramework/kotlinApp/Application/src/main/res/layout/multidataset_service_auth_activity.xml
@@ -28,12 +28,12 @@
     tools:context=".multidatasetservice.AuthActivity">
 
     <TextView
-        android:id="@+id/master_login_header"
+        android:id="@+id/main_login_header"
         style="@style/TextAppearance.AppCompat.Large"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginTop="@dimen/spacing_normal"
-        android:text="@string/autofill_master_login_label"
+        android:text="@string/autofill_main_login_label"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintHorizontal_bias="0.5"
         app:layout_constraintStart_toStartOf="parent"
@@ -47,15 +47,15 @@
         android:layout_marginEnd="@dimen/spacing_normal"
         android:layout_marginStart="@dimen/spacing_normal"
         android:layout_marginTop="@dimen/spacing_large"
-        android:labelFor="@+id/master_password"
+        android:labelFor="@+id/main_password"
         android:text="@string/password_label"
-        app:layout_constraintEnd_toStartOf="@+id/master_password"
+        app:layout_constraintEnd_toStartOf="@+id/main_password"
         app:layout_constraintHorizontal_chainStyle="packed"
         app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/master_login_header" />
+        app:layout_constraintTop_toBottomOf="@+id/main_login_header" />
 
     <EditText
-        android:id="@+id/master_password"
+        android:id="@+id/main_password"
         android:layout_width="@dimen/text_field_width"
         android:layout_height="wrap_content"
         android:layout_marginEnd="@dimen/spacing_normal"
@@ -80,7 +80,7 @@
         app:layout_constraintHorizontal_bias="0.5"
         app:layout_constraintHorizontal_chainStyle="packed"
         app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/master_password" />
+        app:layout_constraintTop_toBottomOf="@+id/main_password" />
 
     <TextView
         android:id="@+id/login"
diff --git a/input/autofill/AutofillFramework/kotlinApp/Application/src/main/res/layout/multidataset_service_settings_authentication_dialog.xml b/input/autofill/AutofillFramework/kotlinApp/Application/src/main/res/layout/multidataset_service_settings_authentication_dialog.xml
index 93ac6dd..9e51fdd 100644
--- a/input/autofill/AutofillFramework/kotlinApp/Application/src/main/res/layout/multidataset_service_settings_authentication_dialog.xml
+++ b/input/autofill/AutofillFramework/kotlinApp/Application/src/main/res/layout/multidataset_service_settings_authentication_dialog.xml
@@ -15,7 +15,7 @@
  * limitations under the License.
 -->
 <EditText xmlns:android="http://schemas.android.com/apk/res/android"
-          android:id="@+id/master_password_field"
+          android:id="@+id/main_password_field"
           android:layout_width="match_parent"
           android:layout_height="wrap_content"
           android:layout_margin="@dimen/spacing_normal"
diff --git a/input/autofill/AutofillFramework/kotlinApp/Application/src/main/res/values/strings.xml b/input/autofill/AutofillFramework/kotlinApp/Application/src/main/res/values/strings.xml
index 46b5349..3765f51 100644
--- a/input/autofill/AutofillFramework/kotlinApp/Application/src/main/res/values/strings.xml
+++ b/input/autofill/AutofillFramework/kotlinApp/Application/src/main/res/values/strings.xml
@@ -56,7 +56,7 @@
     <string name="login_label">Login</string>
     <string name="to_label">To</string>
     <string name="body_label">Body</string>
-    <string name="autofill_master_login_label">Autofill Master Login</string>
+    <string name="autofill_main_login_label">Autofill Main Login</string>
     <string name="submit_label">Submit</string>
     <string name="cc_exp_month_description">Credit Card Expiration Month</string>
     <string name="cc_exp_year_description">Credit Card Expiration Year</string>
diff --git a/input/autofill/AutofillFramework/template-params.xml b/input/autofill/AutofillFramework/template-params.xml
index 37d6bd2..b652b23 100644
--- a/input/autofill/AutofillFramework/template-params.xml
+++ b/input/autofill/AutofillFramework/template-params.xml
@@ -133,7 +133,7 @@
 app. To edit the service's settings, tap the settings icon next to the **Auto-fill service** list
 item or open the **Autofill Settings** launcher icon.. Here, you can set whether you want to enable
 authentication on the entire autofill Response or just on individual autofill datasets. You should
-also set the master password to “unlock” authenticated autofill data with.
+also set the main password to “unlock” authenticated autofill data with.
 
 **Note:** This sample service stores all autofill data in SharedPreferences and thus is not secure.
 Be careful about what you store when experimenting with the sample because anyone with root access