Merge branch 'dev_robotaxi-d-app-module_290_220715_2.9.0' into 'test_robotaxi-d-app-module_290_220715_2.9.0.1'
Dev robotaxi d app module 290 220715 2.9.0 See merge request zhjt/AndroidApp/MoGoEagleEye!108
This commit is contained in:
@@ -29,15 +29,13 @@ android {
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
debug {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
debug {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -409,7 +409,9 @@ public class BusPassengerModel {
|
||||
public void dynamicCalculateRouteInfo() {
|
||||
//计算当前位置和下一站的剩余点集合
|
||||
//计算剩余点总里程和时间
|
||||
calculateTwoStationsRoute();
|
||||
if (mTwoStationsRouts.size() == 0){
|
||||
calculateTwoStationsRoute();
|
||||
}
|
||||
if (mTwoStationsRouts.size() > 0){
|
||||
List<LatLng> lastPoints = CoordinateCalculateRouteUtil
|
||||
.getRemainPointListByCompare(mTwoStationsRouts,mLongitude,mLatitude);
|
||||
@@ -481,6 +483,7 @@ public class BusPassengerModel {
|
||||
if (isStart) {
|
||||
BusPassengerModelLoopManager.getInstance().startCalculateRouteInfoLoop();
|
||||
} else {
|
||||
mTwoStationsRouts.clear();
|
||||
BusPassengerModelLoopManager.getInstance().stopCalculateRouteInfLoop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,15 +29,13 @@ android {
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
debug {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
debug {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,15 +2,19 @@ package com.mogo.och.taxi.passenger.mulprocess;
|
||||
|
||||
import android.os.RemoteException;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.och.taxi.passenger.ui.leftmenu.LeftMenuOpen;
|
||||
import com.mogo.och.taxi.passenger.ui.leftmenu.OverlayLeftViewUtils;
|
||||
|
||||
public class OrderServiceImpl extends ILeftMenuService.Stub {
|
||||
|
||||
public static final String TAG = "mulprocessOrderServiceImpl";
|
||||
|
||||
@Override
|
||||
public void transmissionIndex(int index) throws RemoteException {
|
||||
|
||||
CallerLogger.INSTANCE.d(SceneConstant.M_TAXI_P + TAG, "跨进程 transmissionIndex"+index);
|
||||
UiThreadHandler.getsUiHandler().post(() -> {
|
||||
OverlayLeftViewUtils.INSTANCE.transmissionIndexGet(index);
|
||||
});
|
||||
@@ -18,11 +22,13 @@ public class OrderServiceImpl extends ILeftMenuService.Stub {
|
||||
|
||||
@Override
|
||||
public void registerCallback(ICallback cb) throws RemoteException {
|
||||
CallerLogger.INSTANCE.d(SceneConstant.M_TAXI_P + TAG, "跨进程 registerCallback");
|
||||
LeftMenuOpen.INSTANCE.registerCallbackHost(cb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unRegisterCallback(ICallback cb) throws RemoteException {
|
||||
CallerLogger.INSTANCE.d(SceneConstant.M_TAXI_P + TAG, "跨进程 unRegisterCallback");
|
||||
LeftMenuOpen.INSTANCE.unregisterCallbackHost(cb);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.WindowManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_TAXI_P
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.eagle.core.utilcode.util.Utils
|
||||
import com.mogo.och.taxi.passenger.R
|
||||
@@ -25,6 +27,8 @@ import rx.schedulers.Schedulers
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
object LeftMenuOpen {
|
||||
|
||||
const val TAG = "mulprocessLeftMenuOpen"
|
||||
|
||||
private var windowView: View? = null
|
||||
private var wl: WindowManager.LayoutParams? = null
|
||||
private var windowManager: WindowManager? = null
|
||||
@@ -43,7 +47,7 @@ object LeftMenuOpen {
|
||||
|
||||
var checkIndex = OverlayLeftViewUtils.LIVE
|
||||
private var lastClickTime = 0L
|
||||
private const val FAST_CLICK_DELAY_TIME = 1000 // 防止事件发送过快
|
||||
private const val FAST_CLICK_DELAY_TIME = 1300 // 防止事件发送过快
|
||||
|
||||
|
||||
fun setValue(
|
||||
@@ -51,7 +55,8 @@ object LeftMenuOpen {
|
||||
wl: WindowManager.LayoutParams?,
|
||||
windowManager: WindowManager?,
|
||||
close: (view: View, windowManager: WindowManager?) -> Unit,
|
||||
open: (view: View, windowManager: WindowManager?) -> Unit
|
||||
open: (view: View, windowManager: WindowManager?) -> Unit,
|
||||
isMainProcess: Boolean
|
||||
) {
|
||||
this.open = open
|
||||
this.close = close
|
||||
@@ -61,7 +66,9 @@ object LeftMenuOpen {
|
||||
dragList.forEach {
|
||||
registerDragView(it)
|
||||
}
|
||||
registerC()
|
||||
if(!isMainProcess) {
|
||||
registerC()
|
||||
}
|
||||
}
|
||||
|
||||
fun clearValue() {
|
||||
@@ -168,9 +175,9 @@ object LeftMenuOpen {
|
||||
fun registerDragView(view: View?) {
|
||||
if (view != null) {
|
||||
dragList.add(view)
|
||||
if (orderService == null) {
|
||||
registerC()
|
||||
}
|
||||
// if (orderService == null) {
|
||||
// registerC()
|
||||
// }
|
||||
view.setOnTouchListener(ItemViewTouchListener())
|
||||
view.setOnClickListener {
|
||||
open?.let { it1 -> it1(windowView!!, windowManager) }
|
||||
@@ -193,6 +200,7 @@ object LeftMenuOpen {
|
||||
}
|
||||
|
||||
fun transmissionIndex(index:Int){
|
||||
CallerLogger.d(M_TAXI_P + TAG, "tran--transmissionIndex---$index")
|
||||
if (orderService == null) {
|
||||
registerC()
|
||||
}
|
||||
@@ -200,22 +208,23 @@ object LeftMenuOpen {
|
||||
}
|
||||
|
||||
fun registerCallbackHost(cb:ICallback?){
|
||||
if (orderService == null) {
|
||||
registerC()
|
||||
}
|
||||
// if (orderService == null) {
|
||||
// registerC()
|
||||
// }
|
||||
cb?.let {
|
||||
icallbacks?.register(it)
|
||||
icallbacks.register(it)
|
||||
}
|
||||
}
|
||||
|
||||
fun unregisterCallbackHost(cb:ICallback?){
|
||||
cb?.let {
|
||||
icallbacks?.unregister(it)
|
||||
icallbacks.unregister(it)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun registerCallback(cb:ICallback?){
|
||||
CallerLogger.d(M_TAXI_P + TAG, "tran--registerCallback--注册")
|
||||
if (orderService == null) {
|
||||
registerC()
|
||||
}
|
||||
@@ -225,6 +234,7 @@ object LeftMenuOpen {
|
||||
}
|
||||
|
||||
fun unregisterCallback(cb:ICallback?){
|
||||
CallerLogger.d(M_TAXI_P + TAG, "tran--unregisterCallback--反注册")
|
||||
cb?.let {
|
||||
orderService?.unRegisterCallback(it)
|
||||
}
|
||||
@@ -240,15 +250,20 @@ object LeftMenuOpen {
|
||||
Observable.empty<String?>().subscribeOn(Schedulers.io())
|
||||
.subscribe(object : Observer<String?> {
|
||||
override fun onCompleted() {
|
||||
val len = icallbacks.beginBroadcast()
|
||||
for (i in 0 until len) {
|
||||
try {
|
||||
icallbacks.getBroadcastItem(i).onResult(meters, timeInSecond, speed)
|
||||
} catch (e: RemoteException) {
|
||||
e.printStackTrace()
|
||||
CallerLogger.d(M_TAXI_P + TAG, "callCallBack$meters--$timeInSecond--$speed")
|
||||
try {
|
||||
val len = icallbacks.beginBroadcast()
|
||||
for (i in 0 until len) {
|
||||
try {
|
||||
icallbacks.getBroadcastItem(i).onResult(meters, timeInSecond, speed)
|
||||
} catch (e: RemoteException) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
icallbacks.finishBroadcast()
|
||||
}catch (e:Exception){
|
||||
CallerLogger.e(M_TAXI_P + TAG, "callCallBack${e.message}")
|
||||
}
|
||||
icallbacks.finishBroadcast()
|
||||
}
|
||||
override fun onError(e: Throwable?) {}
|
||||
override fun onNext(t: String?) {}
|
||||
@@ -273,7 +288,12 @@ object LeftMenuOpen {
|
||||
* 主进程在显示是主动调用
|
||||
* video进程在天津View是判断是否调用了
|
||||
*/
|
||||
@Synchronized
|
||||
private fun registerC() {
|
||||
if(orderService!=null){
|
||||
return
|
||||
}
|
||||
CallerLogger.d(M_TAXI_P + TAG, "tran--registerC--获取jni")
|
||||
val resolver: ContentResolver = Utils.getApp().contentResolver
|
||||
|
||||
cu = resolver.query(
|
||||
|
||||
@@ -177,7 +177,7 @@ object OverlayLeftViewUtils {
|
||||
|
||||
addTarget(context)
|
||||
|
||||
LeftMenuOpen.setValue(view, params, windowManager,::close,::open)
|
||||
LeftMenuOpen.setValue(view, params, windowManager,::close,::open,isMainProcess)
|
||||
try {
|
||||
windowManager!!.addView(overlayView, params)
|
||||
checkProcess()
|
||||
|
||||
@@ -11,6 +11,8 @@ import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.widget.AppCompatImageView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil
|
||||
import com.mogo.och.common.module.utils.NumberFormatUtil
|
||||
import com.mogo.och.taxi.passenger.R
|
||||
@@ -52,6 +54,7 @@ class VideoActivity : AppCompatActivity() {
|
||||
private lateinit var acivTitleIcon: AppCompatImageView
|
||||
private lateinit var tvTitle: TextView
|
||||
private var subscribe: Subscription?=null
|
||||
private val TAG = "mulprocessVideoActivity"
|
||||
|
||||
private val arrayListOf = ArrayList<TaxiPassengerVideoPlay>()
|
||||
|
||||
@@ -352,7 +355,7 @@ class VideoActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
}
|
||||
subscribe = Observable.interval(0, 8, TimeUnit.SECONDS)
|
||||
subscribe = Observable.interval(2, 8, TimeUnit.SECONDS)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(object : Observer<Long> {
|
||||
@@ -387,15 +390,13 @@ class VideoActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
}
|
||||
subscribe?.let {
|
||||
if(it.isUnsubscribed){
|
||||
it.unsubscribe()
|
||||
}
|
||||
}
|
||||
cancleSubscribe()
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun finishActivity(event: FinishActivity){
|
||||
CallerLogger.d(SceneConstant.M_TAXI_P + TAG, "finishActivity(event)")
|
||||
cancleSubscribe()
|
||||
val intent = Intent()
|
||||
val parse = Uri.parse("mogo://launcher/main/switch2?type=launch")
|
||||
intent.data = parse
|
||||
@@ -405,6 +406,7 @@ class VideoActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
CallerLogger.d(SceneConstant.M_TAXI_P + TAG, "onDestroy()")
|
||||
super.onDestroy()
|
||||
EventBus.getDefault().unregister(this)
|
||||
LeftMenuOpen.unregisterCallback(callBack)
|
||||
@@ -412,6 +414,15 @@ class VideoActivity : AppCompatActivity() {
|
||||
OverlayLeftViewUtils.dismissOverlayView(false)
|
||||
FloatingDistanceInfoUtils.dismissOverlayView()
|
||||
FixMemoryLeak.fixLeak(this)
|
||||
cancleSubscribe()
|
||||
}
|
||||
|
||||
private fun cancleSubscribe(){
|
||||
subscribe?.let {
|
||||
if(!it.isUnsubscribed){
|
||||
it.unsubscribe()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun releaseOnNewInstance() {
|
||||
|
||||
@@ -29,15 +29,13 @@ android {
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
debug {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
debug {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1208,8 +1208,10 @@ public class TaxiModel {
|
||||
|
||||
@Override
|
||||
public void onAutopilotRotting(MessagePad.GlobalPathResp routeList) {
|
||||
CallerLogger.INSTANCE.d(M_TAXI + TAG, "onAutopilotRotting = "
|
||||
+ GsonUtil.jsonFromObject(routeList));
|
||||
if (null != routeList && routeList.getWayPointsList() != null){
|
||||
CallerLogger.INSTANCE.d(M_TAXI + TAG, "getWayPointsList = "
|
||||
+ routeList.getWayPointsList().size());
|
||||
}
|
||||
if (null != routeList && routeList.getWayPointsList().size() > 0) {
|
||||
updateOrderRoute(routeList.getWayPointsList());
|
||||
updateOrderRouteInfo(routeList.getWayPointsList());
|
||||
@@ -1268,7 +1270,10 @@ public class TaxiModel {
|
||||
Logger.d(M_TAXI + TAG, "--------计算出sumLength开始---------- ");
|
||||
|
||||
//转换成高德坐标系
|
||||
mRoutePoints = CoordinateCalculateRouteUtil.coordinateConverterWgsToGcjListCommon(mContext, models);
|
||||
if (mRoutePoints.size() > 0){
|
||||
mRoutePoints.clear();
|
||||
}
|
||||
mRoutePoints.addAll(CoordinateCalculateRouteUtil.coordinateConverterWgsToGcjListCommon(mContext, models));
|
||||
startDynamicCalculateRouteInfo();
|
||||
}
|
||||
|
||||
@@ -1324,7 +1329,7 @@ public class TaxiModel {
|
||||
new TaxiServiceCallback<QueryOrderRouteResp>() {
|
||||
@Override
|
||||
public void onSuccess(QueryOrderRouteResp data) {
|
||||
if (data != null && data.data != null) {
|
||||
if (data != null && data.data != null && mRoutePoints.size() == 0) {
|
||||
mRoutePoints.clear();
|
||||
mRoutePoints.addAll(data.data);
|
||||
}
|
||||
|
||||
@@ -167,6 +167,8 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement
|
||||
if (order.orderStatus == TaxiOrderStatusEnum.JourneyCompleted.getCode()) {
|
||||
mCurrentOrder = null;
|
||||
isHaveBeingOrder(false);
|
||||
mDistanceAndTime2.setText("距离 - - 公里,用时 - - 分");
|
||||
mDistanceAndTime3.setText("距离 - - 公里,用时 - - 分");
|
||||
return;
|
||||
}
|
||||
mOrderNo = order.orderNo;
|
||||
@@ -407,6 +409,8 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement
|
||||
if (status == TaxiOrderStatusEnum.None.getCode() || status == TaxiOrderStatusEnum.Cancel.getCode() || status == TaxiOrderStatusEnum.JourneyCompleted.getCode()) {
|
||||
isHaveBeingOrder(false);
|
||||
mCurrentOrder = null;
|
||||
mDistanceAndTime2.setText("距离 - - 公里,用时 - - 分");
|
||||
mDistanceAndTime3.setText("距离 - - 公里,用时 - - 分");
|
||||
} else {
|
||||
isHaveBeingOrder(true);
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ aspectjx {
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
|
||||
//Crash日志收集
|
||||
implementation rootProject.ext.dependencies.crashSdk
|
||||
// implementation rootProject.ext.dependencies.crashSdk
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
implementation rootProject.ext.dependencies.boostmultidex
|
||||
|
||||
@@ -52,7 +52,7 @@ class AutoPilotBadCaseTest {
|
||||
it.timestamp = SimpleDateFormat("yyyyMMddHHmmss").format(Date())
|
||||
index++
|
||||
}
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(builder.build())
|
||||
// CallerDevaToolsManager.onReceiveBadCaseRecord(builder.build())
|
||||
}
|
||||
.flowOn(Dispatchers.Default)
|
||||
.collect()
|
||||
@@ -86,7 +86,7 @@ class AutoPilotBadCaseTest {
|
||||
it.timestamp = SimpleDateFormat("yyyyMMddHHmmss").format(Date())
|
||||
index++
|
||||
}
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(builder.build())
|
||||
// CallerDevaToolsManager.onReceiveBadCaseRecord(builder.build())
|
||||
}
|
||||
.flowOn(Dispatchers.Default)
|
||||
.collect()
|
||||
@@ -114,7 +114,7 @@ class AutoPilotBadCaseTest {
|
||||
it.timestamp = SimpleDateFormat("yyyyMMddHHmmss").format(Date())
|
||||
index++
|
||||
}
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(builder.build())
|
||||
// CallerDevaToolsManager.onReceiveBadCaseRecord(builder.build())
|
||||
}
|
||||
.flowOn(Dispatchers.Default)
|
||||
.collect()
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.hmi.notification.WarningFloat
|
||||
import com.mogo.eagle.core.function.hmi.notification.anim.DefaultAnimator
|
||||
import com.mogo.eagle.core.data.enums.SidePattern
|
||||
import com.mogo.eagle.core.function.hmi.ui.*
|
||||
import com.mogo.eagle.core.function.main.MainLauncherActivity
|
||||
import com.mogo.eagle.core.utilcode.kotlin.shape
|
||||
import com.mogo.eagle.core.utilcode.reminder.Reminder
|
||||
@@ -27,14 +28,14 @@ import com.mogo.eagle.core.utilcode.reminder.api.impl.ActivityReminder
|
||||
import com.mogo.eagle.core.utilcode.reminder.api.impl.PopupWindowReminder
|
||||
import com.mogo.eagle.core.utilcode.reminder.api.impl.ViewReminder
|
||||
import com.mogo.eagle.core.utilcode.util.AppStateManager
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.flow.*
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import java.lang.Integer.min
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.*
|
||||
import java.util.concurrent.TimeUnit.MILLISECONDS
|
||||
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
@@ -64,6 +65,46 @@ class ReminderTest {
|
||||
return@runBlocking
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testShowWarningV2x() = runBlocking {
|
||||
val f = ensureMoGoHmiFragmentShow()
|
||||
|
||||
delay(5000)
|
||||
(1 until 20).map {
|
||||
it
|
||||
}.asFlow()
|
||||
.onEach {
|
||||
f.showWarningV2X("10006", "test", "测试$it", "$it", null, true, 5000)
|
||||
}
|
||||
.flowOn(Dispatchers.Default)
|
||||
.collect()
|
||||
delay(3000000)
|
||||
}
|
||||
|
||||
private suspend fun ensureMoGoHmiFragmentShow(): MoGoHmiFragment = suspendCancellableCoroutine {
|
||||
launch.onActivity { itx ->
|
||||
val executor = Executors.newSingleThreadScheduledExecutor()
|
||||
executor.scheduleAtFixedRate({
|
||||
var find =
|
||||
itx.supportFragmentManager.fragments.find { it is MoGoHmiFragment } as? MoGoHmiFragment
|
||||
while (find == null) {
|
||||
find =
|
||||
itx.supportFragmentManager.fragments.find { it is MoGoHmiFragment } as? MoGoHmiFragment
|
||||
}
|
||||
while (!find.isResumed) {
|
||||
Thread.sleep(500)
|
||||
}
|
||||
it.resumeWith(Result.success(find))
|
||||
try {
|
||||
Thread.sleep(500)
|
||||
executor.shutdownNow()
|
||||
} catch (e: Throwable) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}, 50, 500, MILLISECONDS)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testViewReminderOverride() = runBlocking(Dispatchers.Main) {
|
||||
launch.onActivity {
|
||||
@@ -357,14 +398,14 @@ class ReminderTest {
|
||||
}
|
||||
}
|
||||
|
||||
class TestPopupWindowReminder(private val anchor: View, private val popupWindow: PopupWindow): PopupWindowReminder(popupWindow) {
|
||||
class TestPopupWindowReminder(private val anchor: View, override val popupWindow: PopupWindow): PopupWindowReminder(popupWindow) {
|
||||
|
||||
override fun show() {
|
||||
popupWindow.showAtLocation(anchor, Gravity.CENTER, 0, 0)
|
||||
}
|
||||
}
|
||||
|
||||
class TestPopupWindowReminderOverride(private val anchor: View, private val popupWindow: PopupWindow): PopupWindowReminder(popupWindow) {
|
||||
class TestPopupWindowReminderOverride(private val anchor: View, override val popupWindow: PopupWindow): PopupWindowReminder(popupWindow) {
|
||||
|
||||
override fun show() {
|
||||
popupWindow.showAtLocation(anchor, Gravity.CENTER, 0, 0)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.mogo.launcher;
|
||||
|
||||
import com.auto.zhidao.logsdk.CrashSystem;
|
||||
import com.mogo.eagle.core.function.main.MainMoGoApplication;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.launcher.crash.CrashSystem;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -17,7 +17,6 @@ public class MogoApplication extends MainMoGoApplication {
|
||||
protected void initCrashConfig() {
|
||||
CrashSystem crashSystem = CrashSystem.getInstance(this);
|
||||
crashSystem.init();
|
||||
|
||||
//设置debug模式,日志不上传
|
||||
crashSystem.setDebug(BuildConfig.DEBUG);
|
||||
}
|
||||
|
||||
218
app/src/main/java/com/mogo/launcher/crash/CrashSystem.java
Normal file
218
app/src/main/java/com/mogo/launcher/crash/CrashSystem.java
Normal file
@@ -0,0 +1,218 @@
|
||||
package com.mogo.launcher.crash;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.os.Environment;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FilenameFilter;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.io.Writer;
|
||||
import java.lang.Thread.UncaughtExceptionHandler;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class CrashSystem implements UncaughtExceptionHandler {
|
||||
public static final String TAG = "CrashSystem";
|
||||
private String mAppPackage = null;
|
||||
private String mAppVersionCode = null;
|
||||
private String mAppVersionName = null;
|
||||
private String mAppName = null;
|
||||
private String mOsVersion = null;
|
||||
private String mDeviceId = null;
|
||||
private UncaughtExceptionHandler mDefaultHandler;
|
||||
private final Map<String, String> info = new HashMap();
|
||||
private final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss");
|
||||
private boolean mDebug = false;
|
||||
private final List<CrashCallback> callbackList = new ArrayList<>();
|
||||
|
||||
private static CrashSystem sCrashSystem = null;
|
||||
|
||||
private static final Object lock = new Object();
|
||||
|
||||
public void init() {
|
||||
this.mDefaultHandler = Thread.getDefaultUncaughtExceptionHandler();
|
||||
Thread.setDefaultUncaughtExceptionHandler(this);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 是否收集记录crash信息
|
||||
* @param debug 是否是debug
|
||||
*/
|
||||
public void setDebug(boolean debug) {
|
||||
this.mDebug = debug;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加crash事件回调
|
||||
*/
|
||||
public void addCallback(CrashCallback callback) {
|
||||
if(callback != null) {
|
||||
callbackList.add(callback);
|
||||
}
|
||||
}
|
||||
|
||||
private CrashSystem(Context context) {
|
||||
this.inflateSystemInfo(context);
|
||||
}
|
||||
|
||||
public static CrashSystem getInstance(Context context) {
|
||||
CrashSystem crashSystem = sCrashSystem;
|
||||
if(crashSystem == null) {
|
||||
synchronized (lock) {
|
||||
crashSystem = sCrashSystem;
|
||||
if(crashSystem == null) {
|
||||
crashSystem = new CrashSystem(context.getApplicationContext());
|
||||
sCrashSystem = crashSystem;
|
||||
}
|
||||
}
|
||||
}
|
||||
return crashSystem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uncaughtException(Thread thread, Throwable ex) {
|
||||
try {
|
||||
this.handleException(ex);
|
||||
dispatchCrashError();
|
||||
} finally {
|
||||
if (mDefaultHandler != null) {
|
||||
mDefaultHandler.uncaughtException(thread, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分发异常事件
|
||||
*/
|
||||
private void dispatchCrashError() {
|
||||
for (CrashCallback callback : callbackList) {
|
||||
if(callback != null) {
|
||||
callback.onCrashError();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean handleException(Throwable ex) {
|
||||
if(ex == null) {
|
||||
return true;
|
||||
} else {
|
||||
String msg = ex.getLocalizedMessage();
|
||||
Log.e("CrashSystem", msg);
|
||||
String filePath = saveCrashInfo2File(ex);
|
||||
Log.i(TAG, "handleException: filePath = " + filePath);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private String saveCrashInfo2File(Throwable ex) {
|
||||
try {
|
||||
if(!Environment.getExternalStorageState().equals("mounted")) {
|
||||
return null;
|
||||
}
|
||||
File dir = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "crash");
|
||||
if(!dir.exists()) {
|
||||
dir.mkdir();
|
||||
}
|
||||
String[] fileList = dir.list((dir1, name) -> name.contains(mAppPackage));
|
||||
if(fileList == null || fileList.length >= 20) { //避免crash日志一直重复
|
||||
return null;
|
||||
}
|
||||
String time = this.format.format(new Date());
|
||||
String fileName = "app-crash-" + this.mAppPackage + "-" + time + ".log";
|
||||
if(mDebug) {
|
||||
fileName = "debug-" + fileName;
|
||||
}
|
||||
String fileTemp = fileName + ".temp";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
Iterator<Entry<String, String>> var4 = this.info.entrySet().iterator();
|
||||
String result;
|
||||
while(var4.hasNext()) {
|
||||
Entry<String, String> entry = var4.next();
|
||||
String key = entry.getKey();
|
||||
result = entry.getValue();
|
||||
sb.append(key).append("=").append(result).append("\n");
|
||||
}
|
||||
sb.append("TIME=").append(String.valueOf(System.currentTimeMillis())).append("\n");
|
||||
sb.append("fileName=").append(fileName).append("\n");
|
||||
Writer writer = new StringWriter();
|
||||
PrintWriter pw = new PrintWriter(writer);
|
||||
ex.printStackTrace(pw);
|
||||
for(Throwable cause = ex.getCause(); cause != null; cause = cause.getCause()) {
|
||||
cause.printStackTrace(pw);
|
||||
}
|
||||
pw.close();
|
||||
result = writer.toString();
|
||||
sb.append(result);
|
||||
FileOutputStream fos = null;
|
||||
try {
|
||||
File dest = new File(dir, fileTemp);
|
||||
fos = new FileOutputStream(dest);
|
||||
fos.write(sb.toString().getBytes());
|
||||
fos.flush();
|
||||
File file = new File(dir,fileName);
|
||||
dest.renameTo(file);
|
||||
return dir.getAbsolutePath() + File.separator + fileName;
|
||||
} catch (IOException var13) {
|
||||
var13.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if (fos != null) {
|
||||
fos.close();
|
||||
}
|
||||
} catch (IOException ignore) {}
|
||||
}
|
||||
} catch (Throwable ignore) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void inflateSystemInfo(Context context) {
|
||||
this.mAppPackage = context.getPackageName();
|
||||
PackageManager pm = context.getPackageManager();
|
||||
try {
|
||||
PackageInfo packageInfo = pm.getPackageInfo(this.mAppPackage, 0);
|
||||
this.mAppVersionCode = "" + packageInfo.versionCode;
|
||||
this.mAppVersionName = packageInfo.versionName;
|
||||
this.mAppPackage = packageInfo.packageName;
|
||||
this.mAppName = packageInfo.applicationInfo.loadLabel(context.getPackageManager()).toString();
|
||||
this.mOsVersion = Build.DISPLAY;
|
||||
String deviceId = MoGoAiCloudClientConfig.getInstance().getSn();
|
||||
if(TextUtils.isEmpty(deviceId)) {
|
||||
deviceId = "11111111";
|
||||
}
|
||||
this.mDeviceId = deviceId;
|
||||
} catch (Exception var5) {
|
||||
var5.printStackTrace();
|
||||
}
|
||||
|
||||
this.info.put("appName",this.mAppName);
|
||||
this.info.put("appPackageName", this.mAppPackage);
|
||||
this.info.put("versionCode", this.mAppVersionCode);
|
||||
this.info.put("versionName", this.mAppVersionName);
|
||||
this.info.put("sn", this.mDeviceId);
|
||||
this.info.put("DISPLAY", this.mOsVersion);
|
||||
}
|
||||
|
||||
public interface CrashCallback {
|
||||
void onCrashError();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,6 @@ ext {
|
||||
jetbrainsannotationsjava5 : "org.jetbrains:annotations-java5:15.0",
|
||||
|
||||
// crash
|
||||
crashSdk : "com.zhidaoauto.crash.log:library:1.0.5",
|
||||
kotlinstdlibjdk7 : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlin_version}",
|
||||
|
||||
//探路使用的直播组件
|
||||
|
||||
@@ -62,7 +62,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.androidxroomktx
|
||||
|
||||
//Crash日志收集
|
||||
implementation rootProject.ext.dependencies.crashSdk
|
||||
// implementation rootProject.ext.dependencies.crashSdk
|
||||
implementation rootProject.ext.dependencies.boostmultidex
|
||||
|
||||
debugImplementation rootProject.ext.dependencies.debugleakcanary
|
||||
|
||||
@@ -146,6 +146,8 @@ import java.util.*
|
||||
|
||||
private var speakJob: Job? = null
|
||||
|
||||
private var showV2XJob: Job? = null
|
||||
|
||||
private var showingV2XTip: IReminder? = null
|
||||
private var roadVideoDialog: RoadVideoDialog? = null
|
||||
|
||||
@@ -606,11 +608,9 @@ import java.util.*
|
||||
CallerLogger.e("$M_HMI$TAG", "Show warningContent is null or empty!")
|
||||
return
|
||||
}
|
||||
speakJob?.safeCancel()
|
||||
val content = mViewNotificationProvider?.getNotificationView() ?: return
|
||||
content.setWarningIcon(EventTypeEnum.getWarningIcon(v2xType))
|
||||
content.setWarningContent(warningContent)
|
||||
var reminder: IReminder? = null
|
||||
Log.d("$M_HMI$TAG", "--- show v2x dialog 1 ---: info -> v2x-type: $v2xType : expireTime: $expireTime")
|
||||
Reminder.enqueue(this@MoGoHmiFragment, object : PopupWindowReminder(PopupWindow(content, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT).also { itx ->
|
||||
itx.isTouchable = false
|
||||
@@ -633,43 +633,44 @@ import java.util.*
|
||||
}
|
||||
}) {
|
||||
override fun show() {
|
||||
showV2XJob?.safeCancel()
|
||||
speakJob?.safeCancel()
|
||||
val parent = it.window.decorView
|
||||
parent.doOnAttach {
|
||||
Log.d("$M_HMI$TAG", "--- show v2x dialog 2 ---: info -> v2x-type: $v2xType : expireTime: $expireTime")
|
||||
popupWindow.showAtLocation(parent, content.layoutGravity, 0, 0)
|
||||
}
|
||||
}
|
||||
|
||||
override fun isOverride(): Boolean {
|
||||
return true
|
||||
}
|
||||
}.also { itx -> reminder = itx }, object : IStateChangeListener {
|
||||
}, object : IStateChangeListener {
|
||||
|
||||
override fun onShow(reminder: IReminder) {
|
||||
listener?.onShow()
|
||||
showingV2XTip = reminder
|
||||
lifecycleScope.launch {
|
||||
delay(expireTime)
|
||||
}.also { itx ->
|
||||
showV2XJob = itx
|
||||
}.invokeOnCompletion { _ ->
|
||||
reminder.hide()
|
||||
}
|
||||
if (ttsContent != null && !TextUtils.isEmpty(ttsContent) && playTTS) {
|
||||
lifecycleScope.launch {
|
||||
speak(it, ttsContent)
|
||||
}.also {
|
||||
speakJob = it
|
||||
}.also { itx ->
|
||||
speakJob = itx
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onHide(reminder: IReminder) {
|
||||
listener?.onDismiss()
|
||||
showingV2XTip = null
|
||||
showWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
}
|
||||
})
|
||||
|
||||
if (reminder == null) {
|
||||
return
|
||||
}
|
||||
showingV2XTip = reminder
|
||||
lifecycleScope.launch {
|
||||
delay(expireTime)
|
||||
reminder?.hide()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotVehicleStateListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
@@ -42,6 +43,8 @@ public class TrafficDataView extends ConstraintLayout {
|
||||
|
||||
private static final int MSG_SEND_UPDATE = 1;
|
||||
private volatile double acceleration;
|
||||
private volatile float mBrake;
|
||||
private volatile float mThrottle;
|
||||
|
||||
@SuppressLint("HandlerLeak")
|
||||
private final Handler handler = new Handler() {
|
||||
@@ -49,10 +52,28 @@ public class TrafficDataView extends ConstraintLayout {
|
||||
public void handleMessage(@NonNull Message msg) {
|
||||
super.handleMessage(msg);
|
||||
if (msg.what == MSG_SEND_UPDATE) {
|
||||
java.text.DecimalFormat mFormat = new java.text.DecimalFormat("0.00");
|
||||
String accStr = mFormat.format(acceleration);
|
||||
accTextView.setText("a: " + accStr);
|
||||
java.text.DecimalFormat mFormat = new java.text.DecimalFormat("0.0");
|
||||
String accStr = mFormat.format(Math.abs(acceleration));
|
||||
if (acceleration > 0f) {
|
||||
accTextView.setText(accStr);
|
||||
} else {
|
||||
accTextView.setText("- " + accStr);
|
||||
}
|
||||
int state = CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState();
|
||||
if (state < 2) {
|
||||
if (mBrake > 0) {
|
||||
brakeStatus.setImageResource(R.drawable.traffic_data_brake);
|
||||
} else if (mThrottle >= 0 && mBrake == 0) {
|
||||
brakeStatus.setImageResource(R.drawable.traffic_data_accelerator);
|
||||
} else {
|
||||
brakeStatus.setImageResource(R.drawable.traffic_data_empty);
|
||||
}
|
||||
}
|
||||
if (state == 2) {
|
||||
brakeStatus.setImageResource(R.drawable.traffic_data_empty);
|
||||
}
|
||||
}
|
||||
handler.sendEmptyMessageDelayed(MSG_SEND_UPDATE, 1000L);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -76,12 +97,12 @@ public class TrafficDataView extends ConstraintLayout {
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
handler.sendEmptyMessageDelayed(MSG_SEND_UPDATE, 1000L);
|
||||
CallerAutopilotVehicleStateListenerManager.INSTANCE.addListener(TAG, mIMoGoAutopilotVehicleStateListener);
|
||||
CallerAutopilotCarStatusListenerManager.INSTANCE.addListener(TAG, gnssInfo -> {
|
||||
if (gnssInfo != null) {
|
||||
acceleration = gnssInfo.getAcceleration();
|
||||
}
|
||||
handler.sendEmptyMessageDelayed(MSG_SEND_UPDATE, 1000L);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -162,25 +183,13 @@ public class TrafficDataView extends ConstraintLayout {
|
||||
@Override
|
||||
public void onAutopilotBrake(float brake) {
|
||||
CallerLogger.INSTANCE.d(TAG, "刹车:" + brake);
|
||||
ThreadUtils.runOnUiThread(() -> {
|
||||
if (brake > 0) {
|
||||
brakeStatus.setImageResource(R.drawable.traffic_data_brake);
|
||||
} else {
|
||||
brakeStatus.setImageResource(R.drawable.traffic_data_empty);
|
||||
}
|
||||
});
|
||||
mBrake = brake;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotThrottle(float throttle) {
|
||||
CallerLogger.INSTANCE.d(TAG, "油门:" + throttle);
|
||||
ThreadUtils.runOnUiThread(() -> {
|
||||
if (throttle > 0) {
|
||||
brakeStatus.setImageResource(R.drawable.traffic_data_accelerator);
|
||||
} else {
|
||||
brakeStatus.setImageResource(R.drawable.traffic_data_empty);
|
||||
}
|
||||
});
|
||||
mThrottle = throttle;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -73,8 +73,19 @@
|
||||
android:id="@+id/speedAccTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_56"
|
||||
android:layout_marginLeft="@dimen/dp_42"
|
||||
android:text="a: "
|
||||
android:layout_marginEnd="@dimen/dp_80"
|
||||
android:gravity="end"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/dp_40"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/brakeStatus"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/brakeStatus"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_56"
|
||||
android:layout_marginLeft="@dimen/dp_14"
|
||||
android:text="a:"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/dp_40"
|
||||
|
||||
@@ -72,7 +72,7 @@ class IdentifyOriginDataDrawer : Identify, IMoGoAutopilotStatusListener {
|
||||
//0是leading障碍物,障碍物车身红色提示
|
||||
trackObj?.let {
|
||||
colorTrafficData[trackId] = PlanningTrack(
|
||||
"#D77F70FF",
|
||||
"#D65D5AFF",
|
||||
CallerAutoPilotStatusListenerManager.getCurWgs84SatelliteTime()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -100,17 +100,23 @@ object Reminder {
|
||||
if (key.isEmpty()) {
|
||||
throw IllegalStateException("reminder: ${reminder.javaClass.name}'s key can't be empty.")
|
||||
}
|
||||
if (enqueued.contains(key)) {
|
||||
return
|
||||
synchronized(enqueued) {
|
||||
if (enqueued.contains(key)) {
|
||||
return
|
||||
}
|
||||
enqueued += key
|
||||
}
|
||||
enqueued += key
|
||||
attaches.getOrPut(attachTo) {
|
||||
mutableListOf()
|
||||
}.also {
|
||||
it.add(WeakReference(reminder))
|
||||
synchronized(attaches) {
|
||||
attaches.getOrPut(attachTo) {
|
||||
mutableListOf()
|
||||
}.also {
|
||||
it.add(WeakReference(reminder))
|
||||
}
|
||||
}
|
||||
listener?.let {
|
||||
reminderListeners[reminder] = it
|
||||
synchronized(reminderListeners) {
|
||||
listener?.let {
|
||||
reminderListeners[reminder] = it
|
||||
}
|
||||
}
|
||||
scope.launch {
|
||||
if (reminder is ActivityReminder) {
|
||||
@@ -131,11 +137,14 @@ object Reminder {
|
||||
heap += reminder
|
||||
dequeueHeap()
|
||||
} else {
|
||||
queue += reminder
|
||||
val pre = findPreShowedReminder()
|
||||
if (pre != null) {
|
||||
pre.hide()
|
||||
queue.clear()
|
||||
queue += reminder
|
||||
} else {
|
||||
queue.clear()
|
||||
queue += reminder
|
||||
dequeue()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import android.widget.PopupWindow
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import com.mogo.eagle.core.utilcode.reminder.api.IReminder
|
||||
|
||||
abstract class PopupWindowReminder(val popupWindow: PopupWindow): IReminder {
|
||||
abstract class PopupWindowReminder(open val popupWindow: PopupWindow): IReminder {
|
||||
|
||||
override fun lifecycleOwner(): LifecycleOwner = popupWindow.lifecycleOwner
|
||||
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<dimen name="dp_12">12px</dimen>
|
||||
<dimen name="dp_14">14px</dimen>
|
||||
<dimen name="dp_20">20px</dimen>
|
||||
<dimen name="dp_22">22px</dimen>
|
||||
<dimen name="dp_43">43px</dimen>
|
||||
<dimen name="dp_50">50px</dimen>
|
||||
<dimen name="dp_57">57px</dimen>
|
||||
<dimen name="dp_60">60px</dimen>
|
||||
<dimen name="dp_72">72px</dimen>
|
||||
<dimen name="dp_80">80px</dimen>
|
||||
<dimen name="dp_88">88px</dimen>
|
||||
<dimen name="module_v2n_tip_text_margin_right">26px</dimen>
|
||||
<dimen name="warning_distance_right">30px</dimen>
|
||||
|
||||
@@ -77,7 +77,7 @@ public class MogoRouteOverlayManager implements
|
||||
return;
|
||||
}
|
||||
synchronized (queue) {
|
||||
List<MessagePad.TrajectoryPoint> items = queue.getLast();
|
||||
List<MessagePad.TrajectoryPoint> items = queue.peekLast();
|
||||
if (items != null && !items.isEmpty()) {
|
||||
RouteOverlayDrawer.getInstance().drawTrajectoryList(items, location.getBearing());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user