diff options
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable/autofill_ins_1.png | bin | 0 -> 11931 bytes | |||
-rw-r--r-- | app/src/main/res/drawable/autofill_ins_2.png | bin | 0 -> 6851 bytes | |||
-rw-r--r-- | app/src/main/res/drawable/autofill_ins_3.png | bin | 0 -> 10726 bytes | |||
-rw-r--r-- | app/src/main/res/drawable/autofill_row_background.xml | 5 | ||||
-rw-r--r-- | app/src/main/res/layout/app_list_item.xml | 24 | ||||
-rw-r--r-- | app/src/main/res/layout/autofill_instructions.xml | 63 | ||||
-rw-r--r-- | app/src/main/res/layout/autofill_recycler_view.xml | 20 | ||||
-rw-r--r-- | app/src/main/res/layout/autofill_row_layout.xml | 46 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_autofill.xml | 59 | ||||
-rw-r--r-- | app/src/main/res/menu/autofill_preference.xml | 12 | ||||
-rw-r--r-- | app/src/main/res/values-cs/strings.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 17 | ||||
-rw-r--r-- | app/src/main/res/xml/autofill_config.xml | 8 | ||||
-rw-r--r-- | app/src/main/res/xml/preference.xml | 21 |
14 files changed, 274 insertions, 3 deletions
diff --git a/app/src/main/res/drawable/autofill_ins_1.png b/app/src/main/res/drawable/autofill_ins_1.png Binary files differnew file mode 100644 index 00000000..56052303 --- /dev/null +++ b/app/src/main/res/drawable/autofill_ins_1.png diff --git a/app/src/main/res/drawable/autofill_ins_2.png b/app/src/main/res/drawable/autofill_ins_2.png Binary files differnew file mode 100644 index 00000000..36767847 --- /dev/null +++ b/app/src/main/res/drawable/autofill_ins_2.png diff --git a/app/src/main/res/drawable/autofill_ins_3.png b/app/src/main/res/drawable/autofill_ins_3.png Binary files differnew file mode 100644 index 00000000..8e423209 --- /dev/null +++ b/app/src/main/res/drawable/autofill_ins_3.png diff --git a/app/src/main/res/drawable/autofill_row_background.xml b/app/src/main/res/drawable/autofill_row_background.xml new file mode 100644 index 00000000..05e887ca --- /dev/null +++ b/app/src/main/res/drawable/autofill_row_background.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_selected="true" android:drawable="@color/blue_grey_200" /> + <item android:drawable="@color/grey_white_1000" /> +</selector>
\ No newline at end of file diff --git a/app/src/main/res/layout/app_list_item.xml b/app/src/main/res/layout/app_list_item.xml new file mode 100644 index 00000000..1a6c6e9b --- /dev/null +++ b/app/src/main/res/layout/app_list_item.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="40dp" + android:orientation="horizontal" + android:paddingLeft="8dp" + android:paddingRight="8dp" + android:gravity="center_vertical"> + + <ImageView + android:id="@android:id/icon1" + android:layout_width="24dp" + android:layout_height="24dp"/> + + <TextView android:id="@android:id/text1" + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:minHeight="?android:attr/listPreferredItemHeightSmall" + android:textAppearance="?android:attr/textAppearanceListItemSmall" + android:layout_marginLeft="8dp"/> + +</LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/autofill_instructions.xml b/app/src/main/res/layout/autofill_instructions.xml new file mode 100644 index 00000000..82ad16d1 --- /dev/null +++ b/app/src/main/res/layout/autofill_instructions.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="utf-8"?> +<ScrollView + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_height="match_parent" + android:layout_width="match_parent"> + +<LinearLayout android:orientation="vertical" + android:layout_height="fill_parent" + android:layout_width="fill_parent" + android:paddingLeft="24dp" + android:paddingRight="24dp" + android:paddingTop="20dp" + android:paddingBottom="20dp"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="@dimen/abc_text_size_menu_material" + android:text="@string/pref_autofill_enable_msg" + android:id="@+id/textView"/> + + <ImageView + android:layout_width="match_parent" + android:id="@+id/imageView" + android:src="@drawable/autofill_ins_1" + android:layout_marginTop="8dp" + android:layout_marginBottom="8dp" + android:layout_height="wrap_content" + android:adjustViewBounds="true"/> + + <ImageView + android:layout_width="match_parent" + android:id="@+id/imageView2" + android:src="@drawable/autofill_ins_2" + android:layout_marginBottom="8dp" + android:layout_height="wrap_content" + android:adjustViewBounds="true"/> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="@dimen/abc_text_size_menu_material" + android:text="@string/pref_autofill_enable_msg2" + android:id="@+id/textView3"/> + + <ImageView + android:layout_width="match_parent" + android:layout_height="114dp" + android:id="@+id/imageView3" + android:src="@drawable/autofill_ins_3" + android:layout_marginTop="8dp" + android:layout_marginBottom="8dp"/> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textSize="@dimen/abc_text_size_menu_material" + android:text="@string/pref_autofill_enable_msg3" + android:id="@+id/textView4"/> + + +</LinearLayout> +</ScrollView>
\ No newline at end of file diff --git a/app/src/main/res/layout/autofill_recycler_view.xml b/app/src/main/res/layout/autofill_recycler_view.xml new file mode 100644 index 00000000..4b4bcf26 --- /dev/null +++ b/app/src/main/res/layout/autofill_recycler_view.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <android.support.v7.widget.RecyclerView + android:id="@+id/autofill_recycler" + android:scrollbars="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"/> + + <ProgressBar + style="?android:attr/progressBarStyleLarge" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/progress_bar" + android:indeterminate="true" + android:layout_centerInParent="true" + android:visibility="gone"/> +</RelativeLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/autofill_row_layout.xml b/app/src/main/res/layout/autofill_row_layout.xml new file mode 100644 index 00000000..6e51fab3 --- /dev/null +++ b/app/src/main/res/layout/autofill_row_layout.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="64dp" + android:background="@drawable/autofill_row_background"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="?android:attr/selectableItemBackground" + android:orientation="horizontal" + android:paddingLeft="@dimen/activity_horizontal_margin" + android:paddingRight="@dimen/activity_horizontal_margin" + android:gravity="center_vertical"> + + <ImageView + android:layout_width="48dp" + android:layout_height="48dp" + android:id="@+id/app_icon" + /> + + <LinearLayout + android:orientation="vertical" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:gravity="center_vertical" + android:layout_marginLeft="8dp"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/app_name"/> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceSmall" + android:id="@+id/secondary_text" + android:textColor="@color/grey_600"/> + </LinearLayout> + + </LinearLayout> + + +</LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/fragment_autofill.xml b/app/src/main/res/layout/fragment_autofill.xml new file mode 100644 index 00000000..a5b1ac90 --- /dev/null +++ b/app/src/main/res/layout/fragment_autofill.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:paddingLeft="24dp" + android:paddingRight="24dp" + android:paddingTop="20dp" + android:paddingBottom="20dp"> + + <RadioGroup + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:id="@+id/autofill_radiogroup" + > + <RadioButton + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/autofill_apps_default" + android:id="@+id/use_default" + android:layout_gravity="center_vertical" + android:checked="false"/> + + <RadioButton + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/autofill_apps_first" + android:id="@+id/first" + android:layout_gravity="center_vertical" + android:checked="false"/> + + <RadioButton + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/autofill_apps_match_ellipsis" + android:id="@+id/match" + android:layout_gravity="center_vertical" + android:checked="false" + /> + + <EditText + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:id="@+id/matched" + android:layout_gravity="center_horizontal" + android:editable="false"/> + + <RadioButton + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/autofill_apps_never" + android:id="@+id/never" + android:layout_gravity="center_vertical" + android:checked="false" + /> + + </RadioGroup> + +</LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/menu/autofill_preference.xml b/app/src/main/res/menu/autofill_preference.xml new file mode 100644 index 00000000..77ce95f4 --- /dev/null +++ b/app/src/main/res/menu/autofill_preference.xml @@ -0,0 +1,12 @@ +<menu xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:pwstore="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + tools:context=".pwdstore.autofill.AutofillPreferenceActivity"> + <item + android:id="@+id/action_search" + android:icon="@drawable/ic_action_search" + android:title="@string/action_search" + pwstore:actionViewClass="android.support.v7.widget.SearchView" + pwstore:showAsAction="ifRoom|collapseActionView"/> + +</menu>
\ No newline at end of file diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 309ff2d6..8d97f2ef 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -116,8 +116,8 @@ <string name="ssh_key_error_dialog_text">Zpráva : \n</string> <string name="pref_recursive_filter">Rekurzivní filtrování</string> <string name="pref_recursive_filter_hint">Rekurzivní hledání hesel v aktuálním adresáři.</string> + <string name="pref_clear_clipboard_title">Zaplnit schránku 20krát</string> <string name="pref_clear_clipboard_hint">Uložit dvacet náhodných textů do schránky namísto pouze jednoho. Užitečné pro telefony Samsug, které nabízejí funkci historie schránky.</string> - <string name="pref_clear_clipboard">Zaplnit schránku 20krát</string> <!-- pwgen fragment --> <string name="pwgen_generate">Generovat</string> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 3a3d4061..4047691f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -117,8 +117,16 @@ <string name="ssh_key_error_dialog_text">Message : \n</string> <string name="pref_recursive_filter">Recursive filtering</string> <string name="pref_recursive_filter_hint">Recursively find passwords of the current directory.</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> + <string name="pref_autofill_apps_title">Per-app settings</string> + <string name="pref_autofill_apps_hint">Customize autofill settings for specific apps.</string> + <string name="pref_autofill_default_title">Automatically match by default</string> + <string name="pref_autofill_default_hint">Default to \'Automatically match\' for apps without custom settings. Otherwise, \'Never match.\'</string> + <string name="pref_clear_clipboard_title">Clear clipboard 20 times</string> <string name="pref_clear_clipboard_hint">Store nonsense in the clipboard 20 times instead of just once. Useful on Samsung phones that feature clipboard history.</string> - <string name="pref_clear_clipboard">Clear clipboard 20 times</string> <!-- pwgen fragment --> <string name="pwgen_generate">Generate</string> @@ -154,4 +162,11 @@ <string name="pwd_generate_button">Generate</string> <string name="category_string">"Category: "</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_fill">Fill</string> + <string name="autofill_apps_default">Use default setting</string> + <string name="autofill_apps_first">Automatically match</string> + <string name="autofill_apps_match_ellipsis">Match with…</string> + <string name="autofill_apps_never">Never match</string> </resources> diff --git a/app/src/main/res/xml/autofill_config.xml b/app/src/main/res/xml/autofill_config.xml new file mode 100644 index 00000000..a604fc07 --- /dev/null +++ b/app/src/main/res/xml/autofill_config.xml @@ -0,0 +1,8 @@ +<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android" + android:description="@string/autofill_description" + android:accessibilityEventTypes="typeViewFocused|typeViewClicked|typeWindowStateChanged" + android:accessibilityFlags="flagDefault|flagRetrieveInteractiveWindows" + android:accessibilityFeedbackType="feedbackGeneric" + android:notificationTimeout="100" + android:canRetrieveWindowContent="true" + />
\ No newline at end of file diff --git a/app/src/main/res/xml/preference.xml b/app/src/main/res/xml/preference.xml index e4071c96..639fdfe1 100644 --- a/app/src/main/res/xml/preference.xml +++ b/app/src/main/res/xml/preference.xml @@ -70,11 +70,30 @@ android:summary="@string/pref_recursive_filter_hint" android:title="@string/pref_recursive_filter" /> </PreferenceCategory> + + <PreferenceCategory android:title="Autofill"> + <CheckBoxPreference + android:defaultValue="true" + android:key="autofill_enable" + android:title="@string/pref_autofill_enable_title"/> + <Preference + android:dependency="autofill_enable" + android:key="autofill_apps" + android:summary="@string/pref_autofill_apps_hint" + android:title="@string/pref_autofill_apps_title"/> + <CheckBoxPreference + android:dependency="autofill_enable" + android:defaultValue="true" + android:key="autofill_default" + android:summary="@string/pref_autofill_default_hint" + android:title="@string/pref_autofill_default_title"/> + </PreferenceCategory> + <PreferenceCategory android:title="Misc"> <CheckBoxPreference android:defaultValue="false" android:key="clear_clipboard_20x" android:summary="@string/pref_clear_clipboard_hint" - android:title="@string/pref_clear_clipboard" /> + android:title="@string/pref_clear_clipboard_title" /> </PreferenceCategory> </PreferenceScreen>
\ No newline at end of file |