version:beta2.1.5
update: fix: add:增加发送锁屏息屏时状态
This commit is contained in:
@@ -41,9 +41,9 @@ android {
|
||||
//新平台正式
|
||||
newly {
|
||||
flavorDimensions "default"
|
||||
versionCode 514
|
||||
versionCode 515
|
||||
//versionCode 1037
|
||||
versionName "2.1.4"
|
||||
versionName "2.1.5"
|
||||
/*********************************极光推送************************************/
|
||||
manifestPlaceholders = [
|
||||
JPUSH_PKGNAME: "com.jiaoguanyi.appstore",
|
||||
@@ -55,13 +55,14 @@ android {
|
||||
/*********************************极光推送end************************************/
|
||||
buildConfigField "String", "ROOT_URL", '"http://name.jiaoguanyi.cn/api/"'
|
||||
buildConfigField "String", "WebsocketURL", '"ws://47.119.147.245:2345"'
|
||||
buildConfigField "String", "SCREEN_URL", '"http://47.119.147.245:2018"'
|
||||
}
|
||||
|
||||
//新平台测试
|
||||
beta {
|
||||
flavorDimensions "default"
|
||||
versionCode 524
|
||||
versionName "2.1.4"
|
||||
versionCode 525
|
||||
versionName "2.1.5"
|
||||
/*********************************极光推送************************************/
|
||||
manifestPlaceholders = [
|
||||
JPUSH_PKGNAME: "com.jiaoguanyi.appstore",
|
||||
@@ -73,6 +74,7 @@ android {
|
||||
/*********************************极光推送end************************************/
|
||||
buildConfigField "String", "ROOT_URL", '"http://name.uiuios.com/api/"'
|
||||
buildConfigField "String", "WebsocketURL", '"ws://39.108.116.195:2345"'
|
||||
buildConfigField "String", "SCREEN_URL", '"http://39.108.116.195:2018"'
|
||||
}
|
||||
|
||||
// //老平台正式
|
||||
|
||||
@@ -36,6 +36,7 @@ import com.arialyy.annotations.Download;
|
||||
import com.arialyy.aria.core.Aria;
|
||||
import com.arialyy.aria.core.download.DownloadEntity;
|
||||
import com.arialyy.aria.core.task.DownloadTask;
|
||||
import com.mjsheng.myappstore.BuildConfig;
|
||||
import com.mjsheng.myappstore.manager.AmapManager;
|
||||
import com.mjsheng.myappstore.network.HTTPInterface;
|
||||
import com.mjsheng.myappstore.network.api.newapi.GetLockStateApi;
|
||||
@@ -314,6 +315,7 @@ public class GuardService extends Service {
|
||||
// Intent navIntent = new Intent(statusbarStatus).setPackage("com.android.systemui");
|
||||
// context.sendBroadcast(navIntent);
|
||||
// }
|
||||
sendScreenStatus(1);
|
||||
break;
|
||||
}
|
||||
case Intent.ACTION_SCREEN_OFF: {
|
||||
@@ -331,6 +333,7 @@ public class GuardService extends Service {
|
||||
// Intent navIntent = new Intent(statusbarStatus).setPackage("com.android.systemui");
|
||||
// context.sendBroadcast(navIntent);
|
||||
// }
|
||||
sendScreenStatus(2);
|
||||
break;
|
||||
}
|
||||
case "android.intent.action.FACTORY_RESET":
|
||||
@@ -345,6 +348,29 @@ public class GuardService extends Service {
|
||||
}
|
||||
}
|
||||
|
||||
private void sendScreenStatus(int status) {
|
||||
// if (!JGYUtils.isBetaVersion()) {
|
||||
// Log.e(TAG, "sendScreenStatus: " + JGYUtils.getCHANNEL_VALUE() + " not support");
|
||||
// return;
|
||||
// }
|
||||
OkGo.post(BuildConfig.SCREEN_URL)
|
||||
.params("key", NetInterfaceManager.HTTP_KEY)
|
||||
.params("sn", Utils.getSerial())
|
||||
.params("is_online", status)
|
||||
.execute(new StringCallback() {
|
||||
@Override
|
||||
public void onSuccess(String s, Call call, Response response) {
|
||||
Log.e("sendScreenStatus", "onSuccess: " + s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Call call, Response response, Exception e) {
|
||||
super.onError(call, response, e);
|
||||
Log.e("sendScreenStatus", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void getLockState(String status, String time) {
|
||||
if (JGYUtils.isOfficialVersion()) {
|
||||
return;
|
||||
|
||||
@@ -70,6 +70,7 @@ public class JGYUtils {
|
||||
public static int UnknowPlatform = 0;
|
||||
public static String MTKTag = "MTK";
|
||||
public static String ZhanruiTag = "展锐";
|
||||
public static String Other = "其他";
|
||||
|
||||
|
||||
private JGYUtils(Context context) {
|
||||
@@ -104,6 +105,10 @@ public class JGYUtils {
|
||||
return "beta".equals(channelValue);
|
||||
}
|
||||
|
||||
public static String getCHANNEL_VALUE() {
|
||||
return JGYUtils.getInstance().getStringMetaData();
|
||||
}
|
||||
|
||||
public void resetDevice() {
|
||||
boolean isReset = MySQLData.GetBooleanData(mContext, CommonDatas.IS_RESET);
|
||||
int batteryLevel = getBatteryLevel();
|
||||
@@ -907,7 +912,7 @@ public class JGYUtils {
|
||||
public void deleteOtherApp() {
|
||||
Log.e(TAG, "deleteOtherApp: " + "start");
|
||||
//获取后台应用白名单
|
||||
String only_jgy_shortcut_list = Settings.System.getString(mContext.getContentResolver(), "only_jgy_shortcut_list");
|
||||
String only_jgy_shortcut_list = Settings.System.getString(mContext.getContentResolver(), "only_jgy_shortcut_list");
|
||||
//获取可以被安装的包名
|
||||
String qch_app_forbid = Settings.System.getString(mContext.getContentResolver(), "qch_app_forbid");
|
||||
Log.e("deleteOtherApp", "only_jgy_shortcut_list:" + only_jgy_shortcut_list);
|
||||
@@ -1205,6 +1210,17 @@ public class JGYUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public String getAppPlatform() {
|
||||
String platform = BuildConfig.platform;
|
||||
if ("MTK".equalsIgnoreCase(platform)) {
|
||||
return MTKTag;
|
||||
} else if ("ZhanRui".equalsIgnoreCase(platform)) {
|
||||
return ZhanruiTag;
|
||||
} else {
|
||||
return Other;
|
||||
}
|
||||
}
|
||||
|
||||
public void cleanLauncherCache() {
|
||||
Log.e(TAG, "cleanLauncherCache: Start");
|
||||
int cleaned = (int) SPUtils.get(mContext, "cleanLauncherCache", 0);
|
||||
|
||||
Reference in New Issue
Block a user