if (intent.action == Intent.ACTION_BOOT_COMPLETED) {//开机广播
handler.postDelayed({
LogUtils.sysout(Tag, "开机广播启动")
}, (5 * 1000).toLong())
跟Thread.sleep(5000)
区别在哪里?
if (intent.action == Intent.ACTION_BOOT_COMPLETED) {//开机广播
handler.postDelayed({
LogUtils.sysout(Tag, "开机广播启动")
}, (5 * 1000).toLong())
跟Thread.sleep(5000)
区别在哪里?