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