|
@@ -142,7 +142,7 @@ public class AppActivity extends Cocos2dxActivity {
|
|
|
}
|
|
|
}).start();
|
|
|
//删除更新包
|
|
|
- new Thread(()->{
|
|
|
+ new Thread(() -> {
|
|
|
String packName = AppUtils.getAppPackageName();
|
|
|
String packStr = "zedu";
|
|
|
if (!packName.substring(8).equals("")) {
|
|
@@ -157,7 +157,7 @@ public class AppActivity extends Cocos2dxActivity {
|
|
|
sb.append(AppUtils.getAppVersionCode());
|
|
|
sb.append(".apk");
|
|
|
File file = new File(sb.toString());
|
|
|
- if(file.exists()){
|
|
|
+ if (file.exists()) {
|
|
|
file.delete();
|
|
|
}
|
|
|
}).start();
|
|
@@ -244,7 +244,8 @@ public class AppActivity extends Cocos2dxActivity {
|
|
|
//判断是否开始验证欠费情况
|
|
|
OrganPrefs_ mOrganPrefs = new OrganPrefs_(this);
|
|
|
OrganClientZedu mOrganClient = new OrganClientZedu();
|
|
|
- if (mOrganClient.isFullMoon(activate.issued) && mOrganPrefs.checkArrearsSuccess().get() == ArrearsEvent.FAIL) {
|
|
|
+ //只验证正式版,不验证临时版
|
|
|
+ if (mOrganClient.isFullMoon(activate.issued) && mOrganPrefs.checkArrearsSuccess().get() == ArrearsEvent.FAIL && activate.type == 2) {
|
|
|
LauncherActivity_.intent(this).start();
|
|
|
return;
|
|
|
}
|
|
@@ -341,11 +342,11 @@ public class AppActivity extends Cocos2dxActivity {
|
|
|
String base64Str = FaceActivity.bitmapToBase64(bitmap);
|
|
|
base64Str = base64Str.replaceAll("\n", "");
|
|
|
SDKUtils.evalString("createFace", "\'" + base64Str + "\'");
|
|
|
- if (isAndroidQ){
|
|
|
+ if (isAndroidQ) {
|
|
|
getContentResolver().delete(faceImageUri, null, null);
|
|
|
- }else{
|
|
|
- File img=new File(mCameraImagePath);
|
|
|
- if(img.exists()){
|
|
|
+ } else {
|
|
|
+ File img = new File(mCameraImagePath);
|
|
|
+ if (img.exists()) {
|
|
|
img.delete();
|
|
|
}
|
|
|
}
|
|
@@ -457,7 +458,7 @@ public class AppActivity extends Cocos2dxActivity {
|
|
|
NetworkInfo.State state = networkInfo.getState();
|
|
|
boolean isConnected = state == NetworkInfo.State.CONNECTED;// 当然,这边可以更精确的确定状态
|
|
|
if (isConnected) {
|
|
|
- if (SDKUtils.GAME_STARTED){
|
|
|
+ if (SDKUtils.GAME_STARTED) {
|
|
|
MyWebSocketServer.startServer();
|
|
|
}
|
|
|
} else {
|
|
@@ -587,7 +588,7 @@ public class AppActivity extends Cocos2dxActivity {
|
|
|
matrix.reset();
|
|
|
System.out.println("====image getRotation=" + rotation);
|
|
|
if (myBitmap.getWidth() > myBitmap.getHeight()) {
|
|
|
- switch (rotation){
|
|
|
+ switch (rotation) {
|
|
|
case 0:
|
|
|
case 90:
|
|
|
matrix.setRotate(90);
|