MCPcopy
hub / github.com/razerdp/BasePopup / check

Method check

app/src/main/java/razerdp/demo/utils/OSUtil.java:73–98  ·  view source on GitHub ↗
(String rom)

Source from the content-addressed store, hash-verified

71 }
72
73 public static boolean check(String rom) {
74 if (sName != null) {
75 return sName.equals(rom);
76 }
77
78 if (!TextUtils.isEmpty(sVersion = getProp(KEY_VERSION_MIUI))) {
79 sName = ROM_MIUI;
80 } else if (!TextUtils.isEmpty(sVersion = getProp(KEY_VERSION_EMUI))) {
81 sName = ROM_EMUI;
82 } else if (!TextUtils.isEmpty(sVersion = getProp(KEY_VERSION_OPPO))) {
83 sName = ROM_OPPO;
84 } else if (!TextUtils.isEmpty(sVersion = getProp(KEY_VERSION_VIVO))) {
85 sName = ROM_VIVO;
86 } else if (!TextUtils.isEmpty(sVersion = getProp(KEY_VERSION_SMARTISAN))) {
87 sName = ROM_SMARTISAN;
88 } else {
89 sVersion = Build.DISPLAY;
90 if (sVersion.toUpperCase().contains(ROM_FLYME)) {
91 sName = ROM_FLYME;
92 } else {
93 sVersion = Build.UNKNOWN;
94 sName = Build.MANUFACTURER.toUpperCase();
95 }
96 }
97 return sName.equals(rom);
98 }
99
100 public static String getProp(String name) {
101 String line = null;

Callers 9

isEmuiMethod · 0.95
isMiuiMethod · 0.95
isVivoMethod · 0.95
isOppoMethod · 0.95
isFlymeMethod · 0.95
is360Method · 0.95
isSmartisanMethod · 0.95
getNameMethod · 0.95
getVersionMethod · 0.95

Calls 4

getPropMethod · 0.95
isEmptyMethod · 0.80
equalsMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected