|
@@ -24,16 +24,11 @@
|
|
****************************************************************************/
|
|
****************************************************************************/
|
|
package org.cocos2dx.javascript;
|
|
package org.cocos2dx.javascript;
|
|
|
|
|
|
-import org.androidannotations.annotations.sharedpreferences.Pref;
|
|
|
|
-import org.androidannotations.api.sharedpreferences.IntPrefField;
|
|
|
|
import org.cocos2dx.lib.Cocos2dxActivity;
|
|
import org.cocos2dx.lib.Cocos2dxActivity;
|
|
import org.cocos2dx.lib.Cocos2dxGLSurfaceView;
|
|
import org.cocos2dx.lib.Cocos2dxGLSurfaceView;
|
|
-import org.java_websocket.server.WebSocketServer;
|
|
|
|
|
|
|
|
import android.Manifest;
|
|
import android.Manifest;
|
|
import android.content.BroadcastReceiver;
|
|
import android.content.BroadcastReceiver;
|
|
-import android.content.ContentResolver;
|
|
|
|
-import android.content.ContentUris;
|
|
|
|
import android.content.ContentValues;
|
|
import android.content.ContentValues;
|
|
import android.content.Context;
|
|
import android.content.Context;
|
|
import android.content.IntentFilter;
|
|
import android.content.IntentFilter;
|
|
@@ -54,14 +49,10 @@ import android.content.Intent;
|
|
import android.content.res.Configuration;
|
|
import android.content.res.Configuration;
|
|
import android.os.Environment;
|
|
import android.os.Environment;
|
|
import android.os.Parcelable;
|
|
import android.os.Parcelable;
|
|
-import android.os.Process;
|
|
|
|
-import android.provider.DocumentsContract;
|
|
|
|
import android.provider.MediaStore;
|
|
import android.provider.MediaStore;
|
|
import android.util.Log;
|
|
import android.util.Log;
|
|
-import android.util.SparseIntArray;
|
|
|
|
import android.view.Gravity;
|
|
import android.view.Gravity;
|
|
import android.view.LayoutInflater;
|
|
import android.view.LayoutInflater;
|
|
-import android.view.Surface;
|
|
|
|
import android.view.View;
|
|
import android.view.View;
|
|
import android.view.WindowManager;
|
|
import android.view.WindowManager;
|
|
import android.widget.FrameLayout;
|
|
import android.widget.FrameLayout;
|
|
@@ -77,19 +68,17 @@ import androidx.core.os.EnvironmentCompat;
|
|
|
|
|
|
import com.lzy.okgo.cache.CacheEntity;
|
|
import com.lzy.okgo.cache.CacheEntity;
|
|
import com.lzy.okgo.db.CacheManager;
|
|
import com.lzy.okgo.db.CacheManager;
|
|
-import com.lzy.okgo.model.HttpParams;
|
|
|
|
import com.orhanobut.logger.Logger;
|
|
import com.orhanobut.logger.Logger;
|
|
import com.zedu.R;
|
|
import com.zedu.R;
|
|
-import com.zedu.cocos.congming.app.ZeduApp;
|
|
|
|
-import com.zedu.cocos.congming.app.daemon.DaemonCreater;
|
|
|
|
import com.zedu.cocos.congming.app.device.DeviceEntity;
|
|
import com.zedu.cocos.congming.app.device.DeviceEntity;
|
|
-import com.zedu.cocos.congming.app.device.DevicePrefs_;
|
|
|
|
|
|
+import com.zedu.cocos.congming.app.organ.ArrearsEvent;
|
|
|
|
+import com.zedu.cocos.congming.app.organ.OrganClientZedu;
|
|
|
|
+import com.zedu.cocos.congming.app.organ.OrganPrefs_;
|
|
import com.zedu.cocos.congming.component.apk.ApkInfo;
|
|
import com.zedu.cocos.congming.component.apk.ApkInfo;
|
|
import com.zedu.cocos.congming.page.activate.ActivateActivity_;
|
|
import com.zedu.cocos.congming.page.activate.ActivateActivity_;
|
|
import com.zedu.cocos.congming.page.device.DeviceActivity_;
|
|
import com.zedu.cocos.congming.page.device.DeviceActivity_;
|
|
import com.zedu.cocos.congming.page.launcher.LauncherActivity;
|
|
import com.zedu.cocos.congming.page.launcher.LauncherActivity;
|
|
import com.zedu.cocos.congming.page.launcher.LauncherActivity_;
|
|
import com.zedu.cocos.congming.page.launcher.LauncherActivity_;
|
|
-import com.zedu.support.request.OkgoClientCache;
|
|
|
|
import com.zedu.support.request.response.BaseResponse;
|
|
import com.zedu.support.request.response.BaseResponse;
|
|
|
|
|
|
import java.io.File;
|
|
import java.io.File;
|
|
@@ -230,7 +219,15 @@ public class AppActivity extends Cocos2dxActivity {
|
|
Logger.d("跳转到ActivateActivity_");
|
|
Logger.d("跳转到ActivateActivity_");
|
|
ActivateActivity_.intent(this).packageName(item.packageName).start();
|
|
ActivateActivity_.intent(this).packageName(item.packageName).start();
|
|
} else if (activate.status == 1) {
|
|
} else if (activate.status == 1) {
|
|
-
|
|
|
|
|
|
+ //判断是否开始验证欠费情况
|
|
|
|
+ OrganPrefs_ mOrganPrefs = new OrganPrefs_(this);
|
|
|
|
+ OrganClientZedu mOrganClient = new OrganClientZedu();
|
|
|
|
+ if (mOrganClient.isFullMoon(activate.issued) && mOrganPrefs.checkArrearsSuccess().get() == ArrearsEvent.FAIL) {
|
|
|
|
+ LauncherActivity_.intent(this).start();
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ //未满月 且验证过欠费的设备 重置验证欠费状态
|
|
|
|
+ mOrganClient.resetArrearsStatus(activate, mOrganPrefs.checkArrearsSuccess().get());
|
|
} else {
|
|
} else {
|
|
Logger.d("激活错误 ActivateActivity_");
|
|
Logger.d("激活错误 ActivateActivity_");
|
|
this.showToast(String.format("%s激活错误", item.appName));
|
|
this.showToast(String.format("%s激活错误", item.appName));
|