version:
update:2021.02.26 fix: add:增加应用市场管控
This commit is contained in:
@@ -38,8 +38,8 @@ android {
|
||||
productFlavors {
|
||||
official {
|
||||
flavorDimensions "default"
|
||||
versionCode 1031
|
||||
versionName "2.0.3.1"// 正式jiaoguanyi.com 双数正式 单数测试
|
||||
versionCode 1032
|
||||
versionName "2.0.3.2"// 正式jiaoguanyi.com 双数正式 单数测试
|
||||
/*********************************极光推送************************************/
|
||||
manifestPlaceholders = [
|
||||
JPUSH_PKGNAME: "com.jiaoguanyi.appstore",
|
||||
|
||||
@@ -176,28 +176,32 @@ public class InitJpushServer extends Service {
|
||||
.execute(new StringCallback() {
|
||||
@Override
|
||||
public void onSuccess(String s, Call call, Response response) {
|
||||
com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(s);
|
||||
int code = jsonObject.getInteger("code");
|
||||
if (code == 200) {
|
||||
com.alibaba.fastjson.JSONObject data = com.alibaba.fastjson.JSONObject.parseObject(jsonObject.getString("data"));
|
||||
int lockScreen = data.getInteger("is_screen_lock");
|
||||
String name = data.getString("name");
|
||||
if (lockScreen == 1) {
|
||||
if (!timelocked) {
|
||||
showFloatingWindow(name);
|
||||
try {
|
||||
com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(s);
|
||||
int code = jsonObject.getInteger("code");
|
||||
if (code == 200) {
|
||||
com.alibaba.fastjson.JSONObject data = com.alibaba.fastjson.JSONObject.parseObject(jsonObject.getString("data"));
|
||||
int lockScreen = data.getInteger("is_screen_lock");
|
||||
String name = data.getString("name");
|
||||
if (lockScreen == 1) {
|
||||
if (!timelocked) {
|
||||
showFloatingWindow(name);
|
||||
}
|
||||
screenlocked = true;
|
||||
} else {
|
||||
if (!timelocked) {
|
||||
hideFloatingWindow();
|
||||
}
|
||||
screenlocked = false;
|
||||
}
|
||||
screenlocked = true;
|
||||
} else {
|
||||
if (!timelocked) {
|
||||
hideFloatingWindow();
|
||||
}
|
||||
screenlocked = false;
|
||||
}
|
||||
} else {
|
||||
if (!timelocked) {
|
||||
hideFloatingWindow();
|
||||
}
|
||||
screenlocked = false;
|
||||
} catch (Exception e) {
|
||||
Log.e("getScreenLockState", "onSuccess: "+e.getMessage() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -652,6 +652,7 @@ public class ApkUtils {
|
||||
//根据需求内置
|
||||
this.add("com.easyclient.activity");//移动课堂
|
||||
this.add("com.jiandan.mobilelesson");//简单课堂
|
||||
this.add("com.jiaoguanyi.store");//教官壹
|
||||
}};
|
||||
|
||||
|
||||
|
||||
@@ -218,8 +218,8 @@ public class Configure {
|
||||
public final static String GET_SN_TIME_CONTROL = HTTP_TAG_HEAD_NEW + "Sn/getSnTimeControl";
|
||||
//获取时间管控
|
||||
public final static String GET_TOP_APP_CONTROL = HTTP_TAG_HEAD_NEW + "Sn/getSnAppControl";
|
||||
//获取时间管控
|
||||
//获取顶部app管控
|
||||
public final static String GET_SN_APP_TEST = HTTP_TAG_HEAD_NEW + "Sn/getSnAppTest";
|
||||
//获取时间管控
|
||||
//获取测试app
|
||||
|
||||
}
|
||||
|
||||
@@ -28,8 +28,11 @@ public class ForegroundAppUtil {
|
||||
}
|
||||
|
||||
public static void openTopApp(Context context) {
|
||||
String packages = ForegroundAppUtil.getForegroundPackageName(context);
|
||||
String topAppName = (String) SPUtils.get(context, ForegroundAppUtil.TOPAPP_KEY, "");
|
||||
if (TextUtils.isEmpty(topAppName)) {
|
||||
return;
|
||||
}
|
||||
String packages = ForegroundAppUtil.getForegroundPackageName(context);
|
||||
Log.e("openTopApp", "old:" + topAppName);
|
||||
|
||||
if (!TextUtils.isEmpty(topAppName)) {
|
||||
|
||||
Reference in New Issue
Block a user