Bug 1246792 - Use existing constant for times.json. r=ahunt
MozReview-Commit-ID: ACtIOPiOSfs
--- a/mobile/android/base/java/org/mozilla/gecko/GeckoProfile.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoProfile.java
@@ -1013,26 +1013,26 @@ public final class GeckoProfile {
parser.addSection(profileSection);
parser.write();
enqueueInitialization(profileDir);
// Write out profile creation time, mirroring the logic in nsToolkitProfileService.
try {
- FileOutputStream stream = new FileOutputStream(profileDir.getAbsolutePath() + File.separator + "times.json");
+ FileOutputStream stream = new FileOutputStream(profileDir.getAbsolutePath() + File.separator + TIMES_PATH);
OutputStreamWriter writer = new OutputStreamWriter(stream, Charset.forName("UTF-8"));
try {
writer.append("{\"created\": " + System.currentTimeMillis() + "}\n");
} finally {
writer.close();
}
} catch (Exception e) {
// Best-effort.
- Log.w(LOGTAG, "Couldn't write times.json.", e);
+ Log.w(LOGTAG, "Couldn't write " + TIMES_PATH, e);
}
// Initialize pref flag for displaying the start pane for a new profile.
final SharedPreferences prefs = GeckoSharedPrefs.forProfile(mApplicationContext);
prefs.edit().putBoolean(FirstrunAnimationContainer.PREF_FIRSTRUN_ENABLED, true).apply();
return profileDir;
}