Commit d645ea5d authored by 王雷's avatar 王雷

打印库兼容商米自带打印机

parents 57e34515 b632147d
......@@ -19,6 +19,7 @@ public class RxTimerUtil {
private static Disposable mDisposableTime;
private static Disposable mDisposableSocket;
private static Disposable mDisposablepPrint;
private static Disposable mDisposableOther;
/**
* milliseconds毫秒后执行next操作
......@@ -81,6 +82,8 @@ public class RxTimerUtil {
case SysCode.RX_TIMER_TYPE.PRINT:
mDisposablepPrint = disposable;
break;
case SysCode.RX_TIMER_TYPE.OTHER:
mDisposableOther = disposable;
}
}
......@@ -127,6 +130,11 @@ public class RxTimerUtil {
Log.e(TAG, "====定时器取消mDisposablepPrint======");
}
break;
case SysCode.RX_TIMER_TYPE.OTHER:
if (mDisposableOther != null && !mDisposableOther.isDisposed()) {
mDisposableOther.dispose();
Log.e(TAG, "====定时器取消mDisposableOther======");
}
}
}
......
......@@ -12,6 +12,7 @@ public class SysCode {
int TIME = 0;
int SOCKET = 1;
int PRINT = 2;
int OTHER = 3;
}
}
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 to comment