update:2019.04.22

fix:https
add:
This commit is contained in:
2020-04-22 18:17:51 +08:00
parent 527e626aa1
commit 524d160f10
7 changed files with 51 additions and 49 deletions

View File

@@ -16,8 +16,8 @@ android {
targetSdkVersion 26 targetSdkVersion 26
// versionCode 85 // versionCode 85
// versionName "2.0.4.6"//正式jiaoguanyi.com // versionName "2.0.4.6"//正式jiaoguanyi.com
versionCode 121 versionCode 123
versionName "2.8.1.2"//测试jiaoguanyi.cn versionName "2.0.0.1"//测试jiaoguanyi.cn
multiDexEnabled true multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

View File

@@ -81,6 +81,8 @@
<action android:name="android.intent.action.DATE_CHANGED" /> <action android:name="android.intent.action.DATE_CHANGED" />
<action android:name="android.intent.action.TIME_TICK" /> <action android:name="android.intent.action.TIME_TICK" />
<action android:name="android.intent.action.USER_PRESENT" /> <action android:name="android.intent.action.USER_PRESENT" />
<action android:name="android.intent.action.SCREEN_ON" />
<action android:name="android.intent.action.SCREEN_OFF" />
</intent-filter> </intent-filter>
</receiver> </receiver>

View File

@@ -570,7 +570,7 @@ public class MainActivity extends AppCompatActivity implements NetStateChangeObs
} catch (PackageManager.NameNotFoundException e) { } catch (PackageManager.NameNotFoundException e) {
e.printStackTrace(); e.printStackTrace();
} }
if (packageInfo == null || packageInfo.versionCode != versionCode) { if (packageInfo == null || packageInfo.versionCode < versionCode) {
Aria.download(this) Aria.download(this)
.load(url) //读取下载地址 .load(url) //读取下载地址
.setFilePath(PathUtils.getExternalDownloadsPath() + "/ygj/" + EncryptUtils.encryptMD5ToString(packageName) + ".apk", true) .setFilePath(PathUtils.getExternalDownloadsPath() + "/ygj/" + EncryptUtils.encryptMD5ToString(packageName) + ".apk", true)
@@ -1364,19 +1364,19 @@ public class MainActivity extends AppCompatActivity implements NetStateChangeObs
//otg开关 //otg开关
int setting_otg = changeNum(data.optInt("setting_otg")); // int setting_otg = changeNum(data.optInt("setting_otg"));
Log.e("SystemSetting", "setting_otg---------" + setting_otg); // Log.e("SystemSetting", "setting_otg---------" + setting_otg);
String otgStatus = ""; // String otgStatus = "";
switch (setting_otg) { // switch (setting_otg) {
case 0: // case 0:
otgStatus = "qch_otg_open"; // otgStatus = "qch_otg_open";
break; // break;
case 1: // case 1:
otgStatus = "qch_otg_forbid"; // otgStatus = "qch_otg_forbid";
break; // break;
} // }
Intent otgIntent = new Intent(otgStatus); // Intent otgIntent = new Intent(otgStatus);
sendBroadcast(otgIntent); // sendBroadcast(otgIntent);
//蓝牙开关 //蓝牙开关
int setting_bluetooth = changeNum(data.optInt("setting_bluetooth")); int setting_bluetooth = changeNum(data.optInt("setting_bluetooth"));
@@ -1405,7 +1405,7 @@ public class MainActivity extends AppCompatActivity implements NetStateChangeObs
//状态栏显示开关 //状态栏显示开关
int setting_statusbar = changeNum(data.optInt("setting_statusbar")); int setting_statusbar = changeNum(data.optInt("setting_statusbar"));
int oldNum = Settings.System.getInt(mContext.getContentResolver(), "qch_hide_statusBar", 1); int oldNum = Settings.System.getInt(mContext.getContentResolver(), "qch_hide_statusBar",0);
if (oldNum != setting_statusbar) { if (oldNum != setting_statusbar) {
boolean qch_hide_statusBar = Settings.System.putInt(mContext.getContentResolver(), "qch_hide_statusBar", setting_statusbar); boolean qch_hide_statusBar = Settings.System.putInt(mContext.getContentResolver(), "qch_hide_statusBar", setting_statusbar);
Log.e("SystemSetting", "qch_hide_statusBar---------" + qch_hide_statusBar); Log.e("SystemSetting", "qch_hide_statusBar---------" + qch_hide_statusBar);

View File

@@ -39,7 +39,7 @@ public class Network {
// public static final String ROOT_URL = "http://www.as.xueshibao.com.cn/api/"; 弃用 // public static final String ROOT_URL = "http://www.as.xueshibao.com.cn/api/"; 弃用
// public static final String ROOT_URL = "https://www.jiaoguanyi.com/api/";//正式 弃用 // public static final String ROOT_URL = "https://www.jiaoguanyi.com/api/";//正式 弃用
public static final String ROOT_URL = "http://partner.jiaoguanyi.com/api/";//正式 public static final String ROOT_URL = "https://partner.jiaoguanyi.com/api/";//正式
// public static final String ROOT_URL = "http://www.jiaoguanyi.cn/api/";//测试 // public static final String ROOT_URL = "http://www.jiaoguanyi.cn/api/";//测试

View File

@@ -30,8 +30,8 @@ public class BootReceiver extends BroadcastReceiver {
|| intent.getAction().equals("android.intent.action.DATE_CHANGED") || intent.getAction().equals("android.intent.action.DATE_CHANGED")
|| intent.getAction().equals("android.intent.action.TIME_TICK") || intent.getAction().equals("android.intent.action.TIME_TICK")
|| intent.getAction().equals("android.intent.action.USER_PRESENT") || intent.getAction().equals("android.intent.action.USER_PRESENT")
|| intent.getAction().equals("android.intent.action.ACTION_SCREEN_ON") || intent.getAction().equals("android.intent.action.SCREEN_ON")
|| intent.getAction().equals("android.intent.action.ACTION_SCREEN_OFF") || intent.getAction().equals("android.intent.action.SCREEN_OFF")
) { ) {
Log.e("fht", "BootReceiver MSG" + intent.getAction()); Log.e("fht", "BootReceiver MSG" + intent.getAction());
context.startService(new Intent(context, InitJpushServer.class)); context.startService(new Intent(context, InitJpushServer.class));

View File

@@ -131,19 +131,19 @@ public class MyJPushReceiver extends BroadcastReceiver {
} }
//otg开关 //otg开关
int setting_otg = changeNum(data.optInt("setting_otg")); // int setting_otg = changeNum(data.optInt("setting_otg"));
Log.e("SystemSetting", "setting_otg---------" + setting_otg); // Log.e("SystemSetting", "setting_otg---------" + setting_otg);
String otgStatus = ""; // String otgStatus = "";
switch (setting_otg) { // switch (setting_otg) {
case 0: // case 0:
otgStatus = "qch_otg_open"; // otgStatus = "qch_otg_open";
break; // break;
case 1: // case 1:
otgStatus = "qch_otg_forbid"; // otgStatus = "qch_otg_forbid";
break; // break;
} // }
Intent otgIntent = new Intent(otgStatus); // Intent otgIntent = new Intent(otgStatus);
mContext.sendBroadcast(otgIntent); // mContext.sendBroadcast(otgIntent);
//蓝牙开关 //蓝牙开关
int setting_bluetooth = changeNum(data.optInt("setting_bluetooth")); int setting_bluetooth = changeNum(data.optInt("setting_bluetooth"));
@@ -174,7 +174,7 @@ public class MyJPushReceiver extends BroadcastReceiver {
//状态栏显示开关 //状态栏显示开关
int setting_statusbar = changeNum(data.optInt("setting_statusbar")); int setting_statusbar = changeNum(data.optInt("setting_statusbar"));
int oldNum = Settings.System.getInt(mContext.getContentResolver(), "qch_hide_statusBar", 1); int oldNum = Settings.System.getInt(mContext.getContentResolver(), "qch_hide_statusBar", 0);
if (oldNum != setting_statusbar) { if (oldNum != setting_statusbar) {
boolean qch_hide_statusBar = Settings.System.putInt(mContext.getContentResolver(), "qch_hide_statusBar", setting_statusbar); boolean qch_hide_statusBar = Settings.System.putInt(mContext.getContentResolver(), "qch_hide_statusBar", setting_statusbar);
Log.e("SystemSetting", "qch_hide_statusBar---------" + qch_hide_statusBar); Log.e("SystemSetting", "qch_hide_statusBar---------" + qch_hide_statusBar);

View File

@@ -761,19 +761,19 @@ public class InitJpushServer extends Service {
} }
//otg开关 //otg开关
int setting_otg = changeNum(data.optInt("setting_otg")); // int setting_otg = changeNum(data.optInt("setting_otg"));
Log.e("SystemSetting", "setting_otg---------" + setting_otg); // Log.e("SystemSetting", "setting_otg---------" + setting_otg);
String otgStatus = ""; // String otgStatus = "";
switch (setting_otg) { // switch (setting_otg) {
case 0: // case 0:
otgStatus = "qch_otg_open"; // otgStatus = "qch_otg_open";
break; // break;
case 1: // case 1:
otgStatus = "qch_otg_forbid"; // otgStatus = "qch_otg_forbid";
break; // break;
} // }
Intent otgIntent = new Intent(otgStatus); // Intent otgIntent = new Intent(otgStatus);
sendBroadcast(otgIntent); // sendBroadcast(otgIntent);
//蓝牙开关 //蓝牙开关
int setting_bluetooth = changeNum(data.optInt("setting_bluetooth")); int setting_bluetooth = changeNum(data.optInt("setting_bluetooth"));
@@ -801,7 +801,7 @@ public class InitJpushServer extends Service {
//状态栏显示开关 //状态栏显示开关
int setting_statusbar = changeNum(data.optInt("setting_statusbar")); int setting_statusbar = changeNum(data.optInt("setting_statusbar"));
int oldNum = Settings.System.getInt(getContentResolver(), "qch_hide_statusBar", 1); int oldNum = Settings.System.getInt(getContentResolver(), "qch_hide_statusBar", 0);
if (oldNum != setting_statusbar) { if (oldNum != setting_statusbar) {
boolean qch_hide_statusBar = Settings.System.putInt(getContentResolver(), "qch_hide_statusBar", setting_statusbar); boolean qch_hide_statusBar = Settings.System.putInt(getContentResolver(), "qch_hide_statusBar", setting_statusbar);
Log.e("SystemSetting", "qch_hide_statusBar---------" + qch_hide_statusBar); Log.e("SystemSetting", "qch_hide_statusBar---------" + qch_hide_statusBar);
@@ -948,7 +948,7 @@ public class InitJpushServer extends Service {
} catch (PackageManager.NameNotFoundException e) { } catch (PackageManager.NameNotFoundException e) {
e.printStackTrace(); e.printStackTrace();
} }
if (packageInfo == null || packageInfo.versionCode != versionCode) { if (packageInfo == null || packageInfo.versionCode < versionCode) {
Aria.download(this) Aria.download(this)
.load(url) //读取下载地址 .load(url) //读取下载地址
.setFilePath(PathUtils.getExternalDownloadsPath() + "/ygj/" + EncryptUtils.encryptMD5ToString(packageName) + ".apk", true) .setFilePath(PathUtils.getExternalDownloadsPath() + "/ygj/" + EncryptUtils.encryptMD5ToString(packageName) + ".apk", true)