version:1.5.8

fix:
update:更换图标,增加护眼模式,增加幼儿模式
This commit is contained in:
2023-08-22 18:08:06 +08:00
parent fc5d807bb8
commit 29c799c744
26 changed files with 234 additions and 98 deletions

View File

@@ -17,10 +17,9 @@ import com.alibaba.sdk.android.push.noonesdk.PushServiceFactory;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.tencent.mmkv.MMKV;
import com.uiui.zyos.BuildConfig;
import com.uiui.zy.IGetInfoInterface;
import com.uiui.zyos.bean.MapBean;
import com.uiui.zyos.config.CommonConfig;
import com.uiui.zy.IGetInfoInterface;
import java.lang.reflect.Type;
import java.util.ArrayList;
@@ -135,35 +134,46 @@ public class RemoteManager {
}
public void aliyunPushInit() {
if (TextUtils.isEmpty(getSerial())) {
String sn = getSerial();
if (TextUtils.isEmpty(sn)) {
Log.e(TAG, "aliyunPushInit: empty");
return;
}
String account = getSerial();
CloudPushService pushService = PushServiceFactory.getCloudPushService();
pushService.bindAccount(account, new CommonCallback() {
pushService.register(mContext, new CommonCallback() {
@Override
public void onSuccess(String s) {
Log.e("AliyunPush", "bind account " + account + " success\n");
public void onSuccess(String response) {
Log.e("AliyunPush", "init cloudchannel success");
Log.e("AliyunPush", "init cloudchannel success " + pushService.getDeviceId());
pushService.bindAccount(sn, new CommonCallback() {
@Override
public void onSuccess(String s) {
Log.e("AliyunPush", "bind account " + sn + " success\n");
}
@Override
public void onFailed(String errorCode, String errorMsg) {
Log.e("AliyunPush", "bind account " + sn + " failed." +
"errorCode: " + errorCode + ", errorMsg:" + errorMsg);
}
});
pushService.addAlias(sn, new CommonCallback() {
@Override
public void onSuccess(String s) {
Log.e("AliyunPush", "add alias " + sn + " success\n");
}
@Override
public void onFailed(String errorCode, String errorMsg) {
Log.e("AliyunPush", "add alias " + sn + " failed." +
"errorCode: " + errorCode + ", errorMsg:" + errorMsg + "\n");
}
});
}
@Override
public void onFailed(String errorCode, String errorMsg) {
Log.e("AliyunPush", "bind account " + account + " failed." +
"errorCode: " + errorCode + ", errorMsg:" + errorMsg);
}
});
String alias = getSerial();
pushService.addAlias(account, new CommonCallback() {
@Override
public void onSuccess(String s) {
Log.e("AliyunPush", "add alias " + alias + " success\n");
}
@Override
public void onFailed(String errorCode, String errorMsg) {
Log.e("AliyunPush", "add alias " + alias + " failed." +
"errorCode: " + errorCode + ", errorMsg:" + errorMsg + "\n");
public void onFailed(String errorCode, String errorMessage) {
Log.e("AliyunPush", "init cloudchannel failed -- errorcode:" + errorCode + " -- errorMessage:" + errorMessage);
}
});
}
@@ -312,4 +322,16 @@ public class RemoteManager {
Set<String> packages = mMMKV.decodeStringSet(CommonConfig.ADMIN_APP_LIST, new HashSet<>());
return new ArrayList<>(packages);
}
public boolean putSecureInt(String key, int value) {
if (mGetInfoInterface != null) {
try {
return mGetInfoInterface.putSecureInt(key, value);
} catch (RemoteException e) {
Log.e(TAG, "putSecureInt: " + e.getMessage());
e.printStackTrace();
}
}
return false;
}
}