version:1.3.5
fix: update:增加学习资源下载,修复退出桌面再进入卡顿,增加语音助手
This commit is contained in:
@@ -46,6 +46,8 @@ public class RemoteManager {
|
||||
public static final String SN_PACKAGE_NAME = "com.uiui.zy";
|
||||
private static final String SN_SERVICE_NAME = "com.uiui.zy.service.RemoteService";
|
||||
|
||||
private static final String SN_KEY = "sn_serial_key";
|
||||
|
||||
private RemoteManager(Context context) {
|
||||
if (context == null) {
|
||||
throw new RuntimeException("Context is NULL");
|
||||
@@ -62,10 +64,20 @@ public class RemoteManager {
|
||||
}
|
||||
getLocation();
|
||||
try {
|
||||
Log.e(TAG, "onServiceConnected: macaddr = " + mGetInfoInterface.getSerial());
|
||||
String sn = mGetInfoInterface.getSerial();
|
||||
mMMKV.encode(SN_KEY, sn);
|
||||
Log.e(TAG, "onServiceConnected: sn = " + sn);
|
||||
} catch (RemoteException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
List<String> pkgs = mGetInfoInterface.getAdminApp();
|
||||
Log.e(TAG, "onServiceConnected: pkgs = " + pkgs);
|
||||
mMMKV.encode(CommonConfig.ADMIN_APP_LIST, new HashSet<>(pkgs));
|
||||
} catch (RemoteException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Log.e(TAG, "onServiceConnected: " + getSerial());
|
||||
aliyunPushInit();
|
||||
}
|
||||
@@ -190,7 +202,7 @@ public class RemoteManager {
|
||||
} else {
|
||||
bindInfoService();
|
||||
}
|
||||
return "";
|
||||
return mMMKV.decodeString(SN_KEY, "");
|
||||
}
|
||||
|
||||
public void getLocation() {
|
||||
@@ -298,11 +310,27 @@ public class RemoteManager {
|
||||
}
|
||||
|
||||
public void setDefaultDesktop(String pkg) {
|
||||
try {
|
||||
mGetInfoInterface.setDefaultLauncher(pkg);
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "setDefaultDesktop: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
if (mGetInfoInterface != null) {
|
||||
try {
|
||||
mGetInfoInterface.setDefaultLauncher(pkg);
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "setDefaultDesktop: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<String> getAdminApp() {
|
||||
if (mGetInfoInterface != null) {
|
||||
try {
|
||||
List<String> pkgs = mGetInfoInterface.getAdminApp();
|
||||
return pkgs;
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "setDefaultDesktop: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
Set<String> packages = mMMKV.decodeStringSet(CommonConfig.ADMIN_APP_LIST, new HashSet<>());
|
||||
return new ArrayList<>(packages);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user