mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-23 11:31:33 +01:00
Minor cleanup
This commit is contained in:
parent
06bf2ab17f
commit
287f2dae4a
|
@ -115,10 +115,9 @@ public class EditFilePreference extends EditTextPreference {
|
|||
currentPath = newPath;
|
||||
}
|
||||
|
||||
final String action = FileBrowseUtil.getPickAction(pickDirectory);
|
||||
final String title = getContext().getString(pickDirectory ? R.string.select_directory
|
||||
: R.string.select_file);
|
||||
Intent i = new Intent(action);
|
||||
String title = getContext().getString(pickDirectory ? R.string.select_directory
|
||||
: R.string.select_file);
|
||||
Intent i = new Intent(FileBrowseUtil.getPickAction(pickDirectory));
|
||||
i.setData(Uri.fromFile(new File(currentPath)));
|
||||
i.putExtra("org.openintents.extra.TITLE", title);
|
||||
try {
|
||||
|
@ -140,9 +139,8 @@ public class EditFilePreference extends EditTextPreference {
|
|||
private boolean matchPattern(String s) {
|
||||
if (ignorePattern.isEmpty())
|
||||
return false;
|
||||
Pattern p;
|
||||
try {
|
||||
p = Pattern.compile(ignorePattern);
|
||||
Pattern p = Pattern.compile(ignorePattern);
|
||||
return p.matcher(s).find();
|
||||
} catch (PatternSyntaxException ex) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user