[app] Show codename only for Android preview (#161)

This commit is contained in:
tehcneko 2021-02-22 21:08:05 +08:00 committed by GitHub
parent a10e882a39
commit 3772fea76d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -72,7 +72,12 @@ public class StatusDialogBuilder extends AlertDialog.Builder {
binding.framework.setText(String.format(Locale.US, "%s (%s)", installXposedVersion, ConfigManager.getXposedVersionCode()));
}
binding.androidVersion.setText(context.getString(R.string.android_sdk, getAndroidVersion(), Build.VERSION.RELEASE, Build.VERSION.SDK_INT));
if (Build.VERSION.PREVIEW_SDK_INT != 0) {
binding.androidVersion.setText(context.getString(R.string.android_sdk_preview, Build.VERSION.CODENAME));
} else {
binding.androidVersion.setText(context.getString(R.string.android_sdk, getAndroidVersion(), Build.VERSION.RELEASE, Build.VERSION.SDK_INT));
}
binding.manufacturer.setText(getUIFramework());
binding.cpu.setText(getCompleteArch());
@ -134,6 +139,8 @@ public class StatusDialogBuilder extends AlertDialog.Builder {
return "Q";
case 30:
return "R";
case 31:
return "S";
}
return "Unknown";
}

View File

@ -93,6 +93,7 @@
<string name="scroll_bottom">Scroll to bottom</string>
<string name="android_sdk" translatable="false">Android %2$s (%1$s, API %3$d)</string>
<string name="android_sdk_preview" translatable="false">Android %1$s Preview</string>
<string name="not_logcat">This is the LSPosed Framework and modules log\nif you need a Android logcat, you can try our Log Catcher Magisk module</string>
<!-- LSPd related -->