| | |
| | | import android.os.Bundle |
| | | import androidx.appcompat.app.AppCompatActivity |
| | | import androidx.core.app.ActivityCompat |
| | | import com.okgoincar.netUtls.getToken |
| | | import com.okgoincar.R |
| | | import com.okgoincar.base.BaseEvent |
| | | import com.okgoincar.base.Const |
| | | import com.okgoincar.base.MyApplication |
| | | import com.okgoincar.netUtls.getToken |
| | | import org.greenrobot.eventbus.EventBus |
| | | import org.greenrobot.eventbus.Subscribe |
| | | import org.greenrobot.eventbus.ThreadMode |
| | | import org.jetbrains.anko.startActivity |
| | | |
| | | class SlabStartActivity : AppCompatActivity() { |
| | |
| | | super.onCreate(savedInstanceState) |
| | | requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE |
| | | setContentView(R.layout.activity_start) |
| | | EventBus.getDefault().register(this) |
| | | setRxpermiss() |
| | | MyApplication.upLog("SlabStartActivity:车载端启动") |
| | | } |
| | | |
| | | |
| | | private fun callLast() { |
| | | if (getToken().isNullOrEmpty()){ |
| | |
| | | } |
| | | } |
| | | |
| | | override fun onDestroy() { |
| | | super.onDestroy() |
| | | EventBus.getDefault().unregister(this) |
| | | } |
| | | |
| | | |
| | | @Subscribe(threadMode = ThreadMode.MAIN) |
| | | fun onEventMainThread(event: BaseEvent) { |
| | | when (event.code) { |
| | | BaseEvent.OUT_APP -> finish() |
| | | } |
| | | } |
| | | |
| | | } |