|
@@ -11,6 +11,7 @@ import android.app.Activity
|
|
import android.app.Service
|
|
import android.app.Service
|
|
import android.content.Context
|
|
import android.content.Context
|
|
import android.content.Intent
|
|
import android.content.Intent
|
|
|
|
+import android.os.Build
|
|
import android.os.Looper
|
|
import android.os.Looper
|
|
import android.view.View
|
|
import android.view.View
|
|
import android.view.ViewGroup
|
|
import android.view.ViewGroup
|
|
@@ -31,6 +32,7 @@ import com.enation.javashop.net.engine.plugin.rxbus.RxBus
|
|
import com.enation.javashop.utils.base.tool.CommonTool
|
|
import com.enation.javashop.utils.base.tool.CommonTool
|
|
import com.enation.javashop.utils.base.tool.ScreenTool
|
|
import com.enation.javashop.utils.base.tool.ScreenTool
|
|
import com.enation.javashop.utils.logger.LoggerFactory
|
|
import com.enation.javashop.utils.logger.LoggerFactory
|
|
|
|
+import com.hjq.toast.Toaster
|
|
import com.wdkl.ncs.android.lib.R
|
|
import com.wdkl.ncs.android.lib.R
|
|
import io.reactivex.disposables.Disposable
|
|
import io.reactivex.disposables.Disposable
|
|
import okhttp3.ResponseBody
|
|
import okhttp3.ResponseBody
|
|
@@ -85,14 +87,23 @@ fun showMessage(message: String) {
|
|
if (message == ""){
|
|
if (message == ""){
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- val messageCallback = {
|
|
|
|
- Toast.makeText(BaseApplication.appContext, message, Toast.LENGTH_SHORT).show()
|
|
|
|
- }
|
|
|
|
- try {
|
|
|
|
- messageCallback.invoke()
|
|
|
|
- } catch (runtime: RuntimeException) {
|
|
|
|
- Looper.prepare()
|
|
|
|
- messageCallback.invoke()
|
|
|
|
|
|
+
|
|
|
|
+ if ("rk3128".equals(Build.MODEL)) {
|
|
|
|
+ try {
|
|
|
|
+ Toaster.showShort(message)
|
|
|
|
+ } catch (ex: Exception) {
|
|
|
|
+ //
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ val messageCallback = {
|
|
|
|
+ Toast.makeText(BaseApplication.appContext, message, Toast.LENGTH_SHORT).show()
|
|
|
|
+ }
|
|
|
|
+ try {
|
|
|
|
+ messageCallback.invoke()
|
|
|
|
+ } catch (runtime: RuntimeException) {
|
|
|
|
+ Looper.prepare()
|
|
|
|
+ messageCallback.invoke()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|