version:
update:2020.11.5 fix:增加热点开关,屏蔽摄像头隐藏图标管控 add:
This commit is contained in:
@@ -38,8 +38,8 @@ android {
|
||||
productFlavors {
|
||||
official {
|
||||
flavorDimensions "default"
|
||||
versionCode 1025
|
||||
versionName "2.0.2.5"// 正式jiaoguanyi.com 双数正式 单数测试
|
||||
versionCode 1026
|
||||
versionName "2.0.2.6"// 正式jiaoguanyi.com 双数正式 单数测试
|
||||
/*********************************极光推送************************************/
|
||||
manifestPlaceholders = [
|
||||
JPUSH_PKGNAME: "com.jiaoguanyi.appstore",
|
||||
@@ -55,8 +55,9 @@ android {
|
||||
|
||||
beta {
|
||||
flavorDimensions "default"
|
||||
versionCode 108
|
||||
versionName "3.1.3"//测试jiaoguanyi.cn
|
||||
versionCode 109
|
||||
// versionCode 160//出厂版本太高
|
||||
versionName "3.1.4"//测试jiaoguanyi.cn
|
||||
/*********************************极光推送************************************/
|
||||
manifestPlaceholders = [
|
||||
JPUSH_PKGNAME: "com.jiaoguanyi.appstore",
|
||||
@@ -88,8 +89,8 @@ android {
|
||||
}
|
||||
newl {
|
||||
flavorDimensions "default"
|
||||
versionCode 159
|
||||
versionName "1.1.4"
|
||||
versionCode 161
|
||||
versionName "1.1.6"
|
||||
/*********************************极光推送************************************/
|
||||
manifestPlaceholders = [
|
||||
JPUSH_PKGNAME: "com.jiaoguanyi.appstore",
|
||||
|
||||
@@ -113,7 +113,7 @@ public class MyApplication extends MultiDexApplication {
|
||||
private SimpleDateFormat mDateFormat = null;
|
||||
private static List<Activity> activityList = new LinkedList();
|
||||
private Handler mHandler;
|
||||
private static AMapLocationClient locationClient = null;
|
||||
public static AMapLocationClient locationClient = null;
|
||||
|
||||
|
||||
public static Context getAppContext() {
|
||||
@@ -230,6 +230,8 @@ public class MyApplication extends MultiDexApplication {
|
||||
sb.append("定位失败" + "\n");
|
||||
SPUtils.put(context, "AmapError", aMapLocation.getErrorInfo());
|
||||
}
|
||||
Log.e("AmapAddress", (String) SPUtils.get(context, "AmapAddress", ""));
|
||||
Log.e("AmapError", (String) SPUtils.get(context, "AmapError", ""));
|
||||
Log.e("addr", sb.toString());
|
||||
}
|
||||
});
|
||||
@@ -350,6 +352,10 @@ public class MyApplication extends MultiDexApplication {
|
||||
Log.e("fht", "receiver action:" + action);
|
||||
if (action.equals(Intent.ACTION_SCREEN_ON)) {
|
||||
long time = System.currentTimeMillis();
|
||||
if (null != locationClient) {
|
||||
locationClient.stopLocation();
|
||||
locationClient.startLocation();
|
||||
}
|
||||
getLockState("2", String.valueOf(time));
|
||||
} else if (action.equals(Intent.ACTION_USER_PRESENT)) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
|
||||
@@ -219,6 +219,7 @@ public class MainActivity extends AppCompatActivity implements AMapLocationListe
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void setAlias() {
|
||||
TagAliasBean tagAliasBean = new TagAliasBean();
|
||||
tagAliasBean.action = ACTION_SET;
|
||||
@@ -1720,6 +1721,11 @@ public class MainActivity extends AppCompatActivity implements AMapLocationListe
|
||||
|
||||
}
|
||||
|
||||
int setting_hotspot = changeNum(data.optInt("setting_hotspot"));//热点
|
||||
boolean qch_hotspot_forbid_on = Settings.System.putInt(this.mContext.getContentResolver(), "qch_hotspot_forbid_on", setting_hotspot);//写入系统数据库
|
||||
Log.e("SystemSetting", "qch_hotspot_forbid_on---------" + setting_hotspot);
|
||||
Log.e("SystemSetting", "qch_hotspot_forbid_on---------" + qch_hotspot_forbid_on);
|
||||
|
||||
//系统导航条显示开关
|
||||
int setting_navigation = changeNum(data.optInt("setting_navigation"));
|
||||
boolean qch_hide_navigationBar = Settings.System.putInt(getContentResolver(), "qch_hide_NavigationBar", setting_navigation);
|
||||
@@ -1761,7 +1767,7 @@ public class MainActivity extends AppCompatActivity implements AMapLocationListe
|
||||
//摄像头开关
|
||||
int setting_camera = changeNum(data.optInt("setting_camera"));
|
||||
Settings.System.putInt(MainActivity.this.getContentResolver(), "qch_app_camera", setting_camera);
|
||||
ApkUtils.hideSystemSettingAPP(MainActivity.this, "com.mediatek.camera");
|
||||
// ApkUtils.hideSystemSettingAPP(MainActivity.this, "com.mediatek.camera");
|
||||
Log.e("SystemSetting", "setting_camera---------" + setting_camera);
|
||||
String cameraStatus = "";
|
||||
switch (setting_camera) {
|
||||
|
||||
@@ -68,6 +68,7 @@ public class Network {
|
||||
private static GetLockState getLockState;
|
||||
private static UpdateDeviceInfo updateDeviceInfo;
|
||||
private static GetBatchApi getBatchApi;
|
||||
|
||||
private static final long cacheSize = 1024 * 1024 * 20;// 缓存文件最大限制大小20M
|
||||
private static String cacheDirectory = Environment.getExternalStorageDirectory() + "/okttpcaches"; // 设置缓存文件路径
|
||||
private static Cache cache = new Cache(new File(cacheDirectory), cacheSize); //
|
||||
|
||||
@@ -59,6 +59,7 @@ public class BootReceiver extends BroadcastReceiver {
|
||||
context.startService(intent);
|
||||
context.startService(new Intent(context, StepService.class));
|
||||
context.startService(new Intent(context, GuardService.class));
|
||||
context.startService(new Intent(context, InitJpushServer.class));
|
||||
context.startService(new Intent(context, MyDownloadService.class));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -392,6 +392,12 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
||||
|
||||
}
|
||||
|
||||
int setting_hotspot = changeNum(data.optInt("setting_hotspot"));//热点
|
||||
boolean qch_hotspot_forbid_on = Settings.System.putInt(this.mContext.getContentResolver(), "qch_hotspot_forbid_on", setting_hotspot);//写入系统数据库
|
||||
Log.e("SystemSetting", "qch_hotspot_forbid_on---------" + setting_hotspot);
|
||||
Log.e("SystemSetting", "qch_hotspot_forbid_on---------" + qch_hotspot_forbid_on);
|
||||
|
||||
|
||||
//系统导航条显示开关
|
||||
int setting_navigation = changeNum(data.optInt("setting_navigation"));
|
||||
boolean qch_hide_navigationBar = Settings.System.putInt(mContext.getContentResolver(), "qch_hide_NavigationBar", setting_navigation);
|
||||
@@ -434,7 +440,7 @@ public class MyJPushReceiver extends BroadcastReceiver {
|
||||
//摄像头开关
|
||||
int setting_camera = changeNum(data.optInt("setting_camera"));
|
||||
Settings.System.putInt(this.mContext.getContentResolver(), "qch_app_camera", setting_camera);
|
||||
ApkUtils.hideSystemSettingAPP(this.mContext, "com.mediatek.camera");
|
||||
// ApkUtils.hideSystemSettingAPP(this.mContext, "com.mediatek.camera");
|
||||
Log.e("SystemSetting", "setting_camera---------" + setting_camera);
|
||||
String cameraStatus = "";
|
||||
switch (setting_camera) {
|
||||
|
||||
@@ -1002,6 +1002,11 @@ public class InitJpushServer extends Service {
|
||||
|
||||
}
|
||||
|
||||
int setting_hotspot = changeNum(data.optInt("setting_hotspot"));//热点
|
||||
boolean qch_hotspot_forbid_on = Settings.System.putInt(this.getContentResolver(), "qch_hotspot_forbid_on", setting_hotspot);//写入系统数据库
|
||||
Log.e("SystemSetting", "qch_hotspot_forbid_on---------" + setting_hotspot);
|
||||
Log.e("SystemSetting", "qch_hotspot_forbid_on---------" + qch_hotspot_forbid_on);
|
||||
|
||||
//系统导航条显示开关
|
||||
int setting_navigation = changeNum(data.optInt("setting_navigation"));
|
||||
boolean qch_hide_navigationBar = Settings.System.putInt(InitJpushServer.this.getContentResolver(), "qch_hide_NavigationBar", setting_navigation);
|
||||
@@ -1044,7 +1049,7 @@ public class InitJpushServer extends Service {
|
||||
//摄像头开关
|
||||
int setting_camera = changeNum(data.optInt("setting_camera"));
|
||||
Settings.System.putInt(InitJpushServer.this.getContentResolver(), "qch_app_camera", setting_camera);
|
||||
ApkUtils.hideSystemSettingAPP(InitJpushServer.this, "com.mediatek.camera");
|
||||
// ApkUtils.hideSystemSettingAPP(InitJpushServer.this, "com.mediatek.camera");
|
||||
Log.e("SystemSetting", "setting_camera---------" + setting_camera);
|
||||
String cameraStatus = "";
|
||||
switch (setting_camera) {
|
||||
|
||||
@@ -663,7 +663,7 @@ public class ApkUtils {
|
||||
try {
|
||||
if (pkage.equalsIgnoreCase("com.mediatek.camera")) {
|
||||
if (Settings.System.getInt(context.getContentResolver(), "qch_app_camera") == 1) {
|
||||
hide = 1;
|
||||
hide = 0;//管控摄像头隐藏图标有问题,先暂时不隐藏
|
||||
}
|
||||
} else if (pkage.equalsIgnoreCase("com.android.deskclock")) {
|
||||
if (Settings.System.getInt(context.getContentResolver(), "qch_app_deskclock") == 1) {
|
||||
|
||||
Reference in New Issue
Block a user