Commit b00b8a6c authored by Roumen Petrov's avatar Roumen Petrov

use static path settins

Allos paths to be used outside activities.
parent dafc721b
......@@ -34,11 +34,11 @@
*/
@Deprecated
public class PathSettings {
private String mPrependPath = null;
private String mAppendPath = null;
private static String mPrependPath = null;
private static String mAppendPath = null;
// extracted from SharedPreferences
private boolean path_verify;
private static boolean path_verify;
private PathSettings(Resources res) {
......@@ -54,7 +54,7 @@ public void extractPreferences(SharedPreferences prefs) {
path_verify = prefs.getBoolean("verify_path", path_verify);
}
public String getPrependPath() {
public static String getPrependPath() {
return mPrependPath;
}
......@@ -62,7 +62,7 @@ public void setPrependPath(String prependPath) {
mPrependPath = prependPath;
}
public String getAppendPath() {
public static String getAppendPath() {
return mAppendPath;
}
......@@ -70,7 +70,7 @@ public void setAppendPath(String appendPath) {
mAppendPath = appendPath;
}
public String buildPATH() {
public static String buildPATH() {
String path = System.getenv("PATH");
if (path == null) path = "";
path = extendPath(path);
......@@ -79,7 +79,7 @@ public String buildPATH() {
return path;
}
private String extendPath(String path) {
private static String extendPath(String path) {
String s;
s = getAppendPath();
......@@ -93,7 +93,7 @@ private String extendPath(String path) {
return path;
}
private String preservePath(String path) {
private static String preservePath(String path) {
String[] entries = path.split(File.pathSeparator);
StringBuilder new_path = new StringBuilder(path.length());
for (String entry : entries) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment