|
|
110
|
sName = ROM_EMUI;
|
|
|
111
|
} else if (!TextUtils.isEmpty(sVersion = getProp(KEY_VERSION_OPPO))) {
|
|
|
112
|
sName = ROM_OPPO;
|
|
|
113
|
} else if (!TextUtils.isEmpty(sVersion = getProp(KEY_VERSION_VIVO))) {
|
|
|
114
|
sName = ROM_VIVO;
|
|
|
115
|
} else if (!TextUtils.isEmpty(sVersion = getProp(KEY_VERSION_SMARTISAN))) {
|
|
|
116
|
sName = ROM_SMARTISAN;
|
|
|
117
|
} else {
|
|
|
118
|
sVersion = Build.DISPLAY;
|
|
|
119
|
if (sVersion.toUpperCase().contains(ROM_FLYME)) {
|
|
|
120
|
sName = ROM_FLYME;
|
|
|
121
|
} else {
|
|
|
122
|
sVersion = Build.UNKNOWN;
|
|
|
123
|
sName = Build.MANUFACTURER.toUpperCase();
|
|
|
124
|
}
|
|
|
125
|
}
|
|
|
126
|
return sName.equals(rom);
|
|
|
127
|
}
|
|
|
128
|
|
|
|
129
|
public static String getProp(String name) {
|
|
|
130
|
String line = null;
|
|
|
131
|
BufferedReader input = null;
|
|
73
|
132
|
try {
|
|
74
|
|
final Method method = Build.class.getMethod("hasSmartBar");
|
|
75
|
|
return method != null;
|
|
76
|
|
} catch (final Exception e) {
|
|
77
|
|
return false;
|
|
|
133
|
Process p = Runtime.getRuntime().exec("getprop " + name);
|
|
|
134
|
input = new BufferedReader(new InputStreamReader(p.getInputStream()), 1024);
|
|
|
135
|
line = input.readLine();
|
|
|
136
|
input.close();
|
|
|
137
|
} catch (IOException ex) {
|
|
|
138
|
Log.e(TAG, "Unable to read prop " + name, ex);
|
|
|
139
|
return null;
|
|
|
140
|
} finally {
|
|
|
141
|
if (input != null) {
|
|
|
142
|
try {
|
|
|
143
|
input.close();
|
|
|
144
|
} catch (IOException e) {
|
|
|
145
|
e.printStackTrace();
|
|
|
146
|
}
|
|
|
147
|
}
|
|
78
|
148
|
}
|
|
|
149
|
return line;
|
|
79
|
150
|
}
|
|
80
|
151
|
|
|
81
|
152
|
|
|
|
@ -99,7 +170,7 @@ public class SystemTypeUtil {
|
|
99
|
170
|
e.printStackTrace();
|
|
100
|
171
|
context.startActivity(getAppDetailSettingIntent(context));
|
|
101
|
172
|
}
|
|
102
|
|
} else if (isMIUI()) {
|
|
|
173
|
} else if (isMiui()) {
|
|
103
|
174
|
// ToastUtil.show("我是小米");
|
|
104
|
175
|
Intent intent = new Intent("miui.intent.action.APP_PERM_EDITOR");
|
|
105
|
176
|
ComponentName componentName = new ComponentName("com.miui.securitycenter", "com.miui.permcenter.permissions.AppPermissionsEditorActivity");
|
|
|
@ -111,7 +182,7 @@ public class SystemTypeUtil {
|
|
111
|
182
|
e.printStackTrace();
|
|
112
|
183
|
context.startActivity(getAppDetailSettingIntent(context));
|
|
113
|
184
|
}
|
|
114
|
|
} else if (isEMUI()) {
|
|
|
185
|
} else if (isEmui()) {
|
|
115
|
186
|
// ToastUtil.show("我是华为");
|
|
116
|
187
|
try {
|
|
117
|
188
|
Intent intent = new Intent();
|
|
|
@ -86,7 +86,7 @@
|
|
86
|
86
|
android:background="@drawable/textviewhuiline_style"
|
|
87
|
87
|
android:gravity="center"
|
|
88
|
88
|
android:layout_below="@+id/tv_2"
|
|
89
|
|
android:layout_marginTop="252px"
|
|
|
89
|
android:layout_marginTop="40dp"
|
|
90
|
90
|
android:layout_centerHorizontal="true"/>
|
|
91
|
91
|
|
|
92
|
92
|
<TextView
|
|
|
@ -101,7 +101,20 @@
|
|
101
|
101
|
|
|
102
|
102
|
|
|
103
|
103
|
<TextView
|
|
104
|
|
android:text="《用户协议和隐私政策》"
|
|
|
104
|
android:text="《充电桩APP用户使用协议》"
|
|
|
105
|
android:layout_width="wrap_content"
|
|
|
106
|
android:layout_above="@+id/privacy"
|
|
|
107
|
android:textSize="15sp"
|
|
|
108
|
android:textColor="#1e90ff"
|
|
|
109
|
android:layout_centerHorizontal="true"
|
|
|
110
|
android:onClick="onAgreementView"
|
|
|
111
|
android:clickable="true"
|
|
|
112
|
android:layout_marginBottom="8dp"
|
|
|
113
|
android:layout_height="wrap_content"/>
|
|
|
114
|
|
|
|
115
|
<TextView
|
|
|
116
|
android:id="@+id/privacy"
|
|
|
117
|
android:text="《充电桩隐私政策》"
|
|
105
|
118
|
android:layout_width="wrap_content"
|
|
106
|
119
|
android:layout_above="@+id/android"
|
|
107
|
120
|
android:textSize="15sp"
|