mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Keep obsolete license values to prevent crashe after upgrade
This commit is contained in:
parent
db81e9c6bb
commit
87b3132d21
3 changed files with 28 additions and 0 deletions
|
|
@ -214,6 +214,10 @@ public class Utils {
|
|||
return "{{self|cc-by-sa-4.0}}";
|
||||
} else if (license.equals(Prefs.Licenses.CC0)) {
|
||||
return "{{self|cc-zero}}";
|
||||
} else if (license.equals(Prefs.Licenses.CC_BY)) {
|
||||
return "{{self|cc-by-3.0}}";
|
||||
} else if (license.equals(Prefs.Licenses.CC_BY_SA)) {
|
||||
return "{{self|cc-by-sa-3.0}}";
|
||||
}
|
||||
throw new RuntimeException("Unrecognized license value");
|
||||
}
|
||||
|
|
@ -229,6 +233,10 @@ public class Utils {
|
|||
return R.string.license_name_cc_by_sa_four;
|
||||
} else if (license.equals(Prefs.Licenses.CC0)) {
|
||||
return R.string.license_name_cc0;
|
||||
} else if (license.equals(Prefs.Licenses.CC_BY)) { // for backward compatibility to v2.1
|
||||
return R.string.license_name_cc_by_3_0;
|
||||
} else if (license.equals(Prefs.Licenses.CC_BY_SA)) { // for backward compatibility to v2.1
|
||||
return R.string.license_name_cc_by_sa_3_0;
|
||||
}
|
||||
throw new RuntimeException("Unrecognized license value");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue