[app] show API in info dialog (#1312)

This commit is contained in:
LoveSy 2021-10-19 00:28:41 +08:00 committed by GitHub
parent 5eac73de77
commit 8a09ff11ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 0 deletions

View File

@ -43,9 +43,11 @@ public class InfoDialogBuilder extends BlurBehindDialogBuilder {
if (ConfigManager.isBinderAlive()) {
binding.apiVersion.setText(String.valueOf(ConfigManager.getXposedApiVersion()));
binding.api.setText(ConfigManager.getApi());
binding.frameworkVersion.setText(String.format(Locale.ROOT, "%s (%s)", ConfigManager.getXposedVersionName(), ConfigManager.getXposedVersionCode()));
} else {
binding.apiVersion.setText(R.string.not_installed);
binding.api.setText(R.string.not_installed);
binding.frameworkVersion.setText(R.string.not_installed);
}
binding.managerVersion.setText(String.format(Locale.ROOT, "%s (%s)", BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE));
@ -66,6 +68,10 @@ public class InfoDialogBuilder extends BlurBehindDialogBuilder {
"\n" +
binding.apiVersion.getText() +
"\n\n" +
context.getString(R.string.info_api) +
"\n" +
binding.api.getText() +
"\n\n" +
context.getString(R.string.info_framework_version) +
"\n" +
binding.frameworkVersion.getText() +

View File

@ -42,6 +42,19 @@
android:layout_height="wrap_content"
android:text="@string/not_installed" />
<TextView
style="@style/DeviceInfoDialogLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/info_api" />
<TextView
style="@style/DeviceInfoDialogValue"
android:id="@+id/api"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/not_installed" />
<TextView
style="@style/DeviceInfoDialogLabel"
android:layout_width="match_parent"

View File

@ -226,4 +226,5 @@
<string name="color_blue_grey">Blue grey</string>
<string name="expand">expand</string>
<string name="collapse">collapse</string>
<string name="info_api">API</string>
</resources>