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