Skip to content

Commit

Permalink
hotfix oppia-1565 - crash on upgrade task from 2020 (fresh install wi…
Browse files Browse the repository at this point in the history
…th sd card available and a course pre loaded)
  • Loading branch information
jbc25 committed Jun 30, 2023
1 parent b6b9391 commit 0788f1f
Showing 1 changed file with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,6 @@ protected BasicResult doInBackground(Void... params) {
result.setSuccess(true);
}

if (!prefs.getBoolean("upgradeV43", false)) {
upgradeV43();
Editor editor = prefs.edit();
editor.putBoolean("upgradeV43", true).apply();
publishProgress(this.ctx.getString(R.string.info_upgrading, "v43"));
result.setSuccess(true);
}

if (!prefs.getBoolean("upgradeV46", false)) {
Editor editor = prefs.edit();
editor.putBoolean("upgradeV46", true);
Expand Down Expand Up @@ -239,18 +231,6 @@ protected void upgradeV20() {
prefs.edit().putString(PrefsActivity.PREF_SERVER, ctx.getString(R.string.prefServerDefault)).apply();
}

/* go through and add html content to tables
*/
protected void upgradeV43() {
SearchUtils.reindexAll(ctx);
prefs = PreferenceManager.getDefaultSharedPreferences(ctx);
User user = new User();
user.setUsername(SessionManager.getUsername(ctx));
user.setApiKey(prefs.getString(UpgradeManagerTask.PREF_API_KEY, ""));
DbHelper db = DbHelper.getInstance(ctx);
long userId = db.addOrUpdateUser(user);
db.updateV43(userId);
}

// update all the current quiz results for the score/maxscore etc
protected void upgradeV54() {
Expand Down

0 comments on commit 0788f1f

Please sign in to comment.