Skip to content

Commit 28d185d

Browse files
committed
修改提示
1 parent 903f0f2 commit 28d185d

File tree

4 files changed

+10
-21
lines changed

4 files changed

+10
-21
lines changed

app/src/main/java/com/coderstory/flyme/activity/MainActivity.java

+1
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ protected void setUpView() {
199199
if (helper.getBoolean("firstOpenD", true)) {
200200
final AlertDialog.Builder normalDialog = new AlertDialog.Builder(MainActivity.this);
201201
normalDialog.setTitle("!!重要提示!!");
202+
202203
normalDialog.setMessage("从4.0.5版本开始,助手的激活方式改成绑定QQ号而不是激活码,部分只有激活码而没绑定QQ号的用户,请联系群主(26735825)处理");
203204
normalDialog.setPositiveButton("确定",
204205
(dialog, which) -> {

app/src/main/java/com/coderstory/flyme/fragment/AboutFragment.java

+7-19
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@
3232
import java.io.IOException;
3333
import java.io.InputStream;
3434
import java.io.OutputStream;
35-
import java.lang.reflect.Method;
3635
import java.net.HttpURLConnection;
3736
import java.net.URL;
37+
import java.util.List;
38+
39+
import eu.chainfire.libsuperuser.Shell;
3840

3941

4042
public class AboutFragment extends BaseFragment {
@@ -86,6 +88,7 @@ public void handleMessage(Message msg) {
8688
getEditor().putString("qq", msg.getData().get("qq").toString()).apply();
8789
getEditor().putString("sn", msg.getData().get("sn").toString()).apply();
8890
Toast.makeText(getMContext(), "绑定成功,重启应用生效", Toast.LENGTH_SHORT).show();
91+
//Toast.makeText(getMContext(), "qq" + msg.getData().get("qq").toString() + "sn" + msg.getData().get("sn").toString(), Toast.LENGTH_SHORT).show();
8992
refresh();
9093
} else {
9194
Toast.makeText(getMContext(), "绑定失败:\r\n" + JSON.parseObject(msg.getData().get("value").toString()).getOrDefault("error", msg.getData().get("value").toString()), Toast.LENGTH_LONG).show();
@@ -102,23 +105,8 @@ public void handleMessage(Message msg) {
102105

103106
public static String getSerialNumber() {
104107

105-
String serial = null;
106-
107-
try {
108-
109-
Class<?> c = Class.forName("android.os.SystemProperties");
110-
111-
Method get = c.getMethod("get", String.class);
112-
113-
serial = (String) get.invoke(c, "ro.serialno");
114-
115-
} catch (Exception e) {
116-
117-
e.printStackTrace();
118-
119-
}
120-
121-
return serial;
108+
List<String> result = Shell.SU.run("getprop ro.serialno");
109+
return result.get(0);
122110

123111
}
124112

@@ -141,7 +129,6 @@ protected void setUpView() {
141129
.show();
142130
});
143131

144-
145132
refresh();
146133
if (helper.getString("qq", "").equals("") || helper.getString("sn", "").equals("")) {
147134
final EditText inputServer = new EditText(getMContext());
@@ -165,6 +152,7 @@ protected void setUpView() {
165152
});
166153
builder.show();
167154
}
155+
168156
}
169157

170158
public void refresh() {

app/src/main/java/com/coderstory/flyme/fragment/OthersFragment.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ protected void setUpData() {
196196
((Switch) $(R.id.disableSearch)).setChecked(getPrefs().getBoolean("disableSearch", false));
197197
((Switch) $(R.id.mms)).setChecked(getPrefs().getBoolean("mms", false));
198198

199-
if (getPrefs().getString("qq", "").equals("") || getPrefs().getString("uuid", "").equals("")) {
199+
if (getPrefs().getString("qq", "").equals("") || getPrefs().getString("sn", "").equals("")) {
200200
((Switch) $(R.id.removeStore)).setEnabled(false);
201201
((Switch) $(R.id.autoInstall)).setEnabled(false);
202202
((NumberPicker) $(R.id.home_icon_num_column)).setEnabled(false);

app/src/main/java/com/coderstory/flyme/fragment/SystemUIFragment.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ protected void setUpData() {
132132
((Switch) $(R.id.hide_status_bar_location_icon)).setChecked(getPrefs().getBoolean("hide_status_bar_location_icon", false));
133133
((Switch) $(R.id.hide_status_bar_clock_icon)).setChecked(getPrefs().getBoolean("hide_status_bar_clock_icon", false));
134134
((Switch) $(R.id.hide_status_bar_battery_icon)).setChecked(getPrefs().getBoolean("hide_status_bar_battery_icon", false));
135-
if (getPrefs().getString("qq", "").equals("") || getPrefs().getString("uuid", "").equals("")) {
135+
if (getPrefs().getString("qq", "").equals("") || getPrefs().getString("sn", "").equals("")) {
136136
((Switch) $(R.id.hide_status_bar_slow_rate_icon)).setEnabled(false);
137137
((Switch) $(R.id.hide_status_bar_time_week_icon)).setEnabled(false);
138138
((Switch) $(R.id.hide_status_bar_time_chinese_icon)).setEnabled(false);

0 commit comments

Comments
 (0)