Use BuildConfig for version name

This commit is contained in:
NekoInverter 2020-04-06 13:00:18 +08:00
parent 2d63aa9951
commit 686c281a6f
No known key found for this signature in database
GPG Key ID: 280D6CCCF95715F9
2 changed files with 3 additions and 9 deletions

View File

@ -20,7 +20,6 @@
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-keep class org.meowcat.edxposed.manager.util.json.**{public *; }
-keep class org.meowcat.edxposed.manager.xposed.**{public *; }
-keep class de.robv.android.xposed.installer.**{public *; }
-repackageclasses ''
-allowaccessmodification
-optimizationpasses 9

View File

@ -46,12 +46,7 @@ public class AboutActivity extends BaseActivity {
.setMessage(HtmlCompat.fromHtml(changes, HtmlCompat.FROM_HTML_MODE_LEGACY))
.setPositiveButton(android.R.string.ok, null).show());
}
try {
String version = getPackageManager().getPackageInfo(packageName, 0).versionName;
binding.appVersion.setText(version);
} catch (PackageManager.NameNotFoundException ignored) {
}
binding.appVersion.setText(BuildConfig.VERSION_NAME);
binding.licensesView.setOnClickListener(v12 -> startActivity(new Intent(this, OssLicensesMenuActivity.class)));