1.1.8 解绑刷新桌面数据
This commit is contained in:
@@ -16,8 +16,8 @@ android {
|
||||
applicationId "com.uiuipad.find"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 29
|
||||
versionCode 17
|
||||
versionName "1.1.6"
|
||||
versionCode 19
|
||||
versionName "1.1.8"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
|
||||
@@ -114,6 +114,8 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
||||
bindService(intent, serviceConnect, BIND_AUTO_CREATE);
|
||||
startService(intent);
|
||||
|
||||
sendBroadcast(new Intent(MainService.OS_REFRESH_ACTION));
|
||||
|
||||
iv_back.setOnClickListener(view -> lazyExit());
|
||||
|
||||
tv_version.setText(BuildConfig.VERSION_NAME);
|
||||
|
||||
@@ -466,6 +466,7 @@ public class NetInterfaceManager {
|
||||
Log.e("getTimeControl", c.toString());
|
||||
}
|
||||
ControlUtils.disableSystemControl(mContext);
|
||||
Settings.Global.putInt(mCrv, "is_control", 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -570,7 +571,7 @@ public class NetInterfaceManager {
|
||||
Map<String, RequestBody> params = new HashMap<>();
|
||||
params.put("package", NetInterfaceManager.convertToRequestBody(packageInfo.packageName));
|
||||
Call<BaseResponse> call = getUploadAppImgApi().uploadAppImg(params, body);
|
||||
call.enqueue(new RetryCallback<BaseResponse>(call, 10, 30 * 1000) {
|
||||
call.enqueue(new RetryCallback<BaseResponse>(call, 1, 30 * 1000) {
|
||||
@Override
|
||||
public void onRequestResponse(Call call, Response response) {
|
||||
BaseResponse baseResponse = (BaseResponse) response.body();
|
||||
@@ -644,7 +645,7 @@ public class NetInterfaceManager {
|
||||
intent2.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
intent2.setClassName(ApkInfo.JXW_LAUNCHER_PACKAGE_NAME, ApkInfo.JXW_LAUNCHER_UPDATE_CLASS_NAME);
|
||||
try {
|
||||
mContext.startActivity(intent2);
|
||||
// mContext.startActivity(intent2);
|
||||
mMMKV.encode("start_jxw_key", true);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "run: " + e.getMessage());
|
||||
|
||||
@@ -8,6 +8,7 @@ import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.os.Handler;
|
||||
import android.os.PowerManager;
|
||||
import android.provider.Settings;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.WindowManager;
|
||||
@@ -241,6 +242,7 @@ public class PushManager {
|
||||
mMMKV.clearAll();
|
||||
ControlUtils.disableSystemControl(mContext);
|
||||
mContext.sendBroadcast(new Intent(MainService.OS_REFRESH_ACTION));
|
||||
Settings.Global.putInt(mContext.getContentResolver(), "is_control", 0);
|
||||
break;
|
||||
case RESTORE_FACTORY:
|
||||
ToastUtil.debugShow("收到管控:恢复出厂");
|
||||
@@ -452,6 +454,7 @@ public class PushManager {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("snConfirmBind", "onComplete: ");
|
||||
mContext.sendBroadcast(new Intent(MainService.OS_REFRESH_ACTION));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5,6 +5,9 @@ import android.util.Log;
|
||||
|
||||
import com.alibaba.sdk.android.push.AliyunMessageIntentService;
|
||||
import com.alibaba.sdk.android.push.notification.CPushMessage;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import com.uiuipad.find.push.PushManager;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -42,6 +45,14 @@ public class AliMessageIntentService extends AliyunMessageIntentService {
|
||||
@Override
|
||||
protected void onMessage(Context context, CPushMessage cPushMessage) {
|
||||
Log.i(TAG, "收到一条推送消息 : " + cPushMessage.getTitle() + ", content:" + cPushMessage.getContent());
|
||||
String title = cPushMessage.getTitle();
|
||||
String content = cPushMessage.getContent();
|
||||
JsonObject extrasJson = JsonParser.parseString(content).getAsJsonObject();
|
||||
String extras = "";
|
||||
if (extrasJson.get("extras") != null) {
|
||||
extras = extrasJson.get("extras").toString();
|
||||
}
|
||||
PushManager.getInstance().setPushContent(title, extras);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,6 +8,7 @@ import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.uiuipad.find.network.NetInterfaceManager;
|
||||
import com.uiuipad.find.service.main.MainService;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@@ -59,6 +60,7 @@ public class APKinstallReceiver extends BroadcastReceiver {
|
||||
Log.e(TAG, "sendAppInfo: " + state + packageName);
|
||||
// ApkUtils.RemoveTask(mContext, packageName);
|
||||
newAppListener.setNewAppListener(packageName);
|
||||
|
||||
// if (JGYUtils.PACKAGE_APPSTORE.equals(packageName)) {
|
||||
// //启动应用市场
|
||||
// JGYUtils.getInstance().wakeUpDeviceInfo();
|
||||
@@ -106,11 +108,13 @@ public class APKinstallReceiver extends BroadcastReceiver {
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
Log.e("sendAppInfo", "onError: " + e.getMessage());
|
||||
onComplete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("sendAppInfo", "onComplete: ");
|
||||
mContext.sendBroadcast(new Intent(MainService.OS_REFRESH_ACTION));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -166,6 +166,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
.subscribe(killObserver);
|
||||
|
||||
registerReceivers();
|
||||
NetworkUtils.registerNetworkStatusChangedListener(this);
|
||||
mPresenter.updateSnInfo();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user