update:2021.03.18
fix:不能自动下载,文件夹创建失败手动创建
add:
This commit is contained in:
FHT
2021-03-18 11:40:25 +08:00
parent d7e1bd9f7c
commit f114b27606
3 changed files with 21 additions and 12 deletions

View File

@@ -41,8 +41,8 @@ android {
productFlavors { productFlavors {
official { official {
flavorDimensions "default" flavorDimensions "default"
versionCode 1033 versionCode 1034
versionName "2.0.3.3"// 正式jiaoguanyi.com 双数正式 单数测试 versionName "2.0.3.4"// 正式jiaoguanyi.com 双数正式 单数测试
/*********************************极光推送************************************/ /*********************************极光推送************************************/
manifestPlaceholders = [ manifestPlaceholders = [
JPUSH_PKGNAME: "com.jiaoguanyi.appstore", JPUSH_PKGNAME: "com.jiaoguanyi.appstore",
@@ -92,9 +92,9 @@ android {
} }
newl { newl {
flavorDimensions "default" flavorDimensions "default"
versionCode 164 versionCode 166
// versionCode 1031 // versionCode 1031
versionName "1.2.4" versionName "1.2.6"
/*********************************极光推送************************************/ /*********************************极光推送************************************/
manifestPlaceholders = [ manifestPlaceholders = [
JPUSH_PKGNAME: "com.jiaoguanyi.appstore", JPUSH_PKGNAME: "com.jiaoguanyi.appstore",

View File

@@ -130,9 +130,9 @@ public class MyJPushReceiver extends BroadcastReceiver {
private final String KILL_SERVER = "26";//结束进程 private final String KILL_SERVER = "26";//结束进程
private final String TIME_CONTROL = "27";//结束进程 private final String TIME_CONTROL = "27";//时间管控
private final String TOP_APP = "28";//结束进程 private final String TOP_APP = "28";//app霸屏
private Context mContext; private Context mContext;
@@ -196,6 +196,8 @@ public class MyJPushReceiver extends BroadcastReceiver {
// ToastUtils.showShort("message::" + message + "--type::" + type + "--title::" + title + "--extras::" + extras + "---package_name:" + package_name); // ToastUtils.showShort("message::" + message + "--type::" + type + "--title::" + title + "--extras::" + extras + "---package_name:" + package_name);
// Toast.makeText(context, "message::" + message + "--type::" + type + "--title::" + title + "--extras::" + extras + "---package_name:" + package_name, Toast.LENGTH_SHORT).show(); // Toast.makeText(context, "message::" + message + "--type::" + type + "--title::" + title + "--extras::" + extras + "---package_name:" + package_name, Toast.LENGTH_SHORT).show();
switch (message) { switch (message) {
default:
break;
case MSG_DELETE: case MSG_DELETE:
if (!TextUtils.isEmpty(title)) { if (!TextUtils.isEmpty(title)) {
if (SaveListUtils.getlist().contains(title)) { if (SaveListUtils.getlist().contains(title)) {
@@ -929,6 +931,7 @@ public class MyJPushReceiver extends BroadcastReceiver {
} }
} }
@Override
public void onSubscribe(Disposable param1Disposable) { public void onSubscribe(Disposable param1Disposable) {
} }
@@ -980,7 +983,7 @@ public class MyJPushReceiver extends BroadcastReceiver {
String qch_disable_slide = Settings.System.getString(mContext.getApplicationContext().getContentResolver(), "qch_disable_slide"); String qch_disable_slide = Settings.System.getString(mContext.getApplicationContext().getContentResolver(), "qch_disable_slide");
Log.e("fht", "qch_disable_slide::" + qch_disable_slide); Log.e("fht", "qch_disable_slide::" + qch_disable_slide);
if (!strban.equals("")) { if (!"".equals(strban)) {
Settings.System.putString(mContext.getContentResolver(), "qch_disable_slide", strban); Settings.System.putString(mContext.getContentResolver(), "qch_disable_slide", strban);
Log.e("fht", "sendban::" + strban); Log.e("fht", "sendban::" + strban);
} else { } else {
@@ -1024,7 +1027,7 @@ public class MyJPushReceiver extends BroadcastReceiver {
// String str = jSONObject.optString("not"); // String str = jSONObject.optString("not");
Log.e("mymjsheng", "ban::" + s1); Log.e("mymjsheng", "ban::" + s1);
// Log.e("mymjsheng", "not::" + str); // Log.e("mymjsheng", "not::" + str);
if (s1.equals("0")) { if ("0".equals(s1)) {
Intent intent2 = new Intent("qch_camera_forbid").setPackage("com.android.settings"); Intent intent2 = new Intent("qch_camera_forbid").setPackage("com.android.settings");
// intent2.putExtra("camera_package_name", s1); // intent2.putExtra("camera_package_name", s1);
this.mContext.sendBroadcast(intent2); this.mContext.sendBroadcast(intent2);
@@ -1070,7 +1073,7 @@ public class MyJPushReceiver extends BroadcastReceiver {
Log.e("fht", "qch_jgy_network_disallow::" + qch_jgy_network_disallow); Log.e("fht", "qch_jgy_network_disallow::" + qch_jgy_network_disallow);
Log.e("fht", "qch_jgy_network_allow::" + qch_jgy_network_allow); Log.e("fht", "qch_jgy_network_allow::" + qch_jgy_network_allow);
if (strban != null && !strban.equals("")) { if (strban != null && !"".equals(strban)) {
Settings.System.putString(mContext.getContentResolver(), "qch_jgy_network_disallow", strban); Settings.System.putString(mContext.getContentResolver(), "qch_jgy_network_disallow", strban);
// Log.e("fht", "qch_jgy_network_disallow::" + Settings.System.getString(mContext.getApplicationContext().getContentResolver(), "qch_jgy_network_disallow")); // Log.e("fht", "qch_jgy_network_disallow::" + Settings.System.getString(mContext.getApplicationContext().getContentResolver(), "qch_jgy_network_disallow"));
// Log.e("fht", "qch_jgy_network_allow::" + Settings.System.getString(mContext.getApplicationContext().getContentResolver(), "qch_jgy_network_allow")); // Log.e("fht", "qch_jgy_network_allow::" + Settings.System.getString(mContext.getApplicationContext().getContentResolver(), "qch_jgy_network_allow"));

View File

@@ -30,6 +30,7 @@ import android.widget.TextView;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.arialyy.aria.core.Aria; import com.arialyy.aria.core.Aria;
import com.blankj.utilcode.util.LogUtils; import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.PathUtils;
import com.lzy.okgo.OkGo; import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback; import com.lzy.okgo.callback.StringCallback;
import com.mjsheng.myappstore.BuildConfig; import com.mjsheng.myappstore.BuildConfig;
@@ -70,6 +71,7 @@ import org.json.JSONArray;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@@ -114,6 +116,10 @@ public class InitJpushServer extends Service {
super.onCreate(); super.onCreate();
registReceiver(); registReceiver();
registerTimeReceiver(); registerTimeReceiver();
File file = new File(PathUtils.getExternalDownloadsPath() + "/jgy/");
if (!file.exists()){
file.mkdirs();
}
// android.os.Debug.waitForDebugger(); // android.os.Debug.waitForDebugger();
} }