Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 01fc196429 |
@@ -15,10 +15,6 @@ android {
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 29
|
||||
|
||||
//versionCode 105
|
||||
//versionName "3.1.0"//测试jiaoguanyi.cn
|
||||
//versionCode 1008
|
||||
//versionName "2.0.1.8"// 正式jiaoguanyi.com 双数正式 单数测试
|
||||
multiDexEnabled true
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
@@ -45,9 +41,9 @@ android {
|
||||
//新平台正式
|
||||
newly {
|
||||
flavorDimensions "default"
|
||||
versionCode 500
|
||||
versionCode 501
|
||||
//versionCode 1037
|
||||
versionName "2.0.0"
|
||||
versionName "2.0.1"
|
||||
/*********************************极光推送************************************/
|
||||
manifestPlaceholders = [
|
||||
JPUSH_PKGNAME: "com.jiaoguanyi.appstore",
|
||||
|
||||
@@ -280,11 +280,13 @@ public class MainPresenter implements MainContact.Presenter {
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
private void updateDevicesInfo(Context context) {
|
||||
synchronized private void updateDevicesInfo(Context context) {
|
||||
String address = String.valueOf(SPUtils.get(context, "AmapAddress", "-"));
|
||||
if ("-".equals(address)) {
|
||||
address = (String) SPUtils.get(context, "AmapError", "-");
|
||||
}
|
||||
String longitude = String.valueOf(SPUtils.get(context, "longitude", "0"));
|
||||
String latitude = String.valueOf(SPUtils.get(context, "latitude", "0"));
|
||||
|
||||
JsonObject jsonObject = new JsonObject();
|
||||
jsonObject.addProperty("address", address);
|
||||
jsonObject.addProperty("longitude", longitude);
|
||||
@@ -393,7 +395,7 @@ public class MainPresenter implements MainContact.Presenter {
|
||||
mView.setAliasFinished();
|
||||
}
|
||||
|
||||
private void SetAlias(){
|
||||
private void SetAlias() {
|
||||
TagAliasOperatorHelper.TagAliasBean tagAliasBean = new TagAliasOperatorHelper.TagAliasBean();
|
||||
tagAliasBean.action = ACTION_SET;
|
||||
sequence++;
|
||||
@@ -441,7 +443,7 @@ public class MainPresenter implements MainContact.Presenter {
|
||||
});
|
||||
}
|
||||
|
||||
private void setTag(String batch){
|
||||
private void setTag(String batch) {
|
||||
Set set = new HashSet();
|
||||
set.add(batch);
|
||||
TagAliasOperatorHelper.TagAliasBean tagAliasBean = new TagAliasOperatorHelper.TagAliasBean();
|
||||
@@ -663,52 +665,52 @@ public class MainPresenter implements MainContact.Presenter {
|
||||
}
|
||||
int locked = Settings.System.getInt(mContext.getContentResolver(), "qch_unlock_ipad", 1);
|
||||
if (locked == 0) {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getBatchObservable()
|
||||
.observeOn(Schedulers.io())
|
||||
.subscribe(new Observer<ResponseBody>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e("getDeviceBatch", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull ResponseBody responseBody) {
|
||||
Log.e("getDeviceBatch", "onNext: ");
|
||||
try {
|
||||
String respons = responseBody.string();
|
||||
JSONObject jsonObject = JSON.parseObject(respons);
|
||||
int code = jsonObject.getInteger("code");
|
||||
if (code == 200) {
|
||||
String data = jsonObject.getString("data");
|
||||
List<Batch> batchList = JSON.parseArray(data, Batch.class);
|
||||
if (null != batchList && batchList.size() > 1) {
|
||||
Log.e("getDeviceBatch", "onNext: " + "deleteOtherApp");
|
||||
if (!BuildConfig.DEBUG) {
|
||||
JGYUtils.getInstance().deleteOtherApp(packageList);
|
||||
}
|
||||
} else {
|
||||
Log.e("getDeviceBatch", "批次为空");
|
||||
Log.e("getDeviceBatch", "onNext: respons:" + respons);
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e("getDeviceBatch", "onError: " + e.getMessage());
|
||||
onComplete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getDeviceBatch", "onComplete: ");
|
||||
mView.getDeviceBatchFinished();
|
||||
}
|
||||
});
|
||||
// NetInterfaceManager.getInstance()
|
||||
// .getBatchObservable()
|
||||
// .observeOn(Schedulers.io())
|
||||
// .subscribe(new Observer<ResponseBody>() {
|
||||
// @Override
|
||||
// public void onSubscribe(@NonNull Disposable d) {
|
||||
// Log.e("getDeviceBatch", "onSubscribe: ");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(@NonNull ResponseBody responseBody) {
|
||||
// Log.e("getDeviceBatch", "onNext: ");
|
||||
// try {
|
||||
// String respons = responseBody.string();
|
||||
// JSONObject jsonObject = JSON.parseObject(respons);
|
||||
// int code = jsonObject.getInteger("code");
|
||||
// if (code == 200) {
|
||||
// String data = jsonObject.getString("data");
|
||||
// List<Batch> batchList = JSON.parseArray(data, Batch.class);
|
||||
// if (null != batchList && batchList.size() > 1) {
|
||||
// Log.e("getDeviceBatch", "onNext: " + "deleteOtherApp");
|
||||
if (!BuildConfig.DEBUG) {
|
||||
JGYUtils.getInstance().deleteOtherApp(packageList);
|
||||
}
|
||||
// } else {
|
||||
// Log.e("getDeviceBatch", "批次为空");
|
||||
// Log.e("getDeviceBatch", "onNext: respons:" + respons);
|
||||
// }
|
||||
// }
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(@NonNull Throwable e) {
|
||||
// Log.e("getDeviceBatch", "onError: " + e.getMessage());
|
||||
// onComplete();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
// Log.e("getDeviceBatch", "onComplete: ");
|
||||
// mView.getDeviceBatchFinished();
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,8 +69,8 @@ public class AmapManager {
|
||||
sb.append("定位失败" + "\n");
|
||||
SPUtils.put(mContext, "AmapError", aMapLocation.getErrorInfo());
|
||||
}
|
||||
Log.e("AmapAddress", (String) SPUtils.get(mContext, "AmapAddress", ""));
|
||||
Log.e("AmapError", (String) SPUtils.get(mContext, "AmapError", ""));
|
||||
Log.e("AmapAddress", (String) SPUtils.get(mContext, "AmapAddress", "-"));
|
||||
Log.e("AmapError", (String) SPUtils.get(mContext, "AmapError", "-"));
|
||||
Log.e("addr", sb.toString());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -492,11 +492,12 @@ public class HTTPInterface {
|
||||
//设置浏览器黑白名单
|
||||
synchronized public static void setBrowserBlackList(final Context context) {
|
||||
// if (JGYUtils.isOfficialVersion()) {
|
||||
oldSetBrowserList(context);
|
||||
oldSetBrowserList(context);
|
||||
// } else {
|
||||
// setBrowserList(context);
|
||||
// }
|
||||
}
|
||||
|
||||
private static void setBrowserList(Context context) {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getBrowserListSettingObservable()
|
||||
@@ -890,8 +891,11 @@ public class HTTPInterface {
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public static void updateDeviceInfo(Context context) {
|
||||
synchronized public static void updateDeviceInfo(Context context) {
|
||||
String address = String.valueOf(SPUtils.get(context, "AmapAddress", "-"));
|
||||
if ("-".equals(address)) {
|
||||
address = (String) SPUtils.get(context, "AmapError", "-");
|
||||
}
|
||||
String longitude = String.valueOf(SPUtils.get(context, "longitude", "0"));
|
||||
String latitude = String.valueOf(SPUtils.get(context, "latitude", "0"));
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
@@ -905,7 +909,7 @@ public class HTTPInterface {
|
||||
NetInterfaceManager.HTTP_KEY,
|
||||
Utils.getMachine(context),
|
||||
Utils.getHardware(context),
|
||||
jsonObject.toJSONString()
|
||||
add
|
||||
)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
|
||||
@@ -27,7 +27,6 @@ public class BootReceiver extends BroadcastReceiver {
|
||||
if (TextUtils.isEmpty(packageList)) {
|
||||
Settings.System.putString(context.getContentResolver(), "qch_launcher_icon_app", "");
|
||||
}
|
||||
HTTPInterface.updateDeviceInfo(context);
|
||||
startService(context);
|
||||
break;
|
||||
case BOOT_COMPLETED:
|
||||
|
||||
Reference in New Issue
Block a user