瀏覽代碼

添加publish.gradle配置文件,修改版本号。

kaiweicai 2 年之前
父節點
當前提交
7165260409
共有 30 個文件被更改,包括 95 次插入99 次删除
  1. 1 0
      build.gradle
  2. 1 0
      demo/build.gradle
  3. 6 1
      demo/src/main/java/com/yyxx/commsdk/demo/SplashActivity.java
  4. 3 7
      library_base/build.gradle
  5. 23 10
      library_base/publish.gradle
  6. 1 1
      library_base/src/main/java/cn/yyxx/commsdk/Version.java
  7. 1 0
      library_base/src/main/java/cn/yyxx/commsdk/base/YYXXApplication.java
  8. 1 1
      library_base/src/main/java/cn/yyxx/commsdk/base/YYXXCommSdk.java
  9. 1 1
      library_base/src/main/java/cn/yyxx/commsdk/base/YYXXWelcomeActivity.java
  10. 4 6
      library_channel/build.gradle
  11. 2 2
      library_channel/publish.gradle
  12. 1 2
      library_channel/src/main/java/cn/yyxx/commsdk/impl/merge/user/UserSessionManager.java
  13. 2 2
      library_core/publish.gradle
  14. 2 4
      library_core/src/main/cpp/yyxxgame.cpp
  15. 1 1
      library_core/src/main/java/cn/yyxx/commsdk/core/common/CommonOperationManager.java
  16. 4 7
      library_core/src/main/java/cn/yyxx/commsdk/core/network/VolleyRequest.java
  17. 2 2
      library_core/src/main/java/cn/yyxx/commsdk/core/utils/ManifestUtils.java
  18. 3 6
      library_platform/hnqj/build.gradle
  19. 2 2
      library_platform/hnqj/publish.gradle
  20. 1 1
      library_platform/hnqj/src/main/assets/yyxx_game/yyxx_cfg.properties
  21. 3 6
      library_platform/hnyy/build.gradle
  22. 2 2
      library_platform/hnyy/publish.gradle
  23. 1 1
      library_platform/hnyy/src/main/assets/yyxx_game/yyxx_cfg.properties
  24. 3 6
      library_platform/shxy/build.gradle
  25. 2 2
      library_platform/shxy/publish.gradle
  26. 2 2
      library_platform/shxy/src/main/assets/yyxx_game/yyxx_cfg.properties
  27. 3 8
      library_platform/xinrui/build.gradle
  28. 2 2
      library_platform/xinrui/publish.gradle
  29. 1 0
      library_platform/xinrui/src/main/assets/yyxx_game/yyxx_cfg.properties
  30. 14 14
      library_platform/xinrui/src/main/java/cn/yyxx/commsdk/impl/merge/platform/xinrui/dialog/AutoLoginDialog.java

+ 1 - 0
build.gradle

