diff options
author | Fabian Henneke <FabianHenneke@users.noreply.github.com> | 2020-03-24 14:03:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-24 14:03:40 +0100 |
commit | bebe43468330f182ea35e01ace555ce8d0512aeb (patch) | |
tree | 85899eccd985b302183ee1551054ef54bdb0ada5 /app/src/main/res | |
parent | 98e9f6734a00cfb1d8164227b2de07d2aea150d2 (diff) |
Add support for Oreo Autofill (#653)
Adds support for the Autofill feature first available in Android Oreo.
In compatible apps and browsers, login forms are automatically detected and
the user is presented with options to fill or generate credentials. In most apps
and certain browsers, the service will also offer to create new Password Store
entries from credentials entered into login forms.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable/ic_autofill_new_password.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_person_black_24dp.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_search_black_24dp.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_warning_red_24dp.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_oreo_autofill_filter.xml | 90 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_oreo_autofill_publisher_changed.xml | 167 | ||||
-rw-r--r-- | app/src/main/res/layout/encrypt_layout.xml | 13 | ||||
-rw-r--r-- | app/src/main/res/layout/oreo_autofill_dataset.xml | 45 | ||||
-rw-r--r-- | app/src/main/res/layout/oreo_autofill_filter_row.xml | 64 | ||||
-rw-r--r-- | app/src/main/res/layout/oreo_autofill_instructions.xml | 43 | ||||
-rw-r--r-- | app/src/main/res/layout/password_row_layout.xml | 8 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 29 | ||||
-rw-r--r-- | app/src/main/res/values/styles.xml | 8 | ||||
-rw-r--r-- | app/src/main/res/xml/oreo_autofill_service.xml | 14 | ||||
-rw-r--r-- | app/src/main/res/xml/preference.xml | 48 |
15 files changed, 536 insertions, 29 deletions
diff --git a/app/src/main/res/drawable/ic_autofill_new_password.xml b/app/src/main/res/drawable/ic_autofill_new_password.xml new file mode 100644 index 00000000..958de190 --- /dev/null +++ b/app/src/main/res/drawable/ic_autofill_new_password.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#FF000000" + android:pathData="M14,2H6A2,2 0,0 0,4 4V20A2,2 0,0 0,6 22H18A2,2 0,0 0,20 20V8L14,2M18,20H6V4H13V9H18M12.83,15A3,3 0,1 0,12.83 17H14V19H16V17H17V15M10,17A1,1 0,1 1,11 16A1,1 0,0 1,10 17Z"/> +</vector> diff --git a/app/src/main/res/drawable/ic_person_black_24dp.xml b/app/src/main/res/drawable/ic_person_black_24dp.xml new file mode 100644 index 00000000..b2cb337b --- /dev/null +++ b/app/src/main/res/drawable/ic_person_black_24dp.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <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/app/src/main/res/drawable/ic_search_black_24dp.xml b/app/src/main/res/drawable/ic_search_black_24dp.xml new file mode 100644 index 00000000..affc7ba2 --- /dev/null +++ b/app/src/main/res/drawable/ic_search_black_24dp.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FF000000" + android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"/> +</vector> diff --git a/app/src/main/res/drawable/ic_warning_red_24dp.xml b/app/src/main/res/drawable/ic_warning_red_24dp.xml new file mode 100644 index 00000000..cea44306 --- /dev/null +++ b/app/src/main/res/drawable/ic_warning_red_24dp.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FFFF0000" + android:pathData="M1,21h22L12,2 1,21zM13,18h-2v-2h2v2zM13,14h-2v-4h2v4z"/> +</vector> diff --git a/app/src/main/res/layout/activity_oreo_autofill_filter.xml b/app/src/main/res/layout/activity_oreo_autofill_filter.xml new file mode 100644 index 00000000..17eb0e29 --- /dev/null +++ b/app/src/main/res/layout/activity_oreo_autofill_filter.xml @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:elevation="2dp" + tools:context="com.zeapo.pwdstore.autofill.oreo.ui.AutofillFilterView"> + + <ImageView + android:id="@+id/cover" + android:layout_width="0dp" + android:layout_height="50dp" + android:background="@color/primary_color" + android:contentDescription="@string/app_name" + android:src="@drawable/ic_launcher_foreground" + app:layout_constraintBottom_toTopOf="@id/searchLayout" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.0" /> + + <com.google.android.material.textfield.TextInputLayout + android:id="@+id/searchLayout" + style="@style/TextInputLayoutBase" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/activity_horizontal_margin" + android:layout_marginTop="@dimen/activity_vertical_margin" + android:layout_marginEnd="@dimen/activity_horizontal_margin" + app:endIconMode="clear_text" + app:layout_constraintBottom_toTopOf="@id/rvPassword" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/cover"> + + <com.google.android.material.textfield.TextInputEditText + android:id="@+id/search" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:hint="@string/action_search" + android:imeOptions="actionDone" + android:inputType="text" + tools:text="example.com" /> + </com.google.android.material.textfield.TextInputLayout> + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/rvPassword" + android:layout_width="0dp" + android:layout_height="0dp" + android:layout_marginTop="@dimen/activity_vertical_margin" + android:scrollbars="vertical" + app:layout_constraintBottom_toTopOf="@id/shouldMatch" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/searchLayout" + tools:itemCount="5" + tools:listitem="@layout/password_row_layout" /> + + <Switch + android:id="@+id/shouldMatch" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/activity_horizontal_margin" + android:layout_marginTop="@dimen/activity_vertical_margin" + android:layout_marginEnd="@dimen/activity_horizontal_margin" + android:checked="true" + app:layout_constraintBottom_toTopOf="@id/shouldClear" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/rvPassword" + app:layout_constraintVertical_bias="1.0" + tools:text="Match with example.org" /> + + <Switch + android:id="@+id/shouldClear" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/activity_horizontal_margin" + android:layout_marginTop="@dimen/activity_vertical_margin" + android:layout_marginEnd="@dimen/activity_horizontal_margin" + android:layout_marginBottom="@dimen/activity_vertical_margin" + android:text="@string/oreo_autofill_matches_clear_existing" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/shouldMatch" + app:layout_constraintVertical_bias="1.0" /> + +</androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/activity_oreo_autofill_publisher_changed.xml b/app/src/main/res/layout/activity_oreo_autofill_publisher_changed.xml new file mode 100644 index 00000000..21184e84 --- /dev/null +++ b/app/src/main/res/layout/activity_oreo_autofill_publisher_changed.xml @@ -0,0 +1,167 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="280dp" + android:layout_height="wrap_content" + android:animateLayoutChanges="true" + android:elevation="2dp" + android:scrollbars="vertical" + tools:context="com.zeapo.pwdstore.autofill.oreo.ui.AutofillPublisherChangedActivity"> + + <ImageView + android:id="@+id/cover" + android:layout_width="0dp" + android:layout_height="50dp" + android:background="@color/primary_color" + android:contentDescription="@string/app_name" + android:src="@drawable/ic_launcher_foreground" + app:layout_constraintBottom_toTopOf="@id/warningSign" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.0" + app:layout_constraintVertical_chainStyle="packed" /> + + <ImageView + android:id="@+id/warningSign" + android:layout_width="0dp" + android:layout_height="50dp" + android:background="@color/window_background" + android:contentDescription="@string/oreo_autofill_warning_publisher_warning_sign_description" + android:src="@drawable/ic_warning_red_24dp" + app:layout_constraintBottom_toTopOf="@id/warningHeader" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/cover" /> + + <TextView + android:id="@+id/warningHeader" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/activity_horizontal_margin" + android:layout_marginEnd="@dimen/activity_horizontal_margin" + android:layout_marginBottom="@dimen/activity_vertical_margin" + android:background="@color/window_background" + android:text="@string/oreo_autofill_warning_publisher_header" + android:textSize="12sp" + app:layout_constraintBottom_toTopOf="@id/warningAppName" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/warningSign" /> + + <TextView + android:id="@+id/warningAppName" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/activity_horizontal_margin" + android:layout_marginEnd="@dimen/activity_horizontal_margin" + android:background="@color/window_background" + android:gravity="center_horizontal" + android:textSize="12sp" + app:layout_constraintBottom_toTopOf="@id/warningAppInstallDate" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/warningHeader" + tools:text="Example Banking" /> + + <TextView + android:id="@+id/warningAppInstallDate" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/activity_horizontal_margin" + android:layout_marginEnd="@dimen/activity_horizontal_margin" + android:background="@color/window_background" + android:gravity="center_horizontal" + android:textSize="12sp" + app:layout_constraintBottom_toTopOf="@id/warningAppFooter" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/warningAppName" + tools:text="Installed: 5 days ago" /> + + <TextView + android:id="@+id/warningAppFooter" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/activity_horizontal_margin" + android:layout_marginTop="@dimen/activity_vertical_margin" + android:layout_marginEnd="@dimen/activity_horizontal_margin" + android:layout_marginBottom="@dimen/activity_vertical_margin" + android:background="@color/window_background" + android:text="@string/oreo_autofill_warning_publisher_footer" + android:textSize="12sp" + app:layout_constraintBottom_toTopOf="@id/okButton" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/warningAppInstallDate" /> + + <Button + android:id="@+id/okButton" + style="@style/Widget.MaterialComponents.Button.OutlinedButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/activity_horizontal_margin" + android:layout_marginEnd="@dimen/activity_horizontal_margin" + android:text="@string/oreo_autofill_warning_publisher_changed_disable_autofill_button" + android:textSize="12sp" + app:layout_constraintBottom_toTopOf="@id/advancedButton" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="1.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/warningAppFooter" /> + + <Button + android:id="@+id/advancedButton" + style="@style/Widget.MaterialComponents.Button.OutlinedButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/activity_horizontal_margin" + android:layout_marginEnd="@dimen/activity_horizontal_margin" + android:text="@string/oreo_autofill_warning_publisher_advanced_info_button" + android:textSize="12sp" + app:layout_constraintBottom_toTopOf="@id/warningAppAdvancedInfo" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="1.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/okButton" /> + + <TextView + android:id="@+id/warningAppAdvancedInfo" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/activity_horizontal_margin" + android:layout_marginEnd="@dimen/activity_horizontal_margin" + android:background="@color/window_background" + android:fontFamily="monospace" + android:gravity="center_horizontal" + android:textIsSelectable="true" + android:textSize="10sp" + android:visibility="invisible" + app:layout_constraintBottom_toTopOf="@id/resetButton" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/advancedButton" + tools:ignore="SmallSp" + tools:text="Package: com.example.banking\n\nHash:\n8P1sW0EPJcslw7UzRsiXL64w+O50Ed+RBICtay1g24M=" + tools:visibility="visible" /> + + <Button + android:id="@+id/resetButton" + style="@style/Widget.MaterialComponents.Button.TextButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/activity_horizontal_margin" + android:layout_marginEnd="@dimen/activity_horizontal_margin" + android:text="@string/oreo_autofill_warning_publisher_reenable_button" + android:textSize="10sp" + android:visibility="invisible" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="1.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/warningAppAdvancedInfo" + tools:ignore="SmallSp" + tools:visibility="visible" /> + +</androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/encrypt_layout.xml b/app/src/main/res/layout/encrypt_layout.xml index a54c45b4..40ae757f 100644 --- a/app/src/main/res/layout/encrypt_layout.xml +++ b/app/src/main/res/layout/encrypt_layout.xml @@ -45,11 +45,13 @@ android:layout_height="wrap_content" android:layout_margin="8dp" android:hint="@string/crypto_pass_label" + app:endIconMode="password_toggle" app:hintEnabled="true" app:layout_constraintTop_toBottomOf="@id/name_input_layout" app:layout_constraintStart_toStartOf="parent"> <com.google.android.material.textfield.TextInputEditText android:id="@+id/crypto_password_edit" + android:inputType="textVisiblePassword" android:layout_width="match_parent" android:layout_height="wrap_content"/> </com.google.android.material.textfield.TextInputLayout> @@ -84,4 +86,15 @@ android:layout_height="wrap_content"/> </com.google.android.material.textfield.TextInputLayout> + + <Switch + android:id="@+id/encrypt_username" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_margin="8dp" + android:text="@string/crypto_encrypt_username_label" + android:visibility="gone" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/extra_input_layout" + tools:visibility="visible" /> </androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/oreo_autofill_dataset.xml b/app/src/main/res/layout/oreo_autofill_dataset.xml new file mode 100644 index 00000000..65c8f3f3 --- /dev/null +++ b/app/src/main/res/layout/oreo_autofill_dataset.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="horizontal" + android:paddingLeft="10dp" + android:paddingTop="5dp" + android:paddingRight="10dp" + android:paddingBottom="5dp"> + + <ImageView + android:id="@+id/icon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_marginEnd="10dp" + android:adjustViewBounds="true" + android:maxWidth="20dp" + android:maxHeight="20dp" + tools:src="@mipmap/ic_launcher" /> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView + android:id="@+id/title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:ellipsize="middle" + android:singleLine="true" + android:textStyle="bold" + tools:text="example.org" /> + + <TextView + android:id="@+id/summary" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:ellipsize="middle" + android:singleLine="true" + tools:text="john@doe.org" /> + </LinearLayout> +</LinearLayout> diff --git a/app/src/main/res/layout/oreo_autofill_filter_row.xml b/app/src/main/res/layout/oreo_autofill_filter_row.xml new file mode 100644 index 00000000..c60c2693 --- /dev/null +++ b/app/src/main/res/layout/oreo_autofill_filter_row.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="utf-8"?> +<com.zeapo.pwdstore.widget.MultiselectableConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@drawable/password_row_background" + android:paddingTop="8dp" + android:paddingBottom="8dp"> + + <ImageView + android:id="@+id/credentialIcon" + android:layout_width="wrap_content" + android:layout_height="0dp" + android:layout_marginStart="8dp" + android:alpha="0.5" + android:src="@drawable/ic_person_black_24dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@id/title" + app:layout_constraintHorizontal_bias="0.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/title" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="8dp" + android:ellipsize="middle" + android:singleLine="true" + android:textSize="12sp" + app:layout_constraintBottom_toTopOf="@id/subtitle" + app:layout_constraintEnd_toStartOf="@id/continueIcon" + app:layout_constraintStart_toEndOf="@id/credentialIcon" + app:layout_constraintTop_toTopOf="parent" + tools:text="/example.com/" /> + + <TextView + android:id="@+id/subtitle" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="8dp" + android:ellipsize="middle" + android:singleLine="true" + android:textSize="14sp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/continueIcon" + app:layout_constraintStart_toEndOf="@id/credentialIcon" + app:layout_constraintTop_toBottomOf="@id/title" + tools:text="johndoe@example.com" /> + + <ImageView + android:id="@+id/continueIcon" + android:layout_width="wrap_content" + android:layout_height="0dp" + android:layout_marginEnd="8dp" + android:src="@drawable/ic_keyboard_arrow_right_24dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="1.0" + app:layout_constraintStart_toEndOf="@id/title" + app:layout_constraintTop_toTopOf="parent" /> + +</com.zeapo.pwdstore.widget.MultiselectableConstraintLayout> diff --git a/app/src/main/res/layout/oreo_autofill_instructions.xml b/app/src/main/res/layout/oreo_autofill_instructions.xml new file mode 100644 index 00000000..376a4363 --- /dev/null +++ b/app/src/main/res/layout/oreo_autofill_instructions.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="utf-8"?> +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + xmlns:tools="http://schemas.android.com/tools"> + + <LinearLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:paddingBottom="20dp" + android:paddingLeft="24dp" + android:paddingRight="24dp" + android:paddingTop="20dp"> + + <androidx.appcompat.widget.AppCompatTextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Password Store can offer to fill login forms and even save credentials you enter in apps or on websites." + android:textSize="16sp" /> + + <androidx.appcompat.widget.AppCompatTextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="To enable this feature, tap OK to go to Autofill settings. There, select Password Store from the list." + android:textSize="16sp" /> + + <androidx.appcompat.widget.AppCompatTextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Autofill support with installed browsers:" + android:textSize="16sp" /> + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/supportedBrowsers" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + tools:text="Firefox: Fill and save credentials" + android:textSize="16sp" /> + + + </LinearLayout> +</ScrollView> diff --git a/app/src/main/res/layout/password_row_layout.xml b/app/src/main/res/layout/password_row_layout.xml index 0b7112b6..ae76d7a9 100644 --- a/app/src/main/res/layout/password_row_layout.xml +++ b/app/src/main/res/layout/password_row_layout.xml @@ -8,7 +8,7 @@ android:paddingTop="12dp" android:paddingBottom="12dp"> - <androidx.appcompat.widget.AppCompatImageView + <ImageView android:id="@+id/type_image" android:layout_width="60dp" android:layout_height="32dp" @@ -20,7 +20,7 @@ app:layout_constraintBottom_toBottomOf="parent" tools:src="@drawable/ic_multiple_files_24dp" /> - <androidx.appcompat.widget.AppCompatTextView + <TextView android:id="@+id/label" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -31,7 +31,7 @@ app:layout_constraintTop_toTopOf="parent" tools:text="FILE_NAME" /> - <androidx.appcompat.widget.AppCompatTextView + <TextView android:id="@+id/child_count" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -42,7 +42,7 @@ android:layout_marginEnd="12dp" tools:text="12" /> - <androidx.appcompat.widget.AppCompatImageView + <ImageView android:id="@+id/folder_indicator" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 288b93f2..5df51af5 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -100,6 +100,7 @@ <string name="crypto_name_hint">Name</string> <string name="crypto_pass_label">Password</string> <string name="crypto_extra_label">Extra content</string> + <string name="crypto_encrypt_username_label">Encrypt username</string> <string name="crypto_select">Select</string> <string name="crypto_cancel">Cancel</string> <string name="crypto_save">Save</string> @@ -151,7 +152,7 @@ <string name="pref_file_first_sort_order">Files first</string> <string name="pref_type_independent_sort_order">Type independent</string> <string name="pref_autofill_title">Autofill</string> - <string name="pref_autofill_enable_title">Enable autofill</string> + <string name="pref_autofill_enable_title">Enable Autofill</string> <string name="pref_autofill_enable_msg">Tap OK to go to Accessibility settings. There, tap Password Store under Services then tap the switch in the top right to turn it on or off.</string> <string name="pref_autofill_enable_msg2">Once the service is on, a dialog will appear when you click on a password field in an app if a matching password for the app exists.</string> <string name="pref_autofill_enable_msg3">Password Store attempts to match apps with passwords automatically. You can change this default setting and also matching settings per-app.</string> @@ -242,6 +243,32 @@ <string name="app_icon_hint">App icon</string> <string name="folder_icon_hint">Folder icon</string> + <!-- Oreo Autofill --> + <string name="oreo_autofill_match_with">Match with %1$s</string> + <string name="oreo_autofill_matches_clear_existing">Clear existing matches</string> + <string name="oreo_autofill_search_in_store">Search in store…</string> + <string name="oreo_autofill_save_internal_error">Save failed due to an internal error</string> + <string name="oreo_autofill_save_app_not_supported">This app is currently not supported</string> + <string name="oreo_autofill_save_passwords_dont_match">Passwords don\'t match</string> + <string name="oreo_autofill_save_invalid_password">Couldn\'t extract password, please use a different browser for now</string> + <string name="oreo_autofill_generate_password">Generate password…</string> + <string name="oreo_autofill_publisher_changed">The app\'s publisher has changed; this may be a phishing attempt.</string> + <string name="oreo_autofill_max_matches_reached">Maximum number of matches (%1$d) reached; clear matches before adding new ones.</string> + <string name="oreo_autofill_warning_publisher_header">This app\'s publisher has changed since you first associated a Password Store entry with it:</string> + <string name="oreo_autofill_warning_publisher_footer"><b>The currently installed app may be trying to steal your credentials by pretending to be a trusted app.</b>\n\nTry to uninstall and reinstall the app from a trusted source, such as the Play Store, Amazon Appstore, F-Droid, or your phone manufacturer\'s store.</string> + <string name="oreo_autofill_warning_publisher_install_time">Installed: %1$s</string> + <string name="oreo_autofill_warning_publisher_advanced_info_template" translatable="false">Package:\n%1$s\n\nHash:\n%2$s</string> + <string name="oreo_autofill_warning_publisher_advanced_info_button">Advanced information</string> + <string name="oreo_autofill_warning_publisher_changed_disable_autofill_button">Keep Autofill disabled</string> + <string name="oreo_autofill_warning_publisher_reenable_button">Re-enable Autofill</string> + <string name="oreo_autofill_warning_publisher_warning_sign_description">Warning</string> + <string name="oreo_autofill_warning_publisher_dataset_summary">Tap for details…</string> + <string name="oreo_autofill_warning_publisher_dataset_title">Possible phishing attempt</string> + <string name="oreo_autofill_fill_and_save_support">Fill and save credentials</string> + <string name="oreo_autofill_fill_support">Fill credentials</string> + <string name="oreo_autofill_flaky_fill_support">Fill credentials (may require restarting the browser from time to time)</string> + <string name="oreo_autofill_no_support">No support</string> + <!-- Autofill --> <string name="autofill_description">Autofills password fields in apps. Only works for Android versions 4.3 and up. Does not rely on the clipboard for Android versions 5.0 and up.</string> <string name="autofill_apps_default">Use default setting</string> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 4f23a285..bed9a13e 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -36,4 +36,12 @@ <item name="boxStrokeColor">?attr/colorSecondary</item> <item name="hintTextColor">?attr/colorOnPrimary</item> </style> + + <style name="DialogLikeTheme" parent="AppTheme"> + <item name="android:windowActionBar">false</item> + <item name="android:windowIsFloating">true</item> + <item name="android:backgroundDimEnabled">true</item> + <!-- Needs to be set without android: prefix as per https://stackoverflow.com/a/33417456 --> + <item name="windowNoTitle">true</item> + </style> </resources> diff --git a/app/src/main/res/xml/oreo_autofill_service.xml b/app/src/main/res/xml/oreo_autofill_service.xml new file mode 100644 index 00000000..cfc8690a --- /dev/null +++ b/app/src/main/res/xml/oreo_autofill_service.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8" ?> +<autofill-service xmlns:android="http://schemas.android.com/apk/res/android"> + <compatibility-package android:name="com.android.chrome" /> + <compatibility-package android:name="com.brave.browser" /> + <compatibility-package android:name="com.chrome.beta" /> + <compatibility-package android:name="com.chrome.canary" /> + <compatibility-package android:name="com.chrome.dev" /> + <compatibility-package android:name="com.microsoft.emmx" /> + <compatibility-package android:name="com.opera.mini.native" /> + <compatibility-package android:name="com.opera.mini.native.beta" /> + <compatibility-package android:name="org.mozilla.fennec_fdroid" /> + <compatibility-package android:name="org.mozilla.firefox" /> + <compatibility-package android:name="org.mozilla.firefox_beta" /> +</autofill-service> diff --git a/app/src/main/res/xml/preference.xml b/app/src/main/res/xml/preference.xml index 1fb8d325..08f23787 100644 --- a/app/src/main/res/xml/preference.xml +++ b/app/src/main/res/xml/preference.xml @@ -1,6 +1,30 @@ <?xml version="1.0" encoding="utf-8"?> <androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> + <androidx.preference.PreferenceCategory app:title="@string/pref_autofill_title"> + <androidx.preference.SwitchPreferenceCompat + app:defaultValue="true" + app:key="autofill_enable" + app:title="@string/pref_autofill_enable_title"/> + <androidx.preference.Preference + app:key="autofill_apps" + app:title="@string/pref_autofill_apps_title"/> + <androidx.preference.CheckBoxPreference + app:defaultValue="true" + app:key="autofill_default" + app:summary="@string/pref_autofill_default_hint" + app:title="@string/pref_autofill_default_title"/> + <androidx.preference.CheckBoxPreference + app:defaultValue="false" + app:key="autofill_always" + app:title="@string/pref_autofill_always_title"/> + <androidx.preference.CheckBoxPreference + app:defaultValue="false" + app:key="autofill_full_path" + app:summary="@string/pref_autofill_full_path_hint" + app:title="@string/pref_autofill_full_path_title"/> + </androidx.preference.PreferenceCategory> + <androidx.preference.PreferenceCategory app:title="@string/pref_git_title"> <androidx.preference.Preference app:key="git_server_info" @@ -134,30 +158,6 @@ app:summary="@string/biometric_auth_summary" /> </androidx.preference.PreferenceCategory> - <androidx.preference.PreferenceCategory app:title="@string/pref_autofill_title"> - <androidx.preference.SwitchPreferenceCompat - app:defaultValue="true" - app:key="autofill_enable" - app:title="@string/pref_autofill_enable_title"/> - <androidx.preference.Preference - app:key="autofill_apps" - app:title="@string/pref_autofill_apps_title"/> - <androidx.preference.CheckBoxPreference - app:defaultValue="true" - app:key="autofill_default" - app:summary="@string/pref_autofill_default_hint" - app:title="@string/pref_autofill_default_title"/> - <androidx.preference.CheckBoxPreference - app:defaultValue="false" - app:key="autofill_always" - app:title="@string/pref_autofill_always_title"/> - <androidx.preference.CheckBoxPreference - app:defaultValue="false" - app:key="autofill_full_path" - app:summary="@string/pref_autofill_full_path_hint" - app:title="@string/pref_autofill_full_path_title"/> - </androidx.preference.PreferenceCategory> - <androidx.preference.PreferenceCategory app:title="@string/pref_misc_title"> <androidx.preference.Preference app:key="export_passwords" |