mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-08 05:24:39 +01:00
move static method into enum
This commit is contained in:
parent
1e766ee52d
commit
a27e8c4c04
2 changed files with 12 additions and 2 deletions
|
@ -60,7 +60,17 @@ public class DictUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep in sync with loc_names string-array
|
// keep in sync with loc_names string-array
|
||||||
public enum DictLoc { UNKNOWN, BUILT_IN, INTERNAL, EXTERNAL, DOWNLOAD };
|
public enum DictLoc {
|
||||||
|
UNKNOWN,
|
||||||
|
BUILT_IN,
|
||||||
|
INTERNAL,
|
||||||
|
EXTERNAL,
|
||||||
|
DOWNLOAD;
|
||||||
|
public boolean needsStoragePermission()
|
||||||
|
{
|
||||||
|
return this == DOWNLOAD;
|
||||||
|
}
|
||||||
|
};
|
||||||
public static final String INVITED = "invited";
|
public static final String INVITED = "invited";
|
||||||
|
|
||||||
private static DictAndLoc[] s_dictListCache = null;
|
private static DictAndLoc[] s_dictListCache = null;
|
||||||
|
|
|
@ -662,7 +662,7 @@ public class DictsDelegate extends ListDelegateBase
|
||||||
|
|
||||||
private void moveDicts( String[] selNames, DictLoc toLoc )
|
private void moveDicts( String[] selNames, DictLoc toLoc )
|
||||||
{
|
{
|
||||||
if ( DictUtils.needsStoragePermission( toLoc ) ) {
|
if ( toLoc.needsStoragePermission() ) {
|
||||||
tryGetPerms( Perm.STORAGE, R.string.move_dict_rationale,
|
tryGetPerms( Perm.STORAGE, R.string.move_dict_rationale,
|
||||||
Action.MOVE_CONFIRMED, selNames, toLoc );
|
Action.MOVE_CONFIRMED, selNames, toLoc );
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue