aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoanne Chung <joannechung@google.com>2020-08-19 06:16:21 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-08-19 06:16:21 +0000
commit7718a43420b4b743020d058f57da20d90207511f (patch)
treedc14d3d116fe072cbfd245e73567c9d2eaf42384
parentae8f4fa013bd49d60ba9513f41d03a399a33e11e (diff)
parent05ca7c47e6a2ccb3c5d53e55fc91a56032d2b71f (diff)
downloadandroid-7718a43420b4b743020d058f57da20d90207511f.tar.gz
Merge "Update language to comply with Android's inclusive language guidance" am: 4cd108aef6 am: d951dc8e29 am: d0435400ab am: b799234bc6 am: 05ca7c47e6
Original change: https://android-review.googlesource.com/c/platform/developers/samples/android/+/1402487 Change-Id: Ie3951291e578754ec41eb64ecbecbf6f47140adb
-rw-r--r--input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/app/StandardAutoCompleteSignInActivity.kt2
-rw-r--r--input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/app/StandardSignInActivity.kt2
-rw-r--r--input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/app/VirtualSignInActivity.kt2
-rw-r--r--input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AuthActivity.kt6
-rw-r--r--input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/settings/MyPreferences.kt18
-rw-r--r--input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/settings/SettingsActivity.kt10
-rw-r--r--input/autofill/AutofillFramework/kotlinApp/Application/src/main/res/layout/multidataset_service_auth_activity.xml14
-rw-r--r--input/autofill/AutofillFramework/kotlinApp/Application/src/main/res/layout/multidataset_service_settings_authentication_dialog.xml2
-rw-r--r--input/autofill/AutofillFramework/kotlinApp/Application/src/main/res/values/strings.xml2
-rw-r--r--input/autofill/AutofillFramework/template-params.xml2
10 files changed, 30 insertions, 30 deletions
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 2e154fbf..7ccb9dc0 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 @@ class StandardAutoCompleteSignInActivity : AppCompatActivity() {
}
/**
- * 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 971bd167..1a815d2c 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 @@ class StandardSignInActivity : AppCompatActivity() {
}
/**
- * 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 6d86da95..6b5f24f7 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 @@ class VirtualSignInActivity : AppCompatActivity() {
}
/**
- * 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 e02a311a..1ab2ea5a 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.datasource.Shar
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 @@ class AuthActivity : AppCompatActivity() {
}
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 1ddf3dab..d3a77131 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 @@ object MyPreferences {
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 @@ object MyPreferences {
}
/**
- * 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 c24a0e95..5eeb901d 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 @@ class SettingsActivity : AppCompatActivity() {
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 @@ class SettingsActivity : AppCompatActivity() {
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 @@ class SettingsActivity : AppCompatActivity() {
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 981dd0d8..459d5bcd 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 93ac6dd1..9e51fddc 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 46b5349b..3765f51e 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 37d6bd2a..b652b233 100644
--- a/input/autofill/AutofillFramework/template-params.xml
+++ b/input/autofill/AutofillFramework/template-params.xml
@@ -133,7 +133,7 @@ To set the device's default Autofill service to the one in the sample, edit **Se
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