Преглед изворни кода

添加升级功能;并优化几个界面

zengjiebin пре 7 година
родитељ
комит
1997c219d2

+ 6 - 38
app/src/main/java/com/kfzs/duanduan/fragment/FgtPersonalCenter.java

@@ -1,5 +1,6 @@
 package com.kfzs.duanduan.fragment;
 
+import android.content.pm.PackageInfo;
 import android.os.Bundle;
 import android.text.TextUtils;
 import android.view.LayoutInflater;
@@ -20,6 +21,7 @@ import com.sheep.gamegroup.model.entity.DialogConfig;
 import com.sheep.gamegroup.model.entity.Ext;
 import com.sheep.gamegroup.model.entity.FriendAndAwardEntity;
 import com.sheep.gamegroup.model.entity.UserEntity;
+import com.sheep.gamegroup.model.entity.Version;
 import com.sheep.gamegroup.model.entity.VersionInfo;
 import com.sheep.gamegroup.model.entity.WebviewEntity;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
@@ -30,6 +32,7 @@ import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.MyDbManager;
 import com.sheep.gamegroup.util.SysAppUtil;
+import com.sheep.gamegroup.util.TestUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.R;
@@ -39,6 +42,8 @@ import com.sheep.jiuyan.samllsheep.utils.G;
 import com.tencent.bugly.beta.Beta;
 import com.tencent.bugly.beta.UpgradeInfo;
 
+import java.io.File;
+
 import butterknife.BindView;
 import butterknife.ButterKnife;
 import butterknife.OnClick;
@@ -147,43 +152,6 @@ public class FgtPersonalCenter extends BaseCompatFragment {
         clear_item_tv.setText(TextUtils.isEmpty(size) || TextUtils.equals("0K",size) ? "无需清理" : size);
     }
 
