完成服务器连接与断开逻辑
This commit is contained in:
parent
9d37de4bfc
commit
4f44034b72
@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Sun Mar 30 06:06:05 GMT 2025
|
||||
#Sun Mar 30 16:43:08 GMT 2025
|
||||
stageCount=2
|
||||
libraryProject=libaes
|
||||
baseVersion=15.2
|
||||
publishVersion=15.2.1
|
||||
buildCount=85
|
||||
buildCount=91
|
||||
baseBetaVersion=15.2.2
|
||||
|
@ -1,8 +1,8 @@
|
||||
#Created by .winboll/winboll_app_build.gradle
|
||||
#Sun Mar 30 06:06:05 GMT 2025
|
||||
#Sun Mar 30 16:43:08 GMT 2025
|
||||
stageCount=2
|
||||
libraryProject=libaes
|
||||
baseVersion=15.2
|
||||
publishVersion=15.2.1
|
||||
buildCount=85
|
||||
buildCount=91
|
||||
baseBetaVersion=15.2.2
|
||||
|
@ -171,13 +171,13 @@ public class WinBollClientService extends Service implements IWinBollClientServi
|
||||
while (mIsEnableService) {
|
||||
// 显示运行状态
|
||||
WinBollServiceStatusView.startConnection();
|
||||
LogUtils.d(TAG, String.format("while mIsEnableService is %s", mIsEnableService));
|
||||
|
||||
try {
|
||||
Thread.sleep(10 * 1000);
|
||||
} catch (InterruptedException e) {
|
||||
LogUtils.d(TAG, e, Thread.currentThread().getStackTrace());
|
||||
}
|
||||
LogUtils.d(TAG, "while syncWinBollClientThreadStatus");
|
||||
syncWinBollClientThreadStatus();
|
||||
}
|
||||
|
||||
|
@ -399,27 +399,27 @@ public class WinBollServiceStatusView extends LinearLayout {
|
||||
mConnectionStatus = ConnectionStatus.START_CONNECT;
|
||||
LogUtils.d(TAG, "startConnectionThread");
|
||||
if (mConnectionThread != null) {
|
||||
LogUtils.d(TAG, "mConnectionThread != null");
|
||||
mConnectionThread.mIsExist = true;
|
||||
}
|
||||
mConnectionThread = new ConnectionThread();
|
||||
mConnectionThread.start();
|
||||
} else if (mConnectionStatus == ConnectionStatus.CONNECTING) {
|
||||
//LogUtils.d(TAG, "mConnectionStatus == ConnectionStatus.CONNECTING");
|
||||
} else if (mConnectionStatus == ConnectionStatus.CONNECTED) {
|
||||
//LogUtils.d(TAG, "mConnectionStatus == ConnectionStatus.CONNECTED");
|
||||
} else {
|
||||
LogUtils.d(TAG, "Unknow mConnectionStatus, can not start ConnectionThread.");
|
||||
LogUtils.d(TAG, String.format("Unknow mConnectionStatus %s, can not start ConnectionThread.", mConnectionStatus));
|
||||
}
|
||||
}
|
||||
|
||||
void stopConnectionThread() {
|
||||
if (mConnectionStatus == ConnectionStatus.CONNECTED) {
|
||||
LogUtils.d(TAG, "stopConnectionThread");
|
||||
if (mConnectionThread != null) {
|
||||
LogUtils.d(TAG, "mConnectionThread != null");
|
||||
mConnectionThread.mIsExist = true;
|
||||
mConnectionThread = null;
|
||||
}
|
||||
} else {
|
||||
LogUtils.d(TAG, "Unknow mConnectionStatus, can not start ConnectionThread.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user