Source:
private static void upgrade(int oldVersion) { if (oldVersion == -1) { if(UserPreferences.getUsageCountingMillis() < 0){ UserPreferences.resetUsageCounting(); } 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); UserPreferences.setStreamOverDownload(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); } } if (oldVersion < 1080100) { prefs.edit().putString(UserPreferences.PREF_VIDEO_BEHAVIOR, "pip").apply(); } }

Target:
private static void upgrade(int oldVersion) { if (oldVersion == -1) { if (UserPreferences.getUsageCountingDateMillis() < 0) { UserPreferences.resetUsageCountingDate(); } 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); UserPreferences.setStreamOverDownload(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); } } if (oldVersion < 1080100) { prefs.edit().putString(UserPreferences.PREF_VIDEO_BEHAVIOR, "pip").apply(); } }