version:beta

fix:
update:接口优化
This commit is contained in:
2022-11-04 09:33:43 +08:00
parent 86429b92f8
commit b1645f0fae
6 changed files with 212 additions and 126 deletions

View File

@@ -226,38 +226,38 @@ public class ManagerService extends Service implements NetworkUtils.OnNetworkSta
topView = LayoutInflater.from(getApplicationContext()).inflate(R.layout.activity_screen_lock, null);
TextView textView = topView.findViewById(R.id.textView);
textView.setText(name);
EditText et_password = topView.findViewById(R.id.et_password);
TextView tv_confirm = topView.findViewById(R.id.tv_confirm);
tv_confirm.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String password = (String) SPUtils.get(ManagerService.this, UrlAddress.LOCK_SCREEN_PWD, "");
String pwd = et_password.getText().toString();
if (!TextUtils.isEmpty(pwd) && !TextUtils.isEmpty(password) && password.equals(pwd)) {
hideFloatingWindow();
}else {
ToastUtil.show("密码错误");
}
}
});
// EditText et_password = topView.findViewById(R.id.et_password);
// TextView tv_confirm = topView.findViewById(R.id.tv_confirm);
// tv_confirm.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// String password = (String) SPUtils.get(ManagerService.this, UrlAddress.LOCK_SCREEN_PWD, "");
// String pwd = et_password.getText().toString();
// if (!TextUtils.isEmpty(pwd) && !TextUtils.isEmpty(password) && password.equals(pwd)) {
// hideFloatingWindow();
// }else {
// ToastUtil.show("密码错误");
// }
// }
// });
} else {
if ("added".equals(topView.getTag())) {
TextView textView = topView.findViewById(R.id.textView);
textView.setText(name);
EditText et_password = topView.findViewById(R.id.et_password);
TextView tv_confirm = topView.findViewById(R.id.tv_confirm);
tv_confirm.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String password = (String) SPUtils.get(ManagerService.this, UrlAddress.LOCK_SCREEN_PWD, "");
String pwd = et_password.getText().toString();
if (!TextUtils.isEmpty(pwd) && !TextUtils.isEmpty(password) && password.equals(pwd)) {
hideFloatingWindow();
}else {
ToastUtil.show("密码错误");
}
}
});
// EditText et_password = topView.findViewById(R.id.et_password);
// TextView tv_confirm = topView.findViewById(R.id.tv_confirm);
// tv_confirm.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// String password = (String) SPUtils.get(ManagerService.this, UrlAddress.LOCK_SCREEN_PWD, "");
// String pwd = et_password.getText().toString();
// if (!TextUtils.isEmpty(pwd) && !TextUtils.isEmpty(password) && password.equals(pwd)) {
// hideFloatingWindow();
// }else {
// ToastUtil.show("密码错误");
// }
// }
// });
} else {
return;
}