diff --git a/java/res/values-pl/strings-appname.xml b/java/res/values-pl/strings-appname.xml
index 4d244d705..e460644a3 100644
--- a/java/res/values-pl/strings-appname.xml
+++ b/java/res/values-pl/strings-appname.xml
@@ -21,7 +21,10 @@
"Klawiatura Android"
- "Sprawdzanie pisowni w Androidzie"
- "Ustawienia klawiatury Android"
- "Ustawienia sprawdzania pisowni"
+
+
+
+
+
+
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index 03dce9ca6..273525100 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -308,6 +308,8 @@
- operation[CHAR LIMIT=100] -->
Please demonstrate the issue you are writing about.\n\nWhen finished, select the \"Bug?\" button again."
+
+ Send feedback
Recording cancelled due to timeout
diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml
index 51f580721..e299ce4f8 100644
--- a/java/res/xml/prefs.xml
+++ b/java/res/xml/prefs.xml
@@ -176,6 +176,9 @@
android:key="pref_show_setup_wizard_icon"
android:title="@string/show_setup_wizard_icon" />
+
() {
@Override
public Object call() throws Exception {
try {
if (mHasWrittenData) {
mJsonWriter.endArray();
- mJsonWriter.flush();
- mJsonWriter.close();
- if (DEBUG) {
- Log.d(TAG, "wrote log to " + mFile);
- }
mHasWrittenData = false;
- } else {
- if (DEBUG) {
- Log.d(TAG, "close() called, but no data, not outputting");
- }
+ }
+ mJsonWriter.flush();
+ mJsonWriter.close();
+ if (DEBUG) {
+ Log.d(TAG, "wrote log to " + mFile);
}
} catch (Exception e) {
- Log.d(TAG, "error when closing ResearchLog:");
- e.printStackTrace();
+ Log.d(TAG, "error when closing ResearchLog:", e);
} finally {
+ // Marking the file as read-only signals that this log file is ready to be
+ // uploaded.
if (mFile != null && mFile.exists()) {
mFile.setWritable(false, false);
}
@@ -125,9 +136,24 @@ public class ResearchLog {
mExecutor.shutdown();
}
- private boolean mIsAbortSuccessful;
+ /**
+ * Block until the research log has shut down and spooled out all output or {@code timeout}
+ * occurs.
+ *
+ * @param timeout time to wait for close in milliseconds
+ */
+ public void blockingClose(final long timeout) {
+ close(null);
+ awaitTermination(timeout, TimeUnit.MILLISECONDS);
+ }
- public synchronized void abort() {
+ /**
+ * Waits for publication requests to finish, closes the JsonWriter, but then deletes the backing
+ * output file.
+ *
+ * @param onAbort run after the abort() operation has completed asynchronously
+ */
+ private synchronized void abort(final Runnable onAbort) {
mExecutor.submit(new Callable