version:5.6
fix: update:设置默认桌面不再打开
This commit is contained in:
@@ -10,6 +10,7 @@ import android.util.Log;
|
||||
import com.aoleyun.sn.SystemInfoInterface;
|
||||
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 java.util.List;
|
||||
@@ -63,12 +64,14 @@ public class RemoteService extends Service {
|
||||
|
||||
@Override
|
||||
public boolean SystemPutInt(String name, int value) throws RemoteException {
|
||||
Log.e(TAG, "SystemPutInt: " + "name = " + name + "\t value = " + value);
|
||||
return Settings.System.putInt(getContentResolver(), name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDefaultDesktop(String pkg) throws RemoteException {
|
||||
JGYUtils.getInstance().setDefaultDesktop(pkg);
|
||||
SPUtils.put(RemoteService.this, "default_launcher", pkg);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.aoleyun.sn.utils.SPUtils;
|
||||
import com.aoleyun.sn.utils.ToastUtil;
|
||||
import com.aoleyun.sn.utils.URLUtils;
|
||||
import com.aoleyun.sn.utils.Utils;
|
||||
import com.arialyy.aria.orm.annotation.Ignore;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
import com.trello.rxlifecycle4.android.ActivityEvent;
|
||||
|
||||
@@ -253,13 +254,19 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
if (JGYUtils.isOfficialVersion() || !JGYUtils.getInstance().getDeviceIsLocked()) {
|
||||
mView.getDefaultDesktopFinish();
|
||||
} else {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getDefaultDesktop(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getDefaultDesktopFinish();
|
||||
}
|
||||
});
|
||||
int aihuaUnlock = Settings.System.getInt(mContext.getContentResolver(), CommonConfig.AIHUA_UNLOCK, 0);
|
||||
if (JGYUtils.getInstance().isAihuaFramwwork() && aihuaUnlock == 1) {
|
||||
mView.getDefaultDesktopFinish();
|
||||
} else {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getDefaultDesktop(true, getLifecycle(), new NetInterfaceManager.onCompleteCallback() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
mView.getDefaultDesktopFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user