Source:
private static void upgrade(int oldVersion) { if (oldVersion == -1) { return; } if (oldVersion < 1070196) { int oldValueInDays = UserPreferences.getEpisodeCleanupValue(); if (oldValueInDays > 0) { UserPreferences.setEpisodeCleanupValue(oldValueInDays * 24); } } if (oldVersion < 1070197) { if (prefs.getBoolean("prefMobileUpdate", false)) { prefs.edit().putString("prefMobileUpdateAllowed", "everything").apply(); } } if (oldVersion < 1070300) { prefs.edit().putString(UserPreferences.PREF_MEDIA_PLAYER, UserPreferences.PREF_MEDIA_PLAYER_EXOPLAYER).apply(); if (prefs.getBoolean("prefEnableAutoDownloadOnMobile", false)) { UserPreferences.setAllowMobileAutoDownload(true); } switch (prefs.getString("prefMobileUpdateAllowed", "images")) { case "everything": UserPreferences.setAllowMobileFeedRefresh(true); UserPreferences.setAllowMobileEpisodeDownload(true); UserPreferences.setAllowMobileImages(true); break; case "images": UserPreferences.setAllowMobileImages(true); break; case "nothing": UserPreferences.setAllowMobileImages(false); break; } } if (oldVersion < 1070397) { final String keyOldPrefEnqueueFront = "prefQueueAddToFront"; boolean enqueueAtFront = prefs.getBoolean(keyOldPrefEnqueueFront, false); EnqueueLocation enqueueLocation = enqueueAtFront ? EnqueueLocation.FRONT : EnqueueLocation.BACK; UserPreferences.setEnqueueLocation(enqueueLocation); } if (oldVersion < 1070400) { int theme = UserPreferences.getTheme(); if (theme == R.style.Theme_AntennaPod_Light) { prefs.edit().putString(UserPreferences.PREF_THEME, "system").apply(); } UserPreferences.setQueueLocked(false); } }

Target:
private static void upgrade(int oldVersion) { if (oldVersion == -1) { return; } if (oldVersion < 1070196) { int oldValueInDays = UserPreferences.getEpisodeCleanupValue(); if (oldValueInDays > 0) { UserPreferences.setEpisodeCleanupValue(oldValueInDays * 24); } } if (oldVersion < 1070197) { if (prefs.getBoolean("prefMobileUpdate", false)) { prefs.edit().putString("prefMobileUpdateAllowed", "everything").apply(); } } if (oldVersion < 1070300) { prefs.edit().putString(UserPreferences.PREF_MEDIA_PLAYER, UserPreferences.PREF_MEDIA_PLAYER_EXOPLAYER).apply(); if (prefs.getBoolean("prefEnableAutoDownloadOnMobile", false)) { UserPreferences.setAllowMobileAutoDownload(true); } switch (prefs.getString("prefMobileUpdateAllowed", "images")) { case "everything": UserPreferences.setAllowMobileFeedRefresh(true); UserPreferences.setAllowMobileEpisodeDownload(true); UserPreferences.setAllowMobileImages(true); break; case "images": UserPreferences.setAllowMobileImages(true); break; case "nothing": UserPreferences.setAllowMobileImages(false); break; } } if (oldVersion < 1070400) { int theme = UserPreferences.getTheme(); if (theme == R.style.Theme_AntennaPod_Light) { prefs.edit().putString(UserPreferences.PREF_THEME, "system").apply(); } UserPreferences.setQueueLocked(false); if (!prefs.contains(UserPreferences.PREF_ENQUEUE_LOCATION)) { final String keyOldPrefEnqueueFront = "prefQueueAddToFront"; boolean enqueueAtFront = prefs.getBoolean(keyOldPrefEnqueueFront, false); EnqueueLocation enqueueLocation = enqueueAtFront ? EnqueueLocation.FRONT : EnqueueLocation.BACK; UserPreferences.setEnqueueLocation(enqueueLocation); } } }