diff options
author | Jorge Ruesga <jorge@ruesga.com> | 2014-10-28 03:26:42 +0100 |
---|---|---|
committer | Jorge Ruesga <jorge@ruesga.com> | 2014-11-10 23:16:25 +0000 |
commit | 877d4660622ebcaa992f05396237169c289470c4 (patch) | |
tree | b254cb04803096aa9695f42e1bcc914ba09e12fd /res | |
parent | fcb4908c2c949f55ec966e09a0a91210dff2ca3f (diff) | |
download | android_packages_apps_CMFileManager-877d4660622ebcaa992f05396237169c289470c4.tar.gz android_packages_apps_CMFileManager-877d4660622ebcaa992f05396237169c289470c4.tar.bz2 android_packages_apps_CMFileManager-877d4660622ebcaa992f05396237169c289470c4.zip |
cmfm: secure storage and other improvements
This patch adds support for virtual filesystems and implements a SecureStorage
filesystem (a password protected area) mounted in /storage or /sdcard/storage
(in chrooted environments).
Also includes a better print support and a cleanup of the code and design of
the menu drawer.
Bump version to 2.0.0
Required: https://github.com/jruesga/android_external_libtruezip located
in external/libtruezip
Patchset 4: Fix selection of unmounted virtual storages.
Fix actions on virtual mount points folders.
Fix strings and typos. Change drop for delete secure storage.
Patchset 5: Move actionbar buttons to navigation drawer
Remove history position
Patchset 6: Update theme preview images
Fix filesystem status image on theme change
Patchset 7: Fix binary file detection in editor (including unicode files)
Patchset 8: Fix unsafe operations in virtual mountpoint logic
Patchset 9: Rebase
Change-Id: I65511352ca649dcbf238c8b07cf8c22465296e8e
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Diffstat (limited to 'res')
48 files changed, 493 insertions, 110 deletions
diff --git a/res/drawable-hdpi/ic_holo_light_delete.png b/res/drawable-hdpi/ic_holo_light_delete.png Binary files differnew file mode 100644 index 00000000..57f9b4d5 --- /dev/null +++ b/res/drawable-hdpi/ic_holo_light_delete.png diff --git a/res/drawable-hdpi/ic_holo_light_print.png b/res/drawable-hdpi/ic_holo_light_print.png Binary files differnew file mode 100644 index 00000000..5b5fc364 --- /dev/null +++ b/res/drawable-hdpi/ic_holo_light_print.png diff --git a/res/drawable-hdpi/ic_holo_light_remote.png b/res/drawable-hdpi/ic_holo_light_remote.png Binary files differnew file mode 100644 index 00000000..82234433 --- /dev/null +++ b/res/drawable-hdpi/ic_holo_light_remote.png diff --git a/res/drawable-hdpi/ic_holo_light_secure.png b/res/drawable-hdpi/ic_holo_light_secure.png Binary files differnew file mode 100644 index 00000000..75fe8a9e --- /dev/null +++ b/res/drawable-hdpi/ic_holo_light_secure.png diff --git a/res/drawable-hdpi/ic_holo_light_settings.png b/res/drawable-hdpi/ic_holo_light_settings.png Binary files differnew file mode 100644 index 00000000..6da677ad --- /dev/null +++ b/res/drawable-hdpi/ic_holo_light_settings.png diff --git a/res/drawable-hdpi/ic_overlay_remote.png b/res/drawable-hdpi/ic_overlay_remote.png Binary files differnew file mode 100644 index 00000000..2ee56395 --- /dev/null +++ b/res/drawable-hdpi/ic_overlay_remote.png diff --git a/res/drawable-hdpi/ic_overlay_secure.png b/res/drawable-hdpi/ic_overlay_secure.png Binary files differnew file mode 100644 index 00000000..d8e692d9 --- /dev/null +++ b/res/drawable-hdpi/ic_overlay_secure.png diff --git a/res/drawable-mdpi/ic_holo_light_delete.png b/res/drawable-mdpi/ic_holo_light_delete.png Binary files differnew file mode 100644 index 00000000..e8ea0b10 --- /dev/null +++ b/res/drawable-mdpi/ic_holo_light_delete.png diff --git a/res/drawable-mdpi/ic_holo_light_print.png b/res/drawable-mdpi/ic_holo_light_print.png Binary files differnew file mode 100644 index 00000000..e4a53d08 --- /dev/null +++ b/res/drawable-mdpi/ic_holo_light_print.png diff --git a/res/drawable-mdpi/ic_holo_light_remote.png b/res/drawable-mdpi/ic_holo_light_remote.png Binary files differnew file mode 100644 index 00000000..87eeff50 --- /dev/null +++ b/res/drawable-mdpi/ic_holo_light_remote.png diff --git a/res/drawable-mdpi/ic_holo_light_secure.png b/res/drawable-mdpi/ic_holo_light_secure.png Binary files differnew file mode 100644 index 00000000..dcf1b117 --- /dev/null +++ b/res/drawable-mdpi/ic_holo_light_secure.png diff --git a/res/drawable-mdpi/ic_holo_light_settings.png b/res/drawable-mdpi/ic_holo_light_settings.png Binary files differnew file mode 100644 index 00000000..be398696 --- /dev/null +++ b/res/drawable-mdpi/ic_holo_light_settings.png diff --git a/res/drawable-mdpi/ic_overlay_remote.png b/res/drawable-mdpi/ic_overlay_remote.png Binary files differnew file mode 100644 index 00000000..318dc87e --- /dev/null +++ b/res/drawable-mdpi/ic_overlay_remote.png diff --git a/res/drawable-mdpi/ic_overlay_secure.png b/res/drawable-mdpi/ic_overlay_secure.png Binary files differnew file mode 100644 index 00000000..80998961 --- /dev/null +++ b/res/drawable-mdpi/ic_overlay_secure.png diff --git a/res/drawable-nodpi/theme_preview.png b/res/drawable-nodpi/theme_preview.png Binary files differindex ba98ce0b..866ed72e 100644 --- a/res/drawable-nodpi/theme_preview.png +++ b/res/drawable-nodpi/theme_preview.png diff --git a/res/drawable-xhdpi/ic_holo_light_delete.png b/res/drawable-xhdpi/ic_holo_light_delete.png Binary files differnew file mode 100644 index 00000000..a5cbd4f7 --- /dev/null +++ b/res/drawable-xhdpi/ic_holo_light_delete.png diff --git a/res/drawable-xhdpi/ic_holo_light_print.png b/res/drawable-xhdpi/ic_holo_light_print.png Binary files differnew file mode 100644 index 00000000..1927fcc6 --- /dev/null +++ b/res/drawable-xhdpi/ic_holo_light_print.png diff --git a/res/drawable-xhdpi/ic_holo_light_remote.png b/res/drawable-xhdpi/ic_holo_light_remote.png Binary files differnew file mode 100644 index 00000000..a45da433 --- /dev/null +++ b/res/drawable-xhdpi/ic_holo_light_remote.png diff --git a/res/drawable-xhdpi/ic_holo_light_secure.png b/res/drawable-xhdpi/ic_holo_light_secure.png Binary files differnew file mode 100644 index 00000000..5a6d50db --- /dev/null +++ b/res/drawable-xhdpi/ic_holo_light_secure.png diff --git a/res/drawable-xhdpi/ic_holo_light_settings.png b/res/drawable-xhdpi/ic_holo_light_settings.png Binary files differnew file mode 100644 index 00000000..09f504de --- /dev/null +++ b/res/drawable-xhdpi/ic_holo_light_settings.png diff --git a/res/drawable-xhdpi/ic_overlay_remote.png b/res/drawable-xhdpi/ic_overlay_remote.png Binary files differnew file mode 100644 index 00000000..a0003e85 --- /dev/null +++ b/res/drawable-xhdpi/ic_overlay_remote.png diff --git a/res/drawable-xhdpi/ic_overlay_secure.png b/res/drawable-xhdpi/ic_overlay_secure.png Binary files differnew file mode 100644 index 00000000..174a1d84 --- /dev/null +++ b/res/drawable-xhdpi/ic_overlay_secure.png diff --git a/res/drawable-xxhdpi/ic_holo_light_delete.png b/res/drawable-xxhdpi/ic_holo_light_delete.png Binary files differnew file mode 100644 index 00000000..743fbfd5 --- /dev/null +++ b/res/drawable-xxhdpi/ic_holo_light_delete.png diff --git a/res/drawable-xxhdpi/ic_holo_light_print.png b/res/drawable-xxhdpi/ic_holo_light_print.png Binary files differnew file mode 100644 index 00000000..6d1fdf67 --- /dev/null +++ b/res/drawable-xxhdpi/ic_holo_light_print.png diff --git a/res/drawable-xxhdpi/ic_holo_light_remote.png b/res/drawable-xxhdpi/ic_holo_light_remote.png Binary files differnew file mode 100644 index 00000000..0cb6fb7a --- /dev/null +++ b/res/drawable-xxhdpi/ic_holo_light_remote.png diff --git a/res/drawable-xxhdpi/ic_holo_light_secure.png b/res/drawable-xxhdpi/ic_holo_light_secure.png Binary files differnew file mode 100644 index 00000000..a959f743 --- /dev/null +++ b/res/drawable-xxhdpi/ic_holo_light_secure.png diff --git a/res/drawable-xxhdpi/ic_holo_light_settings.png b/res/drawable-xxhdpi/ic_holo_light_settings.png Binary files differnew file mode 100644 index 00000000..f3246735 --- /dev/null +++ b/res/drawable-xxhdpi/ic_holo_light_settings.png diff --git a/res/drawable-xxhdpi/ic_overlay_remote.png b/res/drawable-xxhdpi/ic_overlay_remote.png Binary files differnew file mode 100644 index 00000000..52fb8701 --- /dev/null +++ b/res/drawable-xxhdpi/ic_overlay_remote.png diff --git a/res/drawable-xxhdpi/ic_overlay_secure.png b/res/drawable-xxhdpi/ic_overlay_secure.png Binary files differnew file mode 100644 index 00000000..dc9a0b80 --- /dev/null +++ b/res/drawable-xxhdpi/ic_overlay_secure.png diff --git a/res/drawable/fso_folder_remote.xml b/res/drawable/fso_folder_remote.xml new file mode 100644 index 00000000..79f40efd --- /dev/null +++ b/res/drawable/fso_folder_remote.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2014 The CyanogenMod 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. + --> + +<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > + + <item android:drawable="@drawable/ic_fso_folder_drawable"/> + <item android:drawable="@drawable/ic_overlay_remote_drawable"/> + +</layer-list> diff --git a/res/drawable/fso_folder_secure.xml b/res/drawable/fso_folder_secure.xml new file mode 100644 index 00000000..1f27b843 --- /dev/null +++ b/res/drawable/fso_folder_secure.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2014 The CyanogenMod 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. + --> + +<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > + + <item android:drawable="@drawable/ic_fso_folder_drawable"/> + <item android:drawable="@drawable/ic_overlay_secure_drawable"/> + +</layer-list> diff --git a/res/drawable/holo_button_selector.xml b/res/drawable/holo_button_selector.xml index 97ebf269..d6a5a8d7 100644 --- a/res/drawable/holo_button_selector.xml +++ b/res/drawable/holo_button_selector.xml @@ -24,6 +24,9 @@ android:state_enabled="true" android:state_focused="true"/> <item + android:drawable="@color/default_background_disabled" + android:state_enabled="false"/> + <item android:drawable="@color/default_background"/> </selector> diff --git a/res/layout/associations_dialog.xml b/res/layout/associations_dialog.xml index 210301a9..18009c9d 100644 --- a/res/layout/associations_dialog.xml +++ b/res/layout/associations_dialog.xml @@ -26,13 +26,17 @@ android:stretchMode="columnWidth" android:scrollbars="vertical" android:horizontalSpacing="@dimen/default_margin" + android:layout_marginBottom="@dimen/extra_margin" android:numColumns="@integer/associations_items_per_row" /> <CheckBox android:id="@+id/associations_remember" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_margin="@dimen/extra_margin" + android:layout_marginLeft="@dimen/extra_margin" + android:layout_marginRight="@dimen/extra_margin" + android:layout_marginBottom="@dimen/extra_margin" android:textAppearance="@style/secondary_text_appearance" - android:text="@string/associations_dialog_remember" /> + android:text="@string/associations_dialog_remember" + android:visibility="gone" /> </LinearLayout>
\ No newline at end of file diff --git a/res/layout/color_picker_pref_item.xml b/res/layout/color_picker_pref_item.xml index 02c44c1a..e250561c 100644 --- a/res/layout/color_picker_pref_item.xml +++ b/res/layout/color_picker_pref_item.xml @@ -19,7 +19,7 @@ android:layout_height="32dp" android:background="@android:color/darker_gray"> <afzkl.development.mColorPicker.views.ColorPanelView - android:id="@+android:id/color_picker" + android:id="@+id/color_picker" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="1dp" diff --git a/res/layout/history_item.xml b/res/layout/history_item.xml index ef02927b..9aa4d8a3 100644 --- a/res/layout/history_item.xml +++ b/res/layout/history_item.xml @@ -56,15 +56,4 @@ android:textAppearance="@style/secondary_text_appearance" /> </LinearLayout> - <TextView - android:id="@+id/history_item_position" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:layout_marginLeft="@dimen/default_margin" - android:paddingRight="@dimen/extra_margin" - android:singleLine="true" - android:textAppearance="@style/primary_text_appearance" - android:textStyle="normal" /> - </LinearLayout>
\ No newline at end of file diff --git a/res/layout/navigation_drawer.xml b/res/layout/navigation_drawer.xml index 9398ede5..c5e29092 100644 --- a/res/layout/navigation_drawer.xml +++ b/res/layout/navigation_drawer.xml @@ -1,62 +1,155 @@ <?xml version="1.0" encoding="utf-8"?> -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer" - android:layout_width="240dp" + android:layout_width="280dp" android:layout_height="match_parent" android:layout_gravity="start" - android:background="@android:color/background_light" > + android:background="@android:color/background_light"> + + <RelativeLayout + android:id="@+id/drawer_actionbar" + android:layout_width="match_parent" + android:layout_height="64dp" + android:layout_alignParentBottom="true"> + + <com.cyanogenmod.filemanager.ui.widgets.ButtonItem + android:id="@+id/ab_settings" + android:layout_width="@dimen/default_buttom_width" + android:layout_height="match_parent" + android:layout_alignParentLeft="true" + android:contentDescription="@string/menu_settings" + android:onClick="onActionBarItemClick" + android:src="@drawable/ic_holo_light_settings" /> + + <com.cyanogenmod.filemanager.ui.widgets.ButtonItem + android:id="@+id/ab_clear_history" + android:layout_width="@dimen/default_buttom_width" + android:layout_height="match_parent" + android:layout_toRightOf="@id/ab_settings" + android:contentDescription="@string/menu_clear_history" + android:onClick="onActionBarItemClick" + android:src="@drawable/ic_holo_light_delete" /> + </RelativeLayout> <LinearLayout + android:id="@+id/drawer_drawer_divider" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical" > - - <TextView - android:id="@+id/bookmarks_header" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/bookmarks" - style="@style/drawer_header" /> + android:layout_above="@id/drawer_actionbar"> + <include layout="@layout/vertical_divider" /> + </LinearLayout> - <ProgressBar - android:id="@+id/bookmarks_loading" - android:layout_width="@dimen/default_row_height" - android:layout_height="@dimen/default_row_height" - android:indeterminate="true" - android:indeterminateOnly="true" - android:visibility="gone" /> + <ScrollView + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_above="@id/drawer_drawer_divider" + android:layout_alignParentTop="true"> <LinearLayout - android:id="@+id/bookmarks_list" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginBottom="@dimen/extra_margin" - android:orientation="vertical" > + android:orientation="vertical"> - </LinearLayout> + <LinearLayout + android:id="@+id/filesystem_info_dialog_tabhost" + android:layout_width="match_parent" + android:layout_height="@dimen/default_row_height" + android:orientation="horizontal" > - <TextView - android:id="@+id/history_header" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/history" - style="@style/drawer_header" /> + <TextView + android:id="@+id/drawer_bookmarks_tab" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_weight="1" + android:background="@drawable/holo_selector" + android:clickable="true" + android:gravity="center_horizontal|center_vertical" + android:text="@string/bookmarks" + android:textAllCaps="true" + android:textAppearance="@style/primary_text_appearance" /> - <TextView - android:id="@+id/history_empty" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/msgs_history_empty" - android:paddingLeft="@dimen/extra_margin" - style="@style/secondary_text_appearance" /> + <include + android:id="@+id/drawer_tab_divider1" + layout="@layout/horizontal_divider" /> + + <TextView + android:id="@+id/drawer_history_tab" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_weight="1" + android:background="@drawable/holo_selector" + android:clickable="true" + android:gravity="center_horizontal|center_vertical" + android:text="@string/history" + android:textAllCaps="true" + android:textAppearance="@style/primary_text_appearance" /> + </LinearLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" > + + <include + android:id="@+id/drawer_tab_divider2" + layout="@layout/vertical_divider" /> + </LinearLayout> + + <LinearLayout + android:id="@+id/drawer_bookmarks" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="@dimen/default_margin" + android:layout_marginRight="@dimen/default_margin" + android:orientation="vertical"> + + <ProgressBar + android:id="@+id/bookmarks_loading" + android:layout_width="@dimen/default_row_height" + android:layout_height="@dimen/default_row_height" + android:indeterminate="true" + android:indeterminateOnly="true" + android:visibility="gone" /> + + <LinearLayout + android:id="@+id/bookmarks_list" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/extra_margin" + android:orientation="vertical" > + + </LinearLayout> + + </LinearLayout> + + <LinearLayout + android:id="@+id/drawer_history" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="@dimen/default_margin" + android:layout_marginRight="@dimen/default_margin" + android:orientation="vertical" + android:visibility="gone"> + + <TextView + android:id="@+id/history_empty" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/msgs_history_empty" + android:padding="@dimen/extra_margin" + android:gravity="center_horizontal" + android:textAppearance="@style/primary_text_appearance"/> + + <LinearLayout + android:id="@+id/history_list" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/extra_margin" + android:orientation="vertical" > + </LinearLayout> + + </LinearLayout> - <LinearLayout - android:id="@+id/history_list" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginBottom="@dimen/extra_margin" - android:orientation="vertical" > </LinearLayout> - </LinearLayout> -</ScrollView>
\ No newline at end of file + </ScrollView> +</RelativeLayout>
\ No newline at end of file diff --git a/res/layout/simple_customtitle.xml b/res/layout/simple_customtitle.xml index 97dafcaa..68286934 100644 --- a/res/layout/simple_customtitle.xml +++ b/res/layout/simple_customtitle.xml @@ -25,6 +25,14 @@ android:layout_alignParentRight="true"> <com.cyanogenmod.filemanager.ui.widgets.ButtonItem + android:id="@+id/ab_button0" + style="@style/breadcrumb_actionbar_buttom" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:onClick="onActionBarItemClick" + android:visibility="gone" /> + + <com.cyanogenmod.filemanager.ui.widgets.ButtonItem android:id="@+id/ab_button1" style="@style/breadcrumb_actionbar_buttom" android:layout_width="wrap_content" @@ -51,7 +59,7 @@ android:layout_marginRight="@dimen/extra_large_margin" android:textAppearance="@style/title_text_appearance" android:layout_alignParentLeft="true" - android:layout_toLeftOf="@id/ab_button1" + android:layout_toLeftOf="@id/ab_button0" android:layout_alignWithParentIfMissing="true" android:contentDescription="@null" android:gravity="left|center_vertical" diff --git a/res/layout/unlock_dialog_message.xml b/res/layout/unlock_dialog_message.xml new file mode 100644 index 00000000..8c7a465c --- /dev/null +++ b/res/layout/unlock_dialog_message.xml @@ -0,0 +1,124 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2012 The CyanogenMod 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. + --> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <!-- Dialog --> + <TextView + android:id="@+id/unlock_dialog_message" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/double_margin" + android:layout_marginLeft="@dimen/extra_large_margin" + android:layout_marginRight="@dimen/extra_large_margin" + android:textAppearance="@style/primary_text_appearance" /> + + <!-- Password --> + <LinearLayout + android:id="@+id/unlock_old_password_layout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/double_margin" + android:layout_marginLeft="@dimen/extra_large_margin" + android:layout_marginRight="@dimen/extra_large_margin" + android:orientation="vertical"> + <TextView + android:id="@+id/unlock_old_password_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@style/primary_text_appearance" + android:text="@string/secure_storage_unlock_old_key_title" + android:textStyle="normal"/> + <EditText + android:id="@+id/unlock_old_password" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="textPassword" + android:textStyle="normal" + android:maxLines="1" /> + </LinearLayout> + + <!-- Password --> + <LinearLayout + android:id="@+id/unlock_password_layout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/double_margin" + android:layout_marginLeft="@dimen/extra_large_margin" + android:layout_marginRight="@dimen/extra_large_margin" + android:orientation="vertical"> + <TextView + android:id="@+id/unlock_password_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@style/primary_text_appearance" + android:text="@string/secure_storage_unlock_key_title" + android:textStyle="normal"/> + <EditText + android:id="@+id/unlock_password" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="textPassword" + android:textStyle="normal" + android:maxLines="1" /> + </LinearLayout> + + <!-- Repeat Password --> + <LinearLayout + android:id="@+id/unlock_repeat_layout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/double_margin" + android:layout_marginLeft="@dimen/extra_large_margin" + android:layout_marginRight="@dimen/extra_large_margin" + android:orientation="vertical"> + <TextView + android:id="@+id/unlock_repeat_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@style/primary_text_appearance" + android:text="@string/secure_storage_unlock_repeat_title" + android:textStyle="normal"/> + <EditText + android:id="@+id/unlock_repeat" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="textPassword" + android:textStyle="normal" + android:maxLines="1" /> + </LinearLayout> + + <!-- Validation message --> + <TextView + android:id="@+id/unlock_validation_msg" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:layout_marginLeft="@dimen/extra_large_margin" + android:layout_marginRight="@dimen/extra_large_margin" + android:background="@drawable/holo_selector" + android:contentDescription="@null" + android:drawableLeft="@drawable/ic_holo_light_fs_warning" + android:drawablePadding="@dimen/default_margin" + android:gravity="left|center_vertical" + android:singleLine="false" + android:textSize="@dimen/note_text_size" + android:visibility="invisible" /> + +</LinearLayout>
\ No newline at end of file diff --git a/res/menu/actions.xml b/res/menu/actions.xml index ba5f50cf..bb2d8e50 100644 --- a/res/menu/actions.xml +++ b/res/menu/actions.xml @@ -74,6 +74,10 @@ android:id="@+id/mnu_actions_add_shortcut_current_folder" android:showAsAction="ifRoom" android:title="@string/actions_menu_add_shortcut"/> + <item + android:id="@+id/mnu_actions_global_set_as_home" + android:showAsAction="ifRoom" + android:title="@string/actions_menu_set_as_home"/> </group> <!-- FileSystemObject Actions --> @@ -150,6 +154,10 @@ android:id="@+id/mnu_actions_open_parent_folder" android:showAsAction="ifRoom" android:title="@string/actions_menu_open_parent_folder"/> + <item + android:id="@+id/mnu_actions_set_as_home" + android:showAsAction="ifRoom" + android:title="@string/actions_menu_set_as_home"/> </group> </menu>
\ No newline at end of file diff --git a/res/menu/drawer.xml b/res/menu/drawer.xml deleted file mode 100644 index 7a5ef1d5..00000000 --- a/res/menu/drawer.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ** Copyright (C) 2012 The CyanogenMod 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. ---> -<menu xmlns:android="http://schemas.android.com/apk/res/android" > - - <!-- - set android:visible="false" for every item as it should - not be visible until the drawer gets opened - --> - - <!-- TODO: add functionality to set bookmark in NavigationActivity.java - <item - android:id="@+id/mnu_actions_add_to_bookmarks_current_folder" - android:showAsAction="never" - android:title="@string/actions_menu_add_to_bookmarks" - android:visible="false"/>--> - <item - android:id="@+id/mnu_clear_history" - android:showAsAction="never" - android:title="@string/menu_clear_history" - android:visible="false"/> - <item - android:id="@+id/mnu_settings" - android:showAsAction="never" - android:title="@string/menu_settings" - android:visible="false"/> - -</menu>
\ No newline at end of file diff --git a/res/menu/navigation.xml b/res/menu/navigation.xml index 5111c94f..e63074ba 100644 --- a/res/menu/navigation.xml +++ b/res/menu/navigation.xml @@ -22,10 +22,4 @@ android:showAsAction="ifRoom" android:title="@string/menu_search"/> - <!-- Overflow actions --> - <item - android:id="@+id/mnu_settings" - android:showAsAction="never" - android:title="@string/menu_settings"/> - </menu>
\ No newline at end of file diff --git a/res/raw/changelog b/res/raw/changelog index 447938cc..bba634b3 100644 --- a/res/raw/changelog +++ b/res/raw/changelog @@ -1,9 +1,14 @@ CyanogenMod File Manager ======================== +Version 2.0.0 +------------- +* Secure storage support +* Print support + Version 1.0.2 ------------- -* move bookmarks and history into a navigation drawer (by Florian Edelmann) +* Drawer navigation support (by Florian Edelmann) Version 1.0.1 ------------- diff --git a/res/values/colors.xml b/res/values/colors.xml index 5dad8206..22841846 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -18,6 +18,8 @@ <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- The default background color --> <color name="default_background">@android:color/white</color> + <!-- The default dissabled background color --> + <color name="default_background_disabled">#f2f2f2</color> <!-- A black color with some transparency --> <color name="black_transparent">#99000000</color> diff --git a/res/values/overlay.xml b/res/values/overlay.xml index 1258d25b..88c5d683 100644 --- a/res/values/overlay.xml +++ b/res/values/overlay.xml @@ -26,6 +26,9 @@ <!-- The system directory --> <string name="system_dir" translatable="false">/system</string> + <!-- The virtual storage directory (virtual filesystem are listed here) --> + <string name="virtual_storage_dir" translatable="false">/storage</string> + <!-- The shell commands used by this application. All of this commands should exist to allow the use of a shell console (and access to root). If any of this commands are not present in the system, then app will start in @@ -85,8 +88,8 @@ <!-- The system properties --> <string name="system_props_file" translatable="false">/system/build.prop</string> - <!-- The size of the buffers use by the console (in bytes). Default: 4k --> - <integer name="buffer_size">4096</integer> + <!-- The size of the buffers use by the console (in bytes) --> + <integer name="buffer_size">8192</integer> <!-- The number of lines to show in the console dialog --> <integer name="console_max_lines">80</integer> diff --git a/res/values/strings.xml b/res/values/strings.xml index 2c51d02f..06859586 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -167,6 +167,8 @@ <string name="actionbar_button_storage_cd">Storage volumes</string> <!-- ActionBar Buttons - Save --> <string name="actionbar_button_save_cd">Save</string> + <!-- ActionBar Buttons - Print --> + <string name="actionbar_button_print_cd">Print</string> <!-- Navigation View - Sort - Sort by name (ascending) --> <string name="sort_by_name_asc">By name \u25B2</string> @@ -221,6 +223,8 @@ <string name="filesystem_info_dialog_options">Options:</string> <!-- Filesystem Info Dialog - Dump/Pass Label --> <string name="filesystem_info_dialog_dump_pass">Dump / Pass:</string> + <!-- Filesystem Info Dialog - Virtual Label --> + <string name="filesystem_info_dialog_virtual">Virtual:</string> <!-- Filesystem Info Dialog - Total Disk Usage --> <string name="filesystem_info_dialog_total_disk_usage">Total:</string> <!-- Filesystem Info Dialog - Used Disk Usage --> @@ -353,6 +357,10 @@ <string name="bookmarks_root_folder">Root folder</string> <!-- Bookmarks - Bookmark name - System folder --> <string name="bookmarks_system_folder">System folder</string> + <!-- Bookmarks - Bookmark name - Secure storage --> + <string name="bookmarks_secure">Secure storage</string> + <!-- Bookmarks - Bookmark name - Remote storage --> + <string name="bookmarks_remote">Remote storage</string> <!-- Bookmarks - Bookmark name - Button - Initial directory content description --> <string name="bookmarks_button_config_cd">Set the initial folder.</string> <!-- Bookmarks - Bookmark name - Button - Remove bookmark content description --> @@ -476,6 +484,8 @@ <string name="actions_menu_compute_checksum">Compute checksum</string> <!-- Actions Dialog - Menu - Print --> <string name="actions_menu_print">Print</string> + <!-- Actions Dialog - Menu - Set as home --> + <string name="actions_menu_set_as_home">Set as home</string> <!-- Actions - Ask user prior to do an undone operation. Dialog message --> <string name="actions_ask_undone_operation_msg">This action cannot be undone. Do you want to continue?</string> @@ -547,6 +557,23 @@ <!-- For example "2 folders and 1 file selected." --> <string name="selection_folders_and_files"><xliff:g id="folders">%1$s</xliff:g> and <xliff:g id="files">%2$s</xliff:g> selected.</string> + <!-- Category descriptions --> + <string name="category_system">SYSTEM</string> + <string name="category_app">APP</string> + <string name="category_binary">BINARY</string> + <string name="category_text">TEXT</string> + <string name="category_document">DOCUMENT</string> + <string name="category_ebook">EBOOK</string> + <string name="category_mail">MAIL</string> + <string name="category_compress">COMPRESS</string> + <string name="category_exec">EXECUTABLE</string> + <string name="category_database">DATABASE</string> + <string name="category_font">FONT</string> + <string name="category_image">IMAGE</string> + <string name="category_audio">AUDIO</string> + <string name="category_video">VIDEO</string> + <string name="category_security">SECURITY</string> + <!-- Compression - Compression modes dialog title --> <string name="compression_mode_title">Compression mode</string> <!-- Compression - Supported archive and compression modes --> @@ -571,6 +598,8 @@ <string name="pref_general">General settings</string> <!-- Preferences - Search title --> <string name="pref_search">Search options</string> + <!-- Preferences - Storage title --> + <string name="pref_storage">Storage options</string> <!-- Preferences - Editor title --> <string name="pref_editor">Editor options</string> <!-- Preferences - Themes title --> @@ -578,7 +607,7 @@ <!-- Preferences - About title --> <string name="pref_about">About</string> <!-- Preferences - About summary --> - <string name="pref_about_summary">File Manager v<xliff:g id="version">%1$s</xliff:g>\nCopyright \u00A9 2012-2014 The CyanogenMod Project</string> + <string name="pref_about_summary">File Manager v<xliff:g id="version">%1$s</xliff:g>\nCopyright \u00A9 2012–2014 The CyanogenMod Project</string> <!-- Preferences - General - Behaviour category --> <string name="pref_general_behaviour_category">General</string> @@ -653,7 +682,20 @@ <!-- Preferences - Search - Remove saved search terms summary --> <string name="pref_remove_saved_search_terms_summary">Tap to remove all the saved search terms</string> <!-- Preferences - Search - Suggestions were truncated --> - <string name="pref_remove_saved_search_terms_msg">All saved search terms were removed.</string> + <string name="pref_remove_saved_search_terms_msg">All saved search terms were removed</string> + <!-- Preferences - Storage - Secure Storage category --> + <string name="pref_secure_storage_category">Secure storage</string> + <!-- Preferences - Storage - Secure Storage - Delayed sync title --> + <string name="pref_secure_storage_delayed_sync_title">Delayed synchronization</string> + <!-- Preferences - Storage - Secure Storage - Delayed sync summary --> + <string name="pref_secure_storage_delayed_sync_summary">Synchronization of secure file systems + is a costly operation. Enable this option to allow better time responses after every operation, + performing the synchronization when the filesystem is in unused state, but at the expense of + lost the pending information not synced if the app crash.</string> + <!-- Preferences - Storage - Secure Storage - Reset password title --> + <string name="pref_secure_storage_reset_password_title">Reset password</string> + <!-- Preferences - Storage - Secure Storage - Delete storage title --> + <string name="pref_secure_storage_delete_storage_title">Delete storage</string> <!-- Preferences - Editor - Behaviour category --> <string name="pref_editor_behaviour_category">Behaviour</string> <!-- Preferences - Editor - No suggestions --> @@ -725,6 +767,46 @@ <string name="ash_quoted_string">Quoted string</string> <string name="ash_variable">Variable</string> + <!-- Secure Storage --> + <!-- Secure Storage dialog title - Unlock --> + <string name="secure_storage_unlock_title">Unlock storage</string> + <!-- Secure Storage dialog title - Create --> + <string name="secure_storage_create_title">Create storage</string> + <!-- Secure Storage dialog title - Reset --> + <string name="secure_storage_reset_title">Reset password</string> + <!-- Secure Storage dialog title - Delete --> + <string name="secure_storage_delete_title">Delete storage</string> + <!-- Secure Storage unlock dialog message (secure storage exists) --> + <string name="secure_storage_unlock_key_prompt_msg">Type the password to unlock the secure storage filesystem.</string> + <!-- Secure Storage unlock dialog message (new secure storage) --> + <string name="secure_storage_unlock_key_new_msg">Type a password to protect the secure storage filesystem.</string> + <!-- Secure Storage unlock dialog message (reset the current password) --> + <string name="secure_storage_unlock_key_reset_msg">Type the current and new passwords to reset the secure storage filesystem.</string> + <!-- Secure Storage unlock dialog message (delete the secure storage) --> + <string name="secure_storage_unlock_key_delete_msg">Type the current password to delete the secure storage filesystem.</string> + <!-- Secure Storage unlock dialog old key title --> + <string name="secure_storage_unlock_old_key_title">Old password:</string> + <!-- Secure Storage unlock dialog key title --> + <string name="secure_storage_unlock_new_key_title">New Password:</string> + <!-- Secure Storage unlock dialog key title --> + <string name="secure_storage_unlock_key_title">Password:</string> + <!-- Secure Storage unlock dialog repeat key title--> + <string name="secure_storage_unlock_repeat_title">Repeat password:</string> + <!-- Secure Storage create button --> + <string name="secure_storage_create_button">Create</string> + <!-- Secure Storage unlock button --> + <string name="secure_storage_unlock_button">Unlock</string> + <!-- Secure Storage reset button --> + <string name="secure_storage_reset_button">Reset</string> + <!-- Secure Storage delete button --> + <string name="secure_storage_delete_button">Delete</string> + <!-- Secure Storage unlock failed toast --> + <string name="secure_storage_unlock_failed">Cannot unlock the storage</string> + <!-- Secure Storage unlock validation, length --> + <string name="secure_storage_unlock_validation_length">Password must have at least <xliff:g id="characters">%1$d</xliff:g> characters.</string> + <!-- Secure Storage unlock validation, equal --> + <string name="secure_storage_unlock_validation_equals">Passwords are not the same.</string> + <!-- Print messages --> <!-- Unsupported document format --> <string name="print_unsupported_document">Unsupported document format</string> diff --git a/res/values/theme.xml b/res/values/theme.xml index d5128c91..29208011 100644 --- a/res/values/theme.xml +++ b/res/values/theme.xml @@ -69,6 +69,12 @@ <drawable name="ab_save_drawable">@drawable/ic_holo_light_save</drawable> <!-- The drawable for the tab action bar button --> <drawable name="ab_tab_drawable">@drawable/ic_holo_light_tab</drawable> + <!-- The drawable for the print action bar button --> + <drawable name="ab_print_drawable">@drawable/ic_holo_light_print</drawable> + <!-- The drawable for the settings action bar button --> + <drawable name="ab_settings_drawable">@drawable/ic_holo_light_settings</drawable> + <!-- The drawable for the delete action bar button --> + <drawable name="ab_delete_drawable">@drawable/ic_holo_light_delete</drawable> <!-- The close action drawable from the expander bar --> <drawable name="expander_close_drawable">@drawable/ic_holo_light_expander_close</drawable> @@ -99,6 +105,11 @@ <!-- FileSystem warning drawable --> <drawable name="filesystem_warning_drawable">@drawable/ic_holo_light_fs_warning</drawable> + <!-- Secure FileSystem icon --> + <drawable name="secure_filesystem_drawable">@drawable/ic_holo_light_secure</drawable> + <!-- Remote FileSystem icon --> + <drawable name="remote_filesystem_drawable">@drawable/ic_holo_light_remote</drawable> + <!-- The popup menu checkable selector drawable --> <drawable name="popup_checkable_selector_drawable">@drawable/checkable_selector</drawable> <!-- The menu checkable selector drawable --> @@ -131,6 +142,8 @@ <drawable name="ic_user_defined_bookmark_drawable">@drawable/ic_holo_light_user_defined_bookmark</drawable> <drawable name="ic_history_search_drawable">@drawable/ic_holo_light_history_search</drawable> <drawable name="ic_copy_drawable">@drawable/ic_holo_light_copy</drawable> + <drawable name="ic_secure_drawable">@drawable/ic_holo_light_secure</drawable> + <drawable name="ic_remote_drawable">@drawable/ic_holo_light_remote</drawable> <!-- Disk usage graph --> <color name="disk_usage_total_color">@color/disk_usage_total</color> @@ -181,6 +194,10 @@ <drawable name="fso_type_text_drawable">@drawable/fso_type_text</drawable> <drawable name="fso_type_video_drawable">@drawable/fso_type_video</drawable> + <!-- Overlay --> + <drawable name="ic_overlay_secure_drawable">@drawable/ic_overlay_secure</drawable> + <drawable name="ic_overlay_remote_drawable">@drawable/ic_overlay_remote</drawable> + <!-- Syntax Highlight --> <color name="ash_text_color">@color/black_transparent</color> <color name="ash_assignment_color">@color/black_transparent</color> diff --git a/res/xml/preferences_headers.xml b/res/xml/preferences_headers.xml index 80c4509d..2c97dced 100644 --- a/res/xml/preferences_headers.xml +++ b/res/xml/preferences_headers.xml @@ -22,6 +22,9 @@ android:fragment="com.cyanogenmod.filemanager.activities.preferences.SearchPreferenceFragment" android:title="@string/pref_search" /> <header + android:fragment="com.cyanogenmod.filemanager.activities.preferences.StoragePreferenceFragment" + android:title="@string/pref_storage" /> + <header android:fragment="com.cyanogenmod.filemanager.activities.preferences.EditorPreferenceFragment" android:title="@string/pref_editor" /> <header diff --git a/res/xml/preferences_storage.xml b/res/xml/preferences_storage.xml new file mode 100644 index 00000000..47f27eea --- /dev/null +++ b/res/xml/preferences_storage.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2012 The CyanogenMod 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. + --> + +<PreferenceScreen + xmlns:android="http://schemas.android.com/apk/res/android"> + + <!-- Secure Storage --> + <PreferenceCategory + android:key="secure_storage" + android:title="@string/pref_secure_storage_category"> + + <!-- Reset password --> + <Preference + android:key="secure_storage_reset_password" + android:title="@string/pref_secure_storage_reset_password_title"/> + + <!-- Delete storage --> + <Preference + android:key="secure_storage_delete_storage" + android:title="@string/pref_secure_storage_delete_storage_title"/> + + <!-- Delayed synchronization --> + <CheckBoxPreference + android:key="cm_filemanager_secure_storage_delayed_sync" + android:title="@string/pref_secure_storage_delayed_sync_title" + android:summary="@string/pref_secure_storage_delayed_sync_summary" + android:persistent="true" + android:defaultValue="true" /> + + </PreferenceCategory> + +</PreferenceScreen> |