Skip to content

Commit

Permalink
#105: renamed mode to "App protected/pinned"
Browse files Browse the repository at this point in the history
  • Loading branch information
k3b committed Jan 8, 2018
1 parent 142f550 commit 94f3f3c
Show file tree
Hide file tree
Showing 12 changed files with 120 additions and 31 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/de/k3b/android/androFotoFinder/Global.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ public static void fixMenu(Context context, Menu menu) {
R.id.cmd_more,
R.id.cmd_show_geo,
R.id.cmd_gallery,
R.id.cmd_unlock2,
R.id.cmd_lock,
R.id.cmd_app_unpin2,
R.id.cmd_app_pin,
R.id.cmd_show_geo_as
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class LockScreen {

public static boolean onOptionsItemSelected(Activity parent, MenuItem item) {
switch (item.getItemId()) {
case R.id.cmd_lock:
case R.id.cmd_app_pin:
if (!isLocked(parent)) {
if (OS_APPLOCK_ENABLED) {
parent.startLockTask();
Expand All @@ -50,7 +50,7 @@ public static boolean onOptionsItemSelected(Activity parent, MenuItem item) {
}
}
return true;
case R.id.cmd_unlock2:
case R.id.cmd_app_unpin2:
// only for old android (< 5.0). Else use app-pinning-end
Global.locked = false;
SettingsActivity.global2Prefs(parent.getApplication());
Expand All @@ -74,8 +74,8 @@ public static boolean isLocked(Context ctx) {

public static void fixMenu(Menu menu) {
if ((menu != null) && OS_APPLOCK_ENABLED) {
MenuItem unlock = menu.findItem(R.id.cmd_unlock2);
if (unlock != null) menu.removeItem(R.id.cmd_unlock2);
MenuItem unlock = menu.findItem(R.id.cmd_app_unpin2);
if (unlock != null) menu.removeItem(R.id.cmd_app_unpin2);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ public String get(MediaUtil.FieldID id) {
case rating:
return getString2(R.string.lbl_rating);
case visibility:
return getString2(R.string.lbl_security);
return getString2(R.string.lbl_image_visibility);
case tags:
return getString2(R.string.lbl_tag);
case path:
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_exif_edit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/lbl_security"
android:text="@string/lbl_image_visibility"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/line_date"
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/menu/menu_gallery_locked.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" tools:context=".GalleryActivity">

<item android:id="@+id/cmd_unlock"
android:title="@string/menu_title_unlock"
<item android:id="@+id/cmd_app_unpin"
android:title="@string/menu_title_app_unpinnend"
android:icon="@android:drawable/ic_lock_lock"
android:visible="true"
android:orderInCategory="1"
Expand Down Expand Up @@ -95,8 +95,8 @@
</menu>
</item>

<item android:id="@+id/cmd_unlock2"
android:title="@string/menu_title_unlock"
<item android:id="@+id/cmd_app_unpin2"
android:title="@string/menu_title_app_unpinnend"
android:icon="@android:drawable/ic_lock_lock"
android:visible="true"
android:orderInCategory="9998"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/menu/menu_gallery_non_multiselect.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
<item android:id="@+id/cmd_scan" android:title="@string/scanner_menu_title" android:orderInCategory="110"
android:showAsAction="never" android:visible="true"/>

<item android:id="@+id/cmd_lock"
android:title="@string/menu_title_lock"
<item android:id="@+id/cmd_app_pin"
android:title="@string/menu_title_app_pinnend"
android:visible="true"
android:orderInCategory="9999"
android:showAsAction="never" />
Expand Down
89 changes: 89 additions & 0 deletions app/src/main/res/menu/menu_gallery_pick_locked.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (c) 2015 by k3b.
*
* This file is part of AndroFotoFinder.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>
*/
-->
<!-- menue of gallery for modus pick/getContent -->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/cmd_app_unpin"
android:title="@string/menu_title_app_unpinnend"
android:icon="@android:drawable/ic_lock_lock"
android:visible="true"
android:orderInCategory="1"
android:showAsAction="always" />
<item android:id="@+id/cmd_ok" android:title="@string/btn_ok"
android:icon="@drawable/ic_action_accept"
android:orderInCategory="1" android:showAsAction="always" android:visible="true" />
<item android:id="@+id/cmd_cancel_pick" android:title="@string/btn_cancel"
android:icon="@drawable/ic_action_cancel"
android:orderInCategory="1" android:showAsAction="always" android:visible="true" />

<item android:id="@+id/cmd_sort"
android:title="@string/sort_menu_title"
android:visible="true"
android:orderInCategory="15"
android:showAsAction="never" >
<menu>
<item android:id="@+id/cmd_sort_directory"
android:title="@string/sort_by_name"
android:visible="true"
android:orderInCategory="5" />
<item android:id="@+id/cmd_sort_date"
android:title="@string/sort_by_date"
android:visible="true"
android:orderInCategory="5"/>
<item android:id="@+id/cmd_sort_location"
android:title="@string/sort_by_place"
android:visible="true"
android:orderInCategory="5" />
<item android:id="@+id/cmd_sort_width"
android:title="@string/sort_by_width"
android:visible="true"
android:orderInCategory="5" />
<item android:id="@+id/cmd_sort_file_len"
android:title="@string/sort_by_file_size"
android:visible="true"
android:orderInCategory="5" />
<item android:id="@+id/cmd_sort_path_len"
android:title="@string/sort_by_name_len"
android:visible="true"
android:orderInCategory="5" />
</menu>
</item>

<item android:id="@+id/cmd_app_unpin2"
android:title="@string/menu_title_app_unpinnend"
android:icon="@android:drawable/ic_lock_lock"
android:visible="true"
android:orderInCategory="9999"
android:showAsAction="never" />

<item android:id="@+id/cmd_about"
android:title="@string/about_summary"
android:visible="true"
android:orderInCategory="10000"
android:showAsAction="never" />
<!--
<item android:id="@+id/cmd_more"
android:title="@string/more_menu_title"
android:visible="true"
android:orderInCategory="32700"
android:showAsAction="never" />
-->
</menu>
4 changes: 2 additions & 2 deletions app/src/main/res/menu/menu_image_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
android:orderInCategory="1001"
android:showAsAction="never" />

<item android:id="@+id/cmd_lock"
android:title="@string/menu_title_lock"
<item android:id="@+id/cmd_app_pin"
android:title="@string/menu_title_app_pinnend"
android:visible="true"
android:orderInCategory="9999"
android:showAsAction="never" />
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/menu/menu_image_detail_locked.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
tools:context=".imagedetail.ImageDetailActivityViewPager">
<!-- note: items with odd orderInCategory will not go to quick button -->

<item android:id="@+id/cmd_unlock"
android:title="@string/menu_title_unlock"
<item android:id="@+id/cmd_app_unpin"
android:title="@string/menu_title_app_unpinnend"
android:icon="@android:drawable/ic_lock_lock"
android:visible="true"
android:orderInCategory="1"
Expand All @@ -35,8 +35,8 @@
android:checkable="true"
android:orderInCategory="901" android:showAsAction="never" />

<item android:id="@+id/cmd_unlock2"
android:title="@string/menu_title_unlock"
<item android:id="@+id/cmd_app_unpin2"
android:title="@string/menu_title_app_unpinnend"
android:icon="@android:drawable/ic_lock_lock"
android:visible="true"
android:orderInCategory="9999"
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,16 +227,16 @@ Verstecken kann über das 'Media-Scanner' Gallery-Menü rückgängig gemacht wer
1708NewName0001.jpg -->
<string name="preview_message_format">"%1$s %2$d Photos\n\talt %3$s (%4$s), &#8230;\nneu %5$s\n\t%6$s"</string>

<!-- new in 0.6.3 -->
<!-- new in 0.6.3 additional sorting options -->
<string name="sort_by_file_size">Größe der Datei</string>
<string name="sort_by_width">Bildbreite</string>

<!-- privacy modus -->
<string name="lbl_security">Sichbarkeit</string>
<!-- new in 0.6.3 edit exif images can have visibility private or public -->
<string name="lbl_image_visibility">Sichbarkeit</string>

<!-- #105 Appplication-pinning, aka "Kiosk Mode", "LockTask": disable dangerous menu-items -->
<string name="menu_title_lock">App Geschützt/Fixiert</string>
<string name="menu_title_unlock">Schutz/Fixierung aufheben</string>
<string name="menu_title_app_pinnend">App Geschützt/Fixiert</string>
<string name="menu_title_app_unpinnend">Schutz/Fixierung aufheben</string>

<!-- depricated tags_update_result_format use image_success_update_format instead -->

Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -231,16 +231,16 @@ You can undo hiding by calling the mediascanner from gallery-menu."</string>
1708NewName0001.jpg -->
<string name="preview_message_format">"%1$s %2$d Photos\n\t%3$s (%4$s), &#8230;\nTo %5$s\n\t%6$s"</string>

<!-- new in 0.6.3 -->
<!-- new in 0.6.3 additional sorting options -->
<string name="sort_by_file_size">Size</string>
<string name="sort_by_width">Width</string>

<!-- privacy modus -->
<string name="lbl_security">Security</string>
<!-- new in 0.6.3 edit exif images can have visibility private or public -->
<string name="lbl_image_visibility">Visibility</string>

<!-- #105 Appplication-pinning, aka "Kiosk Mode", "LockTask": disable dangerous menu-items -->
<string name="menu_title_lock">Protect (App Pinning)</string>
<string name="menu_title_unlock">Unprotect (unpin app)</string>
<string name="menu_title_app_pinnend">App protected/pinned</string>
<string name="menu_title_app_unpinnend">App unprotect/unpinned</string>

<!-- depricated tags_update_result_format use image_success_update_format instead -->
</resources>
2 changes: 1 addition & 1 deletion fastlane/metadata/android/en-US/changelogs/35.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* NEW: Protect-mode (Extended App Pinning): Allow to savley hand over your phone to someone else and allow him/her only to view those images that you have chosen before. Dangerous commands (edit, copy, delete, rootfilter, settings, ...) are not available while "App Pinning" is active.
* NEW: Mode (App protected/pinned(Extended App Pinning)): Allow to savley hand over your phone to someone else and allow him/her to view only those images that you have chosen before. Dangerous commands (edit, copy, delete, rootfilter, settings, ...) are not available while "App Pinning" is active.
* NEW: Folder-rule-based autoprocessing for copy/move photo(s) with rename-file-pattern and auto-apply userdefined exif. Example: If you move IMG_20171221_085715.jpg to folder .../holiday/2017krete/ it will be automatically renamed to 17krete022.jpg and gets tags holiday, greece, krete if you define a rule for that folder.
* NEW: Mark images as "PRIVATE" and allow filtering include/exclude "PRIVATE"
* Gallery view: Added sort by (image-)width, (file-)size
Expand Down

0 comments on commit 94f3f3c

Please sign in to comment.