迁移探路模块和tanlulib代码至此

This commit is contained in:
tongchenfei
2020-08-10 11:29:55 +08:00
parent dffd094b67
commit ee53d50cdb
269 changed files with 13646 additions and 4 deletions

View File

@@ -0,0 +1,39 @@
package com.zhidao.roadcondition.base
import android.app.IntentService
import android.content.Intent
import android.os.IBinder
open class BaseIntentService : IntentService("BaseIntentService") {
protected var tag: String = this.javaClass.simpleName
override fun onHandleIntent(p0: Intent?) {
tag = this.javaClass.simpleName
}
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
return super.onStartCommand(intent, flags, startId)
}
override fun onCreate() {
super.onCreate()
}
override fun onStart(intent: Intent?, startId: Int) {
super.onStart(intent, startId)
}
override fun onBind(intent: Intent?): IBinder? {
return super.onBind(intent)
}
override fun setIntentRedelivery(enabled: Boolean) {
super.setIntentRedelivery(enabled)
}
override fun onDestroy() {
super.onDestroy()
}
}

View File

@@ -0,0 +1,10 @@
package com.zhidao.roadcondition.base
import com.zhidao.roadcondition.model.BaseResponse
open class BaseRepository {
suspend fun <T : Any> apiCall(call: suspend () -> BaseResponse<T>): BaseResponse<T> {
return call.invoke()
}
}