Commit 194fbf69 authored by gsantner's avatar gsantner 🦀
Browse files

Rename test flavor to atest (so it's default dev flavor when starting android studio)

parent 6d456201
......@@ -10,18 +10,19 @@ android {
compileSdkVersion rootProject.ext.version_compileSdk
defaultConfig {
resValue "string", "manifest_package_id", "com.github.dfa.diaspora_android"
applicationId "com.github.dfa.diaspora_android"
versionName "1.3.1"
versionCode 42
vectorDrawables.useSupportLibrary = true
minSdkVersion rootProject.ext.version_minSdk
targetSdkVersion rootProject.ext.version_compileSdk
buildConfigField "boolean", "IS_TEST_BUILD", "false"
buildConfigField "boolean", "IS_GPLAY_BUILD", "false"
buildConfigField "String[]", "DETECTED_ANDROID_LOCALES", "${findUsedAndroidLocales()}"
buildConfigField "String", "GITHASH", "\"${getGitHash()}\""
resValue "string", "manifest_package_id", "com.github.dfa.diaspora_android"
applicationId "com.github.dfa.diaspora_android"
versionName "1.3.1"
versionCode 42
vectorDrawables.useSupportLibrary = true
setProperty("archivesBaseName", applicationId + "-v" + versionCode + "-" + versionName)
}
flavorDimensions "default"
......@@ -38,7 +39,7 @@ android {
applicationId "net.gsantner.dandelior"
}
flavorTest {
flavorAtest {
applicationId "net.gsantner.secondlion"
versionCode = Integer.parseInt(new Date().format('yyMMdd'))
versionName = new Date().format('yyMMdd')
......
......@@ -58,6 +58,8 @@ public class SharedPreferencesPropertyBackend implements PropertyBackend<String,
protected static final String ARRAY_SEPARATOR = "%%%";
protected static final String ARRAY_SEPARATOR_SUBSTITUTE = "§§§";
public static final String SHARED_PREF_APP = "app";
private static String _debugLog = "";
//
// Members, Constructors
......@@ -571,4 +573,16 @@ public class SharedPreferencesPropertyBackend implements PropertyBackend<String,
}
return trigger;
}
public static void clearDebugLog() {
_debugLog = "";
}
public static String getDebugLog() {
return _debugLog;
}
public static synchronized void appendDebugLog(String text) {
_debugLog += "[" + new Date().toString() + "] " + text + "\n";
}
}
......@@ -126,7 +126,6 @@ public class SearchOrCustomTextDialog {
}
};
final ActivityUtils activityUtils = new ActivityUtils(activity);
final AppCompatEditText searchEditText = new AppCompatEditText(activity);
searchEditText.setSingleLine(true);
searchEditText.setMaxLines(1);
......@@ -156,8 +155,7 @@ public class SearchOrCustomTextDialog {
linearLayout.setOrientation(LinearLayout.VERTICAL);
if (dopt.isSearchEnabled) {
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
ContextUtils cu = new net.gsantner.opoc.util.ContextUtils(listView.getContext());
int px = (int) (new net.gsantner.opoc.util.ContextUtils(listView.getContext()).convertDpToPx(8));
int px = (int) (new ContextUtils(listView.getContext()).convertDpToPx(8));
lp.setMargins(px, px / 2, px, px / 2);
linearLayout.addView(searchEditText, lp);
}
......@@ -288,7 +286,13 @@ public class SearchOrCustomTextDialog {
List<String> ret = new ArrayList<>();
boolean first = true;
Iterator<File> iter = FileUtils.iterateFilesAndDirs(_searchDir, this, this);
Iterator<File> iter = null;
try {
iter = FileUtils.iterateFilesAndDirs(_searchDir, this, this);
} catch (Exception ex) {
// Iterator may throw an error at creation
return ret;
}
while (iter.hasNext() && !isCancelled()) {
File f = iter.next();
if (first) {
......
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