Commit 1333e061 by pye52

Merge branch 'develop' into uat

parents e62d605e 258bc0aa
......@@ -14,3 +14,4 @@
/build
/captures
.externalNativeBuild
.idea/codeStyles/Project.xml
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JetCodeStyleSettings>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</codeStyleSettings>
</code_scheme>
</component>
\ No newline at end of file
......@@ -2,7 +2,6 @@ package com.bgycc.smartcanteen.activity
import android.content.Context
import android.media.AudioManager
import android.media.SoundPool
import android.os.Bundle
import android.os.Handler
import android.util.Log
......@@ -14,7 +13,6 @@ import com.bgycc.smartcanteen.App
import com.bgycc.smartcanteen.AppConfig
import com.bgycc.smartcanteen.BuildConfig
import com.bgycc.smartcanteen.R
import com.bgycc.smartcanteen.action.*
import com.bgycc.smartcanteen.event.*
import com.bgycc.smartcanteen.helper.EthernetHelper
import com.bgycc.smartcanteen.helper.TTSHelper
......@@ -29,15 +27,12 @@ import com.bgycc.smartcanteen.task.ButtonTask
import com.bgycc.smartcanteen.task.QRCodeTask
import com.bgycc.smartcanteen.util.StringUtil
import com.blankj.utilcode.util.LogUtils
import com.blankj.utilcode.util.ToastUtils
import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode
import java.text.SimpleDateFormat
import java.util.*
import kotlinx.android.synthetic.main.activity_main.*
import org.json.JSONObject
import java.lang.Exception
class MainActivity : BaseActivity() {
......
......@@ -68,6 +68,7 @@ object TTSHelper {
"非营业时间" -> "pay-canteen-rest-time.mp3"
"余额不足" -> "pay-balance-not-enough.mp3"
"第三方支付异常" -> "pay-other-platform-offline.mp3"
"支付成功(异常时间)" -> "pay-success-error-time.mp3"
else -> "pay-fail.mp3"
}
......
......@@ -13,6 +13,8 @@ import com.bgycc.smartcanteen.server.websocket.event.ConnectStateEvent;
import com.bgycc.smartcanteen.server.websocket.event.RecvMessageEvent;
import com.bgycc.smartcanteen.server.websocket.event.SendMessageEvent;
import com.bgycc.smartcanteen.util.LogUtil;
import com.blankj.utilcode.util.LogUtils;
import org.greenrobot.eventbus.EventBus;
import org.java_websocket.client.WebSocketClient;
import org.java_websocket.drafts.Draft_6455;
......@@ -84,14 +86,14 @@ public class MainWebSocket extends WebSocketClient {
data.put(FieldEnum.equipmentId.name(), sDeviceSN);
action(ActionEnum.AUTO_CHECK_DEVICE.name(), data, null);
} catch (Exception e) {
LogUtil.e(TAG, "action error: " + e.getMessage(), e);
}
}
}
}
}, 2000, -1, 2000);
} catch (URISyntaxException e) {
e.printStackTrace();
LogUtils.file(TAG, "fatal error: " + e.getMessage());
}
}
}
......@@ -256,8 +258,7 @@ public class MainWebSocket extends WebSocketClient {
@Override
public void onError(Exception ex) {
LogUtil.i(TAG, "onError");
ex.printStackTrace();
LogUtil.i(TAG, "onError", ex);
}
public static class Request {
......
......@@ -12,21 +12,41 @@ public class LogUtil {
sEnable = enable;
}
public static void i(String tag, String log, Exception e) {
if (!sEnable) return;
Log.i(tag, log, e);
}
public static void i(String tag, String log) {
if (!sEnable) return;
Log.i(tag, log);
}
public static void d(String tag, String log, Exception e) {
if (!sEnable) return;
Log.d(tag, log, e);
}
public static void d(String tag, String log) {
if (!sEnable) return;
Log.d(tag, log);
}
public static void w(String tag, String log, Exception e) {
if (!sEnable) return;
Log.w(tag, log, e);
}
public static void w(String tag, String log) {
if (!sEnable) return;
Log.w(tag, log);
}
public static void e(String tag, String log, Exception e) {
if (!sEnable) return;
Log.e(tag, log, e);
}
public static void e(String tag, String log) {
if (!sEnable) return;
Log.e(tag, log);
......
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.11'
ext.kotlin_version = '1.3.61'
repositories {
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment