open wordlists browser even without Storage permission

and add a na-key to rationale for storage permissions so don't
ask forever when user wants to decline.
This commit is contained in:
Eric House 2020-09-01 12:29:33 -07:00
parent b5bc784431
commit e0d291ae0e
3 changed files with 20 additions and 4 deletions

View file

@ -524,7 +524,8 @@ public class DictsDelegate extends ListDelegateBase
makeNotAgainBuilder( R.string.not_again_dicts, R.string.key_na_dicts ) makeNotAgainBuilder( R.string.not_again_dicts, R.string.key_na_dicts )
.show(); .show();
tryGetPerms( Perm.STORAGE, R.string.dicts_storage_rationale, Perms23.tryGetPermsNA( this, Perm.STORAGE, R.string.dicts_storage_rationale,
R.string.key_na_perms_storage_dicts,
Action.STORAGE_CONFIRMED ); Action.STORAGE_CONFIRMED );
} // init } // init
@ -944,6 +945,20 @@ public class DictsDelegate extends ListDelegateBase
return handled; return handled;
} }
@Override
public boolean onNegButton( Action action, Object[] params )
{
boolean handled = true;
switch ( action ) {
case STORAGE_CONFIRMED:
mkListAdapter();
break;
default:
handled = super.onNegButton( action, params );
}
return handled;
}
private DictLoc itemToRealLoc( int item ) private DictLoc itemToRealLoc( int item )
{ {
item += DictLoc.INTERNAL.ordinal(); item += DictLoc.INTERNAL.ordinal();

View file

@ -154,6 +154,7 @@
<string name="key_na_sms_banned">key_na_sms_banned</string> <string name="key_na_sms_banned">key_na_sms_banned</string>
<string name="key_na_longtap_lookup">key_na_longtap_lookup</string> <string name="key_na_longtap_lookup">key_na_longtap_lookup</string>
<string name="key_na_perms_phonestate">key_na_perms_phonestate</string> <string name="key_na_perms_phonestate">key_na_perms_phonestate</string>
<string name="key_na_perms_storage_dicts">key_na_perms_storage_dicts</string>
<string name="key_na_newFeatureFilter">key_na_newFeatureFilter</string> <string name="key_na_newFeatureFilter">key_na_newFeatureFilter</string>
<string name="key_na_dupstatus_host">key_na_dupstatus_host</string> <string name="key_na_dupstatus_host">key_na_dupstatus_host</string>

View file

@ -2428,7 +2428,7 @@
displayed. displayed.
</string> </string>
<string name="move_dict_rationale">Storing a wordlist in the <string name="move_dict_rationale">Storing a wordlist in the
Downloads area requires permission.</string> Downloads area requires Storage permission.</string>
<string name="remove_sms">Remove SMS</string> <string name="remove_sms">Remove SMS</string>
<!-- In the permissions rationale explanation, means go ahead and <!-- In the permissions rationale explanation, means go ahead and
have the OS ask for permission --> have the OS ask for permission -->