update:2019.04.22
fix:https add:
This commit is contained in:
@@ -16,8 +16,8 @@ android {
|
||||
targetSdkVersion 26
|
||||
// versionCode 85
|
||||
// versionName "2.0.4.6"//正式jiaoguanyi.com
|
||||
versionCode 121
|
||||
versionName "2.8.1.2"//测试jiaoguanyi.cn
|
||||
versionCode 123
|
||||
versionName "2.0.0.1"//测试jiaoguanyi.cn
|
||||
multiDexEnabled true
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
|
||||
@@ -81,6 +81,8 @@
|
||||
<action android:name="android.intent.action.DATE_CHANGED" />
|
||||
<action android:name="android.intent.action.TIME_TICK" />
|
||||
<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>
|
||||
</receiver>
|
||||
|
||||
@@ -570,7 +570,7 @@ public class MainActivity extends AppCompatActivity implements NetStateChangeObs
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (packageInfo == null || packageInfo.versionCode != versionCode) {
|
||||
if (packageInfo == null || packageInfo.versionCode < versionCode) {
|
||||
Aria.download(this)
|
||||
.load(url) //读取下载地址
|
||||
.setFilePath(PathUtils.getExternalDownloadsPath() + "/ygj/" + EncryptUtils.encryptMD5ToString(packageName) + ".apk", true)
|
||||
@@ -1364,19 +1364,19 @@ public class MainActivity extends AppCompatActivity implements NetStateChangeObs
|
||||
|
||||
|
||||
//otg开关
|
||||
int setting_otg = changeNum(data.optInt("setting_otg"));
|
||||
Log.e("SystemSetting", "setting_otg---------" + setting_otg);
|
||||
String otgStatus = "";
|
||||
switch (setting_otg) {
|
||||
case 0:
|
||||
otgStatus = "qch_otg_open";
|
||||
break;
|
||||
case 1:
|
||||
otgStatus = "qch_otg_forbid";
|
||||
break;
|
||||
}
|
||||
Intent otgIntent = new Intent(otgStatus);
|
||||
sendBroadcast(otgIntent);
|
||||
// int setting_otg = changeNum(data.optInt("setting_otg"));
|
||||
// Log.e("SystemSetting", "setting_otg---------" + setting_otg);
|
||||
// String otgStatus = "";
|
||||
// switch (setting_otg) {
|
||||
// case 0:
|
||||
// otgStatus = "qch_otg_open";
|
||||
// break;
|
||||
// case 1:
|
||||
// otgStatus = "qch_otg_forbid";
|
||||
// break;
|
||||
// }
|
||||
// Intent otgIntent = new Intent(otgStatus);
|
||||
// sendBroadcast(otgIntent);
|
||||
|
||||
//蓝牙开关
|
||||
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 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) {
|
||||
boolean qch_hide_statusBar = Settings.System.putInt(mContext.getContentResolver(), "qch_hide_statusBar", setting_statusbar);
|
||||
Log.e("SystemSetting", "qch_hide_statusBar---------" + qch_hide_statusBar);
|
||||
|
||||
@@ -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 = "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/";//测试
|
||||
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@ public class BootReceiver extends BroadcastReceiver {
|
||||
|| intent.getAction().equals("android.intent.action.DATE_CHANGED")
|
||||
|| intent.getAction().equals("android.intent.action.TIME_TICK")
|
||||
|| intent.getAction().equals("android.intent.action.USER_PRESENT")
|
||||
|| intent.getAction().equals("android.intent.action.ACTION_SCREEN_ON")
|
||||
|| intent.getAction().equals("android.intent.action.ACTION_SCREEN_OFF")
|
||||
|| intent.getAction().equals("android.intent.action.SCREEN_ON")
|
||||
|| intent.getAction().equals("android.intent.action.SCREEN_OFF")
|
||||
) {
|
||||
Log.e("fht", "BootReceiver MSG" + intent.getAction());
|
||||
context.startService(new Intent(context, InitJpushServer.class));
|
||||
|
||||
@@ -131,19 +131,19 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
||||
}
|
||||
|
||||
//otg开关
|
||||
int setting_otg = changeNum(data.optInt("setting_otg"));
|
||||
Log.e("SystemSetting", "setting_otg---------" + setting_otg);
|
||||
String otgStatus = "";
|
||||
switch (setting_otg) {
|
||||
case 0:
|
||||
otgStatus = "qch_otg_open";
|
||||
break;
|
||||
case 1:
|
||||
otgStatus = "qch_otg_forbid";
|
||||
break;
|
||||
}
|
||||
Intent otgIntent = new Intent(otgStatus);
|
||||
mContext.sendBroadcast(otgIntent);
|
||||
// int setting_otg = changeNum(data.optInt("setting_otg"));
|
||||
// Log.e("SystemSetting", "setting_otg---------" + setting_otg);
|
||||
// String otgStatus = "";
|
||||
// switch (setting_otg) {
|
||||
// case 0:
|
||||
// otgStatus = "qch_otg_open";
|
||||
// break;
|
||||
// case 1:
|
||||
// otgStatus = "qch_otg_forbid";
|
||||
// break;
|
||||
// }
|
||||
// Intent otgIntent = new Intent(otgStatus);
|
||||
// mContext.sendBroadcast(otgIntent);
|
||||
|
||||
//蓝牙开关
|
||||
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 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) {
|
||||
boolean qch_hide_statusBar = Settings.System.putInt(mContext.getContentResolver(), "qch_hide_statusBar", setting_statusbar);
|
||||
Log.e("SystemSetting", "qch_hide_statusBar---------" + qch_hide_statusBar);
|
||||
|
||||
@@ -761,19 +761,19 @@ public class InitJpushServer extends Service {
|
||||
}
|
||||
|
||||
//otg开关
|
||||
int setting_otg = changeNum(data.optInt("setting_otg"));
|
||||
Log.e("SystemSetting", "setting_otg---------" + setting_otg);
|
||||
String otgStatus = "";
|
||||
switch (setting_otg) {
|
||||
case 0:
|
||||
otgStatus = "qch_otg_open";
|
||||
break;
|
||||
case 1:
|
||||
otgStatus = "qch_otg_forbid";
|
||||
break;
|
||||
}
|
||||
Intent otgIntent = new Intent(otgStatus);
|
||||
sendBroadcast(otgIntent);
|
||||
// int setting_otg = changeNum(data.optInt("setting_otg"));
|
||||
// Log.e("SystemSetting", "setting_otg---------" + setting_otg);
|
||||
// String otgStatus = "";
|
||||
// switch (setting_otg) {
|
||||
// case 0:
|
||||
// otgStatus = "qch_otg_open";
|
||||
// break;
|
||||
// case 1:
|
||||
// otgStatus = "qch_otg_forbid";
|
||||
// break;
|
||||
// }
|
||||
// Intent otgIntent = new Intent(otgStatus);
|
||||
// sendBroadcast(otgIntent);
|
||||
|
||||
//蓝牙开关
|
||||
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 oldNum = Settings.System.getInt(getContentResolver(), "qch_hide_statusBar", 1);
|
||||
int oldNum = Settings.System.getInt(getContentResolver(), "qch_hide_statusBar", 0);
|
||||
if (oldNum != setting_statusbar) {
|
||||
boolean qch_hide_statusBar = Settings.System.putInt(getContentResolver(), "qch_hide_statusBar", setting_statusbar);
|
||||
Log.e("SystemSetting", "qch_hide_statusBar---------" + qch_hide_statusBar);
|
||||
@@ -948,7 +948,7 @@ public class InitJpushServer extends Service {
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (packageInfo == null || packageInfo.versionCode != versionCode) {
|
||||
if (packageInfo == null || packageInfo.versionCode < versionCode) {
|
||||
Aria.download(this)
|
||||
.load(url) //读取下载地址
|
||||
.setFilePath(PathUtils.getExternalDownloadsPath() + "/ygj/" + EncryptUtils.encryptMD5ToString(packageName) + ".apk", true)
|
||||
|
||||
Reference in New Issue
Block a user