diff --git a/.gradle/5.6.4/executionHistory/executionHistory.bin b/.gradle/5.6.4/executionHistory/executionHistory.bin index b3e96f3..529e7ae 100644 Binary files a/.gradle/5.6.4/executionHistory/executionHistory.bin and b/.gradle/5.6.4/executionHistory/executionHistory.bin differ diff --git a/.gradle/5.6.4/executionHistory/executionHistory.lock b/.gradle/5.6.4/executionHistory/executionHistory.lock index b78a759..5c70734 100644 Binary files a/.gradle/5.6.4/executionHistory/executionHistory.lock and b/.gradle/5.6.4/executionHistory/executionHistory.lock differ diff --git a/.gradle/5.6.4/fileHashes/fileHashes.bin b/.gradle/5.6.4/fileHashes/fileHashes.bin index 4fa7c19..ec8bfe6 100644 Binary files a/.gradle/5.6.4/fileHashes/fileHashes.bin and b/.gradle/5.6.4/fileHashes/fileHashes.bin differ diff --git a/.gradle/5.6.4/fileHashes/fileHashes.lock b/.gradle/5.6.4/fileHashes/fileHashes.lock index 6a5bb66..7101c09 100644 Binary files a/.gradle/5.6.4/fileHashes/fileHashes.lock and b/.gradle/5.6.4/fileHashes/fileHashes.lock differ diff --git a/.gradle/5.6.4/fileHashes/resourceHashesCache.bin b/.gradle/5.6.4/fileHashes/resourceHashesCache.bin index 8223d25..755763f 100644 Binary files a/.gradle/5.6.4/fileHashes/resourceHashesCache.bin and b/.gradle/5.6.4/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/5.6.4/javaCompile/classAnalysis.bin b/.gradle/5.6.4/javaCompile/classAnalysis.bin index 1eefccc..5b4da22 100644 Binary files a/.gradle/5.6.4/javaCompile/classAnalysis.bin and b/.gradle/5.6.4/javaCompile/classAnalysis.bin differ diff --git a/.gradle/5.6.4/javaCompile/jarAnalysis.bin b/.gradle/5.6.4/javaCompile/jarAnalysis.bin index b96149f..96bc1fa 100644 Binary files a/.gradle/5.6.4/javaCompile/jarAnalysis.bin and b/.gradle/5.6.4/javaCompile/jarAnalysis.bin differ diff --git a/.gradle/5.6.4/javaCompile/javaCompile.lock b/.gradle/5.6.4/javaCompile/javaCompile.lock index 24b9895..ea283a8 100644 Binary files a/.gradle/5.6.4/javaCompile/javaCompile.lock and b/.gradle/5.6.4/javaCompile/javaCompile.lock differ diff --git a/.gradle/5.6.4/javaCompile/taskHistory.bin b/.gradle/5.6.4/javaCompile/taskHistory.bin index e3b6c38..baaa6b0 100644 Binary files a/.gradle/5.6.4/javaCompile/taskHistory.bin and b/.gradle/5.6.4/javaCompile/taskHistory.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 0cbb9e0..0382d85 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin index 59d4c0c..bca0ebd 100644 Binary files a/.gradle/buildOutputCleanup/outputFiles.bin and b/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/app/build.gradle b/app/build.gradle index 81c5279..520a155 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -225,7 +225,10 @@ dependencies { implementation 'com.shuyu:gsyVideoPlayer-java:8.1.2' - implementation 'org.java-websocket:Java-WebSocket:1.5.7' + + //webserver + implementation 'com.koushikdutta.async:androidasync:3.1.0' +// implementation 'org.java-websocket:Java-WebSocket:1.5.7' //根据你的需求ijk模式的so implementation 'com.shuyu:gsyVideoPlayer-armv5:8.1.2' diff --git a/app/src/main/java/cn/trans88/taxiappkotlin/TaxiApp.kt b/app/src/main/java/cn/trans88/taxiappkotlin/TaxiApp.kt index a9ede49..5ede723 100644 --- a/app/src/main/java/cn/trans88/taxiappkotlin/TaxiApp.kt +++ b/app/src/main/java/cn/trans88/taxiappkotlin/TaxiApp.kt @@ -9,6 +9,7 @@ import android.util.Log import cn.trans88.kurotool.util.LogLevel import cn.trans88.kurotool.util.LogUtil import cn.trans88.taxiappkotlin.ext.logd +import cn.trans88.taxiappkotlin.ledok.HttpServer import cn.trans88.taxiappkotlin.logic.dao.DaoMaster import cn.trans88.taxiappkotlin.logic.dao.DaoSession import cn.trans88.taxiappkotlin.logic.dao.HelperDaoDB @@ -226,6 +227,12 @@ class TaxiApp : Application() { registerNetworkChangeReceiver() + + Log.d(TAG, "onCreate: httpServer") + Thread { + HttpServer().listen() + }.start() +// HttpServer().start() //配置exoPlayer的player // initPlayer() //TODO diff --git a/app/src/main/java/cn/trans88/taxiappkotlin/ledok/ActionRequest.kt b/app/src/main/java/cn/trans88/taxiappkotlin/ledok/ActionRequest.kt new file mode 100644 index 0000000..c03a80f --- /dev/null +++ b/app/src/main/java/cn/trans88/taxiappkotlin/ledok/ActionRequest.kt @@ -0,0 +1,81 @@ +package cn.trans88.taxiappkotlin.ledok + +import android.util.Log +import cn.trans88.taxiappkotlin.logic.model.BindModel +import cn.trans88.taxiappkotlin.logic.network.ConnManger +import com.google.gson.Gson +import com.koushikdutta.async.http.body.AsyncHttpRequestBody +import com.koushikdutta.async.http.body.JSONObjectBody +import com.koushikdutta.async.http.body.StringBody +import com.koushikdutta.async.http.server.AsyncHttpServerRequest +import com.koushikdutta.async.http.server.AsyncHttpServerResponse +import com.koushikdutta.async.http.server.HttpServerRequestCallback +import org.json.JSONException +import org.json.JSONObject + +/** + * Created by Administrator on 2017/3/29 0029. + */ +class ActionRequest : HttpServerRequestCallback { + + private val TAG = this.javaClass.simpleName + + override fun onRequest(request: AsyncHttpServerRequest, response: AsyncHttpServerResponse) { + val gson = Gson() + try { + val hs = response.headers + hs.add("Access-Control-Allow-Origin", "*") + hs.add("Access-Control-Allow-Methods", "POST") //让ajax跨域 + val obj = getJSONFromReq(request) + val actionName = obj!!.getString("action") + val json = obj.toString() + Log.i(TAG, "get POST: $json") + if ("InvokeTaxiAppFunction" == actionName) { + val bindModel = + gson.fromJson(obj.get("jsonCommand").toString(), BindModel::class.java) + Log.d(TAG, "listen: httpServer ${bindModel}") + if (bindModel?.server != null && bindModel?.server != "") { + bindModel.server = bindModel?.server + "/" + } + if (bindModel?.server != null && bindModel.server != "") { + bindModel.tlsServer = bindModel?.server+ "/" + } + val result = ConnManger.mbindAccount(bindModel); + if (result) { + val map = HashMap() + map["code"] = 200 + map["message"] = "Success" + response.code(200).send("application/json", gson.toJson(map)); + } else { + val map = HashMap() + map["code"] = 400 + map["message"] = "Failed" + response.code(400).send("application/json", gson.toJson(map)); + } + } + } catch (e: JSONException) { + throw RuntimeException(e) + Log.d(TAG, "onRequest: httpServer e") + val map = HashMap() + map["code"] = 500 + map["message"] = gson.toJson(e) + response.code(500).send("application/json", gson.toJson(map)); + } + } + + + private fun getJSONFromReq(req: AsyncHttpServerRequest): JSONObject? { + var obj: JSONObject? = null + val body = req.getBody>() + if (body is JSONObjectBody) { + obj = body.get() + } else if (body is StringBody) { + try { + obj = JSONObject(body.get()) + } catch (e: JSONException) { + e.printStackTrace() + } + } + return obj + } +} diff --git a/app/src/main/java/cn/trans88/taxiappkotlin/ledok/HttpServer.kt b/app/src/main/java/cn/trans88/taxiappkotlin/ledok/HttpServer.kt new file mode 100644 index 0000000..07c6ff7 --- /dev/null +++ b/app/src/main/java/cn/trans88/taxiappkotlin/ledok/HttpServer.kt @@ -0,0 +1,47 @@ +package cn.trans88.taxiappkotlin.ledok + +import android.util.Log +import cn.trans88.taxiappkotlin.logic.model.BindModel +import cn.trans88.taxiappkotlin.logic.network.ConnManger +import com.google.gson.Gson +import com.koushikdutta.async.http.body.AsyncHttpRequestBody +import com.koushikdutta.async.http.body.JSONObjectBody +import com.koushikdutta.async.http.body.StringBody +import com.koushikdutta.async.http.server.AsyncHttpServer +import com.koushikdutta.async.http.server.AsyncHttpServerRequest +import org.json.JSONException +import org.json.JSONObject + +class HttpServer { + + val TAG = this.javaClass::class.simpleName + + lateinit var server: AsyncHttpServer + + fun listen() { + server = AsyncHttpServer() + server.get("/") { _, resp -> + run { + resp.send("Hello") + } + } + server.post("/", ActionRequest()) + server.listen(3389) + Log.d(TAG, "run: httpServer start... listen 3389") + } + + private fun getJSONFromReq(req: AsyncHttpServerRequest): JSONObject? { + var obj: JSONObject? = null + val body = req.getBody>() + if (body is JSONObjectBody) { + obj = body.get() + } else if (body is StringBody) { + try { + obj = JSONObject(body.get()) + } catch (e: JSONException) { + e.printStackTrace() + } + } + return obj + } +} \ No newline at end of file diff --git a/app/src/main/java/cn/trans88/taxiappkotlin/ledok/LedOkAdvertise.kt b/app/src/main/java/cn/trans88/taxiappkotlin/ledok/LedOkAdvertise.kt index 965fa14..95e9364 100644 --- a/app/src/main/java/cn/trans88/taxiappkotlin/ledok/LedOkAdvertise.kt +++ b/app/src/main/java/cn/trans88/taxiappkotlin/ledok/LedOkAdvertise.kt @@ -11,14 +11,14 @@ data class LedOkAdvertise( data class LedOkBindModel( val _type: String, - val bindModel: BindModel + val bindModel: cn.trans88.taxiappkotlin.ledok.BindModel ) -data class BingModel( +data class BindModel( val action: String, val accountIdToken: String, - val server: String, - val tlsServer: String + var server: String, + var tlsServer: String ) data class Task( diff --git a/app/src/main/java/cn/trans88/taxiappkotlin/ledok/LedOkCommands.kt b/app/src/main/java/cn/trans88/taxiappkotlin/ledok/LedOkCommands.kt index a2ac0fe..b9bc856 100644 --- a/app/src/main/java/cn/trans88/taxiappkotlin/ledok/LedOkCommands.kt +++ b/app/src/main/java/cn/trans88/taxiappkotlin/ledok/LedOkCommands.kt @@ -2,33 +2,16 @@ package cn.trans88.taxiappkotlin.ledok import android.content.Intent -import android.os.Build -import android.os.Environment -import android.os.FileUtils -import android.util.Base64 import android.util.Log -import androidx.annotation.RequiresApi import cn.trans88.taxiappkotlin.R import cn.trans88.taxiappkotlin.TaxiApp import cn.trans88.taxiappkotlin.TaxiApp.Companion.instance -import cn.trans88.taxiappkotlin.logic.network.JoeyDownloadListener -import cn.trans88.taxiappkotlin.play.kuroPlay.IKuroPlay import com.google.gson.Gson -import com.liulishuo.filedownloader.BaseDownloadTask -import com.liulishuo.filedownloader.FileDownloadListener -import com.liulishuo.filedownloader.FileDownloader -import org.java_websocket.WebSocket import java.io.BufferedReader import java.io.File -import java.io.FileOutputStream import java.io.FileReader import java.io.IOException -import java.io.OutputStream -import java.net.NetworkInterface -import java.net.SocketException -import java.nio.ByteBuffer import java.util.concurrent.CountDownLatch -import kotlin.reflect.jvm.internal.impl.load.kotlin.JvmType object LedOkCommands { @@ -112,105 +95,105 @@ object LedOkCommands { /** * ledok平台的命令 */ - fun executeByLedOk(conn: WebSocket, command: String) { - Log.d(TAG, "executeByLedOk: command: $command") - try { - val ledOkAdvertise = gson.fromJson(command, LedOkAdvertise::class.java) - Log.d(TAG, "executeByLedOk: baskTask: $ledOkAdvertise") - if (ledOkAdvertise.type != null) { - when (ledOkAdvertise.type) { - "consult" -> consult(conn, ledOkAdvertise) - "proStart" -> proStart(conn, ledOkAdvertise) - "fileStart" -> fileStart(conn, ledOkAdvertise) - "fileEnd" -> fileEnd(conn, ledOkAdvertise) - "proEnd" -> proEnd(conn, ledOkAdvertise) - else -> Log.w(TAG, "executeByLedOk: 三乐 未知命令") - } - } - } catch (e: Exception) { - Log.e(TAG, "executeByLedOk: 三乐长连接执行命令出现异常: ${e.printStackTrace()}") - } - } - - fun consult(conn: WebSocket, ledOkAdvertise: LedOkAdvertise) { -// if ("program".equals(ledOkAdvertise.proName)) { - val items = ledOkAdvertise.task.items - val idList: MutableList = mutableListOf() - playlist.clear() - for (item in items) { - val file = File("${downloadDir.absolutePath}/${item.itemId}") - if (!file.exists()) { - idList.add(item.itemId) - } - item.path = file.absolutePath - playlist.add(item) - } - val resMap = HashMap() - resMap["type"] = "consult" - resMap["idList"] = idList - conn.send(gson.toJson(resMap)) +// fun executeByLedOk(conn: WebSocket, command: String) { +// Log.d(TAG, "executeByLedOk: command: $command") +// try { +// val ledOkAdvertise = gson.fromJson(command, LedOkAdvertise::class.java) +// Log.d(TAG, "executeByLedOk: baskTask: $ledOkAdvertise") +// if (ledOkAdvertise.type != null) { +// when (ledOkAdvertise.type) { +// "consult" -> consult(conn, ledOkAdvertise) +// "proStart" -> proStart(conn, ledOkAdvertise) +// "fileStart" -> fileStart(conn, ledOkAdvertise) +// "fileEnd" -> fileEnd(conn, ledOkAdvertise) +// "proEnd" -> proEnd(conn, ledOkAdvertise) +// else -> Log.w(TAG, "executeByLedOk: 三乐 未知命令") +// } +// } +// } catch (e: Exception) { +// Log.e(TAG, "executeByLedOk: 三乐长连接执行命令出现异常: ${e.printStackTrace()}") // } - } - - fun proStart(conn: WebSocket, ledOkAdvertise: LedOkAdvertise) { - Log.d(TAG, "proStart: ") - } - - - fun fileStart(conn: WebSocket, ledOkAdvertise: LedOkAdvertise) { - Log.d(TAG, "fileStart: ") - currentFile = ledOkAdvertise.task.items[0].itemId - Log.d(TAG, "fileStart: currentFIle: $currentFile") - } - - fun fileEnd(conn: WebSocket, ledOkAdvertise: LedOkAdvertise) { - Log.d(TAG, "fileEnd: ") - val currentFilePath = File("${downloadDir.absolutePath}/$currentFile") - Log.d(TAG, "fileEnd: currentFilePath: $currentFilePath") -// if (!currentFilePath.exists()) { +// } +// +// fun consult(conn: WebSocket, ledOkAdvertise: LedOkAdvertise) { +//// if ("program".equals(ledOkAdvertise.proName)) { +// val items = ledOkAdvertise.task.items +// val idList: MutableList = mutableListOf() +// playlist.clear() +// for (item in items) { +// val file = File("${downloadDir.absolutePath}/${item.itemId}") +// if (!file.exists()) { +// idList.add(item.itemId) +// } +// item.path = file.absolutePath +// playlist.add(item) +// } +// val resMap = HashMap() +// resMap["type"] = "consult" +// resMap["idList"] = idList +// conn.send(gson.toJson(resMap)) +//// } +// } +// +// fun proStart(conn: WebSocket, ledOkAdvertise: LedOkAdvertise) { +// Log.d(TAG, "proStart: ") +// } +// +// +// fun fileStart(conn: WebSocket, ledOkAdvertise: LedOkAdvertise) { +// Log.d(TAG, "fileStart: ") +// currentFile = ledOkAdvertise.task.items[0].itemId +// Log.d(TAG, "fileStart: currentFIle: $currentFile") +// } +// +// fun fileEnd(conn: WebSocket, ledOkAdvertise: LedOkAdvertise) { +// Log.d(TAG, "fileEnd: ") +// val currentFilePath = File("${downloadDir.absolutePath}/$currentFile") +// Log.d(TAG, "fileEnd: currentFilePath: $currentFilePath") +//// if (!currentFilePath.exists()) { +//// val resMap = HashMap() +//// resMap["type"] = "AckFailed" +//// conn.send(gson.toJson(resMap)) +//// } else { +//// currentFile = null +//// } +// currentFile = null +// } +// +// fun proEnd(conn: WebSocket, ledOkAdvertise: LedOkAdvertise) { +// Log.d(TAG, "proEnd: ") +// playAdvertise(ledOkAdvertise) +// val resMap = HashMap() +// resMap["type"] = "AckSuccess" +// conn.send(gson.toJson(resMap)) +// } +// +// +// fun receiveFile(conn: WebSocket, message: ByteBuffer) { +// Log.d(TAG, "executeByLedOk: command: ") +// try { +// val data = ByteArray(message.remaining()); +// message.get(data) +// val downloadDir = File( +// TaxiApp.instance().filesDir, +// TaxiApp.instance().getString(R.string.dir_program) +// ) +// if (!downloadDir.exists()) { +// downloadDir.mkdirs() +// } +// Log.d(TAG, "prepareAdvertise: downloadDir: " + downloadDir.absolutePath) +// val downloadFile = File("${downloadDir.absolutePath}/$currentFile") +// FileOutputStream(downloadFile).use { outputStream -> +// outputStream.write(data) +// } +// } catch (e: Exception) { +// Log.e(TAG, "executeByLedOk: 三乐长连接执行命令出现异常: ${e.printStackTrace()}") // val resMap = HashMap() // resMap["type"] = "AckFailed" // conn.send(gson.toJson(resMap)) -// } else { -// currentFile = null // } - currentFile = null - } - - fun proEnd(conn: WebSocket, ledOkAdvertise: LedOkAdvertise) { - Log.d(TAG, "proEnd: ") - playAdvertise(ledOkAdvertise) - val resMap = HashMap() - resMap["type"] = "AckSuccess" - conn.send(gson.toJson(resMap)) - } - - - fun receiveFile(conn: WebSocket, message: ByteBuffer) { - Log.d(TAG, "executeByLedOk: command: ") - try { - val data = ByteArray(message.remaining()); - message.get(data) - val downloadDir = File( - TaxiApp.instance().filesDir, - TaxiApp.instance().getString(R.string.dir_program) - ) - if (!downloadDir.exists()) { - downloadDir.mkdirs() - } - Log.d(TAG, "prepareAdvertise: downloadDir: " + downloadDir.absolutePath) - val downloadFile = File("${downloadDir.absolutePath}/$currentFile") - FileOutputStream(downloadFile).use { outputStream -> - outputStream.write(data) - } - } catch (e: Exception) { - Log.e(TAG, "executeByLedOk: 三乐长连接执行命令出现异常: ${e.printStackTrace()}") - val resMap = HashMap() - resMap["type"] = "AckFailed" - conn.send(gson.toJson(resMap)) - } - } - +// } +// /** * 播放广告 diff --git a/app/src/main/java/cn/trans88/taxiappkotlin/ledok/TaskSocketServer.kt b/app/src/main/java/cn/trans88/taxiappkotlin/ledok/TaskSocketServer.kt index 39bc35f..c2b2568 100644 --- a/app/src/main/java/cn/trans88/taxiappkotlin/ledok/TaskSocketServer.kt +++ b/app/src/main/java/cn/trans88/taxiappkotlin/ledok/TaskSocketServer.kt @@ -1,16 +1,10 @@ package cn.trans88.taxiappkotlin.ledok import android.content.Context -import android.content.Intent import android.util.Log import cn.trans88.taxiappkotlin.R import cn.trans88.taxiappkotlin.TaxiApp -import cn.trans88.taxiappkotlin.TaxiApp.Companion.instance -import cn.trans88.taxiappkotlin.ledok.LedOkCommands.PLAYLIST -import cn.trans88.taxiappkotlin.ledok.LedOkCommands.playlist -import cn.trans88.taxiappkotlin.logic.model.BindModel import cn.trans88.taxiappkotlin.logic.network.ConnManger -import com.google.gson.Gson import com.google.gson.GsonBuilder import com.trs88.kurolibrary.log.KuroLog import java.io.BufferedReader @@ -79,7 +73,7 @@ class TaskSocketServer(private val context: Context, port: Int) { try { //只保持一个链接,新的进来就把老的断开 val socket = soc!!.accept() - socket.soTimeout = 5000 + socket.soTimeout = 5000 * 5 if (client != null) { client!!.close() } @@ -454,16 +448,20 @@ class TaskSocketServer(private val context: Context, port: Int) { dos = null file = null //TaskProcessor.getInstance(context).updateSourceFile(new SourceFile(cmd.id, servant.getCanUsedPath(context), FileState.Is_Downloaded)); - } else if (cmd._type == "BindAccount") { - Log.d(TAG, "processPackage: BindAccount") -// val bindModel = cmd.bindModel -// if (bindModel?.server != null && bindModel?.server!=""){ -// bindModel?.server = bindModel?.server+"/" + } +// else if (cmd._type == "BindAccount") { +// Log.d(TAG, "processPackage: BindAccount") +// val server = cmd.server!! +// val tlsServer = cmd.tlsServer!! +// val accountIdToken = cmd.accountIdToken!! +// val bindModel = BindModel("", accountIdToken, server, tlsServer)!! +// if (bindModel?.server != null && bindModel?.server != "") { +// bindModel?.server = bindModel?.server + "/" // } -// if (bindModel?.server != null && bindModel.server!=""){ -// bindModel.tlsServer = bindModel.tlsServer+"/" +// if (bindModel?.server != null && bindModel.server != "") { +// bindModel.tlsServer = bindModel.tlsServer + "/" // } -// val mbindAccount = bindModel?.let { ConnManger.mbindAccount(it) } +// val mbindAccount = ConnManger.mbindAccount(bindModel) // if (mbindAccount == true) { // val ack = "{\"_type\":\"AckSuccess\"}" // sendDataToClient(ack) @@ -472,7 +470,7 @@ class TaskSocketServer(private val context: Context, port: Int) { // sendDataToClient(ack) // } // client?.close() - } +// } } catch (e: Exception) { Log.i(TAG, "error:" + e.message) e.printStackTrace() @@ -554,7 +552,11 @@ class TaskSocketServer(private val context: Context, port: Int) { var _id: String? = null var idList: List? = null var task: Task? = null - var bindModel: BindModel? = null + + // var bindModel: cn.trans88.taxiappkotlin.ledok.BindModel? = null + var accountIdToken: String? = null + var server: String? = null + var tlsServer: String? = null } var idList1: List? = null @@ -568,8 +570,8 @@ class TaskSocketServer(private val context: Context, port: Int) { try { // if (soc == null) { // destroy() - soc = ServerSocket(port) - recreate = false + soc = ServerSocket(port) + recreate = false // } Log.i(TAG, "create...... ") } catch (e: Exception) { diff --git a/app/src/main/java/cn/trans88/taxiappkotlin/logic/network/ConnManger.kt b/app/src/main/java/cn/trans88/taxiappkotlin/logic/network/ConnManger.kt index 3309330..55f7fbb 100644 --- a/app/src/main/java/cn/trans88/taxiappkotlin/logic/network/ConnManger.kt +++ b/app/src/main/java/cn/trans88/taxiappkotlin/logic/network/ConnManger.kt @@ -15,7 +15,6 @@ import cn.trans88.taxiappkotlin.ext.loge //import cn.trans88.taxiappkotlin.ledok.WsManagerLedOk import cn.trans88.taxiappkotlin.logic.Repository import cn.trans88.taxiappkotlin.logic.Repository.taxiApp -import cn.trans88.taxiappkotlin.logic.dao.AdvertiseDao import cn.trans88.taxiappkotlin.logic.dao.DaoUtil import cn.trans88.taxiappkotlin.logic.dao.DaoUtil.getAdvertise import cn.trans88.taxiappkotlin.logic.dao.DaoUtil.getFirstPlayDao @@ -26,7 +25,6 @@ import cn.trans88.taxiappkotlin.net.OkHttpTool import cn.trans88.taxiappkotlin.play.RefreshPlayer import cn.trans88.taxiappkotlin.ui.play.PlayActivity import cn.trans88.taxiappkotlin.ui.play.PlayViewModel -import cn.trans88.taxiappkotlin.util.DateUtil.daysBetweenTimestamps import cn.trans88.taxiappkotlin.util.KuroTimer import cn.trans88.taxiappkotlin.util.YoungUtil import cn.trans88.taxiappkotlin.util.checkAppToken @@ -46,7 +44,6 @@ import okhttp3.* import okhttp3.MediaType.Companion.toMediaTypeOrNull import java.io.File import java.io.IOException -import java.lang.ref.WeakReference import java.util.* import java.util.concurrent.TimeUnit import kotlin.concurrent.thread