From 8e49b3925e936eb629487ccefe520138135950db Mon Sep 17 00:00:00 2001 From: Xevi Miro Bruix Date: Thu, 23 Jul 2020 03:41:00 +0000 Subject: =?UTF-8?q?Update=20language=20to=20comply=20with=20Android?= =?UTF-8?q?=E2=80=99s=20inclusive=20language=20guidance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://source.android.com/setup/contribute/respectful-code for reference inclusivefixit Bug: 161896447 Test: Modified documentation Change-Id: I380dd26d5d609900c59da4fc6afc251c3741e5b4 --- input/autofill/AutofillFramework/kotlinApp/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/input/autofill/AutofillFramework/kotlinApp/README.md b/input/autofill/AutofillFramework/kotlinApp/README.md index d0ab0e01..4d11faa2 100644 --- a/input/autofill/AutofillFramework/kotlinApp/README.md +++ b/input/autofill/AutofillFramework/kotlinApp/README.md @@ -39,7 +39,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 primary 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 -- cgit v1.2.3 From 325fd8600e4a2ea36df39fbd370513f0c7363fa2 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Thu, 30 Jul 2020 19:57:17 -0600 Subject: Update language to comply with Android's inclusive language guidance See https://source.android.com/setup/contribute/respectful-code for reference Bug: 161896447 Change-Id: Ie7e7dd0f1afcfa04856c29484304c15a6cc60c8b --- common/src/java/com/example/android/common/dummydata/Cheeses.java | 2 +- .../main/java/com/example/android/cardemulation/CardService.java | 2 +- .../src/main/java/com/example/android/directshare/Contact.java | 4 ++-- .../java/com/example/android/directshare/SendMessageActivity.java | 2 +- .../src/main/java/com/example/android/sharingshortcuts/Contact.java | 4 ++-- .../com/example/android/sharingshortcuts/SendMessageActivity.java | 2 +- .../java/com/example/android/widgetdata/WeatherDataProvider.java | 2 +- .../java/com/example/android/widgetdata/WidgetDataFragment.java | 2 +- .../com/example/android/contentproviderpaging/ImageProvider.java | 6 +++--- .../java/com/example/android/storageprovider/MyCloudProvider.java | 6 +++--- .../example/android/storageprovider/StorageProviderFragment.java | 6 +++--- .../example/android/wearable/wear/messaging/mock/MockDatabase.java | 2 +- .../app/antipatterns/BadViewStructureCreationSignInActivity.java | 2 +- .../app/antipatterns/CallbackLessAutoCompleteSignInActivity.java | 2 +- .../app/commoncases/StandardAutoCompleteSignInActivity.java | 2 +- .../android/autofill/app/commoncases/StandardSignInActivity.java | 2 +- .../android/autofill/app/commoncases/VirtualSignInActivity.java | 2 +- .../autofill/app/edgecases/VirtualCompatModeSignInActivity.java | 4 ++-- .../example/android/autofill/service/AutofillHintProperties.java | 2 +- notification/Bubbles/app/src/main/AndroidManifest.xml | 2 +- .../com/example/android/system/runtimepermissions/MainActivity.java | 2 +- .../system/runtimepermissions/contacts/ContactsFragment.java | 4 ++-- .../com/example/android/actionbarcompat/listpopupmenu/Cheeses.java | 2 +- .../android/actionbarcompat/listpopupmenu/PopupListFragment.java | 2 +- .../src/main/java/com/example/android/customchoicelist/Cheeses.java | 2 +- .../example/android/effectivenavigation/CollectionDemoActivity.java | 2 +- .../java/com/example/android/effectivenavigation/MainActivity.java | 4 ++-- .../java/com/example/android/horizontalpaging/MainActivity.java | 2 +- .../swiperefreshlayoutbasic/SwipeRefreshLayoutBasicFragment.java | 2 +- .../swiperefreshlistfragment/SwipeRefreshListFragmentFragment.java | 2 +- .../SwipeRefreshMultipleViewsFragment.java | 2 +- .../java/com/example/android/wearable/jumpingjack/MainActivity.java | 2 +- .../example/android/wearable/speedtracker/PhoneMainActivity.java | 2 +- .../java/com/example/android/wearable/speaker/MainActivity.java | 2 +- .../android/xyztouristattractions/service/UtilityService.java | 2 +- 35 files changed, 46 insertions(+), 46 deletions(-) diff --git a/common/src/java/com/example/android/common/dummydata/Cheeses.java b/common/src/java/com/example/android/common/dummydata/Cheeses.java index 783735ce..3b7fcefe 100644 --- a/common/src/java/com/example/android/common/dummydata/Cheeses.java +++ b/common/src/java/com/example/android/common/dummydata/Cheeses.java @@ -21,7 +21,7 @@ import java.util.HashSet; import java.util.Random; /** - * Dummy data. + * Placeholder data. */ public class Cheeses { static final String[] CHEESES = { diff --git a/connectivity/nfc/CardEmulation/Application/src/main/java/com/example/android/cardemulation/CardService.java b/connectivity/nfc/CardEmulation/Application/src/main/java/com/example/android/cardemulation/CardService.java index a409d28f..123785ed 100644 --- a/connectivity/nfc/CardEmulation/Application/src/main/java/com/example/android/cardemulation/CardService.java +++ b/connectivity/nfc/CardEmulation/Application/src/main/java/com/example/android/cardemulation/CardService.java @@ -65,7 +65,7 @@ public class CardService extends HostApduService { * This method will be called when a command APDU has been received from a remote device. A * response APDU can be provided directly by returning a byte-array in this method. In general * response APDUs must be sent as quickly as possible, given the fact that the user is likely - * holding his device over an NFC reader when this method is called. + * holding their device over an NFC reader when this method is called. * *