-    private void showVersionInfo() {
-        SheepApp.getInstance().getNetComponent().getApiService().getVersionInfo("")
-                .subscribeOn(Schedulers.io())
-                .observeOn(AndroidSchedulers.mainThread())
-                .subscribe(new SheepSubscriber<BaseMessage>(getContext()) {
-                    @Override
-                    public void onNext(BaseMessage baseMessage) {
-                        LogUtil.println("baseMessage onNext " + JSON.toJSONString(baseMessage));
-                        VersionInfo newVersionInfo = baseMessage.getData(VersionInfo.class);
-                        if(newVersionInfo == null){
-                            G.showToast(baseMessage);
-                            return;
-                        }
-                        String appVersonName = ApkUtils.getCurrentPkgVersionName(SheepApp.getInstance());
-                        if(TextUtils.equals(newVersionInfo.getVersion_number(), appVersonName)){//已经是最新版本
-                            G.showToast("当前版本为最新版本,无需更新");
-                        } else {//有新版本
-                            DialogConfig dialogConfig = new DialogConfig().setTitle("小绵羊V"+newVersionInfo.getVersion_number());
-                            dialogConfig.setMsg("当前版本小绵羊V"+appVersonName).setBtnRightText("下次更新")
-                                    .setBtnLeftText("立即更新").setBtnLeftOnClickListener(new View.OnClickListener() {
-                                @Override
-                                public void onClick(View view) {
-                                    Beta.checkUpgrade();//检查版本号
-                                }
-                            });
-                            ViewUtil.showMsgDialog(getActivity(), dialogConfig);
-                        }
-                    }
-
-                    @Override
-                    public void onError(BaseMessage baseMessage) {
-                        LogUtil.println("baseMessage onError " + JSON.toJSONString(baseMessage));
-                        G.showToast(baseMessage);
-                    }
-                });
-    }
-
     private void updateData(BaseMessage baseMessage) {
         userEntitys = baseMessage.getData(UserEntity.class);
         try {
@@ -272,7 +240,7 @@ public class FgtPersonalCenter extends BaseCompatFragment {
                 }
                 break;
             case R.id.version_layout://版本更新
-                showVersionInfo();
+                SysAppUtil.showVersionInfo();
                 break;
             case R.id.clear_layout://清除缓存
                 ViewUtil.showMsgDialog(getActivity(), new DialogConfig().setTitle("清除缓存").setMsg("所有本地的缓存都会被清理").setBtnRightText("取消")

+ 9 - 0
app/src/main/java/com/kfzs/duanduan/utils/ApkUtils.java

@@ -297,6 +297,15 @@ public class ApkUtils {
             return "0.0.0";
         }
     }
+    public static PackageInfo getPackageInfo(Context context) {
+        try {
+            PackageManager pm = context.getPackageManager();
+            PackageInfo pi = pm.getPackageInfo(context.getPackageName(), 0);
+            return pi;
+        } catch (Exception e) {
+            return null;
+        }
+    }
 
 
     public static int getCurrentPkgVersionCode(Context context) {

+ 0 - 88
app/src/main/java/com/kfzs/duanduan/utils/net/ApiUploadFileCallBack.java

@@ -1,88 +0,0 @@
-package com.kfzs.duanduan.utils.net;
-
-import com.google.protobuf.InvalidProtocolBufferException;
-import com.kfzs.appstore.utils.string.HexUtils;
-import com.kfzs.duanduan.proto.ApiResponseOuterClass;
-
-import go.kfzssafe.Kfzssafe;
-
-/**
- * <pre>
- *     sinlov
- *
- *     /\__/\
- *    /`    '\
- *  ≈≈≈ 0  0 ≈≈≈ Hello world!
- *    \  --  /
- *   /        \
- *  /          \
- * |            |
- *  \  ||  ||  /
- *   \_oo__oo_/≡≡≡≡≡≡≡≡o
- *
- * </pre>
- * Created by sinlov on 17/3/30.
- */
-public abstract class ApiUploadFileCallBack implements UploadFileCallBack {
-    public static final int INVALID_PROTOCOL_BUFFER_ERROR = -99;
-
-    @Override
-    public void responseUploadSuccess(String msg) {
-        try {
-            byte[] bytes = HexUtils.hexStr2Bytes(msg);
-            byte[] byteDecode = Kfzssafe.XByteDecode(bytes);
-            ApiResponseOuterClass.ApiResponse apiResponse = ApiResponseOuterClass.ApiResponse.parseFrom(byteDecode);
-            int codeValue = apiResponse.getCodeValue();
-            switch (codeValue) {
-                case ApiResponseOuterClass.Codes.Success_VALUE:
-                    onApiSuccess(apiResponse);
-                    break;
-                case ApiResponseOuterClass.Codes.Unauthorized_VALUE:
-                    onApiUnauthorized(apiResponse);
-                default:
-                    onApiError(codeValue, apiResponse);
-                    break;
-            }
-        } catch (Exception e) {
-            onParseError(INVALID_PROTOCOL_BUFFER_ERROR, e);
-        }
-    }
-
-    @Override
-    public void responseUploadError(int code, String msg) {
-        onParseError(code, new Exception(msg));
-    }
-
-    /**
-     * when this call back job code is {@link com.kfzs.duanduan.proto.ApiResponseOuterClass.Codes#Success_VALUE}
-     *
-     * @param response {@link com.kfzs.duanduan.proto.ApiResponseOuterClass.ApiResponse}
-     */
-    public abstract void onApiSuccess(ApiResponseOuterClass.ApiResponse response);
-
-    /**
-     * when this call back job code is {@link com.kfzs.duanduan.proto.ApiResponseOuterClass.Codes#Unauthorized_VALUE}
-     *
-     * @param response {@link com.kfzs.duanduan.proto.ApiResponseOuterClass.ApiResponse}
-     */
-    public abstract void onApiUnauthorized(ApiResponseOuterClass.ApiResponse response);
-
-    /**
-     * this method call back by right parse btn_dialog_close code not
-     * <br/><li/>{@link com.kfzs.duanduan.proto.ApiResponseOuterClass.Codes#Success_VALUE}
-     * <br/><li/>{@link com.kfzs.duanduan.proto.ApiResponseOuterClass.Codes#Unauthorized_VALUE}
-     *
-     * @param errorCode code of error
-     * @param response  {@link com.kfzs.duanduan.proto.ApiResponseOuterClass.ApiResponse}
-     */
-    public abstract void onApiError(int errorCode, ApiResponseOuterClass.ApiResponse response);
-
-    /**
-     * this method call back by pares error code is {@link #INVALID_PROTOCOL_BUFFER_ERROR}
-     * <br/> most of time Exception is {@link InvalidProtocolBufferException} or other Exception
-     *
-     * @param errorCode {@link #INVALID_PROTOCOL_BUFFER_ERROR}
-     * @param e         {@link Exception}
-     */
-    public abstract void onParseError(int errorCode, Exception e);
-}

+ 0 - 35
app/src/main/java/com/kfzs/duanduan/utils/net/UploadFileCallBack.java

@@ -1,35 +0,0 @@
-package com.kfzs.duanduan.utils.net;
-
-/**
- * <pre>
- *     sinlov
- *
- *     /\__/\
- *    /`    '\
- *  ≈≈≈ 0  0 ≈≈≈ Hello world!
- *    \  --  /
- *   /        \
- *  /          \
- * |            |
- *  \  ||  ||  /
- *   \_oo__oo_/≡≡≡≡≡≡≡≡o
- *
- * </pre>
- * Created by sinlov on 17/3/30.
- */
-public interface UploadFileCallBack {
-    int PROGRESS_START = 0;
-    int PROGRESS_FINISH = 99;
-    int PROGRESS_SUCCESS = 100;
-    int PROGRESS_ERROR = -1;
-
-    int ERROR_FILE_IS_EMPTY = -2;
-    int ERROR_OUT_OF_TIME = -3;
-    int ERROR_FILE_MD5_HASH_ERROR = -4;
-
-    void responseUploadError(int code, String msg);
-
-    void responseUploadSuccess(String msg);
-
-    void uploadProgress(int progress);
-}

+ 7 - 0
app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java

@@ -552,4 +552,11 @@ public interface ApiService {
      */
     @GET("app/game_consumption/order/{id}")
     Observable<BaseMessage> gameTaskPayOrGiveUp(@Path("id") int id, @Body JSONObject jsonObject);
+
+    /**
+     * 获取最新版本信息
+     * @return
+     */
+    @GET("app/version/new_version")
+    Observable<BaseMessage> getNewVersion(@Query("type") int type);
 }

+ 20 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/DialogConfig.java

@@ -15,7 +15,9 @@ public class DialogConfig {
     private View.OnClickListener btnRightOnClickListener;
     private String msgMore;
     private String tip;
+    private boolean cancelable = true;//默认可以取消对话框,并显示close图标
     private boolean isFinish;
+    private int msgGravity;
 
     public boolean isFinish() {
         return isFinish;
@@ -97,4 +99,22 @@ public class DialogConfig {
         this.tip = tip;
         return this;
     }
+
+    public boolean isCancelable() {
+        return cancelable;
+    }
+
+    public DialogConfig setCancelable(boolean cancelable) {
+        this.cancelable = cancelable;
+        return this;
+    }
+
+    public int getMsgGravity() {
+        return msgGravity;
+    }
+
+    public DialogConfig setMsgGravity(int msgGravity) {
+        this.msgGravity = msgGravity;
+        return this;
+    }
 }

+ 121 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/Version.java

@@ -0,0 +1,121 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * Created by realicing on 2018/6/20.
+ * realicing@sina.com
+ * {
+ "address": "2",
+ "md5_address": "2",
+ "status": 1,
+ "id": 2,
+ "strong_update": 0,
+ "version_number": 2,
+ "type": 1,
+ "update_time": 1529480619,
+ "create_time": 1529465833
+ }
+ */
+public class Version {
+
+    private String address;
+
+    private String md5_address;
+
+    private String version_name;
+
+    private String update_content;
+
+    private int status;
+
+    private int id;
+
+    private int strong_update;//是否强更,是:1,否:0
+
+    private int version_number;
+
+    private int type;//类型,正式服:1,测试服:0
+
+    private int update_time;
+
+    private int create_time;
+
+    public void setAddress(String address){
+        this.address = address;
+    }
+    public String getAddress(){
+        return this.address;
+    }
+    public void setMd5_address(String md5_address){
+        this.md5_address = md5_address;
+    }
+    public String getMd5_address(){
+        return this.md5_address;
+    }
+    public void setStatus(int status){
+        this.status = status;
+    }
+    public int getStatus(){
+        return this.status;
+    }
+    public void setId(int id){
+        this.id = id;
+    }
+    public int getId(){
+        return this.id;
+    }
+    public void setStrong_update(int strong_update){
+        this.strong_update = strong_update;
+    }
+    public int getStrong_update(){
+        return this.strong_update;
+    }
+    public void setVersion_number(int version_number){
+        this.version_number = version_number;
+    }
+    public int getVersion_number(){
+        return this.version_number;
+    }
+    public void setType(int type){
+        this.type = type;
+    }
+    public int getType(){
+        return this.type;
+    }
+    public void setUpdate_time(int update_time){
+        this.update_time = update_time;
+    }
+    public int getUpdate_time(){
+        return this.update_time;
+    }
+    public void setCreate_time(int create_time){
+        this.create_time = create_time;
+    }
+    public int getCreate_time(){
+        return this.create_time;
+    }
+
+    public String getVersion_name() {
+        return version_name;
+    }
+
+    public void setVersion_name(String version_name) {
+        this.version_name = version_name;
+    }
+
+    public String getUpdate_content() {
+        return update_content;
+    }
+
+    public void setUpdate_content(String update_content) {
+        this.update_content = update_content;
+    }
+
+
+    /**
+     * 是否强更
+     * @return
+     */
+    public boolean isForceUpdate() {
+        return strong_update == 1;
+    }
+}

+ 97 - 0
app/src/main/java/com/sheep/gamegroup/util/SysAppUtil.java

@@ -11,15 +11,26 @@ import android.os.Build;
 import android.provider.AlarmClock;
 import android.text.TextUtils;
 import android.text.format.Formatter;
+import android.view.Gravity;
+import android.view.View;
+import android.widget.TextView;
 
+import com.alibaba.fastjson.JSON;
 import com.bumptech.glide.Glide;
 import com.bumptech.glide.load.engine.cache.InternalCacheDiskCacheFactory;
 import com.kfzs.duanduan.utils.ApkUtils;
 import com.sheep.gamegroup.model.entity.AppInfo;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.DialogConfig;
+import com.sheep.gamegroup.model.entity.Version;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.ClassFileHelper;
 import com.sheep.jiuyan.samllsheep.utils.G;
+import com.tencent.bugly.beta.Beta;
+import com.zhy.http.okhttp.OkHttpUtils;
+import com.zhy.http.okhttp.callback.FileCallBack;
 
 import java.io.BufferedReader;
 import java.io.File;
@@ -29,7 +40,9 @@ import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.List;
+import java.util.Locale;
 
+import okhttp3.Call;
 import rx.Observable;
 import rx.android.schedulers.AndroidSchedulers;
 import rx.functions.Action1;
@@ -302,4 +315,88 @@ public class SysAppUtil {
             e.printStackTrace();
         }
     }
+
+    public static void showVersionInfo() {
+        SheepApp.getInstance().getNetComponent().getApiService().getNewVersion(TestUtil.isSheep() ? 1 : 0)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        LogUtil.println("baseMessage onNext " + JSON.toJSONString(baseMessage));
+                        final Version version = baseMessage.getData(Version.class);
+                        if(version == null){
+                            G.showToast(baseMessage);
+                            return;
+                        }
+                        PackageInfo packageInfo = ApkUtils.getPackageInfo(SheepApp.getInstance());
+                        if(packageInfo == null || TextUtils.isEmpty(packageInfo.applicationInfo.sourceDir)){
+//                            G.showToast(R.string.unknown_error);
+                            Beta.checkUpgrade();//检查版本号
+                            return;
+                        }
+                        String fileMD5 = com.arialyy.aria.util.CommonUtil.getFileMD5(new File(packageInfo.applicationInfo.sourceDir));
+                        if(TextUtils.equals(version.getMd5_address(), fileMD5)){//已经是最新版本
+                            G.showToast("当前版本为最新版本,无需更新");
+                        } else {//有新版本
+                            DialogConfig dialogConfig = new DialogConfig().setTitle("小绵羊V"+version.getVersion_name());
+                            dialogConfig.setMsg(TextUtils.isEmpty(version.getUpdate_content()) ? "当前版本小绵羊V"+packageInfo.versionName : version.getUpdate_content())
+                                    .setMsgGravity(Gravity.START)
+                                    .setBtnLeftText("立即更新").setBtnLeftOnClickListener(new View.OnClickListener() {
+                                private void installApk(File file){
+                                    if(file != null && file.exists()) {
+                                        ApkUtils.installApk(SheepApp.getInstance(), file.getAbsolutePath());
+                                    }
+                                }
+                                @Override
+                                public void onClick(final View view) {
+                                    String fileName = version.getMd5_address()+".apk";
+                                    final File file = new File(fileName);
+                                    if(file.exists()){//直接安装
+                                        installApk(file);
+                                    } else if(TextUtils.isEmpty(version.getAddress())){//地址错误
+                                        G.showToast(R.string.error_download_link);
+                                    } else {//下载安装
+                                        OkHttpUtils.get().url(version.getAddress()).build().execute(new FileCallBack(ClassFileHelper.DIR, fileName) {
+                                            @Override
+                                            public void inProgress(float progress, long total, int id) {
+                                                if(view instanceof TextView) {
+                                                    TextView btnLeftTextView = (TextView) view;
+                                                    btnLeftTextView.setEnabled(false);
+                                                    btnLeftTextView.setText(String.format(Locale.CHINA, "%d%%", Math.round(progress * 100)));
+                                                }
+                                            }
+                                            @Override
+                                            public void onError(Call call, Exception e, int id) {
+                                                if(view instanceof TextView) {
+                                                    TextView btnLeftTextView = (TextView) view;
+                                                    btnLeftTextView.setEnabled(true);
+                                                    btnLeftTextView.setText("重新下载");
+                                                }
+                                            }
+
+                                            @Override
+                                            public void onResponse(File response, int id) {
+                                                installApk(file);
+                                            }
+                                        });
+                                    }
+                                }
+                            });
+                            if(version.isForceUpdate()){//强更
+                                dialogConfig.setCancelable(false);
+                            } else {
+                                dialogConfig.setBtnRightText("下次更新");
+                            }
+                            ViewUtil.showMsgDialog(SheepApp.getInstance(), dialogConfig);
+                        }
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        LogUtil.println("baseMessage onError " + JSON.toJSONString(baseMessage));
+                        G.showToast(baseMessage);
+                    }
+                });
+    }
 }

