Skip to content

Commit 53cacb2

Browse files
committed
Merge pull request #745 from garvankeeley/refine-disk-db
Data storage timer bugs: (1) upload timer kept being reset (2) new idle timer to flush
2 parents 75fabeb + 096311f commit 53cacb2

File tree

6 files changed

+108
-67
lines changed

6 files changed

+108
-67
lines changed

src/org/mozilla/mozstumbler/client/MainActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public void showUploadStats() {
282282
formatTextView(R.id.reports_sent, R.string.reports_sent, Integer.parseInt(value));
283283
}
284284
catch (IOException ex) {
285-
Log.e(LOGTAG, "Exception in showUploadStats():" + ex.toString());
285+
Log.e(LOGTAG, "Exception in showUploadStats()", ex);
286286
}
287287
}
288288

src/org/mozilla/mozstumbler/client/UploadReportsDialog.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ void updateSyncedStats() {
163163
mTotalDataSentView.setText(String.valueOf(kilobytes));
164164
}
165165
catch (IOException ex) {
166-
Log.e(LOGTAG, "Exception in updateSyncedStats():" + ex.toString());
166+
Log.e(LOGTAG, "Exception in updateSyncedStats()", ex);
167167
}
168168
}
169169

src/org/mozilla/mozstumbler/service/StumblerService.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import java.io.IOException;
2424

2525
public final class StumblerService extends PersistentIntentService
26-
implements DataStorageManager.DatabaseIsEmptyTracker {
26+
implements DataStorageManager.StorageIsEmptyTracker {
2727
private static final String LOGTAG = StumblerService.class.getName();
2828
public static final String ACTION_BASE = AppGlobals.ACTION_NAMESPACE;
2929
public static final String ACTION_START_PASSIVE = ACTION_BASE + ".START_PASSIVE";
@@ -161,7 +161,7 @@ public void onDestroy() {
161161
AppGlobals.dataStorageManager.saveCurrentReportsToDisk();
162162
} catch (IOException ex) {
163163
AppGlobals.guiLogInfo(ex.toString());
164-
Log.e(LOGTAG, "Exception in onDestroy saving reports:" + ex.toString());
164+
Log.e(LOGTAG, "Exception in onDestroy saving reports", ex);
165165
}
166166
}
167167
mReporter.shutdown();
@@ -221,12 +221,11 @@ public void onRebind(Intent intent) {
221221
if (AppGlobals.isDebug)Log.d(LOGTAG,"onRebind");
222222
}
223223

224-
public void databaseIsEmpty(boolean isEmpty) {
224+
public void storageIsEmpty(boolean isEmpty) {
225225
if (isEmpty) {
226226
UploadAlarmReceiver.cancelAlarm(this);
227227
} else {
228228
UploadAlarmReceiver.scheduleAlarm(this);
229229
}
230230
}
231-
232-
}
231+
}

0 commit comments

Comments
 (0)