aboutsummaryrefslogtreecommitdiff
path: root/input/autofill
diff options
context:
space:
mode:
authorDouglas Sigelbaum <sigelbaum@google.com>2017-10-31 10:09:36 -0700
committerDouglas Sigelbaum <sigelbaum@google.com>2017-11-02 18:14:54 -0700
commit4487887e43586eb0b99340b46bad9971b829c91e (patch)
tree3e10a75696790e00bbe39c6a7216d1eaae38f41c /input/autofill
parent73b47dfd77402959722965fe2813de5016294f0a (diff)
downloadandroid-4487887e43586eb0b99340b46bad9971b829c91e.tar.gz
Upgrade to AS 3.0 and modularize.
Note: Not finished with modularizing until readme is updated to state that you need to pick with application module to run in AS. Test: manual Bug: 68707239 Bug: 68707183 Change-Id: I1a59b8de10f48eee7b45fe6d52ba9c2435febb95
Diffstat (limited to 'input/autofill')
-rw-r--r--input/autofill/AutofillFramework/Application/build.gradle31
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/AndroidManifest.xml63
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CommonUtil.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/CommonUtil.java)2
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardActivity.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardActivity.java)3
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardAntiPatternActivity.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardAntiPatternActivity.java)4
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardCompoundViewActivity.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardCompoundViewActivity.java)4
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardDatePickerActivity.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardDatePickerActivity.java)6
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardExpirationDateCompoundView.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardExpirationDateCompoundView.java)6
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardExpirationDatePickerView.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardExpirationDatePickerView.java)8
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardSpinnersActivity.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardSpinnersActivity.java)4
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CustomVirtualView.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CustomVirtualView.java)6
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/EmailComposeActivity.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/EmailComposeActivity.java)4
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/InfoButton.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/InfoButton.java)4
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/MainActivity.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/MainActivity.java)6
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/MultiplePartitionsActivity.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/MultiplePartitionsActivity.java)5
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/NavigationItem.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/NavigationItem.java)4
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/ScrollableCustomVirtualView.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/ScrollableCustomVirtualView.java)2
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/StandardAutoCompleteSignInActivity.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/StandardAutoCompleteSignInActivity.java)6
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/StandardSignInActivity.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/StandardSignInActivity.java)4
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/VirtualSignInActivity.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/VirtualSignInActivity.java)4
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/WebViewSignInActivity.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/WebViewSignInActivity.java)8
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/WelcomeActivity.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/WelcomeActivity.java)4
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/res/layout/activity_main.xml22
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_activity.xml2
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_anti_pattern_activity.xml2
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_compound_view_activity.xml4
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_date_picker_activity.xml4
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_spinners_activity.xml2
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/res/layout/email_compose_activity.xml2
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/res/layout/login_activity.xml2
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/res/layout/login_with_autocomplete_activity.xml2
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/res/layout/multiple_partitions_activity.xml4
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/res/layout/navigation_item.xml2
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/res/layout/virtual_login_activity.xml4
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/res/values/strings.xml39
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/res/values/styles.xml27
-rw-r--r--input/autofill/AutofillFramework/afservice/.gitignore1
-rw-r--r--input/autofill/AutofillFramework/afservice/build.gradle35
-rw-r--r--input/autofill/AutofillFramework/afservice/proguard-rules.pro21
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/AndroidManifest.xml41
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AuthActivity.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AuthActivity.java)15
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AutofillFieldMetadata.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AutofillFieldMetadata.java)9
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AutofillFieldMetadataCollection.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AutofillFieldMetadataCollection.java)2
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AutofillHelper.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AutofillHelper.java)7
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AutofillHintProperties.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AutofillHintProperties.java)4
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AutofillHints.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AutofillHints.java)10
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/CommonUtil.java154
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/FakeFieldGenerator.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/FakeFieldGenerator.java)4
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/MyAutofillService.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/MyAutofillService.java)19
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/SecurityHelper.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/SecurityHelper.java)8
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/StructureParser.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/StructureParser.java)13
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/W3cHints.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/W3cHints.java)2
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/datasource/AutofillDataSource.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/datasource/AutofillDataSource.java)4
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/datasource/DigitalAssetLinksDataSource.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/datasource/DigitalAssetLinksDataSource.java)2
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/datasource/PackageVerificationDataSource.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/datasource/PackageVerificationDataSource.java)2
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/datasource/SharedPrefsAutofillRepository.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/datasource/SharedPrefsAutofillRepository.java)8
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/datasource/SharedPrefsDigitalAssetLinksRepository.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/datasource/SharedPrefsDigitalAssetLinksRepository.java)6
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/datasource/SharedPrefsPackageVerificationRepository.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/datasource/SharedPrefsPackageVerificationRepository.java)10
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/model/FilledAutofillField.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/model/FilledAutofillField.java)12
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/model/FilledAutofillFieldCollection.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/model/FilledAutofillFieldCollection.java)14
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/settings/MyPreferences.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/settings/MyPreferences.java)2
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/settings/SettingsActivity.java (renamed from input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/settings/SettingsActivity.java)26
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/res/drawable-v24/ic_add_black_24dp.xml (renamed from input/autofill/AutofillFramework/Application/src/main/res/drawable/ic_add_black_24dp.xml)0
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/res/drawable-v24/ic_delete_forever_black_24dp.xml (renamed from input/autofill/AutofillFramework/Application/src/main/res/drawable/ic_delete_forever_black_24dp.xml)0
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/res/drawable-v24/ic_lock_black_24dp.xml (renamed from input/autofill/AutofillFramework/Application/src/main/res/drawable/ic_lock_black_24dp.xml)0
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/res/drawable-v24/ic_person_black_24dp.xml20
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_auth_activity.xml (renamed from input/autofill/AutofillFramework/Application/src/main/res/layout/multidataset_service_auth_activity.xml)8
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_list_item.xml (renamed from input/autofill/AutofillFramework/Application/src/main/res/layout/multidataset_service_list_item.xml)0
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_settings_activity.xml (renamed from input/autofill/AutofillFramework/Application/src/main/res/layout/multidataset_service_settings_activity.xml)0
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_settings_add_data_dialog.xml (renamed from input/autofill/AutofillFramework/Application/src/main/res/layout/multidataset_service_settings_add_data_dialog.xml)0
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_settings_authentication_dialog.xml (renamed from input/autofill/AutofillFramework/Application/src/main/res/layout/multidataset_service_settings_authentication_dialog.xml)0
-rwxr-xr-xinput/autofill/AutofillFramework/afservice/src/main/res/mipmap-hdpi/ic_launcher.pngbin0 -> 3323 bytes
-rwxr-xr-xinput/autofill/AutofillFramework/afservice/src/main/res/mipmap-mdpi/ic_launcher.pngbin0 -> 2036 bytes
-rwxr-xr-xinput/autofill/AutofillFramework/afservice/src/main/res/mipmap-xhdpi/ic_launcher.pngbin0 -> 4201 bytes
-rwxr-xr-xinput/autofill/AutofillFramework/afservice/src/main/res/mipmap-xxhdpi/ic_launcher.pngbin0 -> 6861 bytes
-rwxr-xr-xinput/autofill/AutofillFramework/afservice/src/main/res/mipmap-xxxhdpi/ic_launcher.pngbin0 -> 9672 bytes
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/res/values/colors.xml6
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/res/values/dimens.xml10
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/res/values/strings.xml78
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/res/values/styles.xml36
-rw-r--r--input/autofill/AutofillFramework/afservice/src/main/res/xml/multidataset_service.xml (renamed from input/autofill/AutofillFramework/Application/src/main/res/xml/multidataset_service.xml)2
-rw-r--r--input/autofill/AutofillFramework/build.gradle27
-rw-r--r--input/autofill/AutofillFramework/gradle/wrapper/gradle-wrapper.properties4
-rw-r--r--input/autofill/AutofillFramework/settings.gradle1
-rw-r--r--input/autofill/AutofillFramework/template-params.xml2
85 files changed, 601 insertions, 330 deletions
diff --git a/input/autofill/AutofillFramework/Application/build.gradle b/input/autofill/AutofillFramework/Application/build.gradle
index 1dc66ebb..04778235 100644
--- a/input/autofill/AutofillFramework/Application/build.gradle
+++ b/input/autofill/AutofillFramework/Application/build.gradle
@@ -1,16 +1,5 @@
apply plugin: 'com.android.application'
-dependencies {
- compile "com.android.support:support-v4:26.0.1"
- compile "com.android.support:support-v13:26.0.1"
- compile "com.android.support:cardview-v7:26.0.1"
- compile "com.android.support:appcompat-v7:26.0.1"
- compile 'com.android.support:design:26.0.1'
- compile 'com.android.support.constraint:constraint-layout:1.0.2'
- compile group: 'com.google.code.gson', name: 'gson', version: '2.8.1'
- compile group: 'com.google.guava', name: 'guava', version: '22.0-android'
-}
-
// The sample build uses multiple directories to
// keep boilerplate and common code separate from
// the main sample code.
@@ -19,14 +8,11 @@ List<String> dirs = [
android {
compileSdkVersion 26
- buildToolsVersion "26.0.1"
+ buildToolsVersion '26.0.2'
defaultConfig {
minSdkVersion 26
targetSdkVersion 26
- jackOptions {
- enabled true
- }
}
compileOptions {
@@ -44,4 +30,19 @@ android {
androidTest.setRoot('tests')
androidTest.java.srcDirs = ['tests/src']
}
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+}
+
+dependencies {
+ implementation "com.android.support:support-v4:26.1.0"
+ implementation "com.android.support:support-v13:26.1.0"
+ implementation "com.android.support:cardview-v7:26.1.0"
+ implementation "com.android.support:appcompat-v7:26.1.0"
+ implementation 'com.android.support:design:26.1.0'
+ implementation 'com.android.support.constraint:constraint-layout:1.0.2'
+ implementation group: 'com.google.guava', name: 'guava', version: '22.0-android'
}
diff --git a/input/autofill/AutofillFramework/Application/src/main/AndroidManifest.xml b/input/autofill/AutofillFramework/Application/src/main/AndroidManifest.xml
index 7d075ab9..4f4a3568 100644
--- a/input/autofill/AutofillFramework/Application/src/main/AndroidManifest.xml
+++ b/input/autofill/AutofillFramework/Application/src/main/AndroidManifest.xml
@@ -14,7 +14,7 @@
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.example.android.autofillframework"
+ package="com.example.android.autofill.app"
android:versionCode="1"
android:versionName="1.0">
@@ -27,7 +27,7 @@
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.Light">
<activity
- android:name=".app.MainActivity"
+ android:name="com.example.android.autofill.app.MainActivity"
android:taskAffinity=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -36,75 +36,40 @@
</intent-filter>
</activity>
<activity
- android:name=".app.StandardSignInActivity"
+ android:name="com.example.android.autofill.app.StandardSignInActivity"
android:taskAffinity=".StandardSignInActivity" />
<activity
- android:name=".app.StandardAutoCompleteSignInActivity"
+ android:name="com.example.android.autofill.app.StandardAutoCompleteSignInActivity"
android:taskAffinity=".StandardAutoCompleteSignInActivity" />
<activity
- android:name=".app.VirtualSignInActivity"
+ android:name="com.example.android.autofill.app.VirtualSignInActivity"
android:taskAffinity=".VirtualSignInActivity" />
- <activity android:name=".app.WelcomeActivity" />
+ <activity android:name="com.example.android.autofill.app.WelcomeActivity" />
<activity
- android:name=".app.CreditCardActivity"
+ android:name="com.example.android.autofill.app.CreditCardActivity"
android:taskAffinity=".CreditCardActivity" />
<activity
- android:name=".app.CreditCardSpinnersActivity"
+ android:name="com.example.android.autofill.app.CreditCardSpinnersActivity"
android:taskAffinity=".CreditCardSpinnersActivity" />
<activity
- android:name=".app.EmailComposeActivity"
+ android:name="com.example.android.autofill.app.EmailComposeActivity"
android:taskAffinity=".EmailComposeActivity" />
<activity
- android:name=".app.CreditCardCompoundViewActivity"
+ android:name="com.example.android.autofill.app.CreditCardCompoundViewActivity"
android:taskAffinity=".CreditCardCompoundViewActivity" />
<activity
- android:name=".app.CreditCardDatePickerActivity"
+ android:name="com.example.android.autofill.app.CreditCardDatePickerActivity"
android:taskAffinity=".CreditCardDatePickerActivity" />
<activity
- android:name=".app.CreditCardAntiPatternActivity"
+ android:name="com.example.android.autofill.app.CreditCardAntiPatternActivity"
android:taskAffinity=".CreditCardAntiPatternActivity" />
<activity
- android:name=".app.MultiplePartitionsActivity"
+ android:name="com.example.android.autofill.app.MultiplePartitionsActivity"
android:taskAffinity=".MultiplePartitionsActivity"
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
<activity
- android:name=".app.WebViewSignInActivity"
+ android:name="com.example.android.autofill.app.WebViewSignInActivity"
android:taskAffinity=".WebViewSignInActivity" />
- <!--
- Including launcher icon for Autofill Settings to convenience.
- Not necessary for a real service.
- -->
- <activity
- android:name=".multidatasetservice.settings.SettingsActivity"
- android:exported="true"
- android:label="@string/settings_name"
- android:taskAffinity=".SettingsActivity">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
-
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
-
- <!--
- Declare AutofillService implementation; only needed for a small number of apps that will
- be implementing an AutofillService. Framework parses meta-data and sets the service's
- Settings Activity based on what the meta-data resource points to.
- -->
- <service
- android:name=".multidatasetservice.MyAutofillService"
- android:label="Multi-Dataset Autofill Service"
- android:permission="android.permission.BIND_AUTOFILL_SERVICE">
- <meta-data
- android:name="android.autofill"
- android:resource="@xml/multidataset_service" />
-
- <intent-filter>
- <action android:name="android.service.autofill.AutofillService" />
- </intent-filter>
- </service>
-
- <activity android:name=".multidatasetservice.AuthActivity" />
</application>
</manifest>
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/CommonUtil.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CommonUtil.java
index b7de476d..d68a3712 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/CommonUtil.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CommonUtil.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework;
+package com.example.android.autofill.app;
import android.app.assist.AssistStructure;
import android.app.assist.AssistStructure.ViewNode;
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardActivity.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardActivity.java
index 83e8614a..8322eb55 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardActivity.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.app;
+package com.example.android.autofill.app;
import android.content.Context;
import android.content.Intent;
@@ -24,7 +24,6 @@ import android.view.View;
import android.view.autofill.AutofillManager;
import android.widget.EditText;
-import com.example.android.autofillframework.R;
public class CreditCardActivity extends AppCompatActivity {
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardAntiPatternActivity.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardAntiPatternActivity.java
index a7c14290..a1cb5999 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardAntiPatternActivity.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardAntiPatternActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.app;
+package com.example.android.autofill.app;
import android.content.Context;
import android.content.Intent;
@@ -24,8 +24,6 @@ import android.view.View;
import android.view.autofill.AutofillManager;
import android.widget.EditText;
-import com.example.android.autofillframework.R;
-
public class CreditCardAntiPatternActivity extends AppCompatActivity {
private EditText mCcExpDateView;
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardCompoundViewActivity.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardCompoundViewActivity.java
index 05f57d03..7a936b91 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardCompoundViewActivity.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardCompoundViewActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.app;
+package com.example.android.autofill.app;
import android.content.Context;
import android.content.Intent;
@@ -24,8 +24,6 @@ import android.view.View;
import android.view.autofill.AutofillManager;
import android.widget.EditText;
-import com.example.android.autofillframework.R;
-
public class CreditCardCompoundViewActivity extends AppCompatActivity {
private CreditCardExpirationDateCompoundView mCcExpDateView;
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardDatePickerActivity.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardDatePickerActivity.java
index 940f5e48..6b575f8a 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardDatePickerActivity.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardDatePickerActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.app;
+package com.example.android.autofill.app;
import android.content.Context;
import android.content.Intent;
@@ -25,9 +25,7 @@ import android.view.View;
import android.view.autofill.AutofillManager;
import android.widget.EditText;
-import com.example.android.autofillframework.R;
-
-import static com.example.android.autofillframework.CommonUtil.TAG;
+import static com.example.android.autofill.app.CommonUtil.TAG;
public class CreditCardDatePickerActivity extends AppCompatActivity {
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardExpirationDateCompoundView.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardExpirationDateCompoundView.java
index afa105e0..151815ca 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardExpirationDateCompoundView.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardExpirationDateCompoundView.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.app;
+package com.example.android.autofill.app;
import android.content.Context;
import android.support.annotation.NonNull;
@@ -29,11 +29,9 @@ import android.widget.ArrayAdapter;
import android.widget.FrameLayout;
import android.widget.Spinner;
-import com.example.android.autofillframework.R;
-
import java.util.Calendar;
-import static com.example.android.autofillframework.CommonUtil.TAG;
+import static com.example.android.autofill.app.CommonUtil.TAG;
/**
* A custom view that represents a {@link View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE} using
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardExpirationDatePickerView.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardExpirationDatePickerView.java
index e8385fbc..215c4b4b 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardExpirationDatePickerView.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardExpirationDatePickerView.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.app;
+package com.example.android.autofill.app;
import android.app.DatePickerDialog;
import android.app.Dialog;
@@ -32,13 +32,11 @@ import android.view.autofill.AutofillValue;
import android.widget.DatePicker;
import android.widget.EditText;
-import com.example.android.autofillframework.R;
-
import java.util.Calendar;
import java.util.Date;
-import static com.example.android.autofillframework.CommonUtil.DEBUG;
-import static com.example.android.autofillframework.CommonUtil.TAG;
+import static com.example.android.autofill.app.CommonUtil.DEBUG;
+import static com.example.android.autofill.app.CommonUtil.TAG;
/**
* A custom view that represents a {@link View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE} using
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardSpinnersActivity.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardSpinnersActivity.java
index af1bed5b..1fff8b19 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CreditCardSpinnersActivity.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CreditCardSpinnersActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.app;
+package com.example.android.autofill.app;
import android.content.Context;
import android.content.Intent;
@@ -25,8 +25,6 @@ import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.Spinner;
-import com.example.android.autofillframework.R;
-
import java.util.Calendar;
public class CreditCardSpinnersActivity extends AppCompatActivity {
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CustomVirtualView.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CustomVirtualView.java
index f6fb3a52..15464db7 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CustomVirtualView.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/CustomVirtualView.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.app;
+package com.example.android.autofill.app;
import android.content.Context;
import android.content.res.TypedArray;
@@ -38,8 +38,6 @@ import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
-import com.example.android.autofillframework.CommonUtil;
-import com.example.android.autofillframework.R;
import com.google.common.base.Preconditions;
import java.text.DateFormat;
@@ -47,7 +45,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
-import static com.example.android.autofillframework.CommonUtil.bundleToString;
+import static com.example.android.autofill.app.CommonUtil.bundleToString;
/**
* A custom View with a virtual structure for fields supporting {@link View#getAutofillHints()}
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/EmailComposeActivity.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/EmailComposeActivity.java
index 957d7aad..bf4995fd 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/EmailComposeActivity.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/EmailComposeActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.app;
+package com.example.android.autofill.app;
import android.content.Context;
import android.content.Intent;
@@ -22,8 +22,6 @@ import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
-import com.example.android.autofillframework.R;
-
public class EmailComposeActivity extends AppCompatActivity {
public static Intent getStartActivityIntent(Context context) {
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/InfoButton.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/InfoButton.java
index d5811e11..cf88d6fb 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/InfoButton.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/InfoButton.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.app;
+package com.example.android.autofill.app;
import android.content.Context;
import android.content.res.TypedArray;
@@ -22,8 +22,6 @@ import android.support.v7.widget.AppCompatImageButton;
import android.util.AttributeSet;
import android.view.View;
-import com.example.android.autofillframework.R;
-
public class InfoButton extends AppCompatImageButton {
public InfoButton(Context context) {
this(context, null);
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/MainActivity.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/MainActivity.java
index 0e139f9f..94d339d4 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/MainActivity.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/MainActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.app;
+package com.example.android.autofill.app;
import android.content.Intent;
import android.os.Bundle;
@@ -22,8 +22,6 @@ import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
-import com.example.android.autofillframework.R;
-
/**
* This is used to launch sample activities that showcase autofill.
*/
@@ -127,7 +125,7 @@ public class MainActivity extends AppCompatActivity {
Log.i(TAG, "trampolining into " + target + " instead");
try {
Intent newIntent = new Intent(this,
- Class.forName("com.example.android.autofillframework." + target));
+ Class.forName("com.example.android.autofill.app." + target));
newIntent.putExtras(intent);
newIntent.removeExtra("target");
getApplicationContext().startActivity(newIntent);
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/MultiplePartitionsActivity.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/MultiplePartitionsActivity.java
index 319ed192..83dd3204 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/MultiplePartitionsActivity.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/MultiplePartitionsActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.app;
+package com.example.android.autofill.app;
import android.content.Context;
import android.content.Intent;
@@ -23,9 +23,6 @@ import android.view.View;
import android.view.autofill.AutofillManager;
import android.widget.Toast;
-import com.example.android.autofillframework.CommonUtil;
-import com.example.android.autofillframework.R;
-
/**
* Activity used to demonstrated safe partitioning of data.
* <p>
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/NavigationItem.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/NavigationItem.java
index baeef683..b6196446 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/NavigationItem.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/NavigationItem.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.app;
+package com.example.android.autofill.app;
import android.content.Context;
import android.content.res.TypedArray;
@@ -30,8 +30,6 @@ import android.view.View;
import android.widget.FrameLayout;
import android.widget.TextView;
-import com.example.android.autofillframework.R;
-
public class NavigationItem extends FrameLayout {
CardView mCardView;
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/ScrollableCustomVirtualView.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/ScrollableCustomVirtualView.java
index 0ce5036d..a2b081a9 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/ScrollableCustomVirtualView.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/ScrollableCustomVirtualView.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.app;
+package com.example.android.autofill.app;
import android.content.Context;
import android.support.annotation.Nullable;
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/StandardAutoCompleteSignInActivity.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/StandardAutoCompleteSignInActivity.java
index 5fbdd346..6ecb5b0b 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/StandardAutoCompleteSignInActivity.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/StandardAutoCompleteSignInActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.app;
+package com.example.android.autofill.app;
import android.content.Context;
import android.content.Intent;
@@ -27,9 +27,7 @@ import android.widget.AutoCompleteTextView;
import android.widget.TextView;
import android.widget.Toast;
-import com.example.android.autofillframework.R;
-
-import static com.example.android.autofillframework.CommonUtil.TAG;
+import static com.example.android.autofill.app.CommonUtil.TAG;
public class StandardAutoCompleteSignInActivity extends AppCompatActivity {
private AutoCompleteTextView mUsernameAutoCompleteField;
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/StandardSignInActivity.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/StandardSignInActivity.java
index 9038e3da..6664a188 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/StandardSignInActivity.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/StandardSignInActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.app;
+package com.example.android.autofill.app;
import android.content.Context;
import android.content.Intent;
@@ -23,8 +23,6 @@ import android.view.View;
import android.widget.EditText;
import android.widget.Toast;
-import com.example.android.autofillframework.R;
-
public class StandardSignInActivity extends AppCompatActivity {
private EditText mUsernameEditText;
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/VirtualSignInActivity.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/VirtualSignInActivity.java
index 30e25397..f157faf8 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/VirtualSignInActivity.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/VirtualSignInActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.app;
+package com.example.android.autofill.app;
import android.content.Context;
import android.content.Intent;
@@ -23,8 +23,6 @@ import android.view.View;
import android.view.autofill.AutofillManager;
import android.widget.Toast;
-import com.example.android.autofillframework.R;
-
/**
* Activity that uses a virtual views for Username/Password text fields.
*/
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/WebViewSignInActivity.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/WebViewSignInActivity.java
index 5eb0b50f..d7c01240 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/WebViewSignInActivity.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/WebViewSignInActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.app;
+package com.example.android.autofill.app;
import android.content.Context;
import android.content.Intent;
@@ -24,10 +24,8 @@ import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
-import com.example.android.autofillframework.R;
-
-import static com.example.android.autofillframework.CommonUtil.DEBUG;
-import static com.example.android.autofillframework.CommonUtil.TAG;
+import static com.example.android.autofill.app.CommonUtil.DEBUG;
+import static com.example.android.autofill.app.CommonUtil.TAG;
public class WebViewSignInActivity extends AppCompatActivity {
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/WelcomeActivity.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/WelcomeActivity.java
index 13eb939b..5f7b117d 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/WelcomeActivity.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/WelcomeActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.app;
+package com.example.android.autofill.app;
import android.content.Context;
import android.content.Intent;
@@ -22,8 +22,6 @@ import android.os.CountDownTimer;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;
-import com.example.android.autofillframework.R;
-
import static java.lang.Math.toIntExact;
public class WelcomeActivity extends AppCompatActivity {
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/layout/activity_main.xml b/input/autofill/AutofillFramework/Application/src/main/res/layout/activity_main.xml
index 687308ea..a1ccd0c6 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/layout/activity_main.xml
+++ b/input/autofill/AutofillFramework/Application/src/main/res/layout/activity_main.xml
@@ -28,7 +28,7 @@
android:paddingStart="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin">
- <com.example.android.autofillframework.app.NavigationItem
+ <com.example.android.autofill.app.NavigationItem
android:id="@+id/standardViewSignInButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -37,7 +37,7 @@
app:itemLogo="@drawable/ic_edittexts_logo_24dp"
app:labelText="@string/navigation_button_edittext_login_label" />
- <com.example.android.autofillframework.app.NavigationItem
+ <com.example.android.autofill.app.NavigationItem
android:id="@+id/standardLoginWithAutoCompleteButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -46,7 +46,7 @@
app:itemLogo="@drawable/ic_autocomplete_logo_24dp"
app:labelText="@string/navigation_button_autocomplete_login_label" />
- <com.example.android.autofillframework.app.NavigationItem
+ <com.example.android.autofill.app.NavigationItem
android:id="@+id/virtualViewSignInButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -55,7 +55,7 @@
app:itemLogo="@drawable/ic_custom_virtual_logo_24dp"
app:labelText="@string/navigation_button_custom_virtual_view_login_label" />
- <com.example.android.autofillframework.app.NavigationItem
+ <com.example.android.autofill.app.NavigationItem
android:id="@+id/webviewSignInButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -64,7 +64,7 @@
app:itemLogo="@drawable/ic_web_black_24dp"
app:labelText="@string/navigation_button_web_view_login_label" />
- <com.example.android.autofillframework.app.NavigationItem
+ <com.example.android.autofill.app.NavigationItem
android:id="@+id/creditCardSpinnersButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -73,7 +73,7 @@
app:itemLogo="@drawable/ic_spinners_logo_24dp"
app:labelText="@string/navigation_button_spinners_credit_card_label" />
- <com.example.android.autofillframework.app.NavigationItem
+ <com.example.android.autofill.app.NavigationItem
android:id="@+id/creditCardCompoundViewButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -82,7 +82,7 @@
app:itemLogo="@drawable/ic_view_module_black_24dp"
app:labelText="@string/navigation_button_compound_view_credit_card_label" />
- <com.example.android.autofillframework.app.NavigationItem
+ <com.example.android.autofill.app.NavigationItem
android:id="@+id/creditCardDatePickerButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -91,7 +91,7 @@
app:itemLogo="@drawable/ic_view_module_black_24dp"
app:labelText="@string/navigation_button_date_picker_credit_card_label" />
- <com.example.android.autofillframework.app.NavigationItem
+ <com.example.android.autofill.app.NavigationItem
android:id="@+id/emailComposeButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -100,7 +100,7 @@
app:itemLogo="@drawable/ic_email_black_24dp"
app:labelText="@string/navigation_button_email_compose_label" />
- <com.example.android.autofillframework.app.NavigationItem
+ <com.example.android.autofill.app.NavigationItem
android:id="@+id/multiplePartitionsButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -109,7 +109,7 @@
app:itemLogo="@drawable/ic_custom_virtual_logo_24dp"
app:labelText="@string/navigation_button_multiple_partitions_label" />
- <com.example.android.autofillframework.app.NavigationItem
+ <com.example.android.autofill.app.NavigationItem
android:id="@+id/creditCardButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -118,7 +118,7 @@
app:itemLogo="@drawable/ic_spinners_logo_24dp"
app:labelText="@string/navigation_button_credit_card_label" />
- <com.example.android.autofillframework.app.NavigationItem
+ <com.example.android.autofill.app.NavigationItem
android:id="@+id/creditCardAntiPatternButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_activity.xml b/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_activity.xml
index e2075ef3..a55fd4b5 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_activity.xml
+++ b/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_activity.xml
@@ -40,7 +40,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
- <com.example.android.autofillframework.app.InfoButton
+ <com.example.android.autofill.app.InfoButton
android:id="@+id/imageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_anti_pattern_activity.xml b/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_anti_pattern_activity.xml
index 8b9f3966..7a126e88 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_anti_pattern_activity.xml
+++ b/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_anti_pattern_activity.xml
@@ -37,7 +37,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
- <com.example.android.autofillframework.app.InfoButton
+ <com.example.android.autofill.app.InfoButton
android:id="@+id/infoButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_compound_view_activity.xml b/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_compound_view_activity.xml
index 9298704c..e2fbc837 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_compound_view_activity.xml
+++ b/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_compound_view_activity.xml
@@ -38,7 +38,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
- <com.example.android.autofillframework.app.InfoButton
+ <com.example.android.autofill.app.InfoButton
android:id="@+id/imageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -86,7 +86,7 @@
app:layout_constraintStart_toStartOf="@id/creditCardNumberLabel"
app:layout_constraintTop_toBottomOf="@+id/creditCardNumberLabel" />
- <com.example.android.autofillframework.app.CreditCardExpirationDateCompoundView
+ <com.example.android.autofill.app.CreditCardExpirationDateCompoundView
android:id="@+id/creditCardExpirationView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_date_picker_activity.xml b/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_date_picker_activity.xml
index 70e3cb50..22679de8 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_date_picker_activity.xml
+++ b/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_date_picker_activity.xml
@@ -40,7 +40,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
- <com.example.android.autofillframework.app.InfoButton
+ <com.example.android.autofill.app.InfoButton
android:id="@+id/imageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -89,7 +89,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/creditCardNumberLabel" />
- <com.example.android.autofillframework.app.CreditCardExpirationDatePickerView
+ <com.example.android.autofill.app.CreditCardExpirationDatePickerView
android:id="@+id/creditCardExpirationView"
android:layout_width="250dp"
android:layout_height="wrap_content"
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_spinners_activity.xml b/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_spinners_activity.xml
index 1034ca2c..5a9b78a5 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_spinners_activity.xml
+++ b/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_spinners_activity.xml
@@ -38,7 +38,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
- <com.example.android.autofillframework.app.InfoButton
+ <com.example.android.autofill.app.InfoButton
android:id="@+id/infoButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/layout/email_compose_activity.xml b/input/autofill/AutofillFramework/Application/src/main/res/layout/email_compose_activity.xml
index 5df3fdc9..9d65f471 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/layout/email_compose_activity.xml
+++ b/input/autofill/AutofillFramework/Application/src/main/res/layout/email_compose_activity.xml
@@ -40,7 +40,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
- <com.example.android.autofillframework.app.InfoButton
+ <com.example.android.autofill.app.InfoButton
android:id="@+id/imageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/layout/login_activity.xml b/input/autofill/AutofillFramework/Application/src/main/res/layout/login_activity.xml
index ce70e1d0..f03bc044 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/layout/login_activity.xml
+++ b/input/autofill/AutofillFramework/Application/src/main/res/layout/login_activity.xml
@@ -40,7 +40,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
- <com.example.android.autofillframework.app.InfoButton
+ <com.example.android.autofill.app.InfoButton
android:id="@+id/imageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/layout/login_with_autocomplete_activity.xml b/input/autofill/AutofillFramework/Application/src/main/res/layout/login_with_autocomplete_activity.xml
index 23375da9..1c5b92f3 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/layout/login_with_autocomplete_activity.xml
+++ b/input/autofill/AutofillFramework/Application/src/main/res/layout/login_with_autocomplete_activity.xml
@@ -39,7 +39,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
- <com.example.android.autofillframework.app.InfoButton
+ <com.example.android.autofill.app.InfoButton
android:id="@+id/imageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/layout/multiple_partitions_activity.xml b/input/autofill/AutofillFramework/Application/src/main/res/layout/multiple_partitions_activity.xml
index 9f6f151c..ff7dfcf5 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/layout/multiple_partitions_activity.xml
+++ b/input/autofill/AutofillFramework/Application/src/main/res/layout/multiple_partitions_activity.xml
@@ -37,7 +37,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
- <com.example.android.autofillframework.app.InfoButton
+ <com.example.android.autofill.app.InfoButton
android:id="@+id/imageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -49,7 +49,7 @@
app:layout_constraintStart_toEndOf="@+id/multiple_partitions_header"
app:layout_constraintTop_toTopOf="@+id/multiple_partitions_header" />
- <com.example.android.autofillframework.app.ScrollableCustomVirtualView
+ <com.example.android.autofill.app.ScrollableCustomVirtualView
android:id="@+id/custom_view"
android:layout_width="match_parent"
android:layout_height="@dimen/multiple_partitions_height"
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/layout/navigation_item.xml b/input/autofill/AutofillFramework/Application/src/main/res/layout/navigation_item.xml
index 9c7b3c78..2903c36f 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/layout/navigation_item.xml
+++ b/input/autofill/AutofillFramework/Application/src/main/res/layout/navigation_item.xml
@@ -51,7 +51,7 @@
tools:text="@string/navigation_button_edittext_login_label" />
</android.support.v7.widget.CardView>
- <com.example.android.autofillframework.app.InfoButton
+ <com.example.android.autofill.app.InfoButton
android:id="@+id/infoButton"
android:layout_width="wrap_content"
android:layout_height="0dp"
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/layout/virtual_login_activity.xml b/input/autofill/AutofillFramework/Application/src/main/res/layout/virtual_login_activity.xml
index af52fb60..c144310e 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/layout/virtual_login_activity.xml
+++ b/input/autofill/AutofillFramework/Application/src/main/res/layout/virtual_login_activity.xml
@@ -37,7 +37,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
- <com.example.android.autofillframework.app.InfoButton
+ <com.example.android.autofill.app.InfoButton
android:id="@+id/imageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -49,7 +49,7 @@
app:layout_constraintStart_toEndOf="@+id/custom_virtual_login_header"
app:layout_constraintTop_toTopOf="@+id/custom_virtual_login_header" />
- <com.example.android.autofillframework.app.CustomVirtualView
+ <com.example.android.autofill.app.CustomVirtualView
android:id="@+id/custom_view"
android:layout_width="match_parent"
android:layout_height="@dimen/custom_view_height"
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/values/strings.xml b/input/autofill/AutofillFramework/Application/src/main/res/values/strings.xml
index 01a743b5..15191d9c 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/values/strings.xml
+++ b/input/autofill/AutofillFramework/Application/src/main/res/values/strings.xml
@@ -17,7 +17,6 @@
<resources>
<string name="app_name">Autofill Sample</string>
- <string name="settings_name">Autofill Settings</string>
<string name="navigation_button_custom_virtual_view_login_label">Sample Login Using a Custom Virtual View</string>
<string name="navigation_button_credit_card_label">Sample Credit Card Check Out Using EditTexts</string>
<string name="navigation_button_spinners_credit_card_label">Sample Credit Card Check Out Using Spinners</string>
@@ -35,7 +34,6 @@
<string name="standard_view_sign_in">Sign in using standard views</string>
<string name="standard_view_autocomplete_sign_in">Sign in using standard views that
trigger AutoComplete dialogs when focused</string>
- <string name="autofill_sign_in_prompt">Tap to sign in.</string>
<string name="credit_card_number_label">CC Number</string>
<string name="credit_card_expiration_label">CC Expiration</string>
<string name="credit_card_expiration_date_label">CC Exp Date</string>
@@ -44,42 +42,16 @@
<string name="credit_card_expiration_year_label">CC Exp Year</string>
<string name="credit_card_security_code_label">CC Security Code</string>
<string name="credit_card_security_code_abbrev_label">CSC</string>
- <string name="settings_cancel">Cancel</string>
- <string name="settings_save">Save</string>
- <string name="settings_authenticate_responses">Authenticate responses</string>
- <string name="settings_authenticate_datasets">Authenticate Datasets</string>
- <string name="settings_add_data_label">Add fake Autofill data</string>
- <string name="settings_add_data_title">Add Autofill Datasets</string>
- <string name="settings_select_number_of_datasets">Select number of Datasets.</string>
- <plurals name="settings_add_data_success">
- <item quantity="one">Added %d Dataset.</item>
- <item quantity="other">Added %d Datasets.</item>
- </plurals>
- <string name="settings_clear_data_label">Clear all autofill data (including credentials)</string>
- <string name="settings_clear_data_confirmation">Are you sure you want to delete all autofill
- data from the sample service?
- </string>
- <string name="settings_clear_data_confirmation_title">Confirmation</string>
<string name="ok">OK</string>
<string name="slash">/</string>
<string name="cancel">Cancel</string>
- <string name="settings_authentication_header">Authentication</string>
- <string name="settings_data_header">Data</string>
- <string name="settings_auth_credentials_label">Update credentials</string>
- <string name="settings_auth_enter_current_password">Enter current password</string>
- <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="clear_label">Clear</string>
<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="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>
- <string name="invalid_package_signature">Invalid package signature</string>
- <string name="invalid_link_association">Could not associate web domain %1$s with app %2$s</string>
<string name="edittext_login_info">This is a sample login page that uses standard EditTexts
from the UI toolkit. EditTexts are already optimized for autofill so extra autofill-specific
code is almost never needed.
@@ -159,6 +131,12 @@
<item quantity="one">Automatically return to main page in %d second.</item>
<item quantity="other">Automatically return to main page in %d seconds.</item>
</plurals>
+
+ <string-array name="mock_autocomplete_sign_in_suggestions">
+ <item>user-1</item>
+ <item>user-2</item>
+ </string-array>
+
<string-array name="month_array">
<item>1</item>
<item>2</item>
@@ -204,9 +182,4 @@
<item>27</item>
</string-array>
- <string-array name="mock_autocomplete_sign_in_suggestions">
- <item>user-1</item>
- <item>user-2</item>
- </string-array>
-
</resources>
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/values/styles.xml b/input/autofill/AutofillFramework/Application/src/main/res/values/styles.xml
index c44f9991..39e5ba88 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/values/styles.xml
+++ b/input/autofill/AutofillFramework/Application/src/main/res/values/styles.xml
@@ -15,33 +15,6 @@
-->
<resources>
- <style name="Settings.Label" parent="">
- <item name="android:ellipsize">end</item>
- <item name="android:lines">1</item>
- <item name="android:paddingBottom">@dimen/spacing_normal</item>
- <item name="android:paddingTop">@dimen/spacing_normal</item>
- </style>
-
- <style name="Settings.Container" parent="">
- <item name="android:background">?android:selectableItemBackground</item>
- <item name="android:gravity">center_vertical</item>
- <item name="android:minHeight">?android:listPreferredItemHeightSmall</item>
- <item name="android:orientation">horizontal</item>
- <item name="android:paddingEnd">?android:listPreferredItemPaddingEnd</item>
- <item name="android:paddingStart">?android:listPreferredItemPaddingStart</item>
- </style>
-
- <style name="Settings.Switch" parent="">
- <!-- We make the parent view clickable instead for better touch feedback -->
- <item name="android:background">@null</item>
- <item name="android:clickable">false</item>
- </style>
-
- <style name="Settings.Header" parent="@style/TextAppearance.AppCompat.Large">
- <item name="android:paddingStart">?android:listPreferredItemPaddingStart</item>
- <item name="android:paddingBottom">@dimen/spacing_normal</item>
- </style>
-
<style name="CustomDatePickerDialogTheme" parent="android:Theme.Material.Light.Dialog">
<item name="android:datePickerStyle">@style/MyDatePickerStyle</item>
</style>
diff --git a/input/autofill/AutofillFramework/afservice/.gitignore b/input/autofill/AutofillFramework/afservice/.gitignore
new file mode 100644
index 00000000..796b96d1
--- /dev/null
+++ b/input/autofill/AutofillFramework/afservice/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/input/autofill/AutofillFramework/afservice/build.gradle b/input/autofill/AutofillFramework/afservice/build.gradle
new file mode 100644
index 00000000..f98116c1
--- /dev/null
+++ b/input/autofill/AutofillFramework/afservice/build.gradle
@@ -0,0 +1,35 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 26
+
+ defaultConfig {
+ minSdkVersion 26
+ targetSdkVersion 26
+ versionCode 1
+ versionName "1.0"
+
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+}
+
+dependencies {
+ implementation 'com.android.support:appcompat-v7:26.1.0'
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ implementation 'com.android.support:design:26.1.0'
+ implementation 'com.android.support.constraint:constraint-layout:1.0.2'
+ implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.1'
+ implementation group: 'com.google.guava', name: 'guava', version: '22.0-android'
+}
diff --git a/input/autofill/AutofillFramework/afservice/proguard-rules.pro b/input/autofill/AutofillFramework/afservice/proguard-rules.pro
new file mode 100644
index 00000000..f1b42451
--- /dev/null
+++ b/input/autofill/AutofillFramework/afservice/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
diff --git a/input/autofill/AutofillFramework/afservice/src/main/AndroidManifest.xml b/input/autofill/AutofillFramework/afservice/src/main/AndroidManifest.xml
new file mode 100644
index 00000000..f03a4548
--- /dev/null
+++ b/input/autofill/AutofillFramework/afservice/src/main/AndroidManifest.xml
@@ -0,0 +1,41 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.example.android.autofill.service">
+ <application
+ android:allowBackup="true"
+ android:icon="@mipmap/ic_launcher"
+ android:supportsRtl="true"
+ android:theme="@style/AppTheme" >
+ <!--
+Declare AutofillService implementation; only needed for a small number of apps that will
+be implementing an AutofillService. Framework parses meta-data and sets the service's
+Settings Activity based on what the meta-data resource points to.
+-->
+ <service
+ android:name=".MyAutofillService"
+ android:label="Multi-Dataset Autofill Service"
+ android:permission="android.permission.BIND_AUTOFILL_SERVICE">
+ <meta-data
+ android:name="android.autofill"
+ android:resource="@xml/multidataset_service" />
+
+ <intent-filter>
+ <action android:name="android.service.autofill.AutofillService" />
+ </intent-filter>
+ </service>
+
+ <activity android:name=".AuthActivity" />
+ <!-- Including launcher icon for Autofill Settings to convenience. Not necessary for a
+ real service. -->
+ <activity
+ android:name=".settings.SettingsActivity"
+ android:exported="true"
+ android:label="@string/settings_name"
+ android:taskAffinity=".SettingsActivity">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+
+ </application>
+</manifest>
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AuthActivity.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AuthActivity.java
index 631cc0a9..e995160d 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AuthActivity.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AuthActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice;
+package com.example.android.autofill.service;
import android.app.PendingIntent;
import android.app.assist.AssistStructure;
@@ -32,18 +32,17 @@ import android.view.View.OnClickListener;
import android.widget.EditText;
import android.widget.Toast;
-import com.example.android.autofillframework.R;
-import com.example.android.autofillframework.multidatasetservice.datasource.SharedPrefsAutofillRepository;
-import com.example.android.autofillframework.multidatasetservice.model.FilledAutofillFieldCollection;
-import com.example.android.autofillframework.multidatasetservice.settings.MyPreferences;
+import com.example.android.autofill.service.datasource.SharedPrefsAutofillRepository;
+import com.example.android.autofill.service.model.FilledAutofillFieldCollection;
+import com.example.android.autofill.service.settings.MyPreferences;
import java.util.HashMap;
import static android.view.autofill.AutofillManager.EXTRA_ASSIST_STRUCTURE;
import static android.view.autofill.AutofillManager.EXTRA_AUTHENTICATION_RESULT;
-import static com.example.android.autofillframework.CommonUtil.EXTRA_DATASET_NAME;
-import static com.example.android.autofillframework.CommonUtil.EXTRA_FOR_RESPONSE;
-import static com.example.android.autofillframework.CommonUtil.TAG;
+import static com.example.android.autofill.service.CommonUtil.EXTRA_DATASET_NAME;
+import static com.example.android.autofill.service.CommonUtil.EXTRA_FOR_RESPONSE;
+import static com.example.android.autofill.service.CommonUtil.TAG;
/**
* This Activity controls the UI for logging in to the Autofill service.
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AutofillFieldMetadata.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AutofillFieldMetadata.java
index 1e8427db..ab15e3f1 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AutofillFieldMetadata.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AutofillFieldMetadata.java
@@ -13,14 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice;
+package com.example.android.autofill.service;
import android.app.assist.AssistStructure.ViewNode;
import android.view.autofill.AutofillId;
-import static com.example.android.autofillframework.multidatasetservice.AutofillHints.convertToStoredHintNames;
-import static com.example.android.autofillframework.multidatasetservice.AutofillHints.filterForSupportedHints;
-
/**
* A stripped down version of a {@link ViewNode} that contains only autofill-relevant metadata. It
* also contains a {@code mSaveType} flag that is calculated based on the {@link ViewNode}]'s
@@ -39,9 +36,9 @@ public class AutofillFieldMetadata {
mAutofillType = view.getAutofillType();
mAutofillOptions = view.getAutofillOptions();
mFocused = view.isFocused();
- String[] hints = filterForSupportedHints(view.getAutofillHints());
+ String[] hints = AutofillHints.filterForSupportedHints(view.getAutofillHints());
if (hints != null) {
- convertToStoredHintNames(hints);
+ AutofillHints.convertToStoredHintNames(hints);
setHints(hints);
}
}
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AutofillFieldMetadataCollection.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AutofillFieldMetadataCollection.java
index 59b8fcd5..d343ff2f 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AutofillFieldMetadataCollection.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AutofillFieldMetadataCollection.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice;
+package com.example.android.autofill.service;
import android.view.autofill.AutofillId;
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AutofillHelper.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AutofillHelper.java
index 4c0f173e..41617246 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AutofillHelper.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AutofillHelper.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice;
+package com.example.android.autofill.service;
import android.content.Context;
import android.content.IntentSender;
@@ -25,13 +25,12 @@ import android.util.Log;
import android.view.autofill.AutofillId;
import android.widget.RemoteViews;
-import com.example.android.autofillframework.R;
-import com.example.android.autofillframework.multidatasetservice.model.FilledAutofillFieldCollection;
+import com.example.android.autofill.service.model.FilledAutofillFieldCollection;
import java.util.HashMap;
import java.util.Set;
-import static com.example.android.autofillframework.CommonUtil.TAG;
+import static com.example.android.autofill.service.CommonUtil.TAG;
/**
* This is a class containing helper methods for building Autofill Datasets and Responses.
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AutofillHintProperties.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AutofillHintProperties.java
index 5a793774..1be307c4 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AutofillHintProperties.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AutofillHintProperties.java
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice;
+package com.example.android.autofill.service;
-import com.example.android.autofillframework.multidatasetservice.model.FilledAutofillField;
+import com.example.android.autofill.service.model.FilledAutofillField;
import java.util.Arrays;
import java.util.HashSet;
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AutofillHints.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AutofillHints.java
index af42b108..7c003993 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/AutofillHints.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/AutofillHints.java
@@ -13,19 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice;
+package com.example.android.autofill.service;
import android.service.autofill.SaveInfo;
import android.util.Log;
import android.view.View;
-import com.example.android.autofillframework.multidatasetservice.model.FilledAutofillField;
-import com.example.android.autofillframework.multidatasetservice.model.FilledAutofillFieldCollection;
+import com.example.android.autofill.service.model.FilledAutofillField;
+import com.example.android.autofill.service.model.FilledAutofillFieldCollection;
import com.google.common.collect.ImmutableMap;
import java.util.Calendar;
-import static com.example.android.autofillframework.CommonUtil.TAG;
+import static com.example.android.autofill.service.CommonUtil.TAG;
public final class AutofillHints {
public static final int PARTITION_OTHER = 0;
@@ -761,7 +761,7 @@ public final class AutofillHints {
if (AutofillHints.isValidHint(hint)) {
filteredHints[i++] = hint;
} else {
- Log.d(TAG, "Invalid autofill hint: " + hint);
+ Log.w(TAG, "Invalid autofill hint: " + hint);
}
}
if (i == 0) {
diff --git a/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/CommonUtil.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/CommonUtil.java
new file mode 100644
index 00000000..f3f169ff
--- /dev/null
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/CommonUtil.java
@@ -0,0 +1,154 @@
+/*
+ * Copyright (C) 2017 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 com.example.android.autofill.service;
+
+import android.app.assist.AssistStructure;
+import android.app.assist.AssistStructure.ViewNode;
+import android.app.assist.AssistStructure.WindowNode;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+import android.view.ViewStructure.HtmlInfo;
+import android.view.autofill.AutofillValue;
+
+import java.util.Arrays;
+import java.util.Set;
+
+public final class CommonUtil {
+
+ public static final String TAG = "AutofillSample";
+ public static final boolean DEBUG = true;
+ public static final boolean VERBOSE = false;
+ public static final String EXTRA_DATASET_NAME = "dataset_name";
+ public static final String EXTRA_FOR_RESPONSE = "for_response";
+
+ private static void bundleToString(StringBuilder builder, Bundle data) {
+ final Set<String> keySet = data.keySet();
+ builder.append("[Bundle with ").append(keySet.size()).append(" keys:");
+ for (String key : keySet) {
+ builder.append(' ').append(key).append('=');
+ Object value = data.get(key);
+ if ((value instanceof Bundle)) {
+ bundleToString(builder, (Bundle) value);
+ } else {
+ builder.append((value instanceof Object[])
+ ? Arrays.toString((Object[]) value) : value);
+ }
+ }
+ builder.append(']');
+ }
+
+ public static String bundleToString(Bundle data) {
+ if (data == null) {
+ return "N/A";
+ }
+ final StringBuilder builder = new StringBuilder();
+ bundleToString(builder, data);
+ return builder.toString();
+ }
+
+ public static String getTypeAsString(int type) {
+ switch (type) {
+ case View.AUTOFILL_TYPE_TEXT:
+ return "TYPE_TEXT";
+ case View.AUTOFILL_TYPE_LIST:
+ return "TYPE_LIST";
+ case View.AUTOFILL_TYPE_NONE:
+ return "TYPE_NONE";
+ case View.AUTOFILL_TYPE_TOGGLE:
+ return "TYPE_TOGGLE";
+ case View.AUTOFILL_TYPE_DATE:
+ return "TYPE_DATE";
+ }
+ return "UNKNOWN_TYPE";
+ }
+
+ private static String getAutofillValueAndTypeAsString(AutofillValue value) {
+ if (value == null) return "null";
+
+ StringBuilder builder = new StringBuilder(value.toString()).append('(');
+ if (value.isText()) {
+ builder.append("isText");
+ } else if (value.isDate()) {
+ builder.append("isDate");
+ } else if (value.isToggle()) {
+ builder.append("isToggle");
+ } else if (value.isList()) {
+ builder.append("isList");
+ }
+ return builder.append(')').toString();
+ }
+
+ public static void dumpStructure(AssistStructure structure) {
+ int nodeCount = structure.getWindowNodeCount();
+ Log.v(TAG, "dumpStructure(): component=" + structure.getActivityComponent()
+ + " numberNodes=" + nodeCount);
+ for (int i = 0; i < nodeCount; i++) {
+ Log.v(TAG, "node #" + i);
+ WindowNode node = structure.getWindowNodeAt(i);
+ dumpNode(" ", node.getRootViewNode());
+ }
+ }
+
+ private static void dumpNode(String prefix, ViewNode node) {
+ StringBuilder builder = new StringBuilder();
+ builder.append(prefix)
+ .append("autoFillId: ").append(node.getAutofillId())
+ .append("\tidEntry: ").append(node.getIdEntry())
+ .append("\tid: ").append(node.getId())
+ .append("\tclassName: ").append(node.getClassName())
+ .append('\n');
+
+ builder.append(prefix)
+ .append("focused: ").append(node.isFocused())
+ .append("\tvisibility").append(node.getVisibility())
+ .append("\tchecked: ").append(node.isChecked())
+ .append("\twebDomain: ").append(node.getWebDomain())
+ .append("\thint: ").append(node.getHint())
+ .append('\n');
+
+ HtmlInfo htmlInfo = node.getHtmlInfo();
+
+ if (htmlInfo != null) {
+ builder.append(prefix)
+ .append("HTML TAG: ").append(htmlInfo.getTag())
+ .append(" attrs: ").append(htmlInfo.getAttributes())
+ .append('\n');
+ }
+
+ String[] afHints = node.getAutofillHints();
+ CharSequence[] options = node.getAutofillOptions();
+ builder.append(prefix).append("afType: ").append(getTypeAsString(node.getAutofillType()))
+ .append("\tafValue:")
+ .append(getAutofillValueAndTypeAsString(node.getAutofillValue()))
+ .append("\tafOptions:").append(options == null ? "N/A" : Arrays.toString(options))
+ .append("\tafHints: ").append(afHints == null ? "N/A" : Arrays.toString(afHints))
+ .append("\tinputType:").append(node.getInputType())
+ .append('\n');
+
+ int numberChildren = node.getChildCount();
+ builder.append(prefix).append("# children: ").append(numberChildren)
+ .append("\ttext: ").append(node.getText())
+ .append('\n');
+
+ Log.v(TAG, builder.toString());
+ final String prefix2 = prefix + " ";
+ for (int i = 0; i < numberChildren; i++) {
+ Log.v(TAG, prefix + "child #" + i);
+ dumpNode(prefix2, node.getChildAt(i));
+ }
+ }
+} \ No newline at end of file
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/FakeFieldGenerator.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/FakeFieldGenerator.java
index 383de216..475b9d07 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/FakeFieldGenerator.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/FakeFieldGenerator.java
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice;
+package com.example.android.autofill.service;
-import com.example.android.autofillframework.multidatasetservice.model.FilledAutofillField;
+import com.example.android.autofill.service.model.FilledAutofillField;
interface FakeFieldGenerator {
FilledAutofillField generate(int seed);
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/MyAutofillService.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/MyAutofillService.java
index ac030221..bec5ffff 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/MyAutofillService.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/MyAutofillService.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice;
+package com.example.android.autofill.service;
import android.app.assist.AssistStructure;
import android.content.IntentSender;
@@ -30,20 +30,19 @@ import android.util.Log;
import android.view.autofill.AutofillId;
import android.widget.RemoteViews;
-import com.example.android.autofillframework.R;
-import com.example.android.autofillframework.multidatasetservice.datasource.SharedPrefsAutofillRepository;
-import com.example.android.autofillframework.multidatasetservice.datasource.SharedPrefsPackageVerificationRepository;
-import com.example.android.autofillframework.multidatasetservice.model.FilledAutofillFieldCollection;
-import com.example.android.autofillframework.multidatasetservice.settings.MyPreferences;
+import com.example.android.autofill.service.datasource.SharedPrefsAutofillRepository;
+import com.example.android.autofill.service.datasource.SharedPrefsPackageVerificationRepository;
+import com.example.android.autofill.service.model.FilledAutofillFieldCollection;
+import com.example.android.autofill.service.settings.MyPreferences;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
-import static com.example.android.autofillframework.CommonUtil.TAG;
-import static com.example.android.autofillframework.CommonUtil.VERBOSE;
-import static com.example.android.autofillframework.CommonUtil.bundleToString;
-import static com.example.android.autofillframework.CommonUtil.dumpStructure;
+import static com.example.android.autofill.service.CommonUtil.TAG;
+import static com.example.android.autofill.service.CommonUtil.VERBOSE;
+import static com.example.android.autofill.service.CommonUtil.bundleToString;
+import static com.example.android.autofill.service.CommonUtil.dumpStructure;
public class MyAutofillService extends AutofillService {
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/SecurityHelper.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/SecurityHelper.java
index f18b422e..5ab23ac9 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/SecurityHelper.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/SecurityHelper.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice;
+package com.example.android.autofill.service;
import android.content.Context;
import android.content.pm.PackageInfo;
@@ -36,9 +36,9 @@ import java.security.MessageDigest;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
-import static com.example.android.autofillframework.CommonUtil.DEBUG;
-import static com.example.android.autofillframework.CommonUtil.TAG;
-import static com.example.android.autofillframework.CommonUtil.VERBOSE;
+import static com.example.android.autofill.service.CommonUtil.DEBUG;
+import static com.example.android.autofill.service.CommonUtil.TAG;
+import static com.example.android.autofill.service.CommonUtil.VERBOSE;
/**
* Helper class for security checks.
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/StructureParser.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/StructureParser.java
index 030780f9..ce020a7b 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/StructureParser.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/StructureParser.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice;
+package com.example.android.autofill.service;
import android.app.assist.AssistStructure;
import android.app.assist.AssistStructure.ViewNode;
@@ -22,13 +22,12 @@ import android.content.Context;
import android.util.Log;
import android.view.autofill.AutofillValue;
-import com.example.android.autofillframework.R;
-import com.example.android.autofillframework.multidatasetservice.datasource.SharedPrefsDigitalAssetLinksRepository;
-import com.example.android.autofillframework.multidatasetservice.model.FilledAutofillField;
-import com.example.android.autofillframework.multidatasetservice.model.FilledAutofillFieldCollection;
+import com.example.android.autofill.service.datasource.SharedPrefsDigitalAssetLinksRepository;
+import com.example.android.autofill.service.model.FilledAutofillField;
+import com.example.android.autofill.service.model.FilledAutofillFieldCollection;
-import static com.example.android.autofillframework.CommonUtil.DEBUG;
-import static com.example.android.autofillframework.CommonUtil.TAG;
+import static com.example.android.autofill.service.CommonUtil.DEBUG;
+import static com.example.android.autofill.service.CommonUtil.TAG;
/**
* Parser for an AssistStructure object. This is invoked when the Autofill Service receives an
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/W3cHints.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/W3cHints.java
index 14085544..1721477c 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/W3cHints.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/W3cHints.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice;
+package com.example.android.autofill.service;
public final class W3cHints {
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/datasource/AutofillDataSource.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/datasource/AutofillDataSource.java
index b92a7365..38e70075 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/datasource/AutofillDataSource.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/datasource/AutofillDataSource.java
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice.datasource;
+package com.example.android.autofill.service.datasource;
import android.content.Context;
-import com.example.android.autofillframework.multidatasetservice.model.FilledAutofillFieldCollection;
+import com.example.android.autofill.service.model.FilledAutofillFieldCollection;
import java.util.HashMap;
import java.util.List;
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/datasource/DigitalAssetLinksDataSource.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/datasource/DigitalAssetLinksDataSource.java
index 04624cbb..040ab501 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/datasource/DigitalAssetLinksDataSource.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/datasource/DigitalAssetLinksDataSource.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice.datasource;
+package com.example.android.autofill.service.datasource;
import android.content.Context;
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/datasource/PackageVerificationDataSource.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/datasource/PackageVerificationDataSource.java
index 129001d0..ed1d1cec 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/datasource/PackageVerificationDataSource.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/datasource/PackageVerificationDataSource.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice.datasource;
+package com.example.android.autofill.service.datasource;
import android.content.Context;
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/datasource/SharedPrefsAutofillRepository.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/datasource/SharedPrefsAutofillRepository.java
index 91a1923e..0643a3f0 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/datasource/SharedPrefsAutofillRepository.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/datasource/SharedPrefsAutofillRepository.java
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice.datasource;
+package com.example.android.autofill.service.datasource;
import android.content.Context;
import android.util.ArraySet;
-import com.example.android.autofillframework.multidatasetservice.model.FilledAutofillFieldCollection;
+import com.example.android.autofill.service.model.FilledAutofillFieldCollection;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -33,8 +33,8 @@ import java.util.Set;
* This is done here only for simplicity and learning purposes.
*/
public class SharedPrefsAutofillRepository implements AutofillDataSource {
- private static final String SHARED_PREF_KEY = "com.example.android.autofillframework"
- + ".multidatasetservice.datasource.AutofillDataSource";
+ private static final String SHARED_PREF_KEY = "com.example.android.autofill"
+ + ".service.datasource.AutofillDataSource";
private static final String CLIENT_FORM_DATA_KEY = "loginCredentialDatasets";
private static final String DATASET_NUMBER_KEY = "datasetNumber";
private static SharedPrefsAutofillRepository sInstance;
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/datasource/SharedPrefsDigitalAssetLinksRepository.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/datasource/SharedPrefsDigitalAssetLinksRepository.java
index a8124a1c..476cf4c5 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/datasource/SharedPrefsDigitalAssetLinksRepository.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/datasource/SharedPrefsDigitalAssetLinksRepository.java
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice.datasource;
+package com.example.android.autofill.service.datasource;
import android.content.Context;
import android.util.Log;
-import com.example.android.autofillframework.multidatasetservice.SecurityHelper;
+import com.example.android.autofill.service.SecurityHelper;
-import static com.example.android.autofillframework.CommonUtil.TAG;
+import static com.example.android.autofill.service.CommonUtil.TAG;
/**
* Singleton repository that caches the result of Digital Asset Links checks.
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/datasource/SharedPrefsPackageVerificationRepository.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/datasource/SharedPrefsPackageVerificationRepository.java
index aa467786..a0aaeab6 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/datasource/SharedPrefsPackageVerificationRepository.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/datasource/SharedPrefsPackageVerificationRepository.java
@@ -13,20 +13,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice.datasource;
+package com.example.android.autofill.service.datasource;
import android.content.Context;
import android.content.SharedPreferences;
import android.util.Log;
-import com.example.android.autofillframework.multidatasetservice.SecurityHelper;
+import com.example.android.autofill.service.SecurityHelper;
-import static com.example.android.autofillframework.CommonUtil.TAG;
+import static com.example.android.autofill.service.CommonUtil.TAG;
public class SharedPrefsPackageVerificationRepository implements PackageVerificationDataSource {
- private static final String SHARED_PREF_KEY = "com.example.android.autofillframework"
- + ".multidatasetservice.datasource.PackageVerificationDataSource";
+ private static final String SHARED_PREF_KEY = "com.example.android.autofill.service"
+ + ".datasource.PackageVerificationDataSource";
private static PackageVerificationDataSource sInstance;
private SharedPrefsPackageVerificationRepository() {
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/model/FilledAutofillField.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/model/FilledAutofillField.java
index dfaa1e78..0c3c8e10 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/model/FilledAutofillField.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/model/FilledAutofillField.java
@@ -13,21 +13,21 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice.model;
+package com.example.android.autofill.service.model;
import android.util.Log;
import android.view.View;
import android.view.autofill.AutofillValue;
-import com.example.android.autofillframework.multidatasetservice.AutofillHints;
+import com.example.android.autofill.service.AutofillHints;
import com.google.common.base.Preconditions;
import com.google.gson.annotations.Expose;
import java.util.Arrays;
-import static com.example.android.autofillframework.CommonUtil.TAG;
-import static com.example.android.autofillframework.multidatasetservice.AutofillHints.convertToStoredHintNames;
-import static com.example.android.autofillframework.multidatasetservice.AutofillHints.filterForSupportedHints;
+import static com.example.android.autofill.service.CommonUtil.TAG;
+import static com.example.android.autofill.service.AutofillHints.convertToStoredHintNames;
+import static com.example.android.autofill.service.AutofillHints.filterForSupportedHints;
/**
* JSON serializable data class containing the same data as an {@link AutofillValue}.
@@ -40,6 +40,8 @@ public class FilledAutofillField {
@Expose
private Boolean mToggleValue = null;
+ //TODO add explicit mListValue
+
/**
* Does not need to be serialized into persistent storage, so it's not exposed.
*/
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/model/FilledAutofillFieldCollection.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/model/FilledAutofillFieldCollection.java
index 05956ec9..7165859e 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/model/FilledAutofillFieldCollection.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/model/FilledAutofillFieldCollection.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice.model;
+package com.example.android.autofill.service.model;
import android.service.autofill.Dataset;
import android.support.annotation.NonNull;
@@ -22,17 +22,17 @@ import android.view.View;
import android.view.autofill.AutofillId;
import android.view.autofill.AutofillValue;
-import com.example.android.autofillframework.multidatasetservice.AutofillFieldMetadata;
-import com.example.android.autofillframework.multidatasetservice.AutofillFieldMetadataCollection;
-import com.example.android.autofillframework.multidatasetservice.AutofillHints;
-import com.example.android.autofillframework.multidatasetservice.W3cHints;
+import com.example.android.autofill.service.AutofillFieldMetadata;
+import com.example.android.autofill.service.AutofillFieldMetadataCollection;
+import com.example.android.autofill.service.AutofillHints;
+import com.example.android.autofill.service.W3cHints;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
import java.util.List;
-import static com.example.android.autofillframework.CommonUtil.DEBUG;
-import static com.example.android.autofillframework.CommonUtil.TAG;
+import static com.example.android.autofill.service.CommonUtil.DEBUG;
+import static com.example.android.autofill.service.CommonUtil.TAG;
/**
* FilledAutofillFieldCollection is the model that holds all of the data on a client app's page,
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/settings/MyPreferences.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/settings/MyPreferences.java
index 34d63ef3..240a5ebe 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/settings/MyPreferences.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/settings/MyPreferences.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice.settings;
+package com.example.android.autofill.service.settings;
import android.content.Context;
import android.content.SharedPreferences;
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/settings/SettingsActivity.java b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/settings/SettingsActivity.java
index 6ca59601..3a96faf9 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/settings/SettingsActivity.java
+++ b/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/settings/SettingsActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.example.android.autofillframework.multidatasetservice.settings;
+package com.example.android.autofill.service.settings;
import android.content.Context;
import android.content.DialogInterface;
@@ -32,11 +32,11 @@ import android.widget.NumberPicker;
import android.widget.Switch;
import android.widget.TextView;
-import com.example.android.autofillframework.R;
-import com.example.android.autofillframework.multidatasetservice.AutofillHints;
-import com.example.android.autofillframework.multidatasetservice.datasource.SharedPrefsAutofillRepository;
-import com.example.android.autofillframework.multidatasetservice.datasource.SharedPrefsPackageVerificationRepository;
-import com.example.android.autofillframework.multidatasetservice.model.FilledAutofillFieldCollection;
+import com.example.android.autofill.service.R;
+import com.example.android.autofill.service.AutofillHints;
+import com.example.android.autofill.service.datasource.SharedPrefsAutofillRepository;
+import com.example.android.autofill.service.datasource.SharedPrefsPackageVerificationRepository;
+import com.example.android.autofill.service.model.FilledAutofillFieldCollection;
public class SettingsActivity extends AppCompatActivity {
private static final String TAG = "SettingsActivity";
@@ -80,8 +80,8 @@ public class SettingsActivity extends AppCompatActivity {
return new AlertDialog.Builder(SettingsActivity.this)
.setMessage(R.string.settings_clear_data_confirmation)
.setTitle(R.string.settings_clear_data_confirmation_title)
- .setNegativeButton(R.string.cancel, null)
- .setPositiveButton(R.string.ok, (dialog, which) -> {
+ .setNegativeButton(R.string.settings_cancel, null)
+ .setPositiveButton(R.string.settings_ok, (dialog, which) -> {
SharedPrefsAutofillRepository.getInstance().clear(SettingsActivity.this);
SharedPrefsPackageVerificationRepository.getInstance()
.clear(SettingsActivity.this);
@@ -101,10 +101,10 @@ public class SettingsActivity extends AppCompatActivity {
numberOfDatasetsPicker.setWrapSelectorWheel(false);
return new AlertDialog.Builder(SettingsActivity.this)
.setTitle(R.string.settings_add_data_title)
- .setNegativeButton(R.string.cancel, null)
+ .setNegativeButton(R.string.settings_cancel, null)
.setMessage(R.string.settings_select_number_of_datasets)
.setView(numberOfDatasetsPicker)
- .setPositiveButton(R.string.ok, (dialog, which) -> {
+ .setPositiveButton(R.string.settings_ok, (dialog, which) -> {
int numOfDatasets = numberOfDatasetsPicker.getValue();
boolean success = buildAndSaveMockedAutofillFieldCollection(
SettingsActivity.this, numOfDatasets);
@@ -142,7 +142,7 @@ public class SettingsActivity extends AppCompatActivity {
private AlertDialog.Builder prepareCredentialsDialog() {
return new AlertDialog.Builder(SettingsActivity.this)
.setTitle(R.string.settings_auth_change_credentials_title)
- .setNegativeButton(R.string.cancel, null);
+ .setNegativeButton(R.string.settings_cancel, null);
}
private AlertDialog buildCurrentCredentialsDialog() {
@@ -153,7 +153,7 @@ public class SettingsActivity extends AppCompatActivity {
return prepareCredentialsDialog()
.setMessage(R.string.settings_auth_enter_current_password)
.setView(currentPasswordField)
- .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
+ .setPositiveButton(R.string.settings_ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
String password = currentPasswordField.getText().toString();
@@ -175,7 +175,7 @@ public class SettingsActivity extends AppCompatActivity {
return prepareCredentialsDialog()
.setMessage(R.string.settings_auth_enter_new_password)
.setView(newPasswordField)
- .setPositiveButton(R.string.ok, (dialog, which) -> {
+ .setPositiveButton(R.string.settings_ok, (dialog, which) -> {
String password = newPasswordField.getText().toString();
MyPreferences.getInstance(SettingsActivity.this).setMasterPassword(password);
dialog.dismiss();
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/drawable/ic_add_black_24dp.xml b/input/autofill/AutofillFramework/afservice/src/main/res/drawable-v24/ic_add_black_24dp.xml
index e50269d8..e50269d8 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/drawable/ic_add_black_24dp.xml
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/drawable-v24/ic_add_black_24dp.xml
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/drawable/ic_delete_forever_black_24dp.xml b/input/autofill/AutofillFramework/afservice/src/main/res/drawable-v24/ic_delete_forever_black_24dp.xml
index 4d2afb01..4d2afb01 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/drawable/ic_delete_forever_black_24dp.xml
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/drawable-v24/ic_delete_forever_black_24dp.xml
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/drawable/ic_lock_black_24dp.xml b/input/autofill/AutofillFramework/afservice/src/main/res/drawable-v24/ic_lock_black_24dp.xml
index 6b2f014d..6b2f014d 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/drawable/ic_lock_black_24dp.xml
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/drawable-v24/ic_lock_black_24dp.xml
diff --git a/input/autofill/AutofillFramework/afservice/src/main/res/drawable-v24/ic_person_black_24dp.xml b/input/autofill/AutofillFramework/afservice/src/main/res/drawable-v24/ic_person_black_24dp.xml
new file mode 100644
index 00000000..6534d9f0
--- /dev/null
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/drawable-v24/ic_person_black_24dp.xml
@@ -0,0 +1,20 @@
+<!--
+ * Copyright (C) 2017 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.
+-->
+<vector android:alpha="0.50" android:height="24dp"
+ android:viewportHeight="24.0" android:viewportWidth="24.0"
+ android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="#FF000000" android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
+</vector>
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/layout/multidataset_service_auth_activity.xml b/input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_auth_activity.xml
index 34b4424b..5430e527 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/layout/multidataset_service_auth_activity.xml
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_auth_activity.xml
@@ -26,7 +26,7 @@
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
- tools:context=".multidatasetservice.AuthActivity">
+ tools:context="com.example.android.autofill.service.AuthActivity">
<TextView
android:id="@+id/master_login_header"
@@ -49,7 +49,7 @@
android:layout_marginStart="@dimen/spacing_normal"
android:layout_marginTop="@dimen/spacing_large"
android:labelFor="@+id/master_password"
- android:text="@string/password_label"
+ android:text="@string/auth_password_label"
app:layout_constraintEnd_toStartOf="@+id/master_password"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
@@ -75,7 +75,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacing_normal"
android:layout_marginTop="@dimen/spacing_normal"
- android:text="@string/cancel"
+ android:text="@string/auth_cancel"
android:textColor="@android:color/holo_blue_dark"
app:layout_constraintEnd_toStartOf="@+id/login"
app:layout_constraintHorizontal_bias="0.5"
@@ -90,7 +90,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/spacing_normal"
android:layout_marginStart="@dimen/spacing_normal"
- android:text="@string/login_label"
+ android:text="@string/auth_login_label"
android:textColor="@android:color/holo_blue_dark"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/layout/multidataset_service_list_item.xml b/input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_list_item.xml
index ef564285..ef564285 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/layout/multidataset_service_list_item.xml
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_list_item.xml
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/layout/multidataset_service_settings_activity.xml b/input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_settings_activity.xml
index 1618bdce..1618bdce 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/layout/multidataset_service_settings_activity.xml
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_settings_activity.xml
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/layout/multidataset_service_settings_add_data_dialog.xml b/input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_settings_add_data_dialog.xml
index 019a3674..019a3674 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/layout/multidataset_service_settings_add_data_dialog.xml
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/layout/multidataset_service_settings_add_data_dialog.xml
diff --git a/input/autofill/AutofillFramework/Application/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 bfd6931b..bfd6931b 100644
--- a/input/autofill/AutofillFramework/Application/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
diff --git a/input/autofill/AutofillFramework/afservice/src/main/res/mipmap-hdpi/ic_launcher.png b/input/autofill/AutofillFramework/afservice/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100755
index 00000000..93465c02
--- /dev/null
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/mipmap-hdpi/ic_launcher.png
Binary files differ
diff --git a/input/autofill/AutofillFramework/afservice/src/main/res/mipmap-mdpi/ic_launcher.png b/input/autofill/AutofillFramework/afservice/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100755
index 00000000..6d5c2bb9
--- /dev/null
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/mipmap-mdpi/ic_launcher.png
Binary files differ
diff --git a/input/autofill/AutofillFramework/afservice/src/main/res/mipmap-xhdpi/ic_launcher.png b/input/autofill/AutofillFramework/afservice/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100755
index 00000000..72ecd6c7
--- /dev/null
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary files differ
diff --git a/input/autofill/AutofillFramework/afservice/src/main/res/mipmap-xxhdpi/ic_launcher.png b/input/autofill/AutofillFramework/afservice/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100755
index 00000000..698fd4c5
--- /dev/null
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/input/autofill/AutofillFramework/afservice/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/input/autofill/AutofillFramework/afservice/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100755
index 00000000..b64a676b
--- /dev/null
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary files differ
diff --git a/input/autofill/AutofillFramework/afservice/src/main/res/values/colors.xml b/input/autofill/AutofillFramework/afservice/src/main/res/values/colors.xml
new file mode 100644
index 00000000..3ab3e9cb
--- /dev/null
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="colorPrimary">#3F51B5</color>
+ <color name="colorPrimaryDark">#303F9F</color>
+ <color name="colorAccent">#FF4081</color>
+</resources>
diff --git a/input/autofill/AutofillFramework/afservice/src/main/res/values/dimens.xml b/input/autofill/AutofillFramework/afservice/src/main/res/values/dimens.xml
new file mode 100644
index 00000000..d451580d
--- /dev/null
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/values/dimens.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <dimen name="padding_normal">16dp</dimen>
+ <dimen name="activity_horizontal_margin">16dp</dimen>
+ <dimen name="activity_vertical_margin">16dp</dimen>
+ <dimen name="spacing_normal">8dp</dimen>
+ <dimen name="spacing_large">32dp</dimen>
+ <dimen name="a11y_min_touch_target_dimen">48dp</dimen>
+ <dimen name="text_field_width">250sp</dimen>
+</resources> \ No newline at end of file
diff --git a/input/autofill/AutofillFramework/afservice/src/main/res/values/strings.xml b/input/autofill/AutofillFramework/afservice/src/main/res/values/strings.xml
new file mode 100644
index 00000000..b9b5e371
--- /dev/null
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/values/strings.xml
@@ -0,0 +1,78 @@
+<resources>
+ <string name="invalid_package_signature">Invalid package signature</string>
+ <string name="invalid_link_association">Could not associate web domain %1$s with app %2$s</string>
+ <string name="autofill_sign_in_prompt">Tap to sign in.</string>
+ <string name="settings_name">Autofill Settings</string>
+ <string name="settings_cancel">Cancel</string>
+ <string name="settings_save">Save</string>
+ <string name="settings_authenticate_responses">Authenticate responses</string>
+ <string name="settings_authenticate_datasets">Authenticate Datasets</string>
+ <string name="settings_add_data_label">Add fake Autofill data</string>
+ <string name="settings_add_data_title">Add Autofill Datasets</string>
+ <string name="settings_select_number_of_datasets">Select number of Datasets.</string>
+ <plurals name="settings_add_data_success">
+ <item quantity="one">Added %d Dataset.</item>
+ <item quantity="other">Added %d Datasets.</item>
+ </plurals>
+ <string name="settings_clear_data_label">Clear all autofill data (including credentials)</string>
+ <string name="settings_clear_data_confirmation">Are you sure you want to delete all autofill
+ data from the sample service?
+ </string>
+ <string name="settings_clear_data_confirmation_title">Confirmation</string>
+ <string name="settings_authentication_header">Authentication</string>
+ <string name="settings_data_header">Data</string>
+ <string name="settings_auth_credentials_label">Update credentials</string>
+ <string name="settings_auth_enter_current_password">Enter current password</string>
+ <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="auth_password_label">Password</string>
+ <string name="auth_cancel">Cancel</string>
+ <string name="auth_login_label">Login</string>
+ <string name="settings_ok">Ok</string>
+ <string-array name="month_array">
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ <item>9</item>
+ <item>10</item>
+ <item>11</item>
+ <item>12</item>
+ </string-array>
+
+ <string-array name="day_array">
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ <item>9</item>
+ <item>10</item>
+ <item>11</item>
+ <item>12</item>
+ <item>13</item>
+ <item>14</item>
+ <item>15</item>
+ <item>16</item>
+ <item>17</item>
+ <item>18</item>
+ <item>19</item>
+ <item>20</item>
+ <item>21</item>
+ <item>22</item>
+ <item>23</item>
+ <item>24</item>
+ <item>25</item>
+ <item>26</item>
+ <item>27</item>
+ </string-array>
+</resources>
diff --git a/input/autofill/AutofillFramework/afservice/src/main/res/values/styles.xml b/input/autofill/AutofillFramework/afservice/src/main/res/values/styles.xml
new file mode 100644
index 00000000..b954cb67
--- /dev/null
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/values/styles.xml
@@ -0,0 +1,36 @@
+<resources>
+
+ <!-- Base application theme. -->
+ <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+ <!-- Customize your theme here. -->
+ <item name="colorPrimary">@color/colorPrimary</item>
+ <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
+ <item name="colorAccent">@color/colorAccent</item>
+ </style>
+ <style name="Settings.Label" parent="">
+ <item name="android:ellipsize">end</item>
+ <item name="android:lines">1</item>
+ <item name="android:paddingBottom">@dimen/spacing_normal</item>
+ <item name="android:paddingTop">@dimen/spacing_normal</item>
+ </style>
+
+ <style name="Settings.Container" parent="">
+ <item name="android:background">?android:selectableItemBackground</item>
+ <item name="android:gravity">center_vertical</item>
+ <item name="android:minHeight">?android:listPreferredItemHeightSmall</item>
+ <item name="android:orientation">horizontal</item>
+ <item name="android:paddingEnd">?android:listPreferredItemPaddingEnd</item>
+ <item name="android:paddingStart">?android:listPreferredItemPaddingStart</item>
+ </style>
+
+ <style name="Settings.Switch" parent="">
+ <!-- We make the parent view clickable instead for better touch feedback -->
+ <item name="android:background">@null</item>
+ <item name="android:clickable">false</item>
+ </style>
+
+ <style name="Settings.Header" parent="@style/TextAppearance.AppCompat.Large">
+ <item name="android:paddingStart">?android:listPreferredItemPaddingStart</item>
+ <item name="android:paddingBottom">@dimen/spacing_normal</item>
+ </style>
+</resources>
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/xml/multidataset_service.xml b/input/autofill/AutofillFramework/afservice/src/main/res/xml/multidataset_service.xml
index 0c1c14d0..88768151 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/xml/multidataset_service.xml
+++ b/input/autofill/AutofillFramework/afservice/src/main/res/xml/multidataset_service.xml
@@ -21,4 +21,4 @@ Settings Activity. This is pointed to in the service's meta-data in the applicat
-->
<autofill-service
xmlns:android="http://schemas.android.com/apk/res/android"
- android:settingsActivity="com.example.android.autofillframework.multidatasetservice.settings.SettingsActivity"/> \ No newline at end of file
+ android:settingsActivity="com.example.android.autofill.service.settings.SettingsActivity"/> \ No newline at end of file
diff --git a/input/autofill/AutofillFramework/build.gradle b/input/autofill/AutofillFramework/build.gradle
index efb29d94..0dafc513 100644
--- a/input/autofill/AutofillFramework/build.gradle
+++ b/input/autofill/AutofillFramework/build.gradle
@@ -1,32 +1,29 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
- repositories {
- jcenter()
- maven {
- url 'https://maven.google.com'
+ repositories {
+ jcenter()
+ google()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:3.0.0'
}
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:2.3.3'
- }
}
allprojects {
- repositories {
- jcenter()
- maven {
- url 'https://maven.google.com'
+ repositories {
+ jcenter()
+ google()
}
- }
}
// BEGIN_EXCLUDE
import com.example.android.samples.build.SampleGenPlugin
+
apply plugin: SampleGenPlugin
samplegen {
- pathToBuild "../../../../../build"
- pathToSamplesCommon "../../../common"
+ pathToBuild "../../../../../build"
+ pathToSamplesCommon "../../../common"
}
apply from: "../../../../../build/build.gradle"
// END_EXCLUDE
diff --git a/input/autofill/AutofillFramework/gradle/wrapper/gradle-wrapper.properties b/input/autofill/AutofillFramework/gradle/wrapper/gradle-wrapper.properties
index 63426264..3f9681d4 100644
--- a/input/autofill/AutofillFramework/gradle/wrapper/gradle-wrapper.properties
+++ b/input/autofill/AutofillFramework/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Fri Jul 28 14:29:44 PDT 2017
+#Thu Oct 26 11:55:14 PDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-milestone-1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
diff --git a/input/autofill/AutofillFramework/settings.gradle b/input/autofill/AutofillFramework/settings.gradle
index 9464a359..2d0eb20e 100644
--- a/input/autofill/AutofillFramework/settings.gradle
+++ b/input/autofill/AutofillFramework/settings.gradle
@@ -1 +1,2 @@
+include ':afservice'
include 'Application'
diff --git a/input/autofill/AutofillFramework/template-params.xml b/input/autofill/AutofillFramework/template-params.xml
index b355587a..37d6bd2a 100644
--- a/input/autofill/AutofillFramework/template-params.xml
+++ b/input/autofill/AutofillFramework/template-params.xml
@@ -19,7 +19,7 @@
<name>AutofillFramework</name>
<group>Input</group> <!-- This field will be deprecated in the future
and replaced with the "categories" tags below. -->
- <package>com.example.android.autofillframework</package>
+ <package>com.example.android.autofill.app</package>
<!-- change minSdk if needed-->
<minSdk>26</minSdk>