@@ -9,6 +9,7 @@ buildscript {
         google()
         mavenCentral()
         jcenter()
+
     }
     dependencies {
         classpath 'com.android.tools.build:gradle:7.1.1'

+ 1 - 0
demo/build.gradle

@@ -82,5 +82,6 @@ dependencies {
 
 //    implementation project(path: ':library_channel_repository:oppo')
 
+    implementation project(path: ':library_base')
 
 }

+ 6 - 1
demo/src/main/java/com/yyxx/commsdk/demo/SplashActivity.java

@@ -1,7 +1,12 @@
 package com.yyxx.commsdk.demo;
 
+import android.os.Bundle;
+
 import cn.yyxx.commsdk.base.YYXXWelcomeActivity;
 
 public class SplashActivity extends YYXXWelcomeActivity {
-
+    @Override
+    protected void onCreate(final Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+    }
 }

+ 3 - 7
library_base/build.gradle

@@ -47,7 +47,7 @@ android.libraryVariants.all { variant ->
     if (variant.buildType.name == 'release'){
         variant.outputs.all {
 
-            outputFileName = "$PUBLISH_ARTIFACT_ID$PUBLISH_VERSION" + ".aar"
+            outputFileName = "$PUBLISH_ARTIFACT_ID"+ "-" + "$PUBLISH_VERSION" + ".aar"
         }
     }else{
         variant.outputs.all {
@@ -58,14 +58,10 @@ android.libraryVariants.all { variant ->
 }
 
 
-ext {
-
-    PUBLISH_ARTIFACT_ID = 'yyxx_comm_base'
-    PUBLISH_VERSION = ':1.0.100'
-}
 
 
 
 
 
-apply from: 'buildJar.gradle'
+apply from: 'buildJar.gradle'
+apply from: 'publish.gradle'

+ 23 - 10
library_base/publish.gradle

@@ -3,15 +3,25 @@ apply plugin: 'signing'
 
 ext {
     PUBLISH_GROUP_ID = 'io.github.yyxxgame.sdk'
-    PUBLISH_ARTIFACT_ID = 'eyuancomm-sdk-ktx-comm'
-    PUBLISH_VERSION = '1.0.0-rc6'
+    PUBLISH_ARTIFACT_ID = 'yyxx-comm-base'
+    PUBLISH_VERSION = '3.0.300'
 }
 
+
+ext["signing.keyId"] = ''
+ext["signing.password"] = ''
+ext["signing.secretKeyRingFile"] = ''
+ext["ossrhUsername"] = ''
+ext["ossrhPassword"] = ''
+
+
+
 Properties properties = new Properties()
 properties.load(project.rootProject.file('local.properties').newDataInputStream())
+properties.each { name, value ->
+    ext[name] = value
+}
 
-def ossrhUsername = properties.getProperty("SonaType.user")
-def ossrhPassword = properties.getProperty("SonaType.pwd")
 
 task androidSourcesJar(type: Jar) {
     archiveClassifier.set('source')
@@ -34,13 +44,16 @@ publishing {
             version PUBLISH_VERSION
 
             // Two artifacts, the `aar` and the sources
-            artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
+
+
+
+            artifact("$buildDir/outputs/aar/$PUBLISH_ARTIFACT_ID" + "-" + "$PUBLISH_VERSION"+ ".aar")
             artifact androidSourcesJar
 
             // Self-explanatory metadata for the most part
             pom {
-                name = "${PUBLISH_GROUP_ID}:${PUBLISH_ARTIFACT_ID}"
-                description = 'game comm sdk of eyuan'
+                name = "${PUBLISH_GROUP_ID}${PUBLISH_ARTIFACT_ID}"
+                description = 'game comm sdk of yyxx_comm'
                 // If your project has a dedicated site, use its URL here
                 url = 'https://github.com/yyxxgame'
                 licenses {
@@ -60,10 +73,10 @@ publishing {
                 // Version control info, if you're using GitHub, follow the format as seen here
                 scm {
                     //修改成你的Git地址:
-                    connection = 'scm:git:gogs.yyxxgame.com:3000/Client/EYuanGameSdk-KTX.git'
-                    developerConnection = 'scm:git:ssh://gogs.yyxxgame.com:3000/Client/EYuanGameSdk-KTX.git'
+                    connection = 'scm:git:gogs.yyxxgame.com:3000/Client/YYXXCommSdk.git'
+                    developerConnection = 'scm:git:ssh://gogs.yyxxgame.com:3000/Client/YYXXCommSdk.git'
                     //分支地址:
-                    url = 'http://gogs.yyxxgame.com/Client/EYuanGameSdk-KTX'
+                    url = 'http://gogs.yyxxgame.com:3000/Client/YYXXCommSdk.git'
                 }
                 // A slightly hacky fix so that your POM will include any transitive dependencies
                 // that your library builds upon

+ 1 - 1
library_base/src/main/java/cn/yyxx/commsdk/Version.java

@@ -5,5 +5,5 @@ package cn.yyxx.commsdk;
  * Created on 2021/12/25
  */
 public class Version {
-    public static final String VERSION_NAME = "3.0.0";
+    public static final String VERSION_NAME = "3.0.300";
 }

+ 1 - 0
library_base/src/main/java/cn/yyxx/commsdk/base/YYXXApplication.java

@@ -4,6 +4,7 @@ import android.app.Application;
 import android.content.Context;
 
 import cn.yyxx.commsdk.base.YYXXCommSdk;
+import cn.yyxx.support.hawkeye.LogUtils;
 
 public class YYXXApplication extends Application {
     @Override

+ 1 - 1
library_base/src/main/java/cn/yyxx/commsdk/base/YYXXCommSdk.java

@@ -156,7 +156,7 @@ public final class YYXXCommSdk {
 
         //有些CP自己请求了权限,导致回调权限2次,执行2次initFuseSdk,这里拦截一下
         if (doSdkInit) {
-            Logger.e("QSGameSdk initialize 已经执行,拦截此次调用");
+            Logger.e("YYXX_Comm_GameSdk initialize 已经执行,拦截此次调用");
             return;
         }
 

+ 1 - 1
library_base/src/main/java/cn/yyxx/commsdk/base/YYXXWelcomeActivity.java

@@ -60,7 +60,7 @@ public class YYXXWelcomeActivity extends Activity {
         YYXXCommSdk.getInstance().initAgreement(this, new ICallback() {
             @Override
             public void onResult(int code, String result) {
-                Logger.logHandler("result : " + result + "\n");
+                Logger.i("result : " + result + "\n");
 
                 if (code == ResultInfo.CODE_SUCCESS) {
                     if (layout == null){

+ 4 - 6
library_channel/build.gradle

@@ -36,7 +36,8 @@ android.libraryVariants.all { variant ->
     if (variant.buildType.name == 'release'){
         variant.outputs.all {
 
-            outputFileName = "$PUBLISH_ARTIFACT_ID$PUBLISH_VERSION" + ".aar"
+            outputFileName = "$PUBLISH_ARTIFACT_ID"+ "-" + "$PUBLISH_VERSION" + ".aar"
+
         }
     }else{
         variant.outputs.all {
@@ -47,11 +48,7 @@ android.libraryVariants.all { variant ->
 }
 
 
-ext {
 
-    PUBLISH_ARTIFACT_ID = 'yyxx_comm_channel'
-    PUBLISH_VERSION = ':3.0.100'
-}
 
 
 dependencies {
@@ -62,4 +59,5 @@ dependencies {
 
 }
 
-apply from: 'buildJar.gradle'
+apply from: 'buildJar.gradle'
+apply from: 'publish.gradle'

+ 2 - 2
library_channel/publish.gradle

@@ -3,8 +3,8 @@ apply plugin: 'signing'
 
 ext {
     PUBLISH_GROUP_ID = 'io.github.yyxxgame.sdk'
-    PUBLISH_ARTIFACT_ID = 'yyxx-comm-base'
-    PUBLISH_VERSION = '3.0.100'
+    PUBLISH_ARTIFACT_ID = 'yyxx-comm-channel'
+    PUBLISH_VERSION = '3.0.300'
 }
 
 

+ 1 - 2
library_channel/src/main/java/cn/yyxx/commsdk/impl/merge/user/UserSessionManager.java

@@ -39,7 +39,7 @@ public class UserSessionManager {
         if (TextUtils.isEmpty(json)) {
             return null;
         }
-        Logger.d("文件读出来:" + json);
+
         ArrayList<UserSession> infoList = null;
         try {
             JSONObject jsonObject = new JSONObject(json);
@@ -189,7 +189,6 @@ public class UserSessionManager {
         } catch (JSONException e) {
             e.printStackTrace();
         }
-        Logger.d("写入用户信息:" + jsonObject.toString());
 
         MMKVUtils.getInstance().userKV.encode(model, jsonObject.toString());
     }

+ 2 - 2
library_core/publish.gradle

@@ -3,8 +3,8 @@ apply plugin: 'signing'
 
 ext {
     PUBLISH_GROUP_ID = 'io.github.yyxxgame.sdk'
-    PUBLISH_ARTIFACT_ID = 'yyxx-comm-channel'
-    PUBLISH_VERSION = '3.0.100'
+    PUBLISH_ARTIFACT_ID = 'yyxx-comm-core'
+    PUBLISH_VERSION = '3.0.302'
 }
 
 

+ 2 - 4
library_core/src/main/cpp/yyxxgame.cpp

@@ -43,8 +43,7 @@ jstring InvokeJobWithoutParams(JNIEnv *env,jobject clz,jstring data){
     jstring result = AesKit::Encrypt(env, request_data.c_str());
 
 
-    YYLog::D(env, "请求路由: " + root["route_path"].asString());
-    YYLog::D(env, "请求参数: " + request_data);
+     YYLog::D(env, "请求参数: " + request_data);
 
     YYLog::LogHandler(env, "请求路由: " + root["route_path"].asString() + "\n");
     YYLog::LogHandler(env, "请求参数: " + request_data + "\n");
@@ -87,8 +86,7 @@ jstring InvokeJob(JNIEnv *env,jobject clz,jstring data){
     jstring result = AesKit::Encrypt(env, request_data.c_str());
 
 
-    YYLog::D(env, "请求路由: " + root["route_path"].asString());
-    YYLog::D(env, "请求参数: " + request_data);
+     YYLog::D(env, "请求参数: " + request_data);
 
     YYLog::LogHandler(env, "请求路由: " + root["route_path"].asString() + "\n");
     YYLog::LogHandler(env, "请求参数: " + request_data + "\n");

+ 1 - 1
library_core/src/main/java/cn/yyxx/commsdk/core/common/CommonOperationManager.java

@@ -193,7 +193,7 @@ public class CommonOperationManager {
                 if (resultInfo.code ==ResultInfo.CODE_SUCCESS){
                     initBean = InitBean.toBean(resultInfo.data,activity);
                     SdkDrive.setClientSignature(initBean.access_token);
-                    Logger.i(initBean.toString());
+                    Logger.d(initBean.toString());
                     callback.onResult(resultInfo.CODE_SUCCESS,activity.getString(ResourceUtil.getStringId(activity,"yyxx_comm_init_success")));
                 }else if (resultInfo.code ==ResultInfo.CODE_FAIL){
                     callback.onResult(resultInfo.CODE_FAIL,activity.getString(ResourceUtil.getStringId(activity,"yyxx_comm_init_fail")));

+ 4 - 7
library_core/src/main/java/cn/yyxx/commsdk/core/network/VolleyRequest.java

@@ -50,8 +50,6 @@ public class VolleyRequest {
 //            Logger.d("raw : " + raw);
 //            String sign = Md5Utils.encodeByMD5(raw.toString().toLowerCase());
 //            jsonObject.put("sign", sign);
-            Logger.logHandler("请求地址 : " + url + "\n");
-            Logger.logHandler("请求参数 : " + jsonObject.toString() + "\n");
             Logger.d("请求地址 : " + url);
             Logger.d("请求参数 : " + jsonObject.toString());
 
@@ -84,8 +82,8 @@ public class VolleyRequest {
                         resultInfo.msg = "接口请求异常";
                         resultInfo.data = "";
                     }
-                    Logger.logHandler("返回内容 : " + resultInfo.toString());
-                    Logger.d("onResponse : " + resultInfo.toString());
+
+                    Logger.d("onResponse : " + resultInfo);
                     if (callback != null) {
                         callback.onResponse(resultInfo);
                     }
@@ -117,10 +115,9 @@ public class VolleyRequest {
     public static void post(Context context, String url,String params, final IRequestCallback callback) {
         try {
 
-            Logger.logHandler("请求地址 : " + url + "\n");
-            Logger.logHandler("请求参数 : " + params + "\n");
-            Logger.d("请求地址 : " + url);
 
+            Logger.d("请求地址 : " + url);
+            Logger.d("请求参数 : " + params + "\n");
             StringRequest request = new StringRequest(Request.Method.POST,url, new Response.Listener<String>() {
                 @Override
                 public void onResponse(String s) {

+ 2 - 2
library_core/src/main/java/cn/yyxx/commsdk/core/utils/ManifestUtils.java

@@ -16,7 +16,7 @@ public class ManifestUtils {
     public static String getMetaDataValue(Context context, String key) {
         Object value = "";
         if (TextUtils.isEmpty(key)) {
-            Logger.logHandler("metaName is empty");
+            Logger.e("metaName is empty");
             return "";
         }
         try {
@@ -28,7 +28,7 @@ public class ManifestUtils {
                 value = getMetaDataValue(context, newKeyName);
             }
         } catch (PackageManager.NameNotFoundException e) {
-            Logger.logHandler("must config application meta data : " + key);
+            Logger.e("must config application meta data : " + key);
         }
         if (null == value) {
             value = "";

+ 3 - 6
library_platform/hnqj/build.gradle

@@ -41,7 +41,7 @@ android.libraryVariants.all { variant ->
     if (variant.buildType.name == 'release'){
         variant.outputs.all {
 
-            outputFileName = "$PUBLISH_ARTIFACT_ID$PUBLISH_VERSION" + ".aar"
+            outputFileName = "$PUBLISH_ARTIFACT_ID"+ "-" + "$PUBLISH_VERSION" + ".aar"
         }
     }else{
         variant.outputs.all {
@@ -52,11 +52,7 @@ android.libraryVariants.all { variant ->
 }
 
 
-ext {
 
-    PUBLISH_ARTIFACT_ID = 'yyxx_comm_platform_hnqj'
-    PUBLISH_VERSION = ':3.0.100'
-}
 
 
 dependencies {
@@ -78,4 +74,5 @@ dependencies {
 
 }
 
-apply from: 'buildJar.gradle'
+apply from: 'buildJar.gradle'
+apply from: 'publish.gradle'

+ 2 - 2
library_platform/hnqj/publish.gradle

@@ -3,8 +3,8 @@ apply plugin: 'signing'
 
 ext {
     PUBLISH_GROUP_ID = 'io.github.yyxxgame.sdk'
-    PUBLISH_ARTIFACT_ID = 'yyxx-comm-channel'
-    PUBLISH_VERSION = '3.0.100'
+    PUBLISH_ARTIFACT_ID = 'yyxx-comm-platform-hnqj'
+    PUBLISH_VERSION = '3.0.300'
 }
 
 

+ 1 - 1
library_platform/hnqj/src/main/assets/yyxx_game/yyxx_cfg.properties

@@ -1,3 +1,3 @@
+#YYXX_ONLINE_ENV=https://fxsy.qijinghao.com
 YYXX_ONLINE_ENV=http://testsdkapi.yyxxgame.com
-YYXX_GCP_CODE=Y0101025
 YYXX_PLATFORM=HNQJ

+ 3 - 6
library_platform/hnyy/build.gradle

@@ -78,7 +78,7 @@ android.libraryVariants.all { variant ->
     if (variant.buildType.name == 'release'){
         variant.outputs.all {
 
-            outputFileName = "$PUBLISH_ARTIFACT_ID$PUBLISH_VERSION" + ".aar"
+            outputFileName = "$PUBLISH_ARTIFACT_ID"+ "-" + "$PUBLISH_VERSION" + ".aar"
         }
     }else{
         variant.outputs.all {
@@ -89,11 +89,7 @@ android.libraryVariants.all { variant ->
 }
 
 
-ext {
 
-    PUBLISH_ARTIFACT_ID = 'yyxx_comm_platform_hnyy'
-    PUBLISH_VERSION = ':3.0.100'
-}
 
 
 dependencies {
@@ -115,4 +111,5 @@ dependencies {
 
 }
 
-apply from: 'buildJar.gradle'
+apply from: 'buildJar.gradle'
+apply from: 'publish.gradle'

+ 2 - 2
library_platform/hnyy/publish.gradle

@@ -3,8 +3,8 @@ apply plugin: 'signing'
 
 ext {
     PUBLISH_GROUP_ID = 'io.github.yyxxgame.sdk'
-    PUBLISH_ARTIFACT_ID = 'yyxx-comm-platform-hnqj'
-    PUBLISH_VERSION = '3.0.100'
+    PUBLISH_ARTIFACT_ID = 'yyxx-comm-platform-hnyy'
+    PUBLISH_VERSION = '3.0.300'
 }
 
 

+ 1 - 1
library_platform/hnyy/src/main/assets/yyxx_game/yyxx_cfg.properties

@@ -1,3 +1,3 @@
+#YYXX_ONLINE_ENV=https://sdkapi.yyxxgame.com
 YYXX_ONLINE_ENV=http://testsdkapi.yyxxgame.com
-YYXX_GCP_CODE=Y0101025
 YYXX_PLATFORM=HNYY

+ 3 - 6
library_platform/shxy/build.gradle

@@ -45,7 +45,7 @@ android.libraryVariants.all { variant ->
     if (variant.buildType.name == 'release'){
         variant.outputs.all {
 
-            outputFileName = "$PUBLISH_ARTIFACT_ID$PUBLISH_VERSION" + ".aar"
+            outputFileName = "$PUBLISH_ARTIFACT_ID"+ "-" + "$PUBLISH_VERSION" + ".aar"
         }
     }else{
         variant.outputs.all {
@@ -56,11 +56,7 @@ android.libraryVariants.all { variant ->
 }
 
 
-ext {
 
-    PUBLISH_ARTIFACT_ID = 'yyxx_comm_platform_shxy'
-    PUBLISH_VERSION = ':1.0.100'
-}
 
 
 dependencies {
@@ -82,4 +78,5 @@ dependencies {
 
 }
 
-apply from: 'buildJar.gradle'
+apply from: 'buildJar.gradle'
+apply from: 'publish.gradle'

+ 2 - 2
library_platform/shxy/publish.gradle

@@ -3,8 +3,8 @@ apply plugin: 'signing'
 
 ext {
     PUBLISH_GROUP_ID = 'io.github.yyxxgame.sdk'
-    PUBLISH_ARTIFACT_ID = 'yyxx-comm-platform-hnyy'
-    PUBLISH_VERSION = '3.0.100'
+    PUBLISH_ARTIFACT_ID = 'yyxx-comm-platform-shxy'
+    PUBLISH_VERSION = '3.0.300'
 }
 
 

+ 2 - 2
library_platform/shxy/src/main/assets/yyxx_game/yyxx_cfg.properties

@@ -1,3 +1,3 @@
+#YYXX_ONLINE_ENV=https://sdkapi.bklinok.com
 YYXX_ONLINE_ENV=http://testsdkapi.yyxxgame.com
-YYXX_GCP_CODE=Y0101025
-YYXX_PLATFORM=SHXY
+YYXX_PLATFORM=SHXY

+ 3 - 8
library_platform/xinrui/build.gradle

@@ -45,7 +45,7 @@ android.libraryVariants.all { variant ->
     if (variant.buildType.name == 'release'){
         variant.outputs.all {
 
-            outputFileName = "$PUBLISH_ARTIFACT_ID$PUBLISH_VERSION" + ".aar"
+            outputFileName = "$PUBLISH_ARTIFACT_ID"+ "-" + "$PUBLISH_VERSION" + ".aar"
         }
     }else{
         variant.outputs.all {
@@ -56,12 +56,6 @@ android.libraryVariants.all { variant ->
 }
 
 
-ext {
-
-    PUBLISH_ARTIFACT_ID = 'yyxx_comm_platform_xinrui'
-    PUBLISH_VERSION = ':3.0.100'
-}
-
 
 dependencies {
 
@@ -82,4 +76,5 @@ dependencies {
 
 }
 
-apply from: 'buildJar.gradle'
+apply from: 'buildJar.gradle'
+apply from: 'publish.gradle'

+ 2 - 2
library_platform/xinrui/publish.gradle

@@ -3,8 +3,8 @@ apply plugin: 'signing'
 
 ext {
     PUBLISH_GROUP_ID = 'io.github.yyxxgame.sdk'
-    PUBLISH_ARTIFACT_ID = 'yyxx-comm-platform-shxy'
-    PUBLISH_VERSION = '3.0.100'
+    PUBLISH_ARTIFACT_ID = 'yyxx-comm-platform-xinrui'
+    PUBLISH_VERSION = '3.0.300'
 }
 
 

+ 1 - 0
library_platform/xinrui/src/main/assets/yyxx_game/yyxx_cfg.properties

@@ -1,3 +1,4 @@
+#YYXX_ONLINE_ENV=https://sdkapi.ykklayo.com
 YYXX_ONLINE_ENV=http://testsdkapi.yyxxgame.com
 YYXX_GCP_CODE=Y0101025
 YYXX_PLATFORM=HNXR

+ 14 - 14
library_platform/xinrui/src/main/java/cn/yyxx/commsdk/impl/merge/platform/xinrui/dialog/AutoLoginDialog.java

@@ -129,20 +129,20 @@ public class AutoLoginDialog extends Dialog {
             public void run() {
                 Looper.prepare();
 
-//                dialogDismiss();
-//
-//                loginViewModel.accountLogin((Activity) context, lastUserSession.uname, lastUserSession.password, lastUserSession.login_token, new ICallback() {
-//                    @Override
-//                    public void onResult(int code, String result) {
-//                        if (code == ResultInfo.CODE_SUCCESS){
-//                            closeDialogCallback.onLoginSuccess();
-//                        }else {
-//                            closeDialogCallback.onLoginFail();
-//
-//                        }
-//
-//                    }
-//                });
+                dialogDismiss();
+
+                loginViewModel.accountLogin((Activity) context, lastUserSession.uname, lastUserSession.password, lastUserSession.login_token, new ICallback() {
+                    @Override
+                    public void onResult(int code, String result) {
+                        if (code == ResultInfo.CODE_SUCCESS){
+                            closeDialogCallback.onLoginSuccess();
+                        }else {
+                            closeDialogCallback.onLoginFail();
+
+                        }
+
+                    }
+                });
 
                 Looper.loop();
             }