Skip to content

Commit

Permalink
opt: about page display device info
Browse files Browse the repository at this point in the history
  • Loading branch information
Sevtinge committed Dec 10, 2024
1 parent 66c37a9 commit 6d98560
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import com.sevtinge.hyperceiler.ui.fragment.main.ContentFragment.IFragmentChange;

import java.lang.reflect.Field;
import java.util.Objects;

import fan.appcompat.app.ActionBar;
import fan.appcompat.app.Fragment;
Expand Down Expand Up @@ -233,10 +234,17 @@ public void initPrefs() {
mDeviceInfoAndroid = findPreference("prefs_key_about_device_info_android");
mDeviceInfoOs = findPreference("prefs_key_about_device_info_os");
mDeviceInfoPadding = findPreference("prefs_key_about_device_info_padding");
mDeviceName.setTitle(getProp("persist.sys.device_name"));
mDeviceInfoDevice.setTitle(getProp("ro.product.marketname"));
mDeviceInfoAndroid.setTitle(getProp("ro.build.version.release"));
mDeviceInfoOs.setTitle(getSystemVersionIncremental());
String deviceName = getProp("persist.sys.device_name");
String marketName = getProp("ro.product.marketname");
String androidVersion = getProp("ro.build.version.release");
String osVersion = getSystemVersionIncremental();
if (Objects.equals(marketName, "")) marketName = android.os.Build.MODEL;
if (Objects.equals(deviceName, "")) deviceName = marketName;
if (Objects.equals(osVersion, "")) osVersion = androidVersion;
mDeviceName.setTitle(deviceName);
mDeviceInfoDevice.setTitle(marketName);
mDeviceInfoAndroid.setTitle(androidVersion);
mDeviceInfoOs.setTitle(osVersion);
mDeviceInfoPadding.setTitle(getDeviceToken(mainActivityContextHelper.getAndroidId()));

if (lIIllII != null) {
Expand Down

0 comments on commit 6d98560

Please sign in to comment.