aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoanne Chung <joannechung@google.com>2020-08-17 02:54:12 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-08-17 02:54:12 +0000
commit8d99f4d8e5bbea332e10f972ec09f8e727657854 (patch)
tree7478cdb80a5359cd5e126415f0cddc19c534e68a
parenta6f5cae4cec28b181082cb002ddcbbe1de71d9ad (diff)
parent1bab8b010703ceabebc440a592061f5a6f23f69e (diff)
downloadandroid-8d99f4d8e5bbea332e10f972ec09f8e727657854.tar.gz
Merge "Update language to comply with Android's inclusive language guidance" am: 1bab8b0107
Original change: https://android-review.googlesource.com/c/platform/developers/samples/android/+/1400288 Change-Id: I34e05f2103f1a4f8da0f51498db536cb89a10ba5
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AuthActivity.java22
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/settings/MyPreferences.java16
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/settings/SettingsActivity.java22
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_auth_activity.xml14
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_settings_authentication_dialog.xml2
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/res/values/strings.xml2
6 files changed, 39 insertions, 39 deletions
diff --git a/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AuthActivity.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AuthActivity.java
index e1660b7c..c5d32eaf 100644
--- a/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AuthActivity.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AuthActivity.java
@@ -15,6 +15,13 @@
*/
package com.example.android.autofill.service;
+import static android.view.autofill.AutofillManager.EXTRA_ASSIST_STRUCTURE;
+import static android.view.autofill.AutofillManager.EXTRA_AUTHENTICATION_RESULT;
+
+import static com.example.android.autofill.service.util.Util.EXTRA_DATASET_NAME;
+import static com.example.android.autofill.service.util.Util.EXTRA_FOR_RESPONSE;
+import static com.example.android.autofill.service.util.Util.logw;
+
import android.app.PendingIntent;
import android.app.assist.AssistStructure;
import android.content.Context;
@@ -51,13 +58,6 @@ import com.google.gson.GsonBuilder;
import java.util.HashMap;
import java.util.List;
-import static android.view.autofill.AutofillManager.EXTRA_ASSIST_STRUCTURE;
-import static android.view.autofill.AutofillManager.EXTRA_AUTHENTICATION_RESULT;
-import static com.example.android.autofill.service.util.Util.EXTRA_DATASET_NAME;
-import static com.example.android.autofill.service.util.Util.EXTRA_FOR_RESPONSE;
-import static com.example.android.autofill.service.util.Util.logw;
-
-
/**
* This Activity controls the UI for logging in to the Autofill service.
* It is launched when an Autofill Response or specific Dataset within the Response requires
@@ -70,7 +70,7 @@ public class AuthActivity extends AppCompatActivity {
private LocalAutofillDataSource mLocalAutofillDataSource;
private DigitalAssetLinksRepository mDalRepository;
- private EditText mMasterPassword;
+ private EditText mMainPassword;
private DatasetAdapter mDatasetAdapter;
private ResponseAdapter mResponseAdapter;
private ClientViewMetadata mClientViewMetadata;
@@ -107,7 +107,7 @@ public class AuthActivity extends AppCompatActivity {
mLocalAutofillDataSource = LocalAutofillDataSource.getInstance(sharedPreferences,
autofillDao, new AppExecutors());
mDalRepository = DigitalAssetLinksRepository.getInstance(getPackageManager());
- mMasterPassword = findViewById(R.id.master_password);
+ mMainPassword = findViewById(R.id.main_password);
mPackageName = getPackageName();
mPreferences = MyPreferences.getInstance(this);
findViewById(R.id.login).setOnClickListener((view) -> login());
@@ -118,8 +118,8 @@ public class AuthActivity extends AppCompatActivity {
}
private void login() {
- Editable password = mMasterPassword.getText();
- String correctPassword = MyPreferences.getInstance(AuthActivity.this).getMasterPassword();
+ Editable password = mMainPassword.getText();
+ String correctPassword = MyPreferences.getInstance(AuthActivity.this).getMainPassword();
if (password.toString().equals(correctPassword)) {
onSuccess();
} else {
diff --git a/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/settings/MyPreferences.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/settings/MyPreferences.java
index 6a723f0d..f006b2db 100644
--- a/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/settings/MyPreferences.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/settings/MyPreferences.java
@@ -26,7 +26,7 @@ import com.example.android.autofill.service.util.Util;
public class MyPreferences {
private static final String RESPONSE_AUTH_KEY = "response_auth";
private static final String DATASET_AUTH_KEY = "dataset_auth";
- private static final String MASTER_PASSWORD_KEY = "master_password";
+ private static final String MAIN_PASSWORD_KEY = "main_password";
private static final String LOGGING_LEVEL = "logging_level";
private static final String DAL_CHECK_REQUIRED = "dal_check_required";
private static final String NUMBER_DATASETS = "number_datasets";
@@ -74,21 +74,21 @@ public class MyPreferences {
}
/**
- * Gets autofill master username.
+ * Gets autofill main username.
*/
- public String getMasterPassword() {
- return mPrefs.getString(MASTER_PASSWORD_KEY, null);
+ public String getMainPassword() {
+ return mPrefs.getString(MAIN_PASSWORD_KEY, null);
}
/**
- * Sets autofill master password.
+ * Sets autofill main password.
*/
- public void setMasterPassword(@NonNull String masterPassword) {
- mPrefs.edit().putString(MASTER_PASSWORD_KEY, masterPassword).apply();
+ public void setMainPassword(@NonNull String mainPassword) {
+ mPrefs.edit().putString(MAIN_PASSWORD_KEY, mainPassword).apply();
}
public void clearCredentials() {
- mPrefs.edit().remove(MASTER_PASSWORD_KEY).apply();
+ mPrefs.edit().remove(MAIN_PASSWORD_KEY).apply();
}
public Util.LogLevel getLoggingLevel() {
diff --git a/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/settings/SettingsActivity.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/settings/SettingsActivity.java
index 500ceeca..9b4916fd 100644
--- a/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/settings/SettingsActivity.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/settings/SettingsActivity.java
@@ -15,6 +15,12 @@
*/
package com.example.android.autofill.service.settings;
+import static com.example.android.autofill.service.util.Util.DalCheckRequirement.AllUrls;
+import static com.example.android.autofill.service.util.Util.DalCheckRequirement.Disabled;
+import static com.example.android.autofill.service.util.Util.DalCheckRequirement.LoginOnly;
+import static com.example.android.autofill.service.util.Util.logd;
+import static com.example.android.autofill.service.util.Util.logw;
+
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
@@ -56,12 +62,6 @@ import com.google.gson.GsonBuilder;
import java.util.List;
-import static com.example.android.autofill.service.util.Util.DalCheckRequirement.AllUrls;
-import static com.example.android.autofill.service.util.Util.DalCheckRequirement.Disabled;
-import static com.example.android.autofill.service.util.Util.DalCheckRequirement.LoginOnly;
-import static com.example.android.autofill.service.util.Util.logd;
-import static com.example.android.autofill.service.util.Util.logw;
-
public class SettingsActivity extends AppCompatActivity {
private static final String TAG = "SettingsActivity";
private static final int REQUEST_CODE_SET_DEFAULT = 1;
@@ -111,7 +111,7 @@ public class SettingsActivity extends AppCompatActivity {
R.id.settings_auth_credentials_label,
R.id.settings_auth_credentials_icon,
(view) -> {
- if (mPreferences.getMasterPassword() != null) {
+ if (mPreferences.getMainPassword() != null) {
buildCurrentCredentialsDialog().show();
} else {
buildNewCredentialsDialog().show();
@@ -258,7 +258,7 @@ public class SettingsActivity extends AppCompatActivity {
final EditText currentPasswordField = LayoutInflater
.from(SettingsActivity.this)
.inflate(R.layout.multidataset_service_settings_authentication_dialog, null)
- .findViewById(R.id.master_password_field);
+ .findViewById(R.id.main_password_field);
return prepareCredentialsDialog()
.setMessage(R.string.settings_auth_enter_current_password)
.setView(currentPasswordField)
@@ -266,7 +266,7 @@ public class SettingsActivity extends AppCompatActivity {
@Override
public void onClick(DialogInterface dialog, int which) {
String password = currentPasswordField.getText().toString();
- if (mPreferences.getMasterPassword()
+ if (mPreferences.getMainPassword()
.equals(password)) {
buildNewCredentialsDialog().show();
dialog.dismiss();
@@ -280,13 +280,13 @@ public class SettingsActivity extends AppCompatActivity {
final EditText newPasswordField = LayoutInflater
.from(SettingsActivity.this)
.inflate(R.layout.multidataset_service_settings_authentication_dialog, null)
- .findViewById(R.id.master_password_field);
+ .findViewById(R.id.main_password_field);
return prepareCredentialsDialog()
.setMessage(R.string.settings_auth_enter_new_password)
.setView(newPasswordField)
.setPositiveButton(R.string.settings_ok, (dialog, which) -> {
String password = newPasswordField.getText().toString();
- mPreferences.setMasterPassword(password);
+ mPreferences.setMainPassword(password);
dialog.dismiss();
})
.create();
diff --git a/input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_auth_activity.xml b/input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_auth_activity.xml
index 844ea0a6..32cb5923 100644
--- a/input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_auth_activity.xml
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_auth_activity.xml
@@ -28,12 +28,12 @@
tools:context="com.example.android.autofill.service.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/auth_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/afservice/src/main/res/layout/multidataset_service_settings_authentication_dialog.xml b/input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_settings_authentication_dialog.xml
index a84e45ff..19a17332 100644
--- a/input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_settings_authentication_dialog.xml
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_settings_authentication_dialog.xml
@@ -14,7 +14,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/afservice/src/main/res/values/strings.xml b/input/autofill/AutofillFramework/afservice/src/main/res/values/strings.xml
index e7b1f880..3729f880 100644
--- a/input/autofill/AutofillFramework/afservice/src/main/res/values/strings.xml
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/values/strings.xml
@@ -62,7 +62,7 @@
<string name="settings_auth_enter_new_password">Enter new password</string>
<string name="settings_auth_change_credentials_title">Change credentials</string>
<string name="settings_number_of_datasets_label">Number of Datasets</string>
- <string name="autofill_master_login_label">Autofill Master Login</string>
+ <string name="autofill_main_login_label">Autofill Main Login</string>
<string name="auth_password_label">Password</string>
<string name="auth_cancel">Cancel</string>
<string name="auth_login_label">Login</string>