+ 4 - 1
app/src/main/java/com/sheep/gamegroup/util/TestUtil.java

@@ -62,7 +62,7 @@ public class TestUtil {
         view.setOnLongClickListener(new View.OnLongClickListener() {
             @Override
             public boolean onLongClick(View view) {
-                final String[] items = {"复制", "系统下载", "浏览器下载"};
+                final String[] items = {"复制下载地址", "系统下载", "浏览器下载"};
                 AlertDialog dialog = new AlertDialog.Builder(context).setTitle("请选择操作")
                         .setItems(items, new DialogInterface.OnClickListener() {
 
@@ -252,6 +252,9 @@ public class TestUtil {
                     });
         }
     }
+    public static boolean isSheep(){
+        return TextUtils.equals("sheep", BuildConfig.FLAVOR) && !BuildConfig.DEBUG;
+    }
     public static boolean isTest(){
         return BuildConfig.DEBUG || !"sheep".equals(BuildConfig.FLAVOR);
     }

+ 15 - 6
app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java

@@ -16,6 +16,7 @@ import android.support.v7.app.AlertDialog;
 import android.text.Html;
 import android.text.TextUtils;
 import android.text.method.ScrollingMovementMethod;
+import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.Window;
@@ -311,6 +312,9 @@ public class ViewUtil {
 
         final TextView dialog_msg = view.findViewById(R.id.dialog_msg);
         dialog_msg.setText(msg);
+        int msgGravity = dialogConfig.getMsgGravity();
+        if(msgGravity != Gravity.NO_GRAVITY)
+            dialog_msg.setGravity(msgGravity);
 
         TextView dialog_msg_more = view.findViewById(R.id.dialog_msg_more);
         if(TextUtils.isEmpty(msgMore)){
@@ -360,12 +364,15 @@ public class ViewUtil {
         View dialog_btn_center = view.findViewById(R.id.dialog_btn_center);
         dialog_btn_center.setVisibility(isLeftBtnShow && isRigthBtnShow ? View.VISIBLE : View.GONE);
 
-        dialog_close.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                dialog.dismiss();
-            }
-        });
+        if(dialogConfig.isCancelable())//
+            dialog_close.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    dialog.dismiss();
+                }
+            });
+        else
+            dialog_close.setVisibility(View.GONE);
         if(dialogConfig.isFinish()) {
             dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
                 @Override
@@ -383,6 +390,8 @@ public class ViewUtil {
         if(!(context instanceof Activity) && dialog.getWindow() != null) {
             dialog.getWindow().setType(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N ? WindowManager.LayoutParams.TYPE_PHONE : WindowManager.LayoutParams.TYPE_TOAST);
         }
+        if(!dialogConfig.isCancelable())
+            dialog.setCancelable(false);
         try {
             dialog.show();
         } catch (Exception e) {

+ 4 - 4
app/src/main/java/com/sheep/gamegroup/view/activity/SplashAct.java

@@ -179,7 +179,7 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
     private void loadAdvertising() {
         if(advertising.isImage()) {
             Glide.with(activity).load(advertising.getDisplay_src()).into(splash_bg);
-            btnJoin.setVisibility(View.GONE);
+//            btnJoin.setVisibility(View.GONE);
             splash_video_view.setVisibility(View.GONE);
         } else {
             Uri uri = Uri.parse(advertising.getDisplay_src());
@@ -193,7 +193,7 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
                     LogUtil.println("onInfo what = " + what + " extra = " + extra);
                     if(MediaPlayer.MEDIA_INFO_BUFFERING_START == what){
                         splash_bg.setVisibility(View.GONE);
-                        btnJoin.setVisibility(View.GONE);
+//                        btnJoin.setVisibility(View.GONE);
                     }
                     return false;
                 }
@@ -214,7 +214,7 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
                         public void onFinish() {
                             splash_skip.setEnabled(true);
                             splash_skip.setVisibility(View.GONE);
-                            btnJoin.setVisibility(View.VISIBLE);
+//                            btnJoin.setVisibility(View.VISIBLE);
                             if (isResume)
                                 sendHandlerMessages();
                         }
@@ -226,7 +226,7 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
                         }
                     }).start();
         } else {
-            btnJoin.setVisibility(View.VISIBLE);
+//            btnJoin.setVisibility(View.VISIBLE);
             sendHandlerMessages();
         }
     }

+ 2 - 2
gradle.properties

@@ -17,8 +17,8 @@
 # org.gradle.parallel=true
 #android.injected.build.model.only.versioned = 3
 
-VERSION_NAME=2.5.3
-VERSION_CODE=2005003
+VERSION_NAME=2.6.0
+VERSION_CODE=2006000
 ANDROID_COMPILE_SDK_VERSION=27
 ANDROID_BUILD_TOOLS_VERSION=27.0.2
 ANDROID_MIN_SDK_VERSION=18