1.4.0318 修复升级后设置默认桌面,对接小程序管控,增加专注模式,接管系统打开app
This commit is contained in:
@@ -16,6 +16,7 @@ import com.aoleyun.sn.utils.ForegroundAppUtil;
|
||||
import com.aoleyun.sn.utils.JGYUtils;
|
||||
import com.aoleyun.sn.utils.SPUtils;
|
||||
import com.aoleyun.sn.utils.Utils;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -24,6 +25,8 @@ import java.util.List;
|
||||
public class RemoteService extends Service {
|
||||
private String TAG = RemoteService.class.getSimpleName();
|
||||
|
||||
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||
|
||||
public RemoteService() {
|
||||
}
|
||||
|
||||
@@ -77,7 +80,8 @@ public class RemoteService extends Service {
|
||||
@Override
|
||||
public void setDefaultDesktop(String pkg) throws RemoteException {
|
||||
Log.e(TAG, "setDefaultDesktop: " + "pkg = " + pkg);
|
||||
SPUtils.put(RemoteService.this, "default_launcher", pkg);
|
||||
// SPUtils.put(RemoteService.this, "default_launcher", pkg);
|
||||
mMMKV.encode(CommonConfig.DEFAULT_LAUNCHER_PACKAGE_NAME, pkg);
|
||||
JGYUtils.getInstance().setDefaultDesktop(pkg);
|
||||
if (PackageNames.DESKTOP.equals(pkg)) {
|
||||
// JGYUtils.getInstance().killPackage(PackageNames.DESKTOP);
|
||||
|
||||
Reference in New Issue
Block a user