If there are multiple services that have registered for the same AIDs in * their meta-data entry, you will only get called if the user has explicitly selected your diff --git a/content/DirectShare/Application/src/main/java/com/example/android/directshare/Contact.java b/content/DirectShare/Application/src/main/java/com/example/android/directshare/Contact.java index 4a1665e3..9e234768 100644 --- a/content/DirectShare/Application/src/main/java/com/example/android/directshare/Contact.java +++ b/content/DirectShare/Application/src/main/java/com/example/android/directshare/Contact.java @@ -17,13 +17,13 @@ package com.example.android.directshare; /** - * Provides the list of dummy contacts. This sample implements this as constants, but real-life apps + * Provides the list of placeholder contacts. This sample implements this as constants, but real-life apps * should use a database and such. */ public class Contact { /** - * The list of dummy contacts. + * The list of placeholder contacts. */ public static final Contact[] CONTACTS = { new Contact("Tereasa"), diff --git a/content/DirectShare/Application/src/main/java/com/example/android/directshare/SendMessageActivity.java b/content/DirectShare/Application/src/main/java/com/example/android/directshare/SendMessageActivity.java index d291172e..39826d4f 100644 --- a/content/DirectShare/Application/src/main/java/com/example/android/directshare/SendMessageActivity.java +++ b/content/DirectShare/Application/src/main/java/com/example/android/directshare/SendMessageActivity.java @@ -141,7 +141,7 @@ public class SendMessageActivity extends Activity { }; /** - * Pretends to send the text to the contact. This only shows a dummy message. + * Pretends to send the text to the contact. This only shows a placeholder message. */ private void send() { Toast.makeText(this, diff --git a/content/SharingShortcuts/Application/src/main/java/com/example/android/sharingshortcuts/Contact.java b/content/SharingShortcuts/Application/src/main/java/com/example/android/sharingshortcuts/Contact.java index 155a8412..e5f25b32 100644 --- a/content/SharingShortcuts/Application/src/main/java/com/example/android/sharingshortcuts/Contact.java +++ b/content/SharingShortcuts/Application/src/main/java/com/example/android/sharingshortcuts/Contact.java @@ -19,13 +19,13 @@ package com.example.android.sharingshortcuts; import androidx.annotation.NonNull; /** - * Provides the list of dummy contacts. This sample implements this as constants, but real-life apps + * Provides the list of placeholder contacts. This sample implements this as constants, but real-life apps * should use a database and such. */ public class Contact { /** - * The list of dummy contacts. + * The list of placeholder contacts. */ public static final Contact[] CONTACTS = { new Contact("Tereasa"), diff --git a/content/SharingShortcuts/Application/src/main/java/com/example/android/sharingshortcuts/SendMessageActivity.java b/content/SharingShortcuts/Application/src/main/java/com/example/android/sharingshortcuts/SendMessageActivity.java index 7519a7b8..86ac18d9 100644 --- a/content/SharingShortcuts/Application/src/main/java/com/example/android/sharingshortcuts/SendMessageActivity.java +++ b/content/SharingShortcuts/Application/src/main/java/com/example/android/sharingshortcuts/SendMessageActivity.java @@ -150,7 +150,7 @@ public class SendMessageActivity extends Activity { }; /** - * Pretends to send the text to the contact. This only shows a dummy message. + * Pretends to send the text to the contact. This only shows a placeholder message. */ private void send() { Toast.makeText(this, diff --git a/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WeatherDataProvider.java b/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WeatherDataProvider.java index 2508f014..d1f44a4c 100644 --- a/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WeatherDataProvider.java +++ b/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WeatherDataProvider.java @@ -25,7 +25,7 @@ import android.net.Uri; import java.util.ArrayList; /** - * A dummy class that we are going to use internally to store weather data. Generally, this data + * A placeholder class that we are going to use internally to store weather data. Generally, this data * will be stored in an external and persistent location (ie. File, Database, SharedPreferences) so * that the data can persist if the process is ever killed. For simplicity, in this sample the * data will only be stored in memory. diff --git a/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WidgetDataFragment.java b/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WidgetDataFragment.java index b7500a98..5bc990fd 100644 --- a/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WidgetDataFragment.java +++ b/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/WidgetDataFragment.java @@ -8,7 +8,7 @@ import android.view.View; import android.view.ViewGroup; /** - * A Dummy Fragment that shows the intro text from a layout. + * A Placeholder Fragment that shows the intro text from a layout. */ public class WidgetDataFragment extends Fragment { diff --git a/content/documentsUi/ContentProviderPaging/app/src/main/java/com/example/android/contentproviderpaging/ImageProvider.java b/content/documentsUi/ContentProviderPaging/app/src/main/java/com/example/android/contentproviderpaging/ImageProvider.java index 11c52274..6b7c4012 100644 --- a/content/documentsUi/ContentProviderPaging/app/src/main/java/com/example/android/contentproviderpaging/ImageProvider.java +++ b/content/documentsUi/ContentProviderPaging/app/src/main/java/com/example/android/contentproviderpaging/ImageProvider.java @@ -57,7 +57,7 @@ public class ImageProvider extends ContentProvider { sUriMatcher.addURI(ImageContract.AUTHORITY, "images/#", IMAGE_ID); } - // Indicated how many same images are going to be written as dummy images + // Indicated how many same images are going to be written as placeholder images private static final int REPEAT_COUNT_WRITE_FILES = 10; private File mBaseDir; @@ -185,7 +185,7 @@ public class ImageProvider extends ContentProvider { /** * Preload sample files packaged in the apk into the internal storage directory. This is a - * dummy function specific to this demo. The MyCloud mock cloud service doesn't actually + * placeholder function specific to this demo. The MyCloud mock cloud service doesn't actually * have a backend, so it simulates by reading content from the device's internal storage. */ private void writeDummyFilesToStorage(Context context) { @@ -202,7 +202,7 @@ public class ImageProvider extends ContentProvider { } /** - * Write a file to internal storage. Used to set up our dummy "cloud server". + * Write a file to internal storage. Used to set up our placeholder "cloud server". * * @param context the Context * @param resId the resource ID of the file to write to internal storage diff --git a/content/documentsUi/StorageProvider/Application/src/main/java/com/example/android/storageprovider/MyCloudProvider.java b/content/documentsUi/StorageProvider/Application/src/main/java/com/example/android/storageprovider/MyCloudProvider.java index 9f9249a3..d76bd675 100644 --- a/content/documentsUi/StorageProvider/Application/src/main/java/com/example/android/storageprovider/MyCloudProvider.java +++ b/content/documentsUi/StorageProvider/Application/src/main/java/com/example/android/storageprovider/MyCloudProvider.java @@ -545,7 +545,7 @@ public class MyCloudProvider extends DocumentsProvider { /** * Preload sample files packaged in the apk into the internal storage directory. This is a - * dummy function specific to this demo. The MyCloud mock cloud service doesn't actually + * placeholder function specific to this demo. The MyCloud mock cloud service doesn't actually * have a backend, so it simulates by reading content from the device's internal storage. */ private void writeDummyFilesToStorage() { @@ -570,7 +570,7 @@ public class MyCloudProvider extends DocumentsProvider { } /** - * Write a file to internal storage. Used to set up our dummy "cloud server". + * Write a file to internal storage. Used to set up our placeholder "cloud server". * * @param resId the resource ID of the file to write to internal storage * @param extension the file extension (ex. .png, .mp3) @@ -608,7 +608,7 @@ public class MyCloudProvider extends DocumentsProvider { } /** - * Dummy function to determine whether the user is logged in. + * Placeholder function to determine whether the user is logged in. */ private boolean isUserLoggedIn() { final SharedPreferences sharedPreferences = diff --git a/content/documentsUi/StorageProvider/Application/src/main/java/com/example/android/storageprovider/StorageProviderFragment.java b/content/documentsUi/StorageProvider/Application/src/main/java/com/example/android/storageprovider/StorageProviderFragment.java index 80d0296d..ace02429 100644 --- a/content/documentsUi/StorageProvider/Application/src/main/java/com/example/android/storageprovider/StorageProviderFragment.java +++ b/content/documentsUi/StorageProvider/Application/src/main/java/com/example/android/storageprovider/StorageProviderFragment.java @@ -70,7 +70,7 @@ public class StorageProviderFragment extends Fragment { } /** - * Dummy function to change the user's authorization status. + * Placeholder function to change the user's authorization status. */ private void toggleLogin() { // Replace this with your standard method of authentication to determine if your app @@ -81,7 +81,7 @@ public class StorageProviderFragment extends Fragment { } /** - * Dummy function to save whether the user is logged in. + * Placeholder function to save whether the user is logged in. */ private void writeLoginValue(boolean loggedIn) { final SharedPreferences sharedPreferences = @@ -91,7 +91,7 @@ public class StorageProviderFragment extends Fragment { } /** - * Dummy function to determine whether the user is logged in. + * Placeholder function to determine whether the user is logged in. */ private boolean readLoginValue() { final SharedPreferences sharedPreferences = diff --git a/deprecated/wearable/wear/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/mock/MockDatabase.java b/deprecated/wearable/wear/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/mock/MockDatabase.java index c3526701..5310044e 100644 --- a/deprecated/wearable/wear/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/mock/MockDatabase.java +++ b/deprecated/wearable/wear/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/mock/MockDatabase.java @@ -224,7 +224,7 @@ public class MockDatabase { } /** - * Generates a set of predefined dummy contacts. You may need to add in extra logic for + * Generates a set of predefined placeholder contacts. You may need to add in extra logic for * timestamp changes between server and local app. * * @return a list of profiles to be used as contacts diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/antipatterns/BadViewStructureCreationSignInActivity.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/antipatterns/BadViewStructureCreationSignInActivity.java index ddc57988..1210c3ac 100644 --- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/antipatterns/BadViewStructureCreationSignInActivity.java +++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/antipatterns/BadViewStructureCreationSignInActivity.java @@ -93,7 +93,7 @@ public class BadViewStructureCreationSignInActivity extends AppCompatActivity { } /** - * Dummy implementation for demo purposes. A real service should use secure mechanisms to + * Placeholder implementation for demo purposes. A real service should use secure mechanisms to * authenticate users. */ public boolean isValidCredentials(String username, String password) { diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/antipatterns/CallbackLessAutoCompleteSignInActivity.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/antipatterns/CallbackLessAutoCompleteSignInActivity.java index 9f28912f..583e1e27 100644 --- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/antipatterns/CallbackLessAutoCompleteSignInActivity.java +++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/antipatterns/CallbackLessAutoCompleteSignInActivity.java @@ -100,7 +100,7 @@ public class CallbackLessAutoCompleteSignInActivity extends AppCompatActivity { } /** - * Dummy implementation for demo purposes. A real service should use secure mechanisms to + * Placeholder implementation for demo purposes. A real service should use secure mechanisms to * authenticate users. */ public boolean isValidCredentials(String username, String password) { diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/commoncases/StandardAutoCompleteSignInActivity.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/commoncases/StandardAutoCompleteSignInActivity.java index 089c6b2d..30991be4 100644 --- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/commoncases/StandardAutoCompleteSignInActivity.java +++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/commoncases/StandardAutoCompleteSignInActivity.java @@ -110,7 +110,7 @@ public class StandardAutoCompleteSignInActivity extends AppCompatActivity { } /** - * Dummy implementation for demo purposes. A real service should use secure mechanisms to + * Placeholder implementation for demo purposes. A real service should use secure mechanisms to * authenticate users. */ public boolean isValidCredentials(String username, String password) { diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/commoncases/StandardSignInActivity.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/commoncases/StandardSignInActivity.java index 3e3b5e9f..48b9522f 100644 --- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/commoncases/StandardSignInActivity.java +++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/commoncases/StandardSignInActivity.java @@ -83,7 +83,7 @@ public class StandardSignInActivity extends AppCompatActivity { } /** - * Dummy implementation for demo purposes. A real service should use secure mechanisms to + * Placeholder implementation for demo purposes. A real service should use secure mechanisms to * authenticate users. */ public boolean isValidCredentials(String username, String password) { diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/commoncases/VirtualSignInActivity.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/commoncases/VirtualSignInActivity.java index baafbf75..0c31a45d 100644 --- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/commoncases/VirtualSignInActivity.java +++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/commoncases/VirtualSignInActivity.java @@ -93,7 +93,7 @@ public class VirtualSignInActivity extends AppCompatActivity { } /** - * Dummy implementation for demo purposes. A real service should use secure mechanisms to + * Placeholder implementation for demo purposes. A real service should use secure mechanisms to * authenticate users. */ public boolean isValidCredentials(String username, String password) { diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/edgecases/VirtualCompatModeSignInActivity.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/edgecases/VirtualCompatModeSignInActivity.java index d55db82d..eba4864a 100644 --- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/edgecases/VirtualCompatModeSignInActivity.java +++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/edgecases/VirtualCompatModeSignInActivity.java @@ -38,7 +38,7 @@ import com.example.android.autofill.app.view.autofillable.CustomVirtualViewCompa *

Useful to test an Autofill service that supports Compatibility Mode. * - *

Note: you must whitelist this app's package for compatibility mode. For exmaple, in + *

Note: you must allowlist this app's package for compatibility mode. For exmaple, in * a UNIX-like OS such as Linux, you can run: * *

@@ -111,7 +111,7 @@ public class VirtualCompatModeSignInActivity extends AppCompatActivity {
     }
 
     /**
-     * Dummy implementation for demo purposes. A real service should use secure mechanisms to
+     * Placeholder implementation for demo purposes. A real service should use secure mechanisms to
      * authenticate users.
      */
     public boolean isValidCredentials(String username, String password) {
diff --git a/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AutofillHintProperties.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AutofillHintProperties.java
index 8314eb30..3da54c1d 100644
--- a/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AutofillHintProperties.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AutofillHintProperties.java
@@ -44,7 +44,7 @@ public final class AutofillHintProperties {
     }
 
     /**
-     * Generates dummy autofill field data that is relevant to the autofill hint.
+     * Generates placeholder autofill field data that is relevant to the autofill hint.
      */
     public FilledAutofillField generateFakeField(int seed, String datasetId) {
         return mFakeFieldGenerator.generate(seed, datasetId);
diff --git a/notification/Bubbles/app/src/main/AndroidManifest.xml b/notification/Bubbles/app/src/main/AndroidManifest.xml
index 45fac5e7..8c20eaa3 100644
--- a/notification/Bubbles/app/src/main/AndroidManifest.xml
+++ b/notification/Bubbles/app/src/main/AndroidManifest.xml
@@ -55,7 +55,7 @@
         
 
         
diff --git a/system/RuntimePermissions/Application/src/main/java/com/example/android/system/runtimepermissions/MainActivity.java b/system/RuntimePermissions/Application/src/main/java/com/example/android/system/runtimepermissions/MainActivity.java
index 37db139d..8b417df4 100644
--- a/system/RuntimePermissions/Application/src/main/java/com/example/android/system/runtimepermissions/MainActivity.java
+++ b/system/RuntimePermissions/Application/src/main/java/com/example/android/system/runtimepermissions/MainActivity.java
@@ -42,7 +42,7 @@ import com.example.android.system.runtimepermissions.contacts.ContactsFragment;
  * Contacts permissions (({@link android.Manifest.permission#READ_CONTACTS} and ({@link
  * android.Manifest.permission#WRITE_CONTACTS})) are requested when the 'Show and Add Contacts'
  * button is
- * clicked to display the first contact in the contacts database and to add a dummy contact
+ * clicked to display the first contact in the contacts database and to add a placeholder contact
  * directly to it. Permissions are verified and requested through compat helpers in the support v4
  * library, in this Activity using {@link ActivityCompat}.
  * First, permissions are checked if they have already been granted through {@link
diff --git a/system/RuntimePermissions/Application/src/main/java/com/example/android/system/runtimepermissions/contacts/ContactsFragment.java b/system/RuntimePermissions/Application/src/main/java/com/example/android/system/runtimepermissions/contacts/ContactsFragment.java
index e6440f09..19675907 100644
--- a/system/RuntimePermissions/Application/src/main/java/com/example/android/system/runtimepermissions/contacts/ContactsFragment.java
+++ b/system/RuntimePermissions/Application/src/main/java/com/example/android/system/runtimepermissions/contacts/ContactsFragment.java
@@ -40,7 +40,7 @@ import com.example.android.system.runtimepermissions.R;
 import java.util.ArrayList;
 
 /**
- * Displays the first contact stored on the device and contains an option to add a dummy contact.
+ * Displays the first contact stored on the device and contains an option to add a placeholder contact.
  * 

* This Fragment is only used to illustrate that access to the Contacts ContentProvider API has * been granted (or denied) as part of the runtime permissions model. It is not relevant for the @@ -83,7 +83,7 @@ public class ContactsFragment extends Fragment implements LoaderManager.LoaderCa mMessageText = rootView.findViewById(R.id.contact_message); - // Register a listener to add a dummy contact when a button is clicked. + // Register a listener to add a placeholder contact when a button is clicked. Button button = rootView.findViewById(R.id.contact_add); button.setOnClickListener(new View.OnClickListener() { @Override diff --git a/ui/actionbarcompat/ActionBarCompat-ListPopupMenu/Application/src/main/java/com/example/android/actionbarcompat/listpopupmenu/Cheeses.java b/ui/actionbarcompat/ActionBarCompat-ListPopupMenu/Application/src/main/java/com/example/android/actionbarcompat/listpopupmenu/Cheeses.java index 5ef11616..8830b48d 100644 --- a/ui/actionbarcompat/ActionBarCompat-ListPopupMenu/Application/src/main/java/com/example/android/actionbarcompat/listpopupmenu/Cheeses.java +++ b/ui/actionbarcompat/ActionBarCompat-ListPopupMenu/Application/src/main/java/com/example/android/actionbarcompat/listpopupmenu/Cheeses.java @@ -17,7 +17,7 @@ package com.example.android.actionbarcompat.listpopupmenu; /** - * Dummy data. + * Placeholder data. */ public class Cheeses { public static final String[] CHEESES = { diff --git a/ui/actionbarcompat/ActionBarCompat-ListPopupMenu/Application/src/main/java/com/example/android/actionbarcompat/listpopupmenu/PopupListFragment.java b/ui/actionbarcompat/ActionBarCompat-ListPopupMenu/Application/src/main/java/com/example/android/actionbarcompat/listpopupmenu/PopupListFragment.java index 754bf224..862763b5 100644 --- a/ui/actionbarcompat/ActionBarCompat-ListPopupMenu/Application/src/main/java/com/example/android/actionbarcompat/listpopupmenu/PopupListFragment.java +++ b/ui/actionbarcompat/ActionBarCompat-ListPopupMenu/Application/src/main/java/com/example/android/actionbarcompat/listpopupmenu/PopupListFragment.java @@ -38,7 +38,7 @@ public class PopupListFragment extends ListFragment implements View.OnClickListe public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); - // We want to allow modifications to the list so copy the dummy data array into an ArrayList + // We want to allow modifications to the list so copy the placeholder data array into an ArrayList ArrayList items = new ArrayList(); for (int i = 0, z = Cheeses.CHEESES.length ; i < z ; i++) { items.add(Cheeses.CHEESES[i]); diff --git a/ui/lists/CustomChoiceList/Application/src/main/java/com/example/android/customchoicelist/Cheeses.java b/ui/lists/CustomChoiceList/Application/src/main/java/com/example/android/customchoicelist/Cheeses.java index 871ae292..21b3f6bd 100644 --- a/ui/lists/CustomChoiceList/Application/src/main/java/com/example/android/customchoicelist/Cheeses.java +++ b/ui/lists/CustomChoiceList/Application/src/main/java/com/example/android/customchoicelist/Cheeses.java @@ -17,7 +17,7 @@ package com.example.android.customchoicelist; /** - * Dummy data. + * Placeholder data. */ public class Cheeses { public static final String[] CHEESES = { diff --git a/ui/views/EffectiveNavigation/app/src/main/java/com/example/android/effectivenavigation/CollectionDemoActivity.java b/ui/views/EffectiveNavigation/app/src/main/java/com/example/android/effectivenavigation/CollectionDemoActivity.java index 3f5ebdc1..38ac6b87 100644 --- a/ui/views/EffectiveNavigation/app/src/main/java/com/example/android/effectivenavigation/CollectionDemoActivity.java +++ b/ui/views/EffectiveNavigation/app/src/main/java/com/example/android/effectivenavigation/CollectionDemoActivity.java @@ -98,7 +98,7 @@ public class CollectionDemoActivity extends AppCompatActivity { } /** - * A dummy fragment representing a section of the app, but that simply displays dummy text. + * A placeholder fragment representing a section of the app, but that simply displays placeholder text. */ public static class DemoObjectFragment extends Fragment { diff --git a/ui/views/EffectiveNavigation/app/src/main/java/com/example/android/effectivenavigation/MainActivity.java b/ui/views/EffectiveNavigation/app/src/main/java/com/example/android/effectivenavigation/MainActivity.java index 5efc2371..0fce99e4 100644 --- a/ui/views/EffectiveNavigation/app/src/main/java/com/example/android/effectivenavigation/MainActivity.java +++ b/ui/views/EffectiveNavigation/app/src/main/java/com/example/android/effectivenavigation/MainActivity.java @@ -92,7 +92,7 @@ public class MainActivity extends AppCompatActivity { return new LaunchpadSectionFragment(); default: - // The other sections of the app are dummy placeholders. + // The other sections of the app are placeholder placeholders. Fragment fragment = new DummySectionFragment(); Bundle args = new Bundle(); args.putInt(DummySectionFragment.ARG_SECTION_NUMBER, i + 1); @@ -156,7 +156,7 @@ public class MainActivity extends AppCompatActivity { } /** - * A dummy fragment representing a section of the app, but that simply displays dummy text. + * A placeholder fragment representing a section of the app, but that simply displays placeholder text. */ public static class DummySectionFragment extends Fragment { diff --git a/ui/views/HorizontalPaging/Application/src/main/java/com/example/android/horizontalpaging/MainActivity.java b/ui/views/HorizontalPaging/Application/src/main/java/com/example/android/horizontalpaging/MainActivity.java index fdd4495f..3a12ba32 100644 --- a/ui/views/HorizontalPaging/Application/src/main/java/com/example/android/horizontalpaging/MainActivity.java +++ b/ui/views/HorizontalPaging/Application/src/main/java/com/example/android/horizontalpaging/MainActivity.java @@ -193,7 +193,7 @@ public class MainActivity extends FragmentActivity implements ActionBar.TabListe } /** - * A dummy fragment representing a section of the app, but that simply displays dummy text. + * A placeholder fragment representing a section of the app, but that simply displays placeholder text. * This would be replaced with your application's content. */ public static class DummySectionFragment extends Fragment { diff --git a/ui/views/SwipeRefreshLayout/SwipeRefreshLayoutBasic/Application/src/main/java/com/example/android/swiperefreshlayoutbasic/SwipeRefreshLayoutBasicFragment.java b/ui/views/SwipeRefreshLayout/SwipeRefreshLayoutBasic/Application/src/main/java/com/example/android/swiperefreshlayoutbasic/SwipeRefreshLayoutBasicFragment.java index 13b22f5c..69133588 100644 --- a/ui/views/SwipeRefreshLayout/SwipeRefreshLayoutBasic/Application/src/main/java/com/example/android/swiperefreshlayoutbasic/SwipeRefreshLayoutBasicFragment.java +++ b/ui/views/SwipeRefreshLayout/SwipeRefreshLayoutBasic/Application/src/main/java/com/example/android/swiperefreshlayoutbasic/SwipeRefreshLayoutBasicFragment.java @@ -203,7 +203,7 @@ public class SwipeRefreshLayoutBasicFragment extends Fragment { // END_INCLUDE (refresh_complete) /** - * Dummy {@link AsyncTask} which simulates a long running task to fetch new cheeses. + * Placeholder {@link AsyncTask} which simulates a long running task to fetch new cheeses. */ private class DummyBackgroundTask extends AsyncTask> { diff --git a/ui/views/SwipeRefreshLayout/SwipeRefreshListFragment/Application/src/main/java/com/example/android/swiperefreshlistfragment/SwipeRefreshListFragmentFragment.java b/ui/views/SwipeRefreshLayout/SwipeRefreshListFragment/Application/src/main/java/com/example/android/swiperefreshlistfragment/SwipeRefreshListFragmentFragment.java index 1147ea81..900ed663 100644 --- a/ui/views/SwipeRefreshLayout/SwipeRefreshListFragment/Application/src/main/java/com/example/android/swiperefreshlistfragment/SwipeRefreshListFragmentFragment.java +++ b/ui/views/SwipeRefreshLayout/SwipeRefreshListFragment/Application/src/main/java/com/example/android/swiperefreshlistfragment/SwipeRefreshListFragmentFragment.java @@ -200,7 +200,7 @@ public class SwipeRefreshListFragmentFragment extends SwipeRefreshListFragment { // END_INCLUDE (refresh_complete) /** - * Dummy {@link AsyncTask} which simulates a long running task to fetch new cheeses. + * Placeholder {@link AsyncTask} which simulates a long running task to fetch new cheeses. */ private class DummyBackgroundTask extends AsyncTask> { diff --git a/ui/views/SwipeRefreshLayout/SwipeRefreshMultipleViews/Application/src/main/java/com/example/android/swiperefreshmultipleviews/SwipeRefreshMultipleViewsFragment.java b/ui/views/SwipeRefreshLayout/SwipeRefreshMultipleViews/Application/src/main/java/com/example/android/swiperefreshmultipleviews/SwipeRefreshMultipleViewsFragment.java index 7bb29c84..d470d376 100644 --- a/ui/views/SwipeRefreshLayout/SwipeRefreshMultipleViews/Application/src/main/java/com/example/android/swiperefreshmultipleviews/SwipeRefreshMultipleViewsFragment.java +++ b/ui/views/SwipeRefreshLayout/SwipeRefreshMultipleViews/Application/src/main/java/com/example/android/swiperefreshmultipleviews/SwipeRefreshMultipleViewsFragment.java @@ -220,7 +220,7 @@ public class SwipeRefreshMultipleViewsFragment extends Fragment { // END_INCLUDE (refresh_complete) /** - * Dummy {@link AsyncTask} which simulates a long running task to fetch new cheeses. + * Placeholder {@link AsyncTask} which simulates a long running task to fetch new cheeses. */ private class DummyBackgroundTask extends AsyncTask> { diff --git a/wearable/wear/JumpingJack/Wearable/src/main/java/com/example/android/wearable/jumpingjack/MainActivity.java b/wearable/wear/JumpingJack/Wearable/src/main/java/com/example/android/wearable/jumpingjack/MainActivity.java index f344cfee..ca6f3f05 100644 --- a/wearable/wear/JumpingJack/Wearable/src/main/java/com/example/android/wearable/jumpingjack/MainActivity.java +++ b/wearable/wear/JumpingJack/Wearable/src/main/java/com/example/android/wearable/jumpingjack/MainActivity.java @@ -52,7 +52,7 @@ public class MainActivity extends FragmentActivity private static final long TIME_THRESHOLD_NS = TimeUnit.SECONDS.toNanos(2); /** - * Earth gravity is around 9.8 m/s^2 but user may not completely direct his/her hand vertical + * Earth gravity is around 9.8 m/s^2 but user may not completely direct their hand vertical * during the exercise so we leave some room. Basically, if the x-component of gravity, as * measured by the Gravity sensor, changes with a variation delta > 0.03 from the hand down * and hand up threshold we define below, we consider that a successful count. diff --git a/wearable/wear/SpeedTracker/Application/src/main/java/com/example/android/wearable/speedtracker/PhoneMainActivity.java b/wearable/wear/SpeedTracker/Application/src/main/java/com/example/android/wearable/speedtracker/PhoneMainActivity.java index 4f9ea723..db86fb3b 100644 --- a/wearable/wear/SpeedTracker/Application/src/main/java/com/example/android/wearable/speedtracker/PhoneMainActivity.java +++ b/wearable/wear/SpeedTracker/Application/src/main/java/com/example/android/wearable/speedtracker/PhoneMainActivity.java @@ -42,7 +42,7 @@ import java.util.List; /** * The main activity for the handset application. When a watch device reconnects to the handset - * app, the collected GPS data on the watch, if any, is synced up and user can see his/her track on + * app, the collected GPS data on the watch, if any, is synced up and user can see their track on * a map. This data is then saved into an internal database and the corresponding data items are * deleted. */ diff --git a/wearable/wear/WearSpeakerSample/wear/src/main/java/com/example/android/wearable/speaker/MainActivity.java b/wearable/wear/WearSpeakerSample/wear/src/main/java/com/example/android/wearable/speaker/MainActivity.java index defe9d16..44ccc536 100644 --- a/wearable/wear/WearSpeakerSample/wear/src/main/java/com/example/android/wearable/speaker/MainActivity.java +++ b/wearable/wear/WearSpeakerSample/wear/src/main/java/com/example/android/wearable/speaker/MainActivity.java @@ -223,7 +223,7 @@ public class MainActivity extends FragmentActivity implements start(); } else { // Permission has been denied before. At this point we should show a dialog to - // user and explain why this permission is needed and direct him to go to the + // user and explain why this permission is needed and direct them to go to the // Permissions settings for the app in the System settings. For this sample, we // simply exit to get to the important part. Toast.makeText(this, R.string.exiting_for_permissions, Toast.LENGTH_LONG).show(); diff --git a/wearable/wear/XYZTouristAttractions/Wearable/src/main/java/com/example/android/xyztouristattractions/service/UtilityService.java b/wearable/wear/XYZTouristAttractions/Wearable/src/main/java/com/example/android/xyztouristattractions/service/UtilityService.java index 8a4fea56..1a30dd5e 100644 --- a/wearable/wear/XYZTouristAttractions/Wearable/src/main/java/com/example/android/xyztouristattractions/service/UtilityService.java +++ b/wearable/wear/XYZTouristAttractions/Wearable/src/main/java/com/example/android/xyztouristattractions/service/UtilityService.java @@ -67,7 +67,7 @@ public class UtilityService extends IntentService { } /** - * Trigger a message that asks the master device to start an activity. + * Trigger a message that asks the manager device to start an activity. * * @param context the context * @param path the path that will be sent via the wearable message API -- cgit v1.2.3 From 99d9b4349457c062eae2dc37cc337a10a4be0311 Mon Sep 17 00:00:00 2001 From: Joanne Chung Date: Fri, 14 Aug 2020 20:25:03 +0800 Subject: Update language to comply with Android's inclusive language guidance See https://source.android.com/setup/contribute/respectful-code for reference Bug: 162536543 Test: ./gradlew :afservice:build Test: install success and see the changed text Change-Id: I43ef643266e6fffa5ce92fe386154f81d924f0fa --- .../android/autofill/service/AuthActivity.java | 22 +++++++++++----------- .../autofill/service/settings/MyPreferences.java | 16 ++++++++-------- .../service/settings/SettingsActivity.java | 22 +++++++++++----------- .../layout/multidataset_service_auth_activity.xml | 14 +++++++------- ...aset_service_settings_authentication_dialog.xml | 2 +- .../afservice/src/main/res/values/strings.xml | 2 +- 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"> + app:layout_constraintTop_toBottomOf="@+id/main_login_header" /> + app:layout_constraintTop_toBottomOf="@+id/main_password" /> Enter new password Change credentials Number of Datasets - Autofill Master Login + Autofill Main Login Password Cancel Login -- cgit v1.2.3 From 5ca16ab21f113b0c64cf330ff14757b909c3f9e4 Mon Sep 17 00:00:00 2001 From: Joanne Chung Date: Mon, 17 Aug 2020 14:49:46 +0800 Subject: Update language to comply with Android's inclusive language guidance See https://source.android.com/setup/contribute/respectful-code for reference Bug: 162536543 Test: ./gradlew :Application:build Test: install success and see the changed text Change-Id: Ia04bd65ed9c7ac2116f0ff898fc57b9d9ecc3745 --- .../app/StandardAutoCompleteSignInActivity.kt | 2 +- .../autofillframework/app/StandardSignInActivity.kt | 2 +- .../autofillframework/app/VirtualSignInActivity.kt | 2 +- .../multidatasetservice/AuthActivity.kt | 6 +++--- .../multidatasetservice/settings/MyPreferences.kt | 18 +++++++++--------- .../multidatasetservice/settings/SettingsActivity.kt | 10 +++++----- .../res/layout/multidataset_service_auth_activity.xml | 14 +++++++------- ...idataset_service_settings_authentication_dialog.xml | 2 +- .../Application/src/main/res/values/strings.xml | 2 +- input/autofill/AutofillFramework/template-params.xml | 2 +- 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(R.id.master_password_field) + .findViewById(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(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.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"> + app:layout_constraintTop_toBottomOf="@+id/main_login_header" /> + app:layout_constraintTop_toBottomOf="@+id/main_password" /> Login To Body - Autofill Master Login + Autofill Main Login Submit Credit Card Expiration Month Credit Card Expiration Year 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 -- cgit v1.2.3 From 22e148622be7a8e03c5035af4730e66700290008 Mon Sep 17 00:00:00 2001 From: Bob Badour Date: Tue, 20 Apr 2021 13:59:16 -0700 Subject: [LSC] Add LOCAL_LICENSE_KINDS to developers/samples/android Added SPDX-license-identifier-Apache-2.0 to: security/FingerprintDialog/Application/src/main/Android.mk Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: I4ce8436201b26f13f926804ea91a0fed1d687893 --- security/FingerprintDialog/Application/src/main/Android.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/security/FingerprintDialog/Application/src/main/Android.mk b/security/FingerprintDialog/Application/src/main/Android.mk index 54ec850e..796e182f 100644 --- a/security/FingerprintDialog/Application/src/main/Android.mk +++ b/security/FingerprintDialog/Application/src/main/Android.mk @@ -22,6 +22,8 @@ LOCAL_STATIC_ANDROID_LIBRARIES := \ LOCAL_MODULE_TAGS := samples LOCAL_SRC_FILES := $(call all-subdir-java-files) LOCAL_PACKAGE_NAME := FingerprintDialog +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 +LOCAL_LICENSE_CONDITIONS := notice LOCAL_SDK_VERSION := current LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res \ prebuilts/sdk/current/support/v7/appcompat/res -- cgit v1.2.3 From b7101833296fdab1ecd4247c3dd1abbfc1d61368 Mon Sep 17 00:00:00 2001 From: Yuntao Xu Date: Wed, 28 Apr 2021 14:31:11 -0700 Subject: Convert src/main/Android.mk to Android.bp Convert the Make file to a Soong one Bug: 186677673 Test: compared the two apk files built by Make and Soong Test: TreeHugger Change-Id: I90506bd1d462f56b588907bbb8f8974a78e06229 --- .../Application/src/main/Android.bp | 37 ++++++++++++++++++++++ .../Application/src/main/Android.mk | 33 ------------------- 2 files changed, 37 insertions(+), 33 deletions(-) create mode 100644 security/FingerprintDialog/Application/src/main/Android.bp delete mode 100644 security/FingerprintDialog/Application/src/main/Android.mk diff --git a/security/FingerprintDialog/Application/src/main/Android.bp b/security/FingerprintDialog/Application/src/main/Android.bp new file mode 100644 index 00000000..8fd208f0 --- /dev/null +++ b/security/FingerprintDialog/Application/src/main/Android.bp @@ -0,0 +1,37 @@ +// Copyright (C) 2016 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package { + // See: http://go/android-license-faq + default_applicable_licenses: ["Android-Apache-2.0"], +} + +android_app { + name: "FingerprintDialog", + static_libs: [ + "androidx.appcompat_appcompat", + "androidx.legacy_legacy-support-v4", + "androidx.annotation_annotation", + ], + srcs: ["**/*.java"], + sdk_version: "current", + resource_dirs: [ + "res", + ], + aaptflags: [ + "--auto-add-overlay", + "--extra-packages", + "android.support.v7.appcompat", + ], +} diff --git a/security/FingerprintDialog/Application/src/main/Android.mk b/security/FingerprintDialog/Application/src/main/Android.mk deleted file mode 100644 index 796e182f..00000000 --- a/security/FingerprintDialog/Application/src/main/Android.mk +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2016 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) -LOCAL_USE_AAPT2 := true -LOCAL_STATIC_ANDROID_LIBRARIES := \ - androidx.appcompat_appcompat \ - androidx.legacy_legacy-support-v4 \ - androidx.annotation_annotation -LOCAL_MODULE_TAGS := samples -LOCAL_SRC_FILES := $(call all-subdir-java-files) -LOCAL_PACKAGE_NAME := FingerprintDialog -LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 -LOCAL_LICENSE_CONDITIONS := notice -LOCAL_SDK_VERSION := current -LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res \ - prebuilts/sdk/current/support/v7/appcompat/res -LOCAL_AAPT_FLAGS := --auto-add-overlay \ - --extra-packages android.support.v7.appcompat - -include $(BUILD_PACKAGE) -- cgit v1.2.3 From 9a342bde5ebf5c4367346093e6c181e1749c196e Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 10 Aug 2021 13:53:00 -0700 Subject: Add android:exported tag These are now required to be explicitly specified for apps targetting API 31. Bug: 195988762 Test: make Change-Id: Icf7492e392cf20986990be2752e6357d4cdb352c --- security/FingerprintDialog/Application/src/main/AndroidManifest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/security/FingerprintDialog/Application/src/main/AndroidManifest.xml b/security/FingerprintDialog/Application/src/main/AndroidManifest.xml index 218c190e..08f39557 100644 --- a/security/FingerprintDialog/Application/src/main/AndroidManifest.xml +++ b/security/FingerprintDialog/Application/src/main/AndroidManifest.xml @@ -32,7 +32,8 @@ + android:theme="@style/Theme.AppCompat.Light.NoActionBar" + android:exported="true"> -- cgit v1.2.3 From c61b39439e71cf76c5382ab44eee0d3120630bcd Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 10 Aug 2021 13:53:00 -0700 Subject: Add android:exported tag These are now required to be explicitly specified for apps targetting API 31. Bug: 195988762 Test: make Change-Id: Icf7492e392cf20986990be2752e6357d4cdb352c Merged-In: Icf7492e392cf20986990be2752e6357d4cdb352c (cherry picked from commit 9a342bde5ebf5c4367346093e6c181e1749c196e) --- security/FingerprintDialog/Application/src/main/AndroidManifest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/security/FingerprintDialog/Application/src/main/AndroidManifest.xml b/security/FingerprintDialog/Application/src/main/AndroidManifest.xml index 218c190e..08f39557 100644 --- a/security/FingerprintDialog/Application/src/main/AndroidManifest.xml +++ b/security/FingerprintDialog/Application/src/main/AndroidManifest.xml @@ -32,7 +32,8 @@ + android:theme="@style/Theme.AppCompat.Light.NoActionBar" + android:exported="true"> -- cgit v1.2.3 From 2fe8554eae50f4473c46d3c312c82b39b524008d Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 10 Aug 2021 13:53:00 -0700 Subject: Add android:exported tag These are now required to be explicitly specified for apps targetting API 31. Bug: 195988762 Test: make Change-Id: Icf7492e392cf20986990be2752e6357d4cdb352c Merged-In: Icf7492e392cf20986990be2752e6357d4cdb352c (cherry picked from commit 9a342bde5ebf5c4367346093e6c181e1749c196e) --- security/FingerprintDialog/Application/src/main/AndroidManifest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/security/FingerprintDialog/Application/src/main/AndroidManifest.xml b/security/FingerprintDialog/Application/src/main/AndroidManifest.xml index 218c190e..08f39557 100644 --- a/security/FingerprintDialog/Application/src/main/AndroidManifest.xml +++ b/security/FingerprintDialog/Application/src/main/AndroidManifest.xml @@ -32,7 +32,8 @@ + android:theme="@style/Theme.AppCompat.Light.NoActionBar" + android:exported="true"> -- cgit v1.2.3