diff --git a/OCH/bus/passenger/.gitignore b/OCH/bus/passenger/.gitignore deleted file mode 100644 index 42afabfd2a..0000000000 --- a/OCH/bus/passenger/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/OCH/bus/passenger/README.md b/OCH/bus/passenger/README.md deleted file mode 100644 index 6175119b78..0000000000 --- a/OCH/bus/passenger/README.md +++ /dev/null @@ -1,15 +0,0 @@ - - - - - -src - - androidTest Android 测试代码 - - basecommon 金旅开沃、接驳车 公用代码部分 - - jinlvvan 金旅开沃 独立代码部分 - - m1 金旅m1 独立代码部分 - - m2 金旅m2 独立代码部分 - - main 所有车型公用代码部分 - - shuttle 接驳车独立代码 因为接驳车和金旅开沃代码耦合厉害暂时放入到mogo-och-bus-passenger里面 - 后期会创建独立module和mogo-och-bus-passenger平级 - - test 普通代码测试 \ No newline at end of file diff --git a/OCH/bus/passenger/build.gradle b/OCH/bus/passenger/build.gradle deleted file mode 100644 index 485f12e541..0000000000 --- a/OCH/bus/passenger/build.gradle +++ /dev/null @@ -1,82 +0,0 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' -apply plugin: 'kotlin-kapt' - -android { - compileSdkVersion rootProject.ext.android.compileSdkVersion - // buildToolsVersion rootProject.ext.android.buildToolsVersion - defaultConfig { - minSdkVersion rootProject.ext.android.minSdkVersion - targetSdkVersion rootProject.ext.android.targetSdkVersion - versionCode Integer.valueOf(VERSION_CODE) - versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION") - - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles "consumer-rules.pro" - - kapt { - useBuildCache = false - arguments { - arg("AROUTER_MODULE_NAME", "bus"+project.getName()) - } - } - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - lintOptions { - abortOnError false - } - - 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' - } - } - - sourceSets { - main { - res.srcDirs = [ - 'src/main/res', - 'src/main/res/m2', - 'src/main/res/jinlv', - ] - java.srcDirs = [ - 'src/main/java', - 'src/main/java/m2', - 'src/main/java/jinlv', - ] - } - } -} - -dependencies { - implementation fileTree(dir: "libs", include: ["*.jar"]) - implementation rootProject.ext.dependencies.kotlinstdlib - implementation rootProject.ext.dependencies.androidxappcompat - implementation rootProject.ext.dependencies.arouter - implementation rootProject.ext.dependencies.androidxrecyclerview - implementation rootProject.ext.dependencies.material - kapt rootProject.ext.dependencies.aroutercompiler - implementation rootProject.ext.dependencies.rxandroid - implementation rootProject.ext.dependencies.androidxconstraintlayout - implementation rootProject.ext.dependencies.amapnavi3dmap - implementation project(":OCH:common:common") - compileOnly project(":libraries:mogo-map") - implementation project(':core:mogo-core-res') - - androidTestImplementation rootProject.ext.dependencies.androidxjunit - testImplementation rootProject.ext.dependencies.junit -} - -apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString() \ No newline at end of file diff --git a/OCH/bus/passenger/consumer-rules.pro b/OCH/bus/passenger/consumer-rules.pro deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/OCH/bus/passenger/gradle.properties b/OCH/bus/passenger/gradle.properties deleted file mode 100644 index 2ed1ed2f42..0000000000 --- a/OCH/bus/passenger/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -GROUP=com.mogo.och -POM_ARTIFACT_ID=och-bus-passenger -VERSION_CODE=1 diff --git a/OCH/bus/passenger/proguard-rules.pro b/OCH/bus/passenger/proguard-rules.pro deleted file mode 100644 index 481bb43481..0000000000 --- a/OCH/bus/passenger/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/OCH/bus/passenger/src/androidTest/java/com/mogo/och/bus/passenger/ExampleInstrumentedTest.java b/OCH/bus/passenger/src/androidTest/java/com/mogo/och/bus/passenger/ExampleInstrumentedTest.java deleted file mode 100644 index 2685ade0a4..0000000000 --- a/OCH/bus/passenger/src/androidTest/java/com/mogo/och/bus/passenger/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.mogo.och.bus.passenger; - -import android.content.Context; - -import androidx.test.platform.app.InstrumentationRegistry; -import androidx.test.ext.junit.runners.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import static org.junit.Assert.*; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - @Test - public void useAppContext() { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); - assertEquals("com.mogo.och.bus.passenger.test", appContext.getPackageName()); - } -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/AndroidManifest.xml b/OCH/bus/passenger/src/main/AndroidManifest.xml deleted file mode 100644 index e0687231c1..0000000000 --- a/OCH/bus/passenger/src/main/AndroidManifest.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/assets/map_style.data b/OCH/bus/passenger/src/main/assets/map_style.data deleted file mode 100644 index d4d4bc8214..0000000000 Binary files a/OCH/bus/passenger/src/main/assets/map_style.data and /dev/null differ diff --git a/OCH/bus/passenger/src/main/assets/map_style_extra.data b/OCH/bus/passenger/src/main/assets/map_style_extra.data deleted file mode 100644 index 88c4e33256..0000000000 Binary files a/OCH/bus/passenger/src/main/assets/map_style_extra.data and /dev/null differ diff --git a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/BusPassengerProvider.kt b/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/BusPassengerProvider.kt deleted file mode 100644 index 5cef7b80d9..0000000000 --- a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/BusPassengerProvider.kt +++ /dev/null @@ -1,72 +0,0 @@ -package com.mogo.och.bus.passenger - -import android.content.Context -import android.view.View -import androidx.fragment.app.Fragment -import com.alibaba.android.arouter.facade.annotation.Route -import com.mogo.eagle.core.data.config.FunctionBuildConfig -import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils -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.ActivityUtils -import com.mogo.eagle.core.utilcode.util.DeviceUtils -import com.mogo.eagle.core.utilcode.util.MultiDisplayUtils -import com.mogo.och.bus.passenger.passenger.ui.PM2BaseFragment -import com.mogo.och.bus.passenger.passenger.ui.widget.M2StatusBarView -import com.mogo.och.bus.passenger.ui.BusPStatusBarView -import com.mogo.och.bus.passenger.ui.BusPassengerRouteFragment -import com.mogo.och.common.module.constant.OchCommonConst -import com.mogo.och.common.module.biz.provider.CommonServiceImpl -import com.mogo.och.common.module.wigets.media.MediaPlayerActivity - -/** - * 网约车-Bus-乘客端 - * - * Created on 2022/3/29 - */ -@Route(path = OchCommonConst.BUS_PASSENGER) -class BusPassengerProvider : CommonServiceImpl() { - - private val tag = BusPassengerProvider::class.java.simpleName - - private var mPM2Fragment: Fragment?=null - - override fun getFragment(): Fragment { - if (AppIdentityModeUtils.isB1(FunctionBuildConfig.appIdentityMode) && DeviceUtils.isEB5Model()) { - MultiDisplayUtils.startActWithSecond(ActivityUtils.getTopActivity(), MediaPlayerActivity::class.java) - } - if(mPM2Fragment==null){ - mPM2Fragment = if (AppIdentityModeUtils.isB2(FunctionBuildConfig.appIdentityMode)) { - PM2BaseFragment() - } else if (AppIdentityModeUtils.isB1(FunctionBuildConfig.appIdentityMode)) { - BusPassengerRouteFragment() - } else { - BusPassengerRouteFragment() - } - } - return mPM2Fragment!! - } - - override fun resetFragment() { - super.resetFragment() - mPM2Fragment = null - } - - override fun getStatusBarView(context: Context): View { - if(statusBarView==null) { - statusBarView = if (AppIdentityModeUtils.isB2(FunctionBuildConfig.appIdentityMode)) { - M2StatusBarView(context) - } else if (AppIdentityModeUtils.isB1(FunctionBuildConfig.appIdentityMode)) { - BusPStatusBarView(context) - } else{ - BusPStatusBarView(context) - } - } - return statusBarView!! - } - - override fun init(context: Context) { - CallerLogger.d(SceneConstant.M_TAXI_P + tag, "init") - } - -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/bean/BusPassengerOperationStatusResponse.java b/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/bean/BusPassengerOperationStatusResponse.java deleted file mode 100644 index c559d22368..0000000000 --- a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/bean/BusPassengerOperationStatusResponse.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.mogo.och.bus.passenger.bean; - -import com.mogo.eagle.core.data.BaseData; - -/** - * @author congtaowang - * @since 2021/3/22 - * - * 小巴车运营状态返回参数 - */ -public class BusPassengerOperationStatusResponse extends BaseData { - - public Result data; - - public static class Result { - private String sn; //司机屏sn - private String phone; //司机手机号 - public String plateNumber; //车牌号 - public int driverStatus;//0:已收车,1:已出车 - } -} diff --git a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/bean/BusPassengerQueryLineRequest.java b/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/bean/BusPassengerQueryLineRequest.java deleted file mode 100644 index 35ba94ce3a..0000000000 --- a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/bean/BusPassengerQueryLineRequest.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.mogo.och.bus.passenger.bean; - -public -/** - * @author congtaowang - * @since 2021/3/22 - * - * 根据车机行驶线路站点信息 - */ -class BusPassengerQueryLineRequest { - - private String sn; - public BusPassengerQueryLineRequest(String sn) { - this.sn = sn; - } -} diff --git a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/bean/PM2RoutesResponse.java b/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/bean/PM2RoutesResponse.java deleted file mode 100644 index 32306a33c1..0000000000 --- a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/bean/PM2RoutesResponse.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.mogo.och.bus.passenger.bean; - -import com.mogo.eagle.core.data.BaseData; -import com.mogo.och.data.bean.BusRoutesResult; - -/** - * 网约车小巴路线接口请求响应结果 返回的是对应司机屏的线路信息 - * - * @author tongchenfei - */ -public class PM2RoutesResponse extends BaseData { - private BusRoutesResult data; - - public BusRoutesResult getResult() { - return data; - } - - public void setResult(BusRoutesResult data) { - this.data = data; - } - - @Override - public String toString() { - return "OchBusRoutesResponse{" + - "data=" + data + - '}'; - } - -} diff --git a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/bean/ResponseSiteIntroduce.kt b/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/bean/ResponseSiteIntroduce.kt deleted file mode 100644 index d9ab5c0209..0000000000 --- a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/bean/ResponseSiteIntroduce.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.mogo.och.bus.passenger.bean - -import com.mogo.eagle.core.data.BaseData - -/** - * 网约车小巴路线接口请求响应结果 返回的是对应司机屏的线路信息 - * - * @author tongchenfei - */ -data class ResponseSiteIntroduce(val data: MutableList?) : BaseData(){ - - data class SiteIntroduceInfo(val siteId:Long,val introduceList:MutableList) - - data class IntroduceInfo(val type:Int,val url :String,val seq:Int) - -} diff --git a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/callback/IAutopilotStatusCallback.java b/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/callback/IAutopilotStatusCallback.java deleted file mode 100644 index 98f13ea45f..0000000000 --- a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/callback/IAutopilotStatusCallback.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.mogo.och.bus.passenger.callback; - -/** - * Created on 2022/3/31 - * - * Model->Presenter回调:ADAS相关(自动驾驶状态回调,到达终点等等) - */ -public interface IAutopilotStatusCallback { - - void updateAutoStatus(boolean isOpen); -} diff --git a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/callback/IBusPassegerDriverStatusCallback.java b/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/callback/IBusPassegerDriverStatusCallback.java deleted file mode 100644 index d56dd0b999..0000000000 --- a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/callback/IBusPassegerDriverStatusCallback.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.mogo.och.bus.passenger.callback; - -/** - * @author: wangmingjun - * @date: 2021/10/22 - */ -public interface IBusPassegerDriverStatusCallback { - void updateDriverSn(String sn); -} diff --git a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/callback/IDrivingInfoCallback.kt b/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/callback/IDrivingInfoCallback.kt deleted file mode 100644 index dc453e8d3d..0000000000 --- a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/callback/IDrivingInfoCallback.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.mogo.och.bus.passenger.callback - -import com.mogo.och.data.bean.BusStationBean - -/** - * @author: wangmingjun - * @date: 2023/2/2 - */ -interface IDrivingInfoCallback { - fun updateLine(lineName: String, lineDuring: String) - fun updateStationsInfo(stations: MutableList, currentStationIndex: Int, isArrived: Boolean) - fun updateRemainMT(meters : Long, timeInSecond : Long) // 米,秒 - fun changeOperationStatus(loginStatus : Boolean) - - fun showNoTaskView(); - fun hideNoTaskView(); -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/callback/ISpeedCallback.java b/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/callback/ISpeedCallback.java deleted file mode 100644 index da304a6aa0..0000000000 --- a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/callback/ISpeedCallback.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.mogo.och.bus.passenger.callback; - -/** - * Created on 2022/3/31 - * - * Model->Presenter回调:状态控制器监听(accOn、adas ui show、voice ui show、push ui show、v2x ui show等等) - */ -public interface ISpeedCallback { - - // 自车定位 - void onCarLocationChanged(float location); -} diff --git a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/constant/BusPassengerConst.kt b/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/constant/BusPassengerConst.kt deleted file mode 100644 index a27b034d25..0000000000 --- a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/constant/BusPassengerConst.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.mogo.och.bus.passenger.constant - -import com.mogo.commons.debug.DebugConfig - -/** - * Created on 2021/12/6 - */ -class BusPassengerConst { - companion object { - - // 轮询line - const val LOOP_LINE_2S = 2 * 1000L - const val LOOP_LINE_1S = 1 * 1000L - const val LOOP_DELAY = 100L - - // 无状态 - const val STATION_STATUS_IDLE = 0 - // 已过站(历史站) - const val STATION_STATUS_LEAVING = 1 - // 到站(当前站) - const val STATION_STATUS_STOPPED = 2 - // 未到站(未到站) - const val STATION_STATUS_ARRIVING = 3 - - //bus平均速度 bus的平均里程:25km/h - const val BUS_AVERAGE_SPEED = 25 - //接驳/B2平均速度 bus的平均里程:10km/h - const val SHUTTLE_AVERAGE_SPEED = 10 - - // 订单总里程 - const val BUS_SP_KEY_ORDER_SUM_DIS = "BUS_SP_KEY_ORDER_SUM_DIS" - - const val QUERY_BUS_P_STATION_DELAY = 3 * 1000L - } -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/model/OrderModel.kt b/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/model/OrderModel.kt deleted file mode 100644 index b70b2d6894..0000000000 --- a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/model/OrderModel.kt +++ /dev/null @@ -1,494 +0,0 @@ -package com.mogo.och.bus.passenger.model - -import android.annotation.SuppressLint -import android.content.Context -import com.mogo.commons.env.ProjectUtils -import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters -import com.mogo.eagle.core.data.config.FunctionBuildConfig -import com.mogo.eagle.core.data.map.MogoLocation -import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener -import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener -import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager -import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager -import com.mogo.eagle.core.network.utils.GsonUtil -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.GsonUtils -import com.mogo.och.bus.passenger.bean.PM2RoutesResponse -import com.mogo.och.bus.passenger.bean.ResponseSiteIntroduce -import com.mogo.och.bus.passenger.callback.IAutopilotStatusCallback -import com.mogo.och.bus.passenger.callback.IBusPassegerDriverStatusCallback -import com.mogo.och.bus.passenger.callback.IDrivingInfoCallback -import com.mogo.och.bus.passenger.callback.ISpeedCallback -import com.mogo.och.bus.passenger.constant.BusPassengerConst -import com.mogo.och.bus.passenger.network.BusPassengerServiceManager -import com.mogo.och.common.module.biz.lansocket.IOchLanPassengerStatusListener -import com.mogo.och.common.module.biz.lansocket.LoginLanPassengerSocket -import com.mogo.och.common.module.biz.login.ILoginCallback -import com.mogo.och.common.module.biz.login.LoginStatusEnum -import com.mogo.och.common.module.biz.login.LoginStatusManager -import com.mogo.och.common.module.biz.login.OpenOrderStatusEnum -import com.mogo.och.common.module.biz.media.MediaManager -import com.mogo.och.common.module.manager.autopilot.autopilot.IOchAutopilotStatusListener -import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotStatusListenerManager -import com.mogo.och.common.module.manager.autopilot.location.OchLocationManager -import com.mogo.och.common.module.manager.distance.IDistanceListener -import com.mogo.och.common.module.manager.distance.TrajectoryAndDistanceManager -import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager -import com.mogo.och.common.module.manager.download.DownloadManager -import com.mogo.och.common.module.manager.loop.BizLoopManager -import com.mogo.och.common.module.manager.loop.LoopInfo -import com.mogo.och.common.module.manager.socket.cloud.AbnormalFactorsLoopManager -import com.mogo.och.common.module.manager.socket.lan.ILanMessageListener -import com.mogo.och.common.module.manager.socket.lan.LanSocketManager -import com.mogo.och.common.module.manager.socket.lan.bean.BusinessType -import com.mogo.och.common.module.manager.socket.lan.bean.DPMsgType -import com.mogo.och.common.module.manager.socket.lan.bean.TaskDetailsMsg -import com.mogo.och.common.module.network.OchCommonServiceCallback -import com.mogo.och.common.module.utils.OCHThreadPoolManager -import com.mogo.och.common.module.utils.PinYinUtil -import com.mogo.och.common.module.wigets.media.MediaItem -import com.mogo.och.data.bean.BusRoutesResult -import com.mogo.och.data.bean.BusStationBean -import com.mogo.och.data.bean.BusTransferData - -@SuppressLint("StaticFieldLeak") -object OrderModel { - - private val TAG = OrderModel::class.java.simpleName - - private val TAG_LOOP_QUERY_BIND_LINE = "${TAG}_TAG_LOOP_QUERY_BIND_LINE" - - private var mContext: Context? = null - - private var routesResult: BusRoutesResult? = null - private var mNextStationIndex = 0 // A-B要到达站的index - - - var mDrivingInfoCallback: IDrivingInfoCallback? = null //行程信息 - var mADASStatusCallback: IAutopilotStatusCallback? = null//Model->Presenter:自动驾驶状态相关 - var mSpeedCallback: ISpeedCallback? = null //行程信息 - var mDriverStatusCallback: IBusPassegerDriverStatusCallback? = null //出车收车状态 - - fun init(context: Context){ - mContext = context - initListeners() - queryDriverByLocalDriver() - queryDriverOperationStatus() - BizLoopManager.setLoopFunction( - TAG_LOOP_QUERY_BIND_LINE, - LoopInfo(2, ::queryDriverSiteByCoordinate) - ) - } - - private fun initListeners() { - //自动驾驶状态监听 - OchAutoPilotStatusListenerManager.addListener(TAG, mGoAutopilotStatusListener) - // 定位监听 - OchLocationManager.addGCJ02Listener(TAG, 3, mMapLocationListener) - // 距离终点站距离监听 - TrajectoryAndDistanceManager.addDistanceListener(TAG, trajectoryListener) - AbnormalFactorsLoopManager.startLoopAbnormalFactors(mContext!!) - //司乘屏通信监听 - LanSocketManager.registerSocketMessageListener(DPMsgType.TYPE_COMMON.type,LanSocketManager.commonListener) - LanSocketManager.registerSocketMessageListener(DPMsgType.TYPE_TASK_DETAILS.type,taskDetailsMsgListener) - LoginLanPassengerSocket.addListener(TAG,driverSnListener) - } - - fun releaseListeners(){ - //自动驾驶状态监听 - OchAutoPilotStatusListenerManager.removeListener(mGoAutopilotStatusListener) - // 注销定位监听 - OchLocationManager.removeGCJ02Listener(TAG) - // 距离终点站距离监听 - TrajectoryAndDistanceManager.removeListener(TAG) - - AbnormalFactorsLoopManager.stopLoopAbnormalFactors() - CallerTelematicListenerManager.removeListener(TAG) - BizLoopManager.removeLoopFunction(TAG_LOOP_QUERY_BIND_LINE) - LanSocketManager.unRegisterSocketMessageListener(DPMsgType.TYPE_COMMON.type,LanSocketManager.commonListener) - LanSocketManager.unRegisterSocketMessageListener(DPMsgType.TYPE_TASK_DETAILS.type,taskDetailsMsgListener) - LoginLanPassengerSocket.removeListener(TAG) - - cleanStation("release") - } - - fun setDrivingInfoCallback(drivingInfoCallback: IDrivingInfoCallback?) { - mDrivingInfoCallback = drivingInfoCallback - } - - fun setADASStatusCallback(callback: IAutopilotStatusCallback?) { - mADASStatusCallback = callback - } - - fun setSpeedCallback(mSpeedCallback: ISpeedCallback?) { - this.mSpeedCallback = mSpeedCallback - } - - fun setDriverStatusCallback(callback: IBusPassegerDriverStatusCallback?) { - mDriverStatusCallback = callback - } - - private val mGoAutopilotStatusListener: IOchAutopilotStatusListener = - object : IOchAutopilotStatusListener { - override fun onAutopilotStatusResponse(state: Int) { - if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING != state) { - //美化模式下且行程中 - if (FunctionBuildConfig.isDemoMode && routesResult !=null - ) { - mADASStatusCallback?.updateAutoStatus(true) - } else {//非美化模式下 - mADASStatusCallback?.updateAutoStatus(false) - } - } else {//自驾状态 2 - mADASStatusCallback?.updateAutoStatus(true) - } - } - } - - private val mMapLocationListener: IMoGoChassisLocationGCJ02Listener = - object : IMoGoChassisLocationGCJ02Listener { - override fun onChassisLocationGCJ02(mogoLocation: MogoLocation?) { - if (null == mogoLocation) return - OCHThreadPoolManager.getsInstance().locationExecute { - mSpeedCallback?.onCarLocationChanged(mogoLocation.gnssSpeed) - } - } - } - - private val trajectoryListener: IDistanceListener = object : IDistanceListener { - override fun distanceCallback(distance: Float) { - val lastTime = distance / BusPassengerConst.BUS_AVERAGE_SPEED * 3.6 //秒 - CallerLogger.d( - SceneConstant.M_BUS_P + TAG, - "轨迹排查==lastSumLength = $distance" - ) - if (routesResult != null) { - for (site in routesResult!!.sites) { - if (site.drivingStatus == BusPassengerConst.STATION_STATUS_STOPPED && !site.isLeaving) { - return - } - } - } - mDrivingInfoCallback?.updateRemainMT(distance.toLong(), lastTime.toLong()) - } - } - - private val taskDetailsMsgListener = object : ILanMessageListener { - override fun targetLan(): Class { - return TaskDetailsMsg::class.java - } - - override fun onLanMsgReceived(taskDetailsMsg: TaskDetailsMsg?) { - taskDetailsMsg?.let { - if (it.msg?.isEmpty() == true){ - clearLocalRouteResult() - return - } - - val result = GsonUtils.fromJson(it.msg, BusTransferData::class.java) - mDrivingInfoCallback?.changeOperationStatus(result.loginStatus == 1) - if (result != null && result.routesResult == null) { - clearLocalRouteResult() - } - if (routesResult == null || - (result != null && result.routesResult?.writeVersion!! > routesResult!!.writeVersion) - ) { //已司机端传来的为准 - routesResult = result.routesResult - updatePassengerRouteInfo(routesResult) - } - } - } - } - private val driverSnListener = object :IOchLanPassengerStatusListener{ - override fun onDriverSnChagneListner(sn: String?) { - CallerLogger.d( - SceneConstant.M_BUS_P + TAG, - "onReceivedServerSn = $sn" - ) - mDriverStatusCallback?.updateDriverSn(sn) - sn?.let { - querySiteIntroduce() - } - } - - } - - - fun queryDriverByLocalDriver() { - //本地去请求司机端 - val msg = TaskDetailsMsg("task", BusinessType.bus) - LanSocketManager.sendMsgToServer(msg) - } - - private fun querySiteIntroduce(){ - mContext?.let { - if (ProjectUtils.isSaas()) { - BusPassengerServiceManager.querySiteIntroduceBySn(it,object : OchCommonServiceCallback{ - override fun onSuccess(response: ResponseSiteIntroduce?) { - response?.let {response-> - downloadSiteIntroduce(response) - } - } - - override fun onFail(code: Int, msg: String?) { - - } - - }) - } - } - } - - private fun downloadSiteIntroduce(response: ResponseSiteIntroduce) { - response.data?.forEach {siteIntroduceInfo -> - siteIntroduceInfo.introduceList.forEach {introduceInfo -> - DownloadManager.downloadVideoFile(introduceInfo.url,null) - } - } - } - - - private fun queryDriverOperationStatus() { - LoginStatusManager.addListener(TAG,object: ILoginCallback{ - override fun onStatusChange(currentStatus: LoginStatusEnum?) { - - } - - override fun onOpenOrderStatusEnumChange(businessEnum: OpenOrderStatusEnum?) { - when (businessEnum) { - OpenOrderStatusEnum.Ordering -> { - mDrivingInfoCallback?.changeOperationStatus(true) - } - else -> { - mDrivingInfoCallback?.changeOperationStatus(false) - } - } - } - - override fun onLoginErrorInfo(code: Int, msg: String?) { - super.onLoginErrorInfo(code, msg) - if(code==-10012){// 网络错误 - queryDriverByLocalDriver() - } - } - }) - } - - private fun queryDriverSiteByCoordinate() { - mContext?.let { - BusPassengerServiceManager.queryDriverSiteByCoordinate(it, - object : OchCommonServiceCallback { - override fun onSuccess(data: PM2RoutesResponse?) { - if (data == null || data.result == null) { - CallerLogger.d( - SceneConstant.M_BUS_P + TAG, - "order = queryDriverSiteByCoordinate = null" - ) - clearLocalRouteResult() - return - } - if (data.result != null && routesResult != null && data.result.equals( - routesResult - )) { - CallerLogger.d( - SceneConstant.M_BUS_P + TAG, - "order = queryDriverSiteByCoordinate = not update" - ) - return - } - OchChainLogManager.writeChainLog("订单信息流转","$data"); - - if (routesResult != null && - routesResult!!.writeVersion < data.result.writeVersion - ) { - routesResult = data.result - } - - if (routesResult == null) { - routesResult = data.result - } - - updatePassengerRouteInfo(data.result) - } - override fun onError() { - CallerLogger.d( - SceneConstant.M_BUS_P + TAG, - "queryDriverSiteByCoordinate = onError = sn = " + LoginLanPassengerSocket.driverSn - ) - queryDriverByLocalDriver() - } - - override fun onFail(code: Int, msg: String) { - CallerLogger.d( - SceneConstant.M_BUS_P + TAG, - "queryDriverSiteByCoordinate = $msg sn = ${LoginLanPassengerSocket.driverSn}" - ) - if (code == 1003) { - LoginStatusManager.queryLoginStatusByNet() - cleanStation("queryDriverSiteByCoordinate 1003") - } - if (LoginLanPassengerSocket.driverSn.isEmpty()) { - //此处拦截是为了防止过程中乘客屏和司机端断连,拿不到司机端sn, 造成请求失败去刷新了界面 - return - } - if (code == 1003) { - routesResult = null - cleanStation("queryDriverSiteByCoordinate 1003") - return - } - } - }) - } - } - - private fun setTrajectoryStation( - startStationInfo: BusStationBean, - endStationInfo: BusStationBean, - lineId: Int - ) { - val startStation = MogoLocation() - startStation.longitude = startStationInfo.gcjLon - startStation.latitude = startStationInfo.gcjLat - val endStation = MogoLocation() - endStation.longitude = endStationInfo.gcjLon - endStation.latitude = endStationInfo.gcjLat - TrajectoryAndDistanceManager.setStationPoint(startStation, endStation, lineId.toLong()) - val introductionList = mutableListOf() - endStationInfo.videoList.forEach { - if(it.type==1) { - introductionList.add(MediaItem(MediaItem.PrioritySite, it.url,MediaItem.MEDIA_TYPE_VIDEO,"","")) - } - } - MediaManager.postSiteIntroduceInfo(introductionList) - } - - fun cleanStation(type: String) { - CallerLogger.d(SceneConstant.M_BUS_P + TAG, "清理站点 $type") - TrajectoryAndDistanceManager.setStationPoint(null, null, -1L) - } - - fun clearLocalRouteResult() { - routesResult = null - mNextStationIndex = 0 - cleanStation("queryDriverSiteByCoordinate") - mDrivingInfoCallback?.showNoTaskView() - } - - private fun updateAutopilotControlParameters( - busRoutesResult: BusRoutesResult, - leaveIndex: Int - ) { - val parameters = initAutopilotControlParameters(busRoutesResult, leaveIndex) - if (null == parameters) { - CallerLogger.e(SceneConstant.M_BUS_P + TAG, "AutopilotControlParameters is empty.") - return - } - CallerLogger.d(SceneConstant.M_BUS_P + TAG, "AutopilotControlParameters is update.") - CallerAutoPilotStatusListenerManager.updateAutopilotControlParameters(parameters) - } - - private fun initAutopilotControlParameters( - busRoutesResult: BusRoutesResult, - leaveIndex: Int - ): AutopilotControlParameters? { - if (busRoutesResult.sites == null) { - return null - } - val stations = busRoutesResult.sites - if (leaveIndex + 1 > stations.size - 1) { - CallerLogger.e(SceneConstant.M_BUS_P + TAG, "行程日志-mismatch condition1.") - return null - } - val currentStation = stations[leaveIndex] - val nextStation = stations[leaveIndex + 1] - val parameters = AutopilotControlParameters() - parameters.routeID = busRoutesResult.lineId - parameters.routeName = busRoutesResult.name - parameters.startName = PinYinUtil.getPinYinHeadChar(currentStation.name) - parameters.endName = PinYinUtil.getPinYinHeadChar(nextStation.name) - parameters.startLatLon = - AutopilotControlParameters.AutoPilotLonLat(currentStation.lat, currentStation.lon) - parameters.endLatLon = - AutopilotControlParameters.AutoPilotLonLat(nextStation.lat, nextStation.lon) - parameters.vehicleType = 10 - if (parameters.autoPilotLine == null) { - parameters.autoPilotLine = AutopilotControlParameters.AutoPilotLine( - busRoutesResult.lineId.toLong(), busRoutesResult.name, - busRoutesResult.csvFileUrl, busRoutesResult.csvFileMd5, - busRoutesResult.txtFileUrl, busRoutesResult.txtFileMd5, - busRoutesResult.contrailSaveTime, busRoutesResult.carModel, - busRoutesResult.csvFileUrlDPQP, busRoutesResult.csvFileMd5DPQP, - busRoutesResult.txtFileUrlDPQP, busRoutesResult.txtFileMd5DPQP, - busRoutesResult.contrailSaveTimeDPQP - ) - } - return parameters - } - - - private fun clearAutopilotControlParameters() { - CallerLogger.d(SceneConstant.M_BUS_P + TAG, "AutopilotControlParameters is clear.") - CallerAutoPilotStatusListenerManager.updateAutopilotControlParameters(null) - } - - fun updatePassengerRouteInfo(result: BusRoutesResult?) { - if (result == null) { - clearLocalRouteResult() - return - } - - CallerLogger.d(SceneConstant.M_BUS_P + TAG, "queryDriverSiteByCoordinate= update") - routesResult = result - - CallerLogger.d(SceneConstant.M_BUS_P + TAG, "order = BusPassengerRoutesResult= " + GsonUtil.jsonFromObject(result)) - mDrivingInfoCallback?.updateLine(result.name, result.runningDur) - if (result.sites != null) { - mDrivingInfoCallback?.hideNoTaskView() - - val stations = result.sites - for (i in stations.indices) { - val station = stations[i] - if (station.drivingStatus == BusPassengerConst.STATION_STATUS_STOPPED && station.isLeaving && i + 1 < stations.size) { //离站 - CallerLogger.d( - SceneConstant.M_BUS_P + TAG, - "order = station= leave" - ) - mDrivingInfoCallback?.updateStationsInfo(stations, i + 1, false) - CallerLogger.d( - SceneConstant.M_BUS_P + TAG, - "och-rotting--mNextStationIndex = $mNextStationIndex , i = $i" - ) - CallerLogger.d( - SceneConstant.M_BUS_P + TAG, - "och-rotting--start " - ) - mNextStationIndex = i + 1 - val startStation = stations[i] - val endStation = stations[i + 1] - setTrajectoryStation(startStation, endStation, result.lineId) - updateAutopilotControlParameters(result, i) - return - } else if (station.drivingStatus == BusPassengerConst.STATION_STATUS_STOPPED && !station.isLeaving) { //到站 - CallerLogger.d( - SceneConstant.M_BUS_P + TAG, - "och-rotting--mNextStationIndex = $mNextStationIndex , i = $i" - ) - CallerLogger.d(SceneConstant.M_BUS_P + TAG, "och-rotting--arrived ") - if (i == stations.size - 1) { - cleanStation("updatePassengerRouteInfo最后一个站点") - } - - TrajectoryAndDistanceManager.suspendCalculate() - - CallerLogger.d(SceneConstant.M_BUS_P + TAG, "order = station= arrive") - - mDrivingInfoCallback?.updateStationsInfo(stations, i, true) - clearAutopilotControlParameters() - return - } - } - } - } - -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/network/BusPassengerServiceManager.kt b/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/network/BusPassengerServiceManager.kt deleted file mode 100644 index ce49576e04..0000000000 --- a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/network/BusPassengerServiceManager.kt +++ /dev/null @@ -1,71 +0,0 @@ -package com.mogo.och.bus.passenger.network - -import android.content.Context -import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager.getServerToken -import com.mogo.och.bus.passenger.bean.PM2RoutesResponse -import com.mogo.cloud.passport.MoGoAiCloudClientConfig -import com.mogo.commons.debug.DebugConfig -import com.mogo.och.bus.passenger.bean.BusPassengerQueryLineRequest -import com.mogo.eagle.core.network.MoGoRetrofitFactory -import com.mogo.commons.storage.SharedPrefsMgr -import com.mogo.och.bus.passenger.bean.ResponseSiteIntroduce -import com.mogo.och.common.module.biz.lansocket.LoginLanPassengerSocket -import com.mogo.och.common.module.constant.OchCommonConst -import com.mogo.och.common.module.network.OchCommonServiceCallback -import com.mogo.och.common.module.network.OchCommonSubscribeImpl -import com.mogo.och.common.module.network.interceptor.transformTry - -/** - * Created on 2022/3/31 - */ -object BusPassengerServiceManager { - - private var mBusPassengerSaasServiceApi = - MoGoRetrofitFactory.getInstance(OchCommonConst.getBaseUrl()).create(PassengerSAASServiceApi::class.java) - - private var mBusPassengerServiceApi = - MoGoRetrofitFactory.getInstance(OchCommonConst.getBaseUrl()).create(PassengerServiceApi::class.java) - - /** - * 查询绑定行驶的小巴车路线 - * @param context - * @param callback - */ - @JvmStatic - fun queryDriverSiteByCoordinate( - context: Context, callback: OchCommonServiceCallback? - ) { - if (DebugConfig.getProjectFlavor().contains("saas")){ - mBusPassengerSaasServiceApi.queryDriverSiteByCoordinate( - MoGoAiCloudClientConfig.getInstance().serviceAppId, - SharedPrefsMgr.getInstance().token, - LoginLanPassengerSocket.driverSn - ).transformTry() - .subscribe(OchCommonSubscribeImpl(context, callback, "queryDriverSiteByCoordinate",false)) - }else{ - mBusPassengerServiceApi.queryDriverSiteByCoordinate( - MoGoAiCloudClientConfig.getInstance().serviceAppId, - SharedPrefsMgr.getInstance().token, - BusPassengerQueryLineRequest(LoginLanPassengerSocket.driverSn) - ).transformTry() - .subscribe(OchCommonSubscribeImpl(context, callback, "queryDriverSiteByCoordinate",false)) - } - } - /** - * 查询绑定行驶的小巴车路线 - * @param context - * @param callback - */ - @JvmStatic - fun querySiteIntroduceBySn( - context: Context, callback: OchCommonServiceCallback? - ) { - mBusPassengerSaasServiceApi.querySiteIntroduceBySn( - MoGoAiCloudClientConfig.getInstance().serviceAppId, - SharedPrefsMgr.getInstance().token, - LoginLanPassengerSocket.driverSn - ).transformTry() - .subscribe(OchCommonSubscribeImpl(context, callback, "querySiteIntroduceBySn")) - } - -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/network/PassengerSAASServiceApi.java b/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/network/PassengerSAASServiceApi.java deleted file mode 100644 index 4c3ab1a8c7..0000000000 --- a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/network/PassengerSAASServiceApi.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.mogo.och.bus.passenger.network; - -import com.mogo.och.bus.passenger.bean.PM2RoutesResponse; -import com.mogo.och.bus.passenger.bean.ResponseSiteIntroduce; - -import io.reactivex.Observable; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.POST; -import retrofit2.http.Query; - -/** - * Created on 2022/3/31 - * - * Bus乘客端接口定义 - */ -public interface PassengerSAASServiceApi { - /** - * 查询bus司机端绑定路线 - * @return 接口返回数据 - */ - @Headers( {"Content-Type:application/json;charset=UTF-8"} ) - @GET( "/och-bus-cabin/api/business/v1/driver/bus/lineDataWithDriver/query" ) - Observable queryDriverSiteByCoordinate(@Header("appId") String appId, @Header("ticket") String ticket, @Query("sn") String sn); - - /** - * 查询车辆对应站点的所有视频介绍视频 - * @return 接口返回数据 - */ - @Headers( {"Content-Type:application/json;charset=UTF-8"} ) - @GET( "/och-bus-cabin/api/business/v1/querySiteIntroduceBySn" ) - Observable querySiteIntroduceBySn(@Header("appId") String appId, @Header("ticket") String ticket, @Query("sn") String sn); - -} diff --git a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/network/PassengerServiceApi.java b/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/network/PassengerServiceApi.java deleted file mode 100644 index a417ccfbcc..0000000000 --- a/OCH/bus/passenger/src/main/java/com/mogo/och/bus/passenger/network/PassengerServiceApi.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.mogo.och.bus.passenger.network; - -import com.mogo.och.bus.passenger.bean.BusPassengerOperationStatusResponse; -import com.mogo.och.bus.passenger.bean.BusPassengerQueryLineRequest; -import com.mogo.och.bus.passenger.bean.PM2RoutesResponse; - -import io.reactivex.Observable; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.POST; -import retrofit2.http.Query; - -/** - * Created on 2022/3/31 - * - * Bus乘客端接口定义 - */ -public interface PassengerServiceApi { - /** - * 查询bus司机端绑定路线 - * @return 接口返回数据 - */ - @Headers( {"Content-Type:application/json;charset=UTF-8"} ) - @POST( "/autopilot-car-hailing/line/v2/driver/bus/passenger/lineDataWithDriver/query" ) - Observable queryDriverSiteByCoordinate(@Header("appId") String appId, @Header("ticket") String ticket, @Body BusPassengerQueryLineRequest request); - -} diff --git a/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/presenter/BaseBusPassengerPresenter.java b/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/presenter/BaseBusPassengerPresenter.java deleted file mode 100644 index b59f09a0d6..0000000000 --- a/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/presenter/BaseBusPassengerPresenter.java +++ /dev/null @@ -1,155 +0,0 @@ -package com.mogo.och.bus.passenger.presenter; - -import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P; - -import android.os.Looper; - -import androidx.annotation.NonNull; -import androidx.lifecycle.LifecycleOwner; - -import com.mogo.commons.AbsMogoApplication; -import com.mogo.commons.mvp.Presenter; -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; -import com.mogo.eagle.core.utilcode.util.UiThreadHandler; -import com.mogo.och.bus.passenger.callback.IBusPassegerDriverStatusCallback; -import com.mogo.och.bus.passenger.callback.IAutopilotStatusCallback; -import com.mogo.och.bus.passenger.callback.IDrivingInfoCallback; -import com.mogo.och.bus.passenger.callback.ISpeedCallback; -import com.mogo.och.bus.passenger.model.OrderModel; -import com.mogo.och.bus.passenger.ui.BusPassengerRouteFragment; -import com.mogo.och.data.bean.BusStationBean; - -import java.util.List; - -/** - * Created on 2022/3/31 - */ -public class BaseBusPassengerPresenter extends Presenter implements - IAutopilotStatusCallback, ISpeedCallback, IBusPassegerDriverStatusCallback, IDrivingInfoCallback { - private static final String TAG = BaseBusPassengerPresenter.class.getSimpleName(); - - public BaseBusPassengerPresenter(BusPassengerRouteFragment view) { - super(view); - OrderModel.INSTANCE.init(getContext()); - initListeners(); - } - - @Override - public void onCreate( @NonNull LifecycleOwner owner ) { - super.onCreate( owner ); - CallerLogger.d( M_BUS_P + TAG, "Bus乘客端Presenter onCreate()" ); - } - - @Override - public void onDestroy( @NonNull LifecycleOwner owner ) { - super.onDestroy( owner ); - - releaseListeners(); - OrderModel.INSTANCE.releaseListeners(); - } - - private void initListeners() { - OrderModel.INSTANCE.setADASStatusCallback(this); - OrderModel.INSTANCE.setSpeedCallback( this); - OrderModel.INSTANCE.setDriverStatusCallback(this); - OrderModel.INSTANCE.setDrivingInfoCallback(this); - } - - private void releaseListeners() { - OrderModel.INSTANCE.setADASStatusCallback(null); - OrderModel.INSTANCE.setSpeedCallback(null); - OrderModel.INSTANCE.setDriverStatusCallback(null); - OrderModel.INSTANCE.setDrivingInfoCallback(null); - } - - private void runOnUIThread( Runnable executor ) { - if ( executor == null ) { - return; - } - if ( Looper.myLooper() != Looper.getMainLooper() ) { - UiThreadHandler.post( executor ); - } else { - executor.run(); - } - } - - @Override - public void updateAutoStatus(boolean isOpen){ - if(mView!=null) { - mView.onAutopilotStatusChanged(isOpen); - } - } - - @Override - public void onCarLocationChanged(float speed) { - runOnUIThread(() -> { - if(mView!=null) { - mView.onCarLocationChanged(speed); - } - }); - } - - @Override - public void changeOperationStatus(boolean changeStatus) { - runOnUIThread(() -> { - if(mView!=null) { - mView.changeOperationStatus(changeStatus); - } - }); - } - - @Override - public void updateDriverSn(String sn) { - runOnUIThread(() -> { - if(mView!=null) { - mView.updateDriverSn(sn); - } - }); - } - - @Override - public void updateLine(String lineName, String lineDurTime) { - runOnUIThread(() -> { - if(mView!=null) { - mView.updateLineInfo(lineName, lineDurTime); - } - }); - } - - @Override - public void updateStationsInfo(List stations, int currentStationIndex, boolean isArrived) { - runOnUIThread(() -> { - if(mView!=null) { - mView.updateStationsInfo(stations, currentStationIndex, isArrived); - } - }); - } - - @Override - public void showNoTaskView() { - runOnUIThread(() -> { - if(mView!=null) { - mView.showNoTaskView(); - } - }); - } - - @Override - public void hideNoTaskView() { - runOnUIThread(() -> { - if (mView != null) { - mView.hideNoTaskView(); - } - }); - } - - @Override - public void updateRemainMT(long meters, long timeInSecond) { - runOnUIThread(() -> { - if(mView!=null) { - mView.updateRoutePlanningToNextStation(meters, timeInSecond); - } - }); - } - -} diff --git a/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/BusPBlueToothView.kt b/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/BusPBlueToothView.kt deleted file mode 100644 index 8e4fef8281..0000000000 --- a/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/BusPBlueToothView.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.mogo.och.bus.passenger.ui - -import android.content.Context -import android.util.AttributeSet -import android.view.LayoutInflater -import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener -import com.mogo.eagle.core.function.hmi.ui.widget.BlueToothView -import com.mogo.eagle.core.utilcode.util.ThreadUtils -import com.mogo.och.bus.passenger.R -import kotlinx.android.synthetic.main.p_bus_view_blue_tooth.view.blueView - -/** - * 魔戒蓝牙控件 - * 放置于StatusBar右侧位置 - */ -class BusPBlueToothView @JvmOverloads constructor( - context: Context, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : BlueToothView(context, attrs, defStyleAttr),IMoGoDevaToolsListener { - - init { - LayoutInflater.from(context).inflate(R.layout.p_bus_view_blue_tooth, this, true) - } - - override fun mofangStatus(status: Boolean) { - ThreadUtils.runOnUiThread { - if (status) { - blueView.setImageResource(R.drawable.bus_p_blue_tooth_close) - } else { - blueView.setImageResource(R.drawable.bus_p_blue_tooth_open) - } - } - } - -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/BusPStatusBarView.kt b/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/BusPStatusBarView.kt deleted file mode 100644 index 0d99ce62ff..0000000000 --- a/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/BusPStatusBarView.kt +++ /dev/null @@ -1,70 +0,0 @@ -package com.mogo.och.bus.passenger.ui - -import android.annotation.* -import android.content.Context -import android.util.AttributeSet -import android.view.LayoutInflater -import android.view.ViewGroup -import androidx.constraintlayout.widget.ConstraintLayout -import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener -import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener -import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager -import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager -import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager -import com.mogo.eagle.core.utilcode.kotlin.* -import com.mogo.eagle.core.utilcode.util.AppUtils -import com.mogo.och.bus.passenger.R -import kotlinx.android.synthetic.main.p_bus_view_status_bar.view.tv_bus_b1_p_version -import kotlinx.coroutines.* -import me.jessyan.autosize.utils.AutoSizeUtils - -/** - * @author: wangmingjun - * @date: 2023/2/14 - */ -class BusPStatusBarView @JvmOverloads constructor( - context: Context, attrs: AttributeSet? = null -) : ConstraintLayout(context, attrs), IViewControlListener, IMoGoSkinModeChangeListener{ - - companion object { - const val TAG = "BusPStatusBarView" - } - - init { - LayoutInflater.from(context).inflate(R.layout.p_bus_view_status_bar, this, true) - setBackgroundResource(R.drawable.bg_status_bar) - isClickable = true - isFocusable = true - - tv_bus_b1_p_version.text = "版本:${AppUtils.getAppVersionName()}" - } - - - @SuppressLint("ClickableViewAccessibility") - override fun onAttachedToWindow() { - super.onAttachedToWindow() - post { - val params: ViewGroup.LayoutParams = getLayoutParams() - params.height = AutoSizeUtils.dp2px(context,40f) - layoutParams = params - } - //添加view控制 - CallerHmiViewControlListenerManager.addListener(TAG,this) - // 添加换肤监听 - CallerSkinModeListenerManager.addListener(TAG, this) - } - - override fun onSkinModeChange(skinMode: Int) { - when (skinMode) { - 0 -> setStatusBarDarkOrLight(false) - 1 -> setStatusBarDarkOrLight(true) - } - } - - override fun onDetachedFromWindow() { - super.onDetachedFromWindow() - CallerHmiViewControlListenerManager.removeListener(TAG) - CallerSkinModeListenerManager.removeListener(TAG) - CallerDevaToolsManager.hideStatusBar() - } -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/BusPassengerBaseFragment.java b/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/BusPassengerBaseFragment.java deleted file mode 100644 index c6cbf8c23e..0000000000 --- a/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/BusPassengerBaseFragment.java +++ /dev/null @@ -1,155 +0,0 @@ -package com.mogo.och.bus.passenger.ui; - -import android.os.Bundle; -import android.view.LayoutInflater; -import android.view.View; -import android.widget.FrameLayout; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.appcompat.widget.AppCompatImageView; - -import com.mogo.commons.mvp.IView; -import com.mogo.commons.mvp.MvpFragment; -import com.mogo.commons.mvp.Presenter; -import com.mogo.eagle.core.data.multidisplay.TelematicConstant; -import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener; -import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager; -import com.mogo.eagle.core.function.hmi.ui.widget.RomaPassengerView; -import com.mogo.eagle.core.function.view.MapBizView; -import com.mogo.eagle.core.utilcode.util.DeviceUtils; -import com.mogo.och.bus.passenger.R; -import com.mogo.och.common.module.manager.socket.lan.LanSocketManager; -import com.mogo.och.common.module.manager.socket.lan.bean.DPMsgType; - -/** - * Created on 2022/3/31 - *

- * Bus乘客端基础Fragment - */ -public abstract class BusPassengerBaseFragment> extends MvpFragment { - private static final String TAG = BusPassengerBaseFragment.class.getSimpleName(); - - private MapBizView mapBizView; - private FrameLayout flContainer; - private RomaPassengerView romaPView; - - protected AppCompatImageView videoSwitch; - - @Override - protected int getLayoutId() { - return R.layout.bus_p_base_fragment; - } - - @Override - public String getTagName() { - return TAG; - } - - @Override - protected void initViews() { - mapBizView = findViewById(R.id.mapBizView); - videoSwitch = findViewById(R.id.video_switch_iv); - romaPView = findViewById(R.id.romaPView); - if(DeviceUtils.isLeOrEb5Model()){ - romaPView.setVisibility(View.VISIBLE); - }else{ - romaPView.setVisibility(View.GONE); - } - - videoSwitch.setOnClickListener(v -> openOrCloseLiveVideo()); - LanSocketManager.INSTANCE.registerSocketMessageListener(DPMsgType.TYPE_COMMON.getType(),LanSocketManager.INSTANCE.getCommonListener()); - CallerTelematicListenerManager.INSTANCE.addListener(TAG, new IReceivedMsgListener() { - @Override - public void onDemoMode(boolean isDemoMode) { - - } - - @Override - public void onReceivedServerSn(@Nullable String sn) { - - } - - @Override - public void onReceivedMsg(int type, @NonNull byte[] byteArray) { - if (type == TelematicConstant.CONTROL_PASSENGER_DRIVER_MONITOR) { - switch (new String(byteArray)) { - // 乘客端开启漫游 - case "0": { -// mLiveShadow.setVisibility(View.GONE); - goneLiveShadow(); - break; - } - // 乘客端关闭漫游 - case "1": { -// mLiveShadow.setVisibility(View.VISIBLE); - visibleLiveShadow(); - break; - } - } - } - } - }); - - showRouteFragment(); - } - - protected abstract void openOrCloseLiveVideo(); - - protected abstract void goneLiveShadow(); - - protected abstract void visibleLiveShadow(); - - @Override - protected void initViews(Bundle savedInstanceState) { - super.initViews(savedInstanceState); - mapBizView.onCreate(savedInstanceState); - } - - @Override - public void onResume() { - super.onResume(); - mapBizView.onResume(); - } - - @Override - public void onSaveInstanceState(@NonNull Bundle outState) { - super.onSaveInstanceState(outState); - mapBizView.onSaveInstanceState(outState); - } - - @Override - public void onLowMemory() { - super.onLowMemory(); - mapBizView.onLowMemory(); - } - - @Override - public void onPause() { - super.onPause(); - mapBizView.onPause(); - } - - @Override - public void onDestroyView() { - mapBizView.onDestroy(); - CallerTelematicListenerManager.INSTANCE.removeListener(TAG); - LanSocketManager.INSTANCE.unRegisterSocketMessageListener(DPMsgType.TYPE_COMMON.getType(),LanSocketManager.INSTANCE.getCommonListener()); - super.onDestroyView(); - } - - /** - * 获取站点面板view,在{@link #initViews()}时候添加到container中 - * - * @return 站点面板view - */ - public abstract int getStationPanelViewId(); - - /** - * 显示线路信息 - */ - public void showRouteFragment() { - flContainer = findViewById(R.id.bus_p_route_panel); - LayoutInflater.from(getContext()).inflate(getStationPanelViewId(), flContainer); - } -} diff --git a/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java b/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java deleted file mode 100644 index 2582b8433c..0000000000 --- a/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java +++ /dev/null @@ -1,440 +0,0 @@ -package com.mogo.och.bus.passenger.ui; - -import android.annotation.SuppressLint; -import android.content.Context; -import android.graphics.drawable.AnimationDrawable; -import android.os.Bundle; -import android.view.Gravity; -import android.view.LayoutInflater; -import android.view.View; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.appcompat.widget.AppCompatImageView; -import androidx.appcompat.widget.AppCompatTextView; -import androidx.constraintlayout.widget.ConstraintLayout; -import androidx.constraintlayout.widget.Group; -import androidx.recyclerview.widget.RecyclerView; - -import com.amap.api.maps.model.LatLng; -import com.elegant.utils.UiThreadHandler; -import com.mogo.eagle.core.data.enums.SidePattern; -import com.mogo.eagle.core.data.map.MogoLocation; -import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; -import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager; -import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView; -import com.mogo.eagle.core.function.hmi.ui.widget.DriverMonitorView; -import com.mogo.commons.storage.SharedPrefsMgr; -import com.mogo.map.overlay.IMoGoOverlayManager; -import com.mogo.och.bus.passenger.R; -import com.mogo.och.bus.passenger.ui.adapter.BusPassengerLineStationsAdapter; -import com.mogo.och.bus.passenger.constant.BusPassengerConst; -import com.mogo.och.bus.passenger.presenter.BaseBusPassengerPresenter; -import com.mogo.och.bus.passenger.ui.layoutmanager.CenterLayoutManager; -import com.mogo.och.common.module.utils.NumberFormatUtil; -import com.mogo.och.common.module.utils.ResourcesUtils; -import com.mogo.och.common.module.wigets.MarqueeTextView; -import com.mogo.och.common.module.wigets.OCHGradientTextView; -import com.mogo.och.data.bean.BusStationBean; -import com.mogo.och.common.module.wigets.mapdirectionview.MapDirectionView; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author: wangmingjun - * @date: 2022/4/12 - */ -public class BusPassengerRouteFragment extends - BusPassengerBaseFragment implements MapAndLiveVideoView.ChangeItemListener { - - public static final String TAG = "BusPassengerRouteFragment"; - - private final List mStationsList = new ArrayList<>(); - - private OCHGradientTextView mSpeedTv; - private ConstraintLayout mNoLineInfoView; - private MarqueeTextView mLineName; - private Group mRouteInfoView; - private RecyclerView mStationsListRv; - private MapDirectionView mMapDirectionView; - private BusPassengerLineStationsAdapter mAdapter; - private TextView emptyTv; - private AppCompatImageView mAutopilotIv; - private AppCompatTextView mCurrentArriveStation; - private AppCompatTextView mCurrentArriveStationTitle; - private AppCompatTextView mCurrentArriveTip; - private AppCompatImageView mSpeakArrivedIv; - - private View busPDriverMonitorView; - private DriverMonitorView driverMonitorView; - private ConstraintLayout indicatorView; - private View mapIndicator; - private View liveIndicator; - - private MapAndLiveVideoView mapAndLiveVideoView; - List views = new ArrayList<>(); - - @Override - public int getStationPanelViewId() { - return R.layout.bus_p_route_fragment; - } - - @NonNull - @Override - protected BaseBusPassengerPresenter createPresenter() { - return new BaseBusPassengerPresenter(this); - } - - @Override - protected void initViews() { - super.initViews(); - - mSpeedTv = findViewById(R.id.bus_p_speed_tv); - mSpeedTv.setVertrial(true); - mSpeedTv.setmColorList(new int[]{ResourcesUtils.getColor(R.color.bus_p_speed_color_start), - ResourcesUtils.getColor(R.color.bus_p_speed_color_end)}); - - mNoLineInfoView =findViewById(R.id.bus_p_no_order_data_view); - emptyTv = findViewById(R.id.no_order_data_tv); - - mLineName = findViewById(R.id.bus_p_line_name_tv); - mAutopilotIv = findViewById(R.id.auto_status_iv); - mCurrentArriveStation = findViewById(R.id.bus_p_cur_station_name); - mCurrentArriveStationTitle = findViewById(R.id.bus_p_cur_station_title); - mCurrentArriveTip = findViewById(R.id.bus_p_cur_station_tip); - mSpeakArrivedIv = findViewById(R.id.speak_arrived_iv); - - mRouteInfoView = findViewById(R.id.bus_p_line_cl); - mStationsListRv = findViewById(R.id.bus_p_line_stations_rl); - - CenterLayoutManager manager = new CenterLayoutManager(getContext()); - mStationsListRv.setLayoutManager(manager); - mAdapter = new BusPassengerLineStationsAdapter(getContext(), mStationsList); - mStationsListRv.setAdapter(mAdapter); - - indicatorView = findViewById(R.id.busIndicatorView); - mapIndicator = findViewById(R.id.firstIndicator); - liveIndicator = findViewById(R.id.secondIndicator); - - busPDriverMonitorView = LayoutInflater.from(getContext()) - .inflate(R.layout.bus_p_driver_monitor_view,null); - - driverMonitorView = busPDriverMonitorView.findViewById(R.id.buDriverMonitorView); - driverMonitorView.setLiveListener(new DriverMonitorView.LiveListener() { - @Override - public void onPlayError() { - goneLiveShadow(); - } - }); - - mSpeedTv.setOnLongClickListener(new View.OnLongClickListener() { - @Override - public boolean onLongClick(View v) { - Context context = getContext(); - if(context!=null){ - ToggleDebugView.Companion. - getToggleDebugView().toggle(context, Gravity.RIGHT, SidePattern.RIGHT); - } - return true; - } - }); - - mapAndLiveVideoView = findViewById(R.id.mapAndLiveVideoView); - - initLiveView(); - } - - private void initLiveView() { - views.add(new View(getContext()));// 其实是空的,真正小地图还在fragment里 - views.add(busPDriverMonitorView); - mapAndLiveVideoView.setData(views); - mapAndLiveVideoView.setVisibility(View.GONE); - indicatorView.setVisibility(View.GONE); - } - - - @SuppressLint("UseCompatLoadingForDrawables") - @Override - public void changeToItem(int position) { -// (position == 0): 空view 地图占位 (position == 1) :live video - if (position == 0){ - mapIndicator.setBackground(getContext().getDrawable(R.drawable.indicator_selected_bg)); - liveIndicator.setBackground(getContext().getDrawable(R.drawable.indicator_unselected_bg)); - }else { - mapIndicator.setBackground(getContext().getDrawable(R.drawable.indicator_unselected_bg)); - liveIndicator.setBackground(getContext().getDrawable(R.drawable.indicator_selected_bg)); - } - mMapDirectionView.setVisibility(position == 0? View.VISIBLE:View.GONE); - } - - public void updateDriverSn(String sn) { - // TODO 这是测试方法,直播源为公司,凤坤旁的F车机 - //if (driverMonitorView.isSOPDriverSn("F803EB2046PZD00164")){ - if (driverMonitorView.isSOPDriverSn(sn)){ - visibleLiveShadow(); - }else { - goneLiveShadow(); - } - } - - @Override - protected void openOrCloseLiveVideo() { - if (videoSwitch.isSelected()){ - driverMonitorView.stopLive(); - videoSwitch.setSelected(false); - }else { - driverMonitorView.startLive(); - videoSwitch.setSelected(true); - mapAndLiveVideoView.changeToSecondView(); - } - mapAndLiveVideoView.setItemChangeListener(videoSwitch.isSelected()? this:null); - mapAndLiveVideoView.setVisibility(videoSwitch.isSelected()? View.VISIBLE : View.GONE); - indicatorView.setVisibility(videoSwitch.isSelected() ? View.VISIBLE : View.GONE); - mMapDirectionView.setVisibility(videoSwitch.isSelected() ? View.GONE : View.VISIBLE); - mapIndicator.setBackground(getContext().getDrawable(R.drawable.indicator_unselected_bg)); - liveIndicator.setBackground(getContext().getDrawable(R.drawable.indicator_selected_bg)); - } - - @Override - protected void goneLiveShadow() { - videoSwitch.setVisibility(View.GONE); -// driverMonitorView.setVisibility(View.GONE); - indicatorView.setVisibility(View.GONE); - } - - @Override - protected void visibleLiveShadow() { - videoSwitch.setVisibility(View.VISIBLE); - } - - @Override - protected void initViews(Bundle savedInstanceState) { - super.initViews(savedInstanceState); - mMapDirectionView = findViewById(R.id.busPLineMapView); - mMapDirectionView.onCreateView(savedInstanceState); - - } - - @Override - public void onResume() { - super.onResume(); - if (mMapDirectionView != null) { - mMapDirectionView.onResume(); - } - } - - @Override - public void onPause() { - super.onPause(); - if (mMapDirectionView != null) { - mMapDirectionView.onPause(); - } - } - - @Override - public void onDestroyView() { - IMoGoOverlayManager overlayManager = CallerMapUIServiceManager.INSTANCE.getOverlayManager(); - if(overlayManager!=null) { - overlayManager.removeAllLines(); - overlayManager.removeAllPoints(); - } - - super.onDestroyView(); - } - - @Override - public void onDestroy() { - super.onDestroy(); - if (mMapDirectionView != null) { - mMapDirectionView.onDestroy(); - } - } - - public void clearMapView() { - if (mMapDirectionView != null) { - mMapDirectionView.clearMapView(); - } - } - - public void clearMapMarkers() { - if (mMapDirectionView != null) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - mMapDirectionView.clearLineMarkers(); - } - }); - } - } - - public void changeOperationStatus(boolean status) { - if (!status) { - emptyTv.setText(getString(R.string.bus_p_no_out)); - mNoLineInfoView.setVisibility(View.VISIBLE); - mRouteInfoView.setVisibility(View.GONE); - mLineName.setText(getContext().getString(R.string.bus_p_no_line)); - updateArrivedStation(null,0,true); - clearMapView(); - clearMapMarkers(); - } - } - - public void showNoTaskView(){ - if (mNoLineInfoView.getVisibility() == View.GONE){ - mNoLineInfoView.setVisibility(View.VISIBLE); - mRouteInfoView.setVisibility(View.GONE); - mLineName.setText(getContext().getString(R.string.bus_p_no_line)); - updateArrivedStation(null,0,true); - clearMapView(); - clearMapMarkers(); - } - emptyTv.setText(getString(R.string.bus_p_no_task)); - } - - public void hideNoTaskView(){ - if (mNoLineInfoView.getVisibility() == View.VISIBLE){ - mNoLineInfoView.setVisibility(View.GONE); - } - if (mRouteInfoView.getVisibility() == View.GONE){ - mRouteInfoView.setVisibility(View.VISIBLE); - } - } - - public void updateLineInfo(String lineName, String lineDurTime) { - mLineName.setText(lineName); -// mOperationTime.setText(lineDurTime); - } - - /** - * - * @param stations - * @param currentStationIndex - * @param isArrived 是否到站并离开,true 到达当前站 currentStationIndex 未离开, false 正在前往此站 currentStationIndex - */ - public void updateStationsInfo(List stations, int currentStationIndex, boolean isArrived) { - updateArrivedStation(stations.get(currentStationIndex).getName(),currentStationIndex,isArrived); - mStationsList.clear(); - mStationsList.addAll(stations); - mAdapter.notifyDataSetChanged(); - - if (currentStationIndex > -1){ - updateCurrentStation(currentStationIndex); - } - - if (currentStationIndex == 0 && isArrived){ //到达始发站且并未出发, 恢复站点marker 清楚路径 清空路径点 - SharedPrefsMgr.getInstance().remove(BusPassengerConst.BUS_SP_KEY_ORDER_SUM_DIS); - clearMapView(); - } - - if (stations.size() > 0){ - updateWayPointList(stations,currentStationIndex); - } - } - - private void updateWayPointList(List stations,int currentStationIndex) { - List mLineStationsList = new ArrayList<>(); - for (int i = 0; i< stations.size(); i++) {//站点集合 - LatLng latLng = new LatLng(stations.get(i).getGcjLat(),stations.get(i).getGcjLon());// lat,lon - mLineStationsList.add(latLng); - } - - if (mMapDirectionView != null) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - mMapDirectionView.setLinePointMarkerAndDraw(mLineStationsList,currentStationIndex); - } - }); - } - } - - public void onCarLocationChanged(float speed) { - int speedKM = (int) (Math.abs(speed) * 3.6F); - mSpeedTv.setText(String.valueOf(speedKM)); - } - - public void updateCurrentStation(int position) { - if (mStationsListRv != null){ - mStationsListRv.smoothScrollToPosition(position); - } - } - - public void updateArrivedStation(String station,int currentIndex,boolean isArrived){ - if (null == station){ - mCurrentArriveStation.setText("----"); - mCurrentArriveStationTitle.setText(ResourcesUtils.getString(R.string.bus_p_cur_station_title)); - mCurrentArriveTip.setText(ResourcesUtils.getString(R.string.bus_p_cur_station_arrived_tip)); - mCurrentArriveTip.setBackgroundResource(R.drawable.cur_station_arrived_bg); - handleArrivingSpeakIconDrawable(); - }else { - mCurrentArriveStation.setText(station); - if (currentIndex == 0){ - mCurrentArriveStationTitle.setText(ResourcesUtils.getString(R.string.bus_p_cur_station_title)); - mCurrentArriveTip.setText(ResourcesUtils.getString(R.string.bus_p_cur_station_arrived_tip)); - mCurrentArriveTip.setBackgroundResource(R.drawable.cur_station_arrived_bg); - handleArrivingSpeakIconDrawable(); - return; - } - if (isArrived){ - mCurrentArriveStationTitle.setText(ResourcesUtils.getString(R.string.bus_p_cur_station_title)); - mCurrentArriveTip.setText(ResourcesUtils.getString(R.string.bus_p_cur_station_arrived_tip)); - mCurrentArriveTip.setBackgroundResource(R.drawable.cur_station_arrived_bg); - handleArrivedSpeakIconDrawable(); - }else { - mCurrentArriveStationTitle.setText(ResourcesUtils.getString(R.string.bus_p_cur_next_station_title)); - mCurrentArriveTip.setBackgroundResource(R.drawable.cur_station_un_arrived_bg); - handleArrivingSpeakIconDrawable(); - } - } - - } - - private void handleArrivedSpeakIconDrawable(){ - AnimationDrawable animationDrawable = (AnimationDrawable) mSpeakArrivedIv.getDrawable(); - animationDrawable.start(); - mSpeakArrivedIv.setVisibility(View.VISIBLE); - } - - private void handleArrivingSpeakIconDrawable(){ - AnimationDrawable animationDrawable = (AnimationDrawable) mSpeakArrivedIv.getDrawable(); - animationDrawable.stop(); - mSpeakArrivedIv.setVisibility(View.GONE); - } - - public void updateRoutePlanningToNextStation(long meters, long timeInSecond){ - //更新进度条 - String dis = "0"; - String disUnit = "公里"; - if (meters > 0){ - if (meters / 1000 < 1){ - disUnit = "米"; - dis = String.valueOf(Math.round(meters)); - }else { - disUnit = "公里"; - dis = NumberFormatUtil.formatLong((double)meters / 1000); - } - } -// String strHtml2 = "距离 " + "" + dis + "" + " "+disUnit+"" -// + "   剩余 " + "" + (int)Math.ceil((double)timeInSecond/ 60f) + "" + " 分钟"; - String str = dis+disUnit+" | "+(int)Math.ceil((double)timeInSecond/ 60f)+"分钟"; - mCurrentArriveTip.setText(str); - } - - public void onAutopilotStatusChanged(boolean isInAutopilot) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - AutopilotStatusChanged(isInAutopilot); - } - }); - } - - public void AutopilotStatusChanged(boolean isInAutopilot) { - if (isInAutopilot) { - mAutopilotIv.setImageResource(R.drawable.auto_open); - } else { - mAutopilotIv.setImageResource(R.drawable.auto_close); - } - } -} diff --git a/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/BusPassengerTrafficLightView.kt b/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/BusPassengerTrafficLightView.kt deleted file mode 100644 index 13f3a349df..0000000000 --- a/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/BusPassengerTrafficLightView.kt +++ /dev/null @@ -1,181 +0,0 @@ -package com.mogo.och.bus.passenger.ui - -import android.content.Context -import android.util.AttributeSet -import android.view.LayoutInflater -import android.widget.LinearLayout -import com.mogo.eagle.core.data.enums.DataSourceType -import com.mogo.eagle.core.data.enums.TrafficLightEnum -import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTrafficLightListener -import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager -import com.mogo.eagle.core.utilcode.util.UiThreadHandler -import com.mogo.och.bus.passenger.R -import kotlinx.android.synthetic.main.bus_p_traffic_light_view.view.bus_p_traffic_light_bg -import kotlinx.android.synthetic.main.bus_p_traffic_light_view.view.bus_p_traffic_light_iv -import kotlinx.android.synthetic.main.bus_p_traffic_light_view.view.bus_p_traffic_light_time_tv - -/** - * bus乘客端:红绿灯view - * - * Created on 2022/3/14 - */ -class BusPassengerTrafficLightView @JvmOverloads constructor( - context: Context?, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : LinearLayout(context, attrs, defStyleAttr), IMoGoTrafficLightListener { - - companion object { - private const val TAG = "BusPassengerTrafficLightView" - } - - private var mCurrentLightId = TrafficLightEnum.BLACK - - init { - init(context) - } - - private fun init(context: Context?) { - LayoutInflater.from(context).inflate(R.layout.bus_p_traffic_light_view, this, true) - } - - override fun onAttachedToWindow() { - super.onAttachedToWindow() - CallerTrafficLightListenerManager.addListener(TAG, this) - } - - override fun onDetachedFromWindow() { - super.onDetachedFromWindow() - CallerTrafficLightListenerManager.removeListener(TAG) - } - - /** - * 展示红绿灯预警 - * - * @param checkLightId 0-都是默认,1-红,2-黄,3-绿 - * @param lightSource 1:云端下发;2:自车感知 - */ - override fun showTrafficLight(checkLightId: TrafficLightEnum, lightSource: DataSourceType) { - super.showTrafficLight(checkLightId, lightSource) - mCurrentLightId = checkLightId - updateTrafficLightIcon(checkLightId) - } - - /** - * 关闭红绿灯预警展示,并重制灯态 - */ - override fun disableTrafficLight() { - super.disableTrafficLight() - UiThreadHandler.post { - mCurrentLightId = TrafficLightEnum.BLACK - this@BusPassengerTrafficLightView.visibility = GONE - } - } - - /** - * @param redNum 红灯倒计时 - * @param yellowNum 黄灯倒计时 - * @param greenNum 绿灯倒计时 - */ - override fun changeCountdownTrafficLightNum(redNum: Int, yellowNum: Int, greenNum: Int) { - super.changeCountdownTrafficLightNum(redNum, yellowNum, greenNum) - resetView() - when (mCurrentLightId) { - TrafficLightEnum.RED -> changeCountdownRed(redNum) - TrafficLightEnum.YELLOW -> changeCountdownYellow(yellowNum) - TrafficLightEnum.GREEN -> changeCountdownGreen(greenNum) - else -> UiThreadHandler.post { bus_p_traffic_light_time_tv.text = "" } - } - } - - override fun changeCountdownRed(redNum: Int) { - super.changeCountdownRed(redNum) - UiThreadHandler.post { - if (redNum > 0) { - resetView() - bus_p_traffic_light_time_tv.text = redNum.toString() - } else { - disableTrafficLightCountDown() - bus_p_traffic_light_time_tv.text = "" - } - } - } - - override fun changeCountdownGreen(greenNum: Int) { - super.changeCountdownGreen(greenNum) - UiThreadHandler.post { - if (greenNum > 0) { - resetView() - bus_p_traffic_light_time_tv.text = greenNum.toString() - } else { - disableTrafficLightCountDown() - bus_p_traffic_light_time_tv.text = "" - } - } - } - - override fun changeCountdownYellow(yellowNum: Int) { - super.changeCountdownYellow(yellowNum) - UiThreadHandler.post { - if (yellowNum > 0) { - resetView() - bus_p_traffic_light_time_tv.text = yellowNum.toString() - } else { - disableTrafficLightCountDown() - bus_p_traffic_light_time_tv.text = "" - } - } - } - - /** - * 更新红绿灯icon - * - * @param lightId 0-都是默认,1-红,2-黄,3-绿 - */ - private fun updateTrafficLightIcon(lightId: TrafficLightEnum) { - UiThreadHandler.post { - when (lightId) { - TrafficLightEnum.RED -> { - bus_p_traffic_light_iv.setBackgroundResource(R.drawable.bus_p_light_red_nor) - this@BusPassengerTrafficLightView.visibility = VISIBLE - } - TrafficLightEnum.YELLOW -> { - bus_p_traffic_light_iv.setBackgroundResource(R.drawable.bus_p_light_yellow_nor) - this@BusPassengerTrafficLightView.visibility = VISIBLE - } - TrafficLightEnum.GREEN -> { - bus_p_traffic_light_iv.setBackgroundResource(R.drawable.bus_p_light_green_nor) - this@BusPassengerTrafficLightView.visibility = VISIBLE - } - else -> this@BusPassengerTrafficLightView.visibility = GONE - } - } - } - - override fun disableTrafficLightCountDown() { - super.disableTrafficLightCountDown() - UiThreadHandler.post { - val layoutParams = layoutParams - if (layoutParams is MarginLayoutParams) { - val lp = layoutParams - lp.width = resources.getDimension(R.dimen.bus_p_traffic_light_icon_size).toInt() - setLayoutParams(lp) - bus_p_traffic_light_time_tv.visibility = GONE - bus_p_traffic_light_bg.layoutParams.width = - resources.getDimension(R.dimen.dp_90).toInt() - } - } - } - - private fun resetView() { - val layoutParams = layoutParams - if (layoutParams is MarginLayoutParams) { - val lp = layoutParams - lp.width = resources.getDimension(R.dimen.bus_p_route_traffic_light_view_width).toInt() - setLayoutParams(lp) - bus_p_traffic_light_time_tv.visibility = VISIBLE - bus_p_traffic_light_bg.layoutParams.width = - resources.getDimension(R.dimen.bus_p_traffic_light_bg_width).toInt() - } - } -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/MapAndLiveVideoView.kt b/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/MapAndLiveVideoView.kt deleted file mode 100644 index 4dc64518f8..0000000000 --- a/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/MapAndLiveVideoView.kt +++ /dev/null @@ -1,137 +0,0 @@ -package com.mogo.och.bus.passenger.ui - -import android.content.Context -import android.util.AttributeSet -import android.view.View -import android.widget.RelativeLayout -import androidx.viewpager.widget.PagerAdapter -import androidx.viewpager.widget.ViewPager -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger -import com.mogo.och.bus.passenger.ui.MapAndLiveVideoView.Companion.TAG - -/** - * @author: wangmingjun - * @date: 2023/5/9 - */ - -class MapAndLiveVideoView @JvmOverloads constructor( - context: Context, attrs: AttributeSet? = null -) : RelativeLayout(context, attrs), ViewPager.OnPageChangeListener { - - private var viewPager: ViewPager? = null - private var pagerAdapter: AdvancePagerAdapter? = null - private var changeItemListener: ChangeItemListener? = null - - companion object { - const val TAG = "MapAndLiveVideoView" - } - - init { - initView() - } - - private fun initView() { - viewPager = ViewPager(context) - pagerAdapter = AdvancePagerAdapter() - viewPager?.adapter = pagerAdapter - - addView(viewPager, LayoutParams(-1, -1)) - - viewPager?.addOnPageChangeListener(this) - } - - fun setData(list: MutableList) { - pagerAdapter?.setData(list) - pagerAdapter?.notifyDataSetChanged() - } - - fun setItemChangeListener(listener: ChangeItemListener?) { - changeItemListener = listener - } - - fun changeToSecondView() { - if (viewPager?.currentItem == 0) { - startPosition = 0 - } - viewPager?.currentItem = 1 - } - - override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) { - CallerLogger.d(TAG, "onPageScrolled--position = $position") - } - - override fun onPageSelected(position: Int) { - CallerLogger.d(TAG, "onPageSelected--position = $position") - } - - var startPosition = 1 - override fun onPageScrollStateChanged(state: Int) { - CallerLogger.d(TAG, "onPageScrollStateChanged--state = $state") - viewPager?.let { - val position = it.currentItem - if (state == 0) { //静止 - if (startPosition == position) { - if (position == 0) { - it.currentItem = 1 - } else { - it.currentItem = 0 - } - } else { - changeItemListener?.changeToItem(it.currentItem) - } - } else if (state == 1) { // 开始滑动 - startPosition = it.currentItem - } else { - - } - } - } - - interface ChangeItemListener { - fun changeToItem(position: Int) - } -} - -class AdvancePagerAdapter : PagerAdapter(), - ViewPager.OnPageChangeListener { - private var views: List? = null - - fun setData(views: List?) { - this.views = views - } - - override fun instantiateItem(container: View, position: Int): Any { - CallerLogger.d(TAG, "instantiateItem--position = $position") - return try { - val currentItem = position % views!!.size - (container as ViewPager).addView(views!![currentItem]) - views!![currentItem] - } catch (e: Exception) { - container - } - } - - override fun getCount(): Int { - return if (views == null) { - 0 - } else { - views!!.size - } - } - - override fun isViewFromObject(arg0: View, arg1: Any): Boolean { - return arg0 === arg1 - } - - override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) { -// CallerLogger.d(TAG, "onPageScrolled--position = $position") - } - - override fun onPageSelected(position: Int) { -// CallerLogger.d(TAG, "onPageSelected--position = $position") - } - - override fun onPageScrollStateChanged(state: Int) { -// CallerLogger.d(TAG, "onPageScrollStateChanged--state = $state") - } -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/adapter/BusPassengerLineStationsAdapter.java b/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/adapter/BusPassengerLineStationsAdapter.java deleted file mode 100644 index cf4298c31a..0000000000 --- a/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/adapter/BusPassengerLineStationsAdapter.java +++ /dev/null @@ -1,141 +0,0 @@ -package com.mogo.och.bus.passenger.ui.adapter; - -import static com.mogo.och.bus.passenger.constant.BusPassengerConst.STATION_STATUS_ARRIVING; -import static com.mogo.och.bus.passenger.constant.BusPassengerConst.STATION_STATUS_LEAVING; -import static com.mogo.och.bus.passenger.constant.BusPassengerConst.STATION_STATUS_STOPPED; - -import android.content.Context; -import android.text.TextUtils; -import android.util.Log; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ImageView; - -import androidx.annotation.NonNull; -import androidx.recyclerview.widget.RecyclerView; - -import com.mogo.och.bus.passenger.R; -import com.mogo.och.common.module.utils.BlinkAnimationUtil; -import com.mogo.och.common.module.wigets.MarqueeTextView; -import com.mogo.och.data.bean.BusStationBean; - -import java.util.List; - -/** - * @author: wangmingjun - * @date: 2022/4/6 - */ -public class BusPassengerLineStationsAdapter extends RecyclerView.Adapter { - - private Context mContext; - private List mStations; - - public BusPassengerLineStationsAdapter(Context context, List stations){ - this.mContext = context; - this.mStations = stations; - } - - @NonNull - @Override - public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { - View view = LayoutInflater.from(mContext).inflate(R.layout.bus_p_stations_common_item,parent,false); - StationViewHolder viewHolder = new StationViewHolder(view); - return viewHolder; - } - - @Override - public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { - BusStationBean station = mStations.get(position); - StationViewHolder viewHolder = (StationViewHolder)holder; - viewHolder.stationName.setText(station.getName()); - BlinkAnimationUtil.clearAnimation(viewHolder.stationCircle); - if (position == 0){ //第一个 起点 - viewHolder.curArrowBg.setVisibility(View.GONE); - viewHolder.curArrowBottomBg.setVisibility(View.VISIBLE); - Log.d("onBindViewHolder" , "position0 = "+position); - viewHolder.stationCircle.setImageResource(R.drawable.bg_bus_p_start_tag_bg); - if (station.getDrivingStatus() == STATION_STATUS_STOPPED && !station.isLeaving()){//到达未离开 - viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_clock_17417B)); - BlinkAnimationUtil.setAnimation(viewHolder.stationCircle); - viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.MARQUEE); - viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_1F82FB)); - }else { - viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_clock_992D3E5F)); - viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.END); - viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_A9B6CA)); - } - }else{ - viewHolder.curArrowBg.setVisibility(View.VISIBLE); - viewHolder.curArrowBottomBg.setVisibility(View.VISIBLE); - BusStationBean preStation = mStations.get(position -1); - if (station.getDrivingStatus() == STATION_STATUS_LEAVING || - (station.getDrivingStatus() == STATION_STATUS_STOPPED && station.isLeaving())){ //过站 - viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_clock_992D3E5F)); - viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_A9B6CA)); - viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_A9B6CA)); - viewHolder.stationCircle.setImageResource(R.drawable.bus_p_point_gray); - viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.END); - Log.d("onBindViewHolder" , "position 1 = "+position); - } else if (station.getDrivingStatus() == STATION_STATUS_STOPPED && !station.isLeaving()){//刚到站未离开的 - viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_clock_17417B)); - viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_A9B6CA)); - viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_1F82FB)); - viewHolder.stationCircle.setImageResource(R.drawable.bus_p_arrive_line_green); - if (position == mStations.size() - 1){ - viewHolder.stationCircle.setImageResource(R.drawable.bg_bus_p_end_tag_bg); - viewHolder.curArrowBottomBg.setVisibility(View.GONE); - } - Log.d("onBindViewHolder" , "position2 = "+position); - BlinkAnimationUtil.setAnimation(viewHolder.stationCircle); - viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.MARQUEE); - }else if (station.getDrivingStatus() == STATION_STATUS_ARRIVING && preStation.isLeaving()){//即将到站 - viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_panel_cur_station_tips_color)); - viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_A9B6CA)); - viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_1F82FB)); - viewHolder.stationCircle.setImageResource(R.drawable.bus_p_arrive_line_blue); - Log.d("onBindViewHolder" , "position3 = "+position); - - if (position == mStations.size() - 1){ - viewHolder.curArrowBottomBg.setVisibility(View.GONE); - } - - }else if (station.getDrivingStatus() == STATION_STATUS_ARRIVING && - (preStation.getDrivingStatus() == STATION_STATUS_ARRIVING - || preStation.getDrivingStatus() == STATION_STATUS_STOPPED)){ //未到站的并且前面也是未到站或者刚到站的 - viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.bus_p_panel_cur_station_tips_color)); - viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_1F82FB)); - viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.bus_p_clock_1F82FB)); - viewHolder.stationCircle.setImageResource(R.drawable.bus_p_point_blue); - viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.END); - - if (position == mStations.size() - 1){ - viewHolder.stationCircle.setImageResource(R.drawable.bg_bus_p_end_tag_bg); - viewHolder.curArrowBottomBg.setVisibility(View.GONE); - } - Log.d("onBindViewHolder" , "position4 = "+position); - } - } - } - - @Override - public int getItemCount() { - return mStations.size(); - } -} - -class StationViewHolder extends RecyclerView.ViewHolder{ - public MarqueeTextView stationName; - public ImageView stationCircle; - public ImageView curArrowBg; - public ImageView curArrowBottomBg; - public StationViewHolder(@NonNull View itemView) { - super(itemView); - stationName = itemView.findViewById(R.id.bus_p_station); - stationCircle = itemView.findViewById(R.id.bus_p_circle); - curArrowBg = itemView.findViewById(R.id.bus_p_cur_arrow_bg); - curArrowBottomBg = itemView.findViewById(R.id.bus_p_cur_arrow_bottom_bg); - } -} - - diff --git a/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/layoutmanager/CenterLayoutManager.java b/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/layoutmanager/CenterLayoutManager.java deleted file mode 100644 index 42210cbcaf..0000000000 --- a/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/layoutmanager/CenterLayoutManager.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.mogo.och.bus.passenger.ui.layoutmanager; - -import android.content.Context; -import android.util.AttributeSet; - -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.LinearSmoothScroller; -import androidx.recyclerview.widget.RecyclerView; - -public class CenterLayoutManager extends LinearLayoutManager { - public CenterLayoutManager(Context context) { - super(context); - } - - public CenterLayoutManager(Context context, int orientation, boolean reverseLayout) { - super(context, orientation, reverseLayout); - } - - public CenterLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { - super(context, attrs, defStyleAttr, defStyleRes); - } - - @Override - public void smoothScrollToPosition(RecyclerView recyclerView, RecyclerView.State state, int position) { - RecyclerView.SmoothScroller smoothScroller = new CenterSmoothScroller(recyclerView.getContext()); - smoothScroller.setTargetPosition(position); - startSmoothScroll(smoothScroller); - } - - private static class CenterSmoothScroller extends LinearSmoothScroller { - - CenterSmoothScroller(Context context) { - super(context); - } - - @Override - public int calculateDtToFit(int viewStart, int viewEnd, int boxStart, int boxEnd, int snapPreference) { - return (boxStart + (boxEnd - boxStart) / 2) - (viewStart + (viewEnd - viewStart) / 2); - } - } - -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/widget/BusPTurnLightView.kt b/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/widget/BusPTurnLightView.kt deleted file mode 100644 index a822623d22..0000000000 --- a/OCH/bus/passenger/src/main/java/jinlv/com/mogo/och/bus/passenger/ui/widget/BusPTurnLightView.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.mogo.och.bus.passenger.ui.widget - -import android.content.Context -import android.util.AttributeSet -import com.mogo.eagle.core.function.hmi.ui.vehicle.TurnLightViewStatus - -/** - * @author: wangmingjun - * @date: 2023/2/13 - */ -class BusPTurnLightView @JvmOverloads constructor( - context: Context, attrs: AttributeSet? = null -) : TurnLightViewStatus(context, attrs) { - - -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/callback/ADASCallback.kt b/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/callback/ADASCallback.kt deleted file mode 100644 index 02c13b7666..0000000000 --- a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/callback/ADASCallback.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.mogo.och.bus.passenger.passenger.callback - -/** - * @author: wangmingjun - * @date: 2023/2/15 - */ -interface ADASCallback { - fun updateHDMapStations(stations: MutableList>) - fun removeHDMapStations() -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/constant/M2Const.kt b/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/constant/M2Const.kt deleted file mode 100644 index 102a792310..0000000000 --- a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/constant/M2Const.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.mogo.och.bus.passenger.passenger.constant - -/** - * Created on 2021/12/6 - */ -class M2Const { - companion object { - //站点UUID - const val M2_MAP_STATION_MAKER = "m2_map_station_maker" - - /** - * Marker类型 - */ - const val TYPE_MARKER_M2_LINE = "TYPE_MARKER_M2_LINE" - } -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/model/PM2ADASModel.kt b/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/model/PM2ADASModel.kt deleted file mode 100644 index 92f2916c6f..0000000000 --- a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/model/PM2ADASModel.kt +++ /dev/null @@ -1,45 +0,0 @@ -package com.mogo.och.bus.passenger.passenger.model - -import android.content.Context -import com.mogo.och.bus.passenger.passenger.callback.ADASCallback -import com.mogo.och.data.bean.BusStationBean - -/** - * @author: wangmingjun - * @date: 2023/2/2 - */ -class PM2ADASModel private constructor() { - - private var mContext: Context? = null - private var mAdasCallback: ADASCallback? = null - - companion object { - val TAG = PM2ADASModel::class.java.simpleName - val INSTANCE: PM2ADASModel by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) { - PM2ADASModel() - } - } - - fun init(context : Context){ - this.mContext = context - } - - fun setAdasCallback(adasCallback: ADASCallback?){ - this.mAdasCallback = adasCallback - } - - fun updateHDMapStations(stations: MutableList){ - var stationsList = mutableListOf>() - for (i in stations.indices){ - var listLatLng = mutableListOf() // 0: long 1:lat - listLatLng.add(stations[i].lon) - listLatLng.add(stations[i].lat) - stationsList.add(listLatLng) - } - mAdasCallback?.updateHDMapStations(stationsList) - } - - fun removeHDMapStations(){ - mAdasCallback?.removeHDMapStations() - } -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/presenter/PM2ADASPresenter.kt b/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/presenter/PM2ADASPresenter.kt deleted file mode 100644 index 92ab97f630..0000000000 --- a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/presenter/PM2ADASPresenter.kt +++ /dev/null @@ -1,41 +0,0 @@ -package com.mogo.och.bus.passenger.passenger.presenter - -import androidx.lifecycle.LifecycleOwner -import com.mogo.commons.mvp.Presenter -import com.mogo.och.bus.passenger.passenger.callback.ADASCallback -import com.mogo.och.bus.passenger.passenger.constant.M2Const.Companion.M2_MAP_STATION_MAKER -import com.mogo.och.bus.passenger.passenger.model.PM2ADASModel -import com.mogo.och.bus.passenger.passenger.ui.PM2HPMapFragment - -class PM2ADASPresenter(view: PM2HPMapFragment?) : - Presenter(view), ADASCallback { - - init { - PM2ADASModel.INSTANCE.init(context) - initListener() - } - - private fun initListener() { - PM2ADASModel.INSTANCE.setAdasCallback(this) - } - - private fun removeListener() { - PM2ADASModel.INSTANCE.setAdasCallback(null) - } - - override fun onDestroy(owner: LifecycleOwner) { - super.onDestroy(owner) - removeListener() - } - - override fun updateHDMapStations(stations: MutableList>) { - for (i in stations.indices){ - mView?.setMapMaker(M2_MAP_STATION_MAKER+i,stations[i]) - } - - } - - override fun removeHDMapStations() { - mView?.removeMapMaker(M2_MAP_STATION_MAKER) - } -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/presenter/PM2DrivingPresenter.kt b/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/presenter/PM2DrivingPresenter.kt deleted file mode 100644 index d85d3de46d..0000000000 --- a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/presenter/PM2DrivingPresenter.kt +++ /dev/null @@ -1,131 +0,0 @@ -package com.mogo.och.bus.passenger.passenger.presenter - -import androidx.lifecycle.LifecycleOwner -import com.amap.api.maps.model.LatLng -import com.mogo.commons.mvp.Presenter -import com.mogo.eagle.core.utilcode.util.ThreadUtils -import com.mogo.och.bus.passenger.callback.IAutopilotStatusCallback -import com.mogo.och.bus.passenger.callback.ISpeedCallback -import com.mogo.och.bus.passenger.callback.IDrivingInfoCallback -import com.mogo.och.bus.passenger.model.OrderModel -import com.mogo.och.bus.passenger.passenger.model.PM2ADASModel -import com.mogo.och.bus.passenger.passenger.ui.PM2DrivingInfoFragment -import com.mogo.och.data.bean.BusStationBean - -class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) : - Presenter(view), IDrivingInfoCallback, IAutopilotStatusCallback, - ISpeedCallback { - - init { - OrderModel.init(context) - PM2ADASModel.INSTANCE.init(context) - initListener() - } - - override fun onDestroy(owner: LifecycleOwner) { - super.onDestroy(owner) - destroyListener() - OrderModel.releaseListeners() - } - - private fun initListener(){ - OrderModel.setDrivingInfoCallback(this) - OrderModel.setSpeedCallback(this) - OrderModel.setADASStatusCallback(this) - } - - private fun destroyListener(){ - OrderModel.setDrivingInfoCallback(null) - OrderModel.setSpeedCallback(null) - OrderModel.setADASStatusCallback(null) - } - - override fun updateLine(lineName: String, lineDuring: String) { - ThreadUtils.runOnUiThread { - mView?.updateTaskName(lineName) - mView?.updateTaskDuringTime(lineDuring) - } - } - - override fun updateRemainMT(meters: Long, timeInSecond: Long) { - ThreadUtils.runOnUiThread { - mView?.updateRemainMT(meters, timeInSecond) //米,秒 - } - } - - override fun changeOperationStatus(loginStatus: Boolean) { - ThreadUtils.runOnUiThread { - mView?.changeOperationStatus(loginStatus) - } - } - - override fun showNoTaskView() { - PM2ADASModel.INSTANCE.removeHDMapStations() - ThreadUtils.runOnUiThread { - mView?.showNoTaskView() - } - } - - override fun hideNoTaskView() { - - } - - private fun updateLineStations(stations: MutableList) { - - val stationsList = mutableListOf() - val stationsListPass = mutableListOf() - var startStation: LatLng? = null - var endStation: LatLng? = null - - for (i in stations.indices){ - val station = stations[i] - val latLng = LatLng(station.gcjLat,station.gcjLon) - if(i==0){ - startStation = latLng - continue - } - if(i==stations.size-1){ - endStation = latLng - continue - } - if(station.drivingStatus==1){//行驶信息,0初始值;1已经过;2当前站;3未到站 - stationsListPass.add(latLng) - }else if(station.drivingStatus==2){ - if(station.isLeaving){ - stationsListPass.add(latLng) - }else{ - stationsList.add(latLng) - } - }else{ - stationsList.add(latLng) - } - - } - - ThreadUtils.runOnUiThread { - mView?.updateLineStations(stationsList,stationsListPass,startStation,endStation) - } - PM2ADASModel.INSTANCE.updateHDMapStations(stations) - } - - override fun updateStationsInfo(stations: MutableList, currentStationIndex: Int, isArrived: Boolean) { - ThreadUtils.runOnUiThread { - mView?.updateStationsInfo(stations,currentStationIndex,isArrived) - } - updateLineStations(stations) - } - - override fun updateAutoStatus(isOpen: Boolean) { - ThreadUtils.runOnUiThread { - mView?.updateAutoStatus(isOpen) - } - } - - override fun onCarLocationChanged(speed: Float) { - val speedKM: Int = (Math.abs(speed) * 3.6f).toInt() - ThreadUtils.runOnUiThread { - mView?.updateSpeed(speedKM) - } - } - -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/presenter/PM2Presenter.kt b/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/presenter/PM2Presenter.kt deleted file mode 100644 index b614c3458b..0000000000 --- a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/presenter/PM2Presenter.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.mogo.och.bus.passenger.passenger.presenter - -import com.mogo.commons.mvp.Presenter -import com.mogo.och.bus.passenger.passenger.ui.PM2BaseFragment - -class PM2Presenter(view: PM2BaseFragment?) : - Presenter(view) \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/PM2BaseFragment.kt b/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/PM2BaseFragment.kt deleted file mode 100644 index e906a9dcad..0000000000 --- a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/PM2BaseFragment.kt +++ /dev/null @@ -1,60 +0,0 @@ -package com.mogo.och.bus.passenger.passenger.ui - -import com.mogo.commons.mvp.MvpFragment -import com.mogo.eagle.core.utilcode.util.AppUtils -import com.mogo.och.bus.passenger.R -import com.mogo.och.bus.passenger.passenger.presenter.PM2Presenter -import com.mogo.och.common.module.wigets.media.MediaPlayerFragment -import kotlinx.android.synthetic.main.bus_p_m2_fragment.tv_bug_b2_p_version - -/** - * @author: wangmingjun - * @date: 2022/4/12 - */ -class PM2BaseFragment : - MvpFragment() { - - private var drivingFragment : PM2DrivingInfoFragment? = null - private var hdMapFragment : PM2HPMapFragment? = null - private var mediaFragment : MediaPlayerFragment? = null - - override fun getLayoutId(): Int { - return R.layout.bus_p_m2_fragment - } - - override fun getTagName(): String { - return TAG - } - - override fun initViews() { - tv_bug_b2_p_version.text = "版本:${AppUtils.getAppVersionName()}" - //隐藏小地图 - initFragment() - } - - /** - * 初始化行程信息,高静地图,宣传 三个fragment - */ - private fun initFragment() { - - if (drivingFragment == null) drivingFragment = PM2DrivingInfoFragment() - childFragmentManager.beginTransaction().add(R.id.driving_fragment, drivingFragment!!) - .show(drivingFragment!!).commitAllowingStateLoss() - - if (hdMapFragment == null) hdMapFragment = PM2HPMapFragment() - childFragmentManager.beginTransaction().add(R.id.hd_map_fragment, hdMapFragment!!) - .show(hdMapFragment!!).commitAllowingStateLoss() - - if (mediaFragment == null) mediaFragment = MediaPlayerFragment() - childFragmentManager.beginTransaction().add(R.id.video_fragment, mediaFragment!!) - .show(mediaFragment!!).commitAllowingStateLoss() - } - - override fun createPresenter(): PM2Presenter { - return PM2Presenter(this) - } - - companion object { - val TAG = PM2BaseFragment::class.java.simpleName - } -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/PM2DrivingInfoFragment.kt b/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/PM2DrivingInfoFragment.kt deleted file mode 100644 index fbc4a1686a..0000000000 --- a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/PM2DrivingInfoFragment.kt +++ /dev/null @@ -1,292 +0,0 @@ -package com.mogo.och.bus.passenger.passenger.ui - -import android.graphics.BitmapFactory -import android.graphics.drawable.AnimationDrawable -import android.os.Bundle -import android.view.View -import androidx.core.content.ContextCompat -import com.amap.api.maps.model.LatLng -import com.mogo.commons.AbsMogoApplication -import com.mogo.commons.mvp.MvpFragment -import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView -import com.mogo.eagle.core.function.view.SiteMarkerBean -import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider -import com.mogo.och.bus.passenger.R -import com.mogo.och.bus.passenger.passenger.presenter.PM2DrivingPresenter -import com.mogo.och.common.module.utils.DateTimeUtil.* -import com.mogo.och.common.module.utils.NumberFormatUtil -import com.mogo.och.common.module.utils.ResourcesUtils -import com.mogo.och.data.bean.BusStationBean -import kotlinx.android.synthetic.main.bus_p_m2_driving_info_fragment.auto_tv -import kotlinx.android.synthetic.main.bus_p_m2_driving_info_fragment.clg_distance_left_time -import kotlinx.android.synthetic.main.bus_p_m2_driving_info_fragment.group_not_select_line -import kotlinx.android.synthetic.main.bus_p_m2_driving_info_fragment.group_stationinfo -import kotlinx.android.synthetic.main.bus_p_m2_driving_info_fragment.iv_animal_list -import kotlinx.android.synthetic.main.bus_p_m2_driving_info_fragment.line_during_tv -import kotlinx.android.synthetic.main.bus_p_m2_driving_info_fragment.line_name_tv -import kotlinx.android.synthetic.main.bus_p_m2_driving_info_fragment.overMapView -import kotlinx.android.synthetic.main.bus_p_m2_driving_info_fragment.speed_tv -import kotlinx.android.synthetic.main.bus_p_m2_driving_info_fragment.station_name_tv -import kotlinx.android.synthetic.main.bus_p_m2_driving_info_fragment.tv_arrived_notice -import kotlinx.android.synthetic.main.bus_p_m2_driving_info_fragment.tv_distance -import kotlinx.android.synthetic.main.bus_p_m2_driving_info_fragment.tv_left_time -import kotlinx.android.synthetic.main.bus_p_m2_driving_info_fragment.tv_next_station_title - -import me.jessyan.autosize.utils.AutoSizeUtils -import kotlin.math.ceil -import kotlin.math.roundToInt - -/** - * @author: wangmingjun - * @date: 2022/4/12 - */ -class PM2DrivingInfoFragment : - MvpFragment() { - - val stationIcon = BitmapFactory.decodeResource(AbsMogoApplication.getApp().resources, R.drawable.bus_p_m2_map_staton_icon) - val stationPassIcon = BitmapFactory.decodeResource(AbsMogoApplication.getApp().resources, R.drawable.bus_p_m2_map_staton_arrived_icon) - val startStationIcon = BitmapFactory.decodeResource(AbsMogoApplication.getApp().resources, R.drawable.bus_p_m2_map_start_icon) - val endStationIcon = BitmapFactory.decodeResource(AbsMogoApplication.getApp().resources, R.drawable.bus_p_m2_map_end_icon) - - /** - * 改变自动驾驶状态 - * - * @param status 2 - running 1 - enable 2 - disable - */ - override fun getLayoutId(): Int { - return R.layout.bus_p_m2_driving_info_fragment - } - - override fun getTagName(): String { - return TAG - } - - override fun initViews() { - speed_tv.setOnLongClickListener { - context?.let { ToggleDebugView.toggleDebugView.toggle(it) } - true - } - - line_name_tv.setTextColor(ResourcesUtils.getColor(R.color.bus_p_m2_line_name_tv_color)) - station_name_tv.setTextColor(ResourcesUtils.getColor(R.color.bus_p_m2_line_name_tv_color)) - speed_tv.setVertrial(true) - val intArrayOf = intArrayOf( - ResourcesUtils.getColor(R.color.bus_p_m2_color_43cefe), - ResourcesUtils.getColor(R.color.bus_p_m2_color_1466fb) - ) - speed_tv.setmColorList(intArrayOf) - -// current_time_tv.onClick { - -// //测试V2X消息 -// CallerMsgBoxManager.saveMsgBox( -// MsgBoxBean( -// MsgBoxType.V2X, -// V2XMsg( -// "6666", -// "超速行驶", -// "" -// ) -// ) -// ) -// -// val noticeTrafficStylePushData = NoticeTrafficStylePushData() -// noticeTrafficStylePushData.content= "测试公告布局" -// val noticeFromCloudMsg = NoticeFrCloudMsg(null, noticeTrafficStylePushData, 1) -// CallerMsgBoxManager.saveMsgBox( -// MsgBoxBean( -// MsgBoxType.NOTICE, noticeFromCloudMsg) -// ) -// BPRouteDataTestUtils.converToRouteData() -// } - } - - override fun initViews(savedInstanceState: Bundle?) { - super.initViews(savedInstanceState) - overMapView?.let { - it.onCreateView(savedInstanceState) - val radius = AutoSizeUtils.dp2px(requireContext(), 16f) - it.outlineProvider = TextureVideoViewOutlineProvider(radius.toFloat()) - it.clipToOutline = true - } - } - - override fun onResume() { - super.onResume() - overMapView?.let{ - it.onResume() - } - } - - override fun onPause() { - super.onPause() - overMapView?.let{ - it.onPause() - } - } - - override fun onDestroyView() { - overMapView?.let{ - it.onDestroy() - } - super.onDestroyView() - - } - - fun updateSpeed(speed: Int){ - speed_tv.text = speed.toString() - } - - fun updateTaskName(name: String){ - line_name_tv.text = name - } - - fun updateTaskDuringTime(time : String){ - line_during_tv.text = time - } - - fun changeOperationStatus(status:Boolean){ - if (!status){ - showNoTaskView() - clearCustomPolyline() - } - } - - fun showNoTaskView(){ - line_name_tv.text = ResourcesUtils.getString(R.string.bus_p_m2_not_select_line_content) - updateNoStationView() - overMapView?.let { - it.clearSiteMarkers() - } - clearCustomPolyline() - } - - fun clearCustomPolyline(){ - overMapView?.let { - it.clearCustomPolyline() - } - } - private fun updateNoStationView(){ - station_name_tv.setTextColor(ResourcesUtils.getColor(R.color.bus_p_m2_next_tv_color)) - station_name_tv.text = ResourcesUtils.getString(R.string.bus_p_m2_empty_tv) - tv_distance.text = ResourcesUtils.getString(R.string.bus_p_m2_empty_remain_km) - tv_left_time.text = ResourcesUtils.getString(R.string.bus_p_m2_empty_remain_minute) - noLineShow() - } - - override fun createPresenter(): PM2DrivingPresenter { - return PM2DrivingPresenter(this) - } - - fun updateAutoStatus(isAutoPilot: Boolean) { - if (isAutoPilot){ - context?.let { auto_tv.setTextColor(ContextCompat.getColor(it,R.color.bus_p_m2_white_color)) } - context?.let { auto_tv.background = ContextCompat.getDrawable(it,R.drawable.bus_p_m2_auto_button_bg) } - }else{ - context?.let { auto_tv.setTextColor(ContextCompat.getColor(it,R.color.bus_p_m2_color_7094ad)) } - context?.let { auto_tv.background = ContextCompat.getDrawable(it,R.drawable.bus_p_m2_bg_p_m2_auto) } - } - } - - fun updateLineStations( - stations: MutableList, - stationsPass: MutableList, - startStation: LatLng?, - endStation: LatLng? - ){ - overMapView?.let { - val stationsList: MutableList = mutableListOf() - startStation?.let { start-> - stationsList.add(SiteMarkerBean(start,startStationIcon,0.5f,0.5f)) - } - for (stationsPass in stationsPass) { - stationsList.add(SiteMarkerBean(stationsPass,stationPassIcon,0.5f,0.5f)) - } - for (stationsPass in stations) { - stationsList.add(SiteMarkerBean(stationsPass,stationIcon,0.5f,0.5f)) - } - endStation?.let {end-> - stationsList.add(SiteMarkerBean(end,endStationIcon,0.5f,0.5f)) - } - it.drawSiteMarkers(stationsList) - } - } - - fun updateStationsInfo(stations: MutableList, currentStationIndex: Int, isArrived: Boolean){ - if (stations.size == 0) return - if (0<= currentStationIndex && currentStationIndex 0) { - if (meters / 1000 < 1) { - disUnit = "米" - remainDis = meters.toFloat().roundToInt().toString() - } else { - disUnit = "公里" - remainDis = NumberFormatUtil.formatLong(meters.toDouble() / 1000) - } - } - - val time = ceil(timeInSecond / 60f).toInt() - - "$remainDis$disUnit".also { tv_distance.text = it } - "${time}分钟".also { tv_left_time.text = it } - } - - fun noLineShow(){ - // 没有线路展示 - group_not_select_line.visibility = View.VISIBLE - // 下一个站点 - group_stationinfo.visibility = View.GONE - // 距离和剩余大概时间 - clg_distance_left_time.visibility = View.GONE - // 到达站点 - tv_arrived_notice.visibility = View.GONE - - iv_animal_list.visibility = View.GONE - } - // 有线路正在到站点 - fun haveLineAndArriveingStation(){ - group_not_select_line.visibility = View.GONE - group_stationinfo.visibility = View.VISIBLE - clg_distance_left_time.visibility = View.VISIBLE - tv_arrived_notice.visibility = View.GONE - iv_animal_list.visibility = View.GONE - } - // 有线路到达站点 - private fun haveLineAndArrivedStation(){ - group_not_select_line.visibility = View.GONE - group_stationinfo.visibility = View.VISIBLE - clg_distance_left_time.visibility = View.GONE - tv_arrived_notice.visibility = View.VISIBLE - iv_animal_list.visibility = View.VISIBLE - val animationDrawable = iv_animal_list.drawable as AnimationDrawable - animationDrawable.start() - } - - companion object { - private val TAG = PM2DrivingInfoFragment::class.java.simpleName - } -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/PM2HPMapFragment.kt b/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/PM2HPMapFragment.kt deleted file mode 100644 index a3c9cc0390..0000000000 --- a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/PM2HPMapFragment.kt +++ /dev/null @@ -1,132 +0,0 @@ -package com.mogo.och.bus.passenger.passenger.ui - -import android.os.Bundle -import com.mogo.commons.mvp.MvpFragment -import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager -import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager.getOverlayManager -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d -import com.mogo.map.overlay.core.Level -import com.mogo.map.overlay.point.Point -import com.mogo.map.MapDataWrapper -import com.mogo.och.bus.passenger.R -import com.mogo.och.bus.passenger.passenger.constant.M2Const.Companion.TYPE_MARKER_M2_LINE -import com.mogo.och.bus.passenger.passenger.presenter.PM2ADASPresenter -import com.mogo.och.common.module.utils.OCHThreadPoolManager -import kotlinx.android.synthetic.main.bus_p_m2_hpmap_fragment.mapBizView - -import java.util.* - -/** - * @author: wangmingjun - * @date: 2022/4/12 - */ -class PM2HPMapFragment : - MvpFragment() { - /** - * 改变自动驾驶状态 - * - * @param status 2 - running 1 - enable 2 - disable - */ - override fun getLayoutId(): Int { - return R.layout.bus_p_m2_hpmap_fragment - } - - override fun getTagName(): String { - return TAG - } - - override fun initViews() { - } - - override fun initViews(savedInstanceState: Bundle?) { - super.initViews(savedInstanceState) - mapBizView.onCreate(savedInstanceState) - } - - override fun onResume() { - super.onResume() - mapBizView.onResume() - } - - override fun onLowMemory() { - super.onLowMemory() - mapBizView.onLowMemory() - } - - override fun onSaveInstanceState(outState: Bundle) { - super.onSaveInstanceState(outState) - mapBizView.onSaveInstanceState(outState) - } - - override fun onPause() { - super.onPause() - mapBizView.onPause() - } - - override fun onDestroyView() { - mapBizView.onDestroy() - CallerMapUIServiceManager.getOverlayManager()?.let { - it.removeAllLines() - it.removeAllPoints() - } - super.onDestroyView() - } - - override fun createPresenter(): PM2ADASPresenter { - return PM2ADASPresenter(this) - } - - companion object { - private val TAG = PM2HPMapFragment::class.java.simpleName - } - - fun setMapMaker( - uuid: String, - station: MutableList, - ) { - //开启线程执行起终点marker设置 - val setMapMarkerRunnable = Runnable { - d( - "setMapMaker= " + Thread.currentThread().name, - uuid + "=latitude=" + station[1] + ",longitude=" + station[0] - ) - - val builder = Point.Options.Builder( - TYPE_MARKER_M2_LINE, - Level.MAP_MARKER - ) - .setId(uuid) - .anchor(0.5f, 0.5f) - .set3DMode(true) - .isUseGps(true) - .controlAngle(true) - .icon3DRes(R.raw.star_marker) - .longitude(station[0]) - .latitude(station[1]) - MapDataWrapper.getCenterLineInfo( - station[0], station[1], -1f - ) { - // 有可能鹰眼map为空没有角度。判空使用后可能造成maker角度跟道路角度不一致 地图未初始化会返回空 - it?.let{ - builder.rotate(it.angle.toFloat()) - } - val overlayManager = getOverlayManager() - overlayManager?.showOrUpdatePoint(builder.build()) - } - } - OCHThreadPoolManager.getsInstance().execute(setMapMarkerRunnable) - } - - fun removeMapMaker( - uuid: String, - ) { - //开启线程移除起终点marker设置 - val removeMapMarkerRunnable = Runnable { - d("RemoveMapMaker=" + Thread.currentThread().name, uuid) - val overlayManager = getOverlayManager() - overlayManager?.removeAllPointsInOwner(TYPE_MARKER_M2_LINE) - } - OCHThreadPoolManager.getsInstance().execute(removeMapMarkerRunnable) - } - -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/widget/M2BlueToothView.kt b/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/widget/M2BlueToothView.kt deleted file mode 100644 index 54377e1c4d..0000000000 --- a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/widget/M2BlueToothView.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.mogo.och.bus.passenger.passenger.ui.widget - -import android.content.Context -import android.util.AttributeSet -import android.view.LayoutInflater -import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener -import com.mogo.eagle.core.function.hmi.ui.widget.BlueToothView -import com.mogo.eagle.core.utilcode.util.ThreadUtils -import com.mogo.och.bus.passenger.R -import kotlinx.android.synthetic.main.bus_p_m2_view_blue_tooth.view.blueView - -/** - * 魔戒蓝牙控件 - * 放置于StatusBar右侧位置 - */ -class M2BlueToothView @JvmOverloads constructor( - context: Context, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : BlueToothView(context, attrs, defStyleAttr),IMoGoDevaToolsListener { - - init { - LayoutInflater.from(context).inflate(R.layout.bus_p_m2_view_blue_tooth, this, true) - } - - override fun mofangStatus(status: Boolean) { - ThreadUtils.runOnUiThread { - if (status) { - blueView.setImageResource(R.drawable.bus_p_m2_blue_tooth_close) - } else { - blueView.setImageResource(R.drawable.bus_p_m2_blue_tooth_open) - } - } - } - -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/widget/M2PTrafficLightView.kt b/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/widget/M2PTrafficLightView.kt deleted file mode 100644 index b769b88f7d..0000000000 --- a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/widget/M2PTrafficLightView.kt +++ /dev/null @@ -1,181 +0,0 @@ -package com.mogo.och.bus.passenger.passenger.ui.widget - -import android.content.Context -import android.util.AttributeSet -import android.view.LayoutInflater -import android.widget.LinearLayout -import com.mogo.eagle.core.data.enums.DataSourceType -import com.mogo.eagle.core.data.enums.TrafficLightEnum -import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTrafficLightListener -import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager -import com.mogo.eagle.core.utilcode.util.UiThreadHandler -import com.mogo.och.bus.passenger.R -import kotlinx.android.synthetic.main.bus_p_m2_traffic_light_view.view.m2_p_traffic_light_bg -import kotlinx.android.synthetic.main.bus_p_m2_traffic_light_view.view.m2_p_traffic_light_iv -import kotlinx.android.synthetic.main.bus_p_m2_traffic_light_view.view.m2_p_traffic_light_time_tv - -/** - * bus乘客端:红绿灯view - * - * Created on 2022/3/14 - */ -class M2PTrafficLightView @JvmOverloads constructor( - context: Context?, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : LinearLayout(context, attrs, defStyleAttr), IMoGoTrafficLightListener { - - companion object { - private const val TAG = "M2PTrafficLightView" - } - - private var mCurrentLightId = TrafficLightEnum.BLACK - - init { - init(context) - } - - private fun init(context: Context?) { - LayoutInflater.from(context).inflate(R.layout.bus_p_m2_traffic_light_view, this, true) - } - - override fun onAttachedToWindow() { - super.onAttachedToWindow() - CallerTrafficLightListenerManager.addListener(TAG, this) - } - - override fun onDetachedFromWindow() { - super.onDetachedFromWindow() - CallerTrafficLightListenerManager.removeListener(TAG) - } - - /** - * 展示红绿灯预警 - * - * @param checkLightId 0-都是默认,1-红,2-黄,3-绿 - * @param lightSource 1:云端下发;2:自车感知 - */ - override fun showTrafficLight(checkLightId: TrafficLightEnum, lightSource: DataSourceType) { - super.showTrafficLight(checkLightId, lightSource) - mCurrentLightId = checkLightId - updateTrafficLightIcon(checkLightId) - } - - /** - * 关闭红绿灯预警展示,并重制灯态 - */ - override fun disableTrafficLight() { - super.disableTrafficLight() - UiThreadHandler.post { - mCurrentLightId = TrafficLightEnum.BLACK - this@M2PTrafficLightView.visibility = GONE - } - } - - /** - * @param redNum 红灯倒计时 - * @param yellowNum 黄灯倒计时 - * @param greenNum 绿灯倒计时 - */ - override fun changeCountdownTrafficLightNum(redNum: Int, yellowNum: Int, greenNum: Int) { - super.changeCountdownTrafficLightNum(redNum, yellowNum, greenNum) - resetView() - when (mCurrentLightId) { - TrafficLightEnum.RED -> changeCountdownRed(redNum) - TrafficLightEnum.YELLOW -> changeCountdownYellow(yellowNum) - TrafficLightEnum.GREEN -> changeCountdownGreen(greenNum) - else -> UiThreadHandler.post { m2_p_traffic_light_time_tv.text = "" } - } - } - - override fun changeCountdownRed(redNum: Int) { - super.changeCountdownRed(redNum) - UiThreadHandler.post { - if (redNum > 0) { - resetView() - m2_p_traffic_light_time_tv.text = redNum.toString() - } else { - disableTrafficLightCountDown() - m2_p_traffic_light_time_tv.text = "" - } - } - } - - override fun changeCountdownGreen(greenNum: Int) { - super.changeCountdownGreen(greenNum) - UiThreadHandler.post { - if (greenNum > 0) { - resetView() - m2_p_traffic_light_time_tv.text = greenNum.toString() - } else { - disableTrafficLightCountDown() - m2_p_traffic_light_time_tv.text = "" - } - } - } - - override fun changeCountdownYellow(yellowNum: Int) { - super.changeCountdownYellow(yellowNum) - UiThreadHandler.post { - if (yellowNum > 0) { - resetView() - m2_p_traffic_light_time_tv.text = yellowNum.toString() - } else { - disableTrafficLightCountDown() - m2_p_traffic_light_time_tv.text = "" - } - } - } - - /** - * 更新红绿灯icon - * - * @param lightId 0-都是默认,1-红,2-黄,3-绿 - */ - private fun updateTrafficLightIcon(lightId: TrafficLightEnum) { - UiThreadHandler.post { - when (lightId) { - TrafficLightEnum.RED -> { - m2_p_traffic_light_iv.setBackgroundResource(R.drawable.bus_p_m2_light_red_nor) - this@M2PTrafficLightView.visibility = VISIBLE - } - TrafficLightEnum.YELLOW -> { - m2_p_traffic_light_iv.setBackgroundResource(R.drawable.bus_p_m2_light_yellow_nor) - this@M2PTrafficLightView.visibility = VISIBLE - } - TrafficLightEnum.GREEN -> { - m2_p_traffic_light_iv.setBackgroundResource(R.drawable.bus_p_m2_light_green_nor) - this@M2PTrafficLightView.visibility = VISIBLE - } - else -> this@M2PTrafficLightView.visibility = GONE - } - } - } - - override fun disableTrafficLightCountDown() { - super.disableTrafficLightCountDown() - UiThreadHandler.post { - val layoutParams = layoutParams - if (layoutParams is MarginLayoutParams) { - val lp = layoutParams - lp.width = resources.getDimension(R.dimen.dp_40).toInt() - setLayoutParams(lp) - m2_p_traffic_light_time_tv.visibility = GONE - m2_p_traffic_light_bg.layoutParams.width = - resources.getDimension(R.dimen.dp_40).toInt() - } - } - } - - private fun resetView() { - val layoutParams = layoutParams - if (layoutParams is MarginLayoutParams) { - val lp = layoutParams - lp.width = resources.getDimension(R.dimen.dp_60).toInt() - setLayoutParams(lp) - m2_p_traffic_light_time_tv.visibility = VISIBLE - m2_p_traffic_light_bg.layoutParams.width = - resources.getDimension(R.dimen.dp_60).toInt() - } - } -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/widget/M2StatusBarView.kt b/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/widget/M2StatusBarView.kt deleted file mode 100644 index 2723a07425..0000000000 --- a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/widget/M2StatusBarView.kt +++ /dev/null @@ -1,114 +0,0 @@ -package com.mogo.och.bus.passenger.passenger.ui.widget - -import android.annotation.* -import android.content.Context -import android.graphics.Color -import android.util.AttributeSet -import android.view.LayoutInflater -import android.view.ViewGroup -import androidx.constraintlayout.widget.ConstraintLayout -import chassis.ChassisStatesOuterClass -import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener -import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener -import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener -import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager -import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager -import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager -import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager -import com.mogo.eagle.core.utilcode.kotlin.* -import com.mogo.eagle.core.utilcode.util.ClickUtils -import com.mogo.eagle.core.utilcode.util.ThreadUtils -import com.mogo.och.bus.passenger.R -import kotlinx.android.synthetic.main.bus_p_m2_view_status_bar.view.progress -import kotlinx.android.synthetic.main.bus_p_m2_view_status_bar.view.tv_power_cos -import kotlinx.coroutines.* -import me.jessyan.autosize.utils.AutoSizeUtils - -/** - * @author: wangmingjun - * @date: 2023/2/14 - */ -class M2StatusBarView @JvmOverloads constructor( - context: Context, attrs: AttributeSet? = null -) : ConstraintLayout(context, attrs), IViewControlListener, IMoGoSkinModeChangeListener, - IMoGoChassisStatesListener { - - companion object { - const val TAG = "M2StatusBarView" - } - - @Volatile - private var oldBmsSoc: Float = -1.0f - - init { - LayoutInflater.from(context).inflate(R.layout.bus_p_m2_view_status_bar, this, true) - setBackgroundColor(Color.parseColor("#80FFFFFF")) - isClickable = true - isFocusable = true - } - - - @SuppressLint("ClickableViewAccessibility") - override fun onAttachedToWindow() { - super.onAttachedToWindow() - post { - val params: ViewGroup.LayoutParams = getLayoutParams() - params.height = AutoSizeUtils.dp2px(context,40f) - layoutParams = params - } - //添加view控制 - CallerHmiViewControlListenerManager.addListener(TAG,this) - // 添加换肤监听 - CallerSkinModeListenerManager.addListener(TAG, this) - //电量 - CallerChassisStatesListenerManager.addListener(TAG,this) - - progress?.also { - it.progress = 50 - } - tv_power_cos?.also { - it.text = "50%" - } - } - - override fun onSkinModeChange(skinMode: Int) { - when (skinMode) { - 0 -> setStatusBarDarkOrLight(false) - 1 -> setStatusBarDarkOrLight(true) - } - } - - override fun onDetachedFromWindow() { - super.onDetachedFromWindow() - CallerHmiViewControlListenerManager.removeListener(TAG) - CallerSkinModeListenerManager.removeListener(TAG) - CallerChassisStatesListenerManager.removeListener(TAG) - CallerDevaToolsManager.hideStatusBar() - } - - @SuppressLint("SetTextI18n") - override fun onBatteryManagementSystemStates(states: ChassisStatesOuterClass.BMSSystemStates) { - ThreadUtils.runOnUiThread({ - if (ClickUtils.isClickTooFrequent(this,1000)) { - return@runOnUiThread - } - val bmsSoc = states.bmsSoc - try { - if (oldBmsSoc != bmsSoc ) { - scope.launch { - if(bmsSoc >1){ - progress?.also { it.progress = bmsSoc.toInt() } - tv_power_cos?.also { it.text = "${bmsSoc.toInt()}%" } - }else{ - val power = (bmsSoc * 100).toInt() - progress?.also { it.progress = power } - tv_power_cos?.also {it.text = "$power%" } - } - } - } - } finally { - oldBmsSoc = bmsSoc - } - },ThreadUtils.MODE.QUEUE) - } -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/widget/M2TurnLightView.kt b/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/widget/M2TurnLightView.kt deleted file mode 100644 index d9a73a4289..0000000000 --- a/OCH/bus/passenger/src/main/java/m2/com/mogo/och/bus/passenger/passenger/ui/widget/M2TurnLightView.kt +++ /dev/null @@ -1,197 +0,0 @@ -package com.mogo.och.bus.passenger.passenger.ui.widget - -import android.animation.AnimatorSet -import android.animation.ObjectAnimator -import android.content.Context -import android.util.AttributeSet -import android.view.LayoutInflater -import android.view.View -import android.view.animation.AlphaAnimation -import android.view.animation.Animation -import android.widget.ImageView -import androidx.constraintlayout.widget.ConstraintLayout -import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTurnLightListener -import com.mogo.eagle.core.function.call.v2x.CallerTurnLightListenerManager -import com.mogo.eagle.core.utilcode.util.ThreadUtils -import com.mogo.och.bus.passenger.R -import com.mogo.och.common.module.manager.light.TurnLightManager -import kotlinx.android.synthetic.main.bus_p_m2_turn_light_status.view.left_nor_image -import kotlinx.android.synthetic.main.bus_p_m2_turn_light_status.view.left_select_image -import kotlinx.android.synthetic.main.bus_p_m2_turn_light_status.view.right_nor_image -import kotlinx.android.synthetic.main.bus_p_m2_turn_light_status.view.right_select_image -import kotlinx.android.synthetic.main.bus_p_m2_turn_light_status.view.turn_light_layout - -/** - * @author: wangmingjun - * @date: 2023/2/13 - */ -class M2TurnLightView @JvmOverloads constructor( - context: Context, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : ConstraintLayout(context, attrs, defStyleAttr), - IMoGoTurnLightListener, TurnLightManager.TurnLightListener { - - - companion object { - private const val TAG = "TurnLightViewStatus" - } - - private var isLeftLight: Boolean = false - private var isRightLight: Boolean = false - private var isDisappear: Boolean = false - - init { - LayoutInflater.from(context) - .inflate(R.layout.bus_p_m2_turn_light_status, this, true) - } - - override fun onAttachedToWindow() { - super.onAttachedToWindow() - CallerTurnLightListenerManager.addListener(TAG,this) - TurnLightManager.addTurnLightStatusChangeListener(TAG,this) - } - - override fun onDetachedFromWindow() { - super.onDetachedFromWindow() - CallerTurnLightListenerManager.removeListener(TAG) - TurnLightManager.removeTurnLightStatusChangeListener(TAG) - } - - override fun hideTurnLightView() { - ThreadUtils.runOnUiThread{ - if (!isDisappear) { - isDisappear = true - isLeftLight = false - isRightLight = false - animationDisappear() - } - } - } - - override fun statusChange(newStatus: TurnLightManager.TurnLightStatus) { - ThreadUtils.runOnUiThread { - setTurnLight(newStatus) - } - } - - /** - * 转向灯动画 - */ - private fun setTurnLight(directionLight: TurnLightManager.TurnLightStatus) { - if (!isAttachedToWindow) { - return - } - //根据左右进行显示和隐藏,实际要判断每个来的时间和频度 - when (directionLight) { - TurnLightManager.TurnLightStatus.TURN_LIGHT_LEFT -> { //左转向 - if (!isLeftLight) { - isLeftLight = true - isRightLight = false - isDisappear = false - showNormalAnimation() - left_select_image.visibility = View.VISIBLE - right_select_image.visibility = View.GONE - right_select_image.clearAnimation() - setAnimation(left_select_image) - } - } - TurnLightManager.TurnLightStatus.TURN_LIGHT_RIGHT -> { //右转向 - if (!isRightLight) { - isRightLight = true - isLeftLight = false - isDisappear = false - showNormalAnimation() - left_select_image.visibility = View.GONE - right_select_image.visibility = View.VISIBLE - left_select_image.clearAnimation() - setAnimation(right_select_image) - } - } - TurnLightManager.TurnLightStatus.TURN_LIGHT_NONE -> { //消失 - if (!isDisappear) { - isDisappear = true - isLeftLight = false - isRightLight = false - animationDisappear() - } - } - } - } - - //显示背景 - private fun showNormalAnimation() { - val appearAnimation = AlphaAnimation(0f, 1.0f) - appearAnimation.duration = 300 - val appearAnimationImage = AlphaAnimation(0f, 1.0f) - appearAnimation.duration = 500 - turn_light_layout.startAnimation(appearAnimation) - left_nor_image.startAnimation(appearAnimationImage) - right_nor_image.startAnimation(appearAnimationImage) - - turn_light_layout.visibility = View.VISIBLE - left_nor_image.visibility = View.VISIBLE - right_nor_image.visibility = View.VISIBLE - } - - //消失动画,当转向等数据为空时候 - private fun animationDisappear() { - left_select_image.visibility = View.GONE - right_select_image.visibility = View.GONE - left_select_image.clearAnimation() - right_select_image.clearAnimation() - - left_nor_image.clearAnimation() - right_nor_image.clearAnimation() - turn_light_layout.clearAnimation() - - val disappearAnimationLeft = AlphaAnimation(1.0f, 0f) - disappearAnimationLeft.duration = 300 - - val disappearAnimationBg = AlphaAnimation(1.0f, 0f) - disappearAnimationBg.duration = 500 - - left_nor_image.startAnimation(disappearAnimationLeft) - right_nor_image.startAnimation(disappearAnimationLeft) - turn_light_layout.startAnimation(disappearAnimationBg) - - disappearAnimationLeft.setAnimationListener(object : Animation.AnimationListener { - override fun onAnimationRepeat(p0: Animation?) { - } - - override fun onAnimationStart(p0: Animation?) { - } - - override fun onAnimationEnd(p0: Animation?) { - left_nor_image.visibility = View.GONE - right_nor_image.visibility = View.GONE - } - }) - - disappearAnimationBg.setAnimationListener(object : Animation.AnimationListener { - override fun onAnimationRepeat(p0: Animation?) { - } - - override fun onAnimationStart(p0: Animation?) { - } - - override fun onAnimationEnd(p0: Animation?) { - turn_light_layout.visibility = View.GONE - } - }) - } - - //实现图片闪烁效果 - private fun setAnimation(imageView: ImageView) { - val animationSet = AnimatorSet() - val valueAnimator = ObjectAnimator.ofFloat(imageView, "alpha", 0f, 1.0f) - val valueAnimatorDisappear = ObjectAnimator.ofFloat(imageView, "alpha", 1.0f, 0f) - valueAnimator.duration = 1000 - valueAnimatorDisappear.duration = 800 - valueAnimator.repeatCount = -1 - valueAnimatorDisappear.repeatCount = -1 - animationSet.playTogether(valueAnimatorDisappear, valueAnimator) - animationSet.start() - } - -} \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/auto_close.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/auto_close.png deleted file mode 100644 index bed91e16ee..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/auto_close.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/auto_open.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/auto_open.png deleted file mode 100644 index 8ecc2ca1e9..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/auto_open.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bg_bus_p_arrived_station.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bg_bus_p_arrived_station.png deleted file mode 100644 index f47f628224..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bg_bus_p_arrived_station.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bg_bus_p_end_tag_bg.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bg_bus_p_end_tag_bg.png deleted file mode 100644 index a679341790..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bg_bus_p_end_tag_bg.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bg_bus_p_start_tag_bg.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bg_bus_p_start_tag_bg.png deleted file mode 100644 index c0fcf5d0ea..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bg_bus_p_start_tag_bg.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_line_logo.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_line_logo.png deleted file mode 100644 index 60064ae514..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_line_logo.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_arrive_line_blue.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_arrive_line_blue.png deleted file mode 100644 index 88247c204f..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_arrive_line_blue.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_arrive_line_green.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_arrive_line_green.png deleted file mode 100644 index 0fd2398cfb..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_arrive_line_green.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_arrow_nor.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_arrow_nor.png deleted file mode 100644 index d8d0663d02..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_arrow_nor.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_auto_nor.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_auto_nor.png deleted file mode 100644 index c9daea21c9..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_auto_nor.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_blue_tooth_close.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_blue_tooth_close.png deleted file mode 100644 index 0c292d2cf3..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_blue_tooth_close.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_blue_tooth_open.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_blue_tooth_open.png deleted file mode 100644 index cccf9e10fa..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_blue_tooth_open.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_light_green_nor.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_light_green_nor.png deleted file mode 100644 index 939d5c0214..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_light_green_nor.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_light_red_nor.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_light_red_nor.png deleted file mode 100644 index 97d774140a..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_light_red_nor.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_light_yellow_nor.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_light_yellow_nor.png deleted file mode 100644 index a782062c34..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_light_yellow_nor.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_line_blue.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_line_blue.png deleted file mode 100755 index 233be50bd5..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_line_blue.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_line_green.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_line_green.png deleted file mode 100755 index 902cd19c2f..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_line_green.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_line_grey.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_line_grey.png deleted file mode 100644 index b16a3dd0b8..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_line_grey.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_arrived_point.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_arrived_point.png deleted file mode 100644 index ac317649b4..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_arrived_point.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_arrow_arrived.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_arrow_arrived.png deleted file mode 100644 index fea5cfd033..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_arrow_arrived.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_arrow_un_arrive.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_arrow_un_arrive.png deleted file mode 100644 index 254662d297..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_arrow_un_arrive.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_car.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_car.png deleted file mode 100644 index 702f10f265..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_car.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_end_point.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_end_point.png deleted file mode 100644 index 39262e5ecb..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_end_point.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_start_point.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_start_point.png deleted file mode 100644 index b2e4c69ada..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_start_point.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_unarrived_point.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_unarrived_point.png deleted file mode 100644 index ec6081f5a3..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_map_unarrived_point.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_mogo_nor.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_mogo_nor.png deleted file mode 100755 index 3a779659d3..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_mogo_nor.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_no_order_data.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_no_order_data.png deleted file mode 100755 index 65625ca374..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_no_order_data.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_point_blue.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_point_blue.png deleted file mode 100755 index ef08c49f25..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_point_blue.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_point_gray.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_point_gray.png deleted file mode 100755 index deec63de9d..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_point_gray.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_point_green.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_point_green.png deleted file mode 100755 index 865097cbad..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_point_green.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_right_route_bg.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_right_route_bg.png deleted file mode 100644 index 5d9bf564af..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_right_route_bg.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_route_bg.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_route_bg.png deleted file mode 100644 index b40a4889bf..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_route_bg.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_status_bar_logo.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_status_bar_logo.png deleted file mode 100644 index ffaacad3c6..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_status_bar_logo.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_un_auto_nor.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_un_auto_nor.png deleted file mode 100644 index 528cd4dc66..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_un_auto_nor.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_youzhuan_open.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_youzhuan_open.png deleted file mode 100644 index fb728e515e..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_youzhuan_open.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_youzhuan_un_open.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_youzhuan_un_open.png deleted file mode 100644 index 4de98ca6dd..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_youzhuan_un_open.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_zuozhuan_open.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_zuozhuan_open.png deleted file mode 100644 index 5762da6053..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_zuozhuan_open.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_zuozhuan_un_open.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_zuozhuan_un_open.png deleted file mode 100644 index ae29f98f34..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/bus_p_zuozhuan_un_open.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/card_split_line_bg.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/card_split_line_bg.png deleted file mode 100644 index 2f392c64b6..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/card_split_line_bg.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/cur_station_arrived_bg.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/cur_station_arrived_bg.png deleted file mode 100644 index 355af19afc..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/cur_station_arrived_bg.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/cur_station_un_arrived_bg.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/cur_station_un_arrived_bg.png deleted file mode 100644 index ea4214cf51..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/cur_station_un_arrived_bg.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/icon_video_close.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/icon_video_close.png deleted file mode 100644 index 8cf2c79113..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/icon_video_close.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/icon_video_open.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/icon_video_open.png deleted file mode 100644 index db33b7ae2a..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/icon_video_open.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/live_view_loading_bg.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/live_view_loading_bg.png deleted file mode 100644 index 99f5600926..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/live_view_loading_bg.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/m2_blue_tooth_open.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/m2_blue_tooth_open.png deleted file mode 100644 index cccf9e10fa..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/m2_blue_tooth_open.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/route_line_name_bg.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/route_line_name_bg.png deleted file mode 100644 index a680b6ea18..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/route_line_name_bg.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/speak_arrived_icon_0.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/speak_arrived_icon_0.png deleted file mode 100644 index 24a13e704e..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/speak_arrived_icon_0.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/speak_arrived_icon_1.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/speak_arrived_icon_1.png deleted file mode 100644 index c15a70a3ee..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/speak_arrived_icon_1.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/speak_arrived_icon_2.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/speak_arrived_icon_2.png deleted file mode 100644 index 8c1c118673..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/speak_arrived_icon_2.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/station_arrow.png b/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/station_arrow.png deleted file mode 100644 index 114c7a2ba7..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable-nodpi/station_arrow.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable/bg_bus_p_end_station_circle.xml b/OCH/bus/passenger/src/main/res/jinlv/drawable/bg_bus_p_end_station_circle.xml deleted file mode 100644 index 528233f84c..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/drawable/bg_bus_p_end_station_circle.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable/bg_bus_p_middle_station_circle.xml b/OCH/bus/passenger/src/main/res/jinlv/drawable/bg_bus_p_middle_station_circle.xml deleted file mode 100644 index 4dca66c4fe..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/drawable/bg_bus_p_middle_station_circle.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable/bg_bus_p_start_station_circle.xml b/OCH/bus/passenger/src/main/res/jinlv/drawable/bg_bus_p_start_station_circle.xml deleted file mode 100644 index 97458b6d07..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/drawable/bg_bus_p_start_station_circle.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable/bg_bus_p_traffic_light_background.xml b/OCH/bus/passenger/src/main/res/jinlv/drawable/bg_bus_p_traffic_light_background.xml deleted file mode 100644 index 6382b0256a..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/drawable/bg_bus_p_traffic_light_background.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable/bg_p_speak_icon_arrived.xml b/OCH/bus/passenger/src/main/res/jinlv/drawable/bg_p_speak_icon_arrived.xml deleted file mode 100644 index a007c6d711..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/drawable/bg_p_speak_icon_arrived.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable/bg_status_bar.xml b/OCH/bus/passenger/src/main/res/jinlv/drawable/bg_status_bar.xml deleted file mode 100644 index 6bc804de4e..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/drawable/bg_status_bar.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable/bottom_radius_bg.xml b/OCH/bus/passenger/src/main/res/jinlv/drawable/bottom_radius_bg.xml deleted file mode 100644 index 8153865510..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/drawable/bottom_radius_bg.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable/brakelight_background_daytime.xml b/OCH/bus/passenger/src/main/res/jinlv/drawable/brakelight_background_daytime.xml deleted file mode 100644 index 6409baca2f..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/drawable/brakelight_background_daytime.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable/bus_p_dividing_line_bg.xml b/OCH/bus/passenger/src/main/res/jinlv/drawable/bus_p_dividing_line_bg.xml deleted file mode 100644 index d5d41809d0..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/drawable/bus_p_dividing_line_bg.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable/bus_p_panel_cur_station_panel.xml b/OCH/bus/passenger/src/main/res/jinlv/drawable/bus_p_panel_cur_station_panel.xml deleted file mode 100644 index 9cc2472376..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/drawable/bus_p_panel_cur_station_panel.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable/bus_p_roma_checked.png b/OCH/bus/passenger/src/main/res/jinlv/drawable/bus_p_roma_checked.png deleted file mode 100644 index 7377fd23a7..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable/bus_p_roma_checked.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable/bus_p_roma_normal.png b/OCH/bus/passenger/src/main/res/jinlv/drawable/bus_p_roma_normal.png deleted file mode 100644 index 38e78514d9..0000000000 Binary files a/OCH/bus/passenger/src/main/res/jinlv/drawable/bus_p_roma_normal.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable/bus_progress_bar_bg.xml b/OCH/bus/passenger/src/main/res/jinlv/drawable/bus_progress_bar_bg.xml deleted file mode 100644 index aa1eeaecd0..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/drawable/bus_progress_bar_bg.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable/indicator_select.xml b/OCH/bus/passenger/src/main/res/jinlv/drawable/indicator_select.xml deleted file mode 100644 index 85d784f55d..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/drawable/indicator_select.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable/indicator_unselect.xml b/OCH/bus/passenger/src/main/res/jinlv/drawable/indicator_unselect.xml deleted file mode 100644 index 8de50ed358..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/drawable/indicator_unselect.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable/progress_item_round.xml b/OCH/bus/passenger/src/main/res/jinlv/drawable/progress_item_round.xml deleted file mode 100644 index 2d74f8fd54..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/drawable/progress_item_round.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable/roma_bus_p_bg_selector.xml b/OCH/bus/passenger/src/main/res/jinlv/drawable/roma_bus_p_bg_selector.xml deleted file mode 100644 index 96080c5b58..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/drawable/roma_bus_p_bg_selector.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/drawable/video_btn_selector.xml b/OCH/bus/passenger/src/main/res/jinlv/drawable/video_btn_selector.xml deleted file mode 100755 index eaa4ae264e..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/drawable/video_btn_selector.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_base_fragment.xml b/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_base_fragment.xml deleted file mode 100644 index d62656ad1e..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_base_fragment.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_driver_monitor_view.xml b/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_driver_monitor_view.xml deleted file mode 100644 index 738b29af84..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_driver_monitor_view.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_map_view.xml b/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_map_view.xml deleted file mode 100644 index 0fa596993e..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_map_view.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_no_data_common_view.xml b/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_no_data_common_view.xml deleted file mode 100644 index 9b12f4f268..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_no_data_common_view.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_route_fragment.xml b/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_route_fragment.xml deleted file mode 100644 index 44589aa303..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_route_fragment.xml +++ /dev/null @@ -1,325 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_stations_common_item.xml b/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_stations_common_item.xml deleted file mode 100644 index 8fceb19365..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_stations_common_item.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_traffic_light_view.xml b/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_traffic_light_view.xml deleted file mode 100644 index 5a0db32bc0..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/layout/bus_p_traffic_light_view.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/layout/p_bus_view_blue_tooth.xml b/OCH/bus/passenger/src/main/res/jinlv/layout/p_bus_view_blue_tooth.xml deleted file mode 100644 index 69ae14c394..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/layout/p_bus_view_blue_tooth.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/layout/p_bus_view_status_bar.xml b/OCH/bus/passenger/src/main/res/jinlv/layout/p_bus_view_status_bar.xml deleted file mode 100644 index 53ff040e93..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/layout/p_bus_view_status_bar.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/layout/view_turn_light_status_daytime.xml b/OCH/bus/passenger/src/main/res/jinlv/layout/view_turn_light_status_daytime.xml deleted file mode 100644 index f206e99831..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/layout/view_turn_light_status_daytime.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/values/dimens.xml b/OCH/bus/passenger/src/main/res/jinlv/values/dimens.xml deleted file mode 100644 index 69a4111088..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/values/dimens.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - 750dp - 804dp - 40dp - 40dp - 48dp - 40dp - 110dp - 224dp - 422dp - 3dp - - 158dp - 90dp - 45dp - 158dp - 90dp - 45dp - 90dp - 90dp - 3dp - - 224dp - 50dp - 50dp - 34dp - 130dp - 38dp - - 38dp - - 90dp - 27dp - - 4dp - 10dp - 20dp - 60dp - 30dp - 20dp - 50dp - 6dp - 38dp - 36dp - 80dp - 100dp - 80dp - 60dp - 6dp - - 685dp - 309dp - 50dp - 10dp - 44dp - 55dp - 40dp - - 584dp - 550dp - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/jinlv/values/strings.xml b/OCH/bus/passenger/src/main/res/jinlv/values/strings.xml deleted file mode 100644 index df17efbd02..0000000000 --- a/OCH/bus/passenger/src/main/res/jinlv/values/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - KM/H - 您已收车 - 暂无班次 - 暂无线路 - - - 已到站: - 前方到站: - - 请按秩序下车 - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_amap_arrived_road.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_amap_arrived_road.png deleted file mode 100644 index f4d80f4cc7..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_amap_arrived_road.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_amap_arriving_road.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_amap_arriving_road.png deleted file mode 100644 index a9aae488fb..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_amap_arriving_road.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_amap_custom_corner.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_amap_custom_corner.png deleted file mode 100644 index 6f0795edaf..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_amap_custom_corner.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_arrived_an_0.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_arrived_an_0.png deleted file mode 100644 index 62ed7bb92d..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_arrived_an_0.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_arrived_an_1.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_arrived_an_1.png deleted file mode 100644 index 34f7c0e1f2..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_arrived_an_1.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_arrived_an_2.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_arrived_an_2.png deleted file mode 100644 index 8b4b214814..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_arrived_an_2.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_auto_button_bg.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_auto_button_bg.png deleted file mode 100644 index fb4ddc5279..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_auto_button_bg.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_bg_driving_info_image.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_bg_driving_info_image.png deleted file mode 100644 index a829d5b88d..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_bg_driving_info_image.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_blue_tooth_close.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_blue_tooth_close.png deleted file mode 100644 index 0c292d2cf3..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_blue_tooth_close.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_blue_tooth_open.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_blue_tooth_open.png deleted file mode 100644 index cccf9e10fa..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_blue_tooth_open.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_bottom_bg.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_bottom_bg.png deleted file mode 100644 index cec9275411..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_bottom_bg.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_card_split.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_card_split.png deleted file mode 100644 index 5446226be7..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_card_split.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_clock_bg.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_clock_bg.png deleted file mode 100644 index a380c3f3b7..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_clock_bg.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_img_drive_bg.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_img_drive_bg.png deleted file mode 100644 index 7412ab3c90..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_img_drive_bg.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_img_line_bg.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_img_line_bg.png deleted file mode 100644 index dd78f6fc9e..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_img_line_bg.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_img_time_bg.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_img_time_bg.png deleted file mode 100644 index ba735834b6..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_img_time_bg.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_light_green_nor.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_light_green_nor.png deleted file mode 100644 index 3135524a79..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_light_green_nor.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_light_red_nor.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_light_red_nor.png deleted file mode 100644 index e873c2b85e..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_light_red_nor.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_light_yellow_nor.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_light_yellow_nor.png deleted file mode 100644 index 8046782601..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_light_yellow_nor.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_lightyellow_nor.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_lightyellow_nor.png deleted file mode 100644 index bae01408fd..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_lightyellow_nor.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_line_name.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_line_name.png deleted file mode 100644 index beed2f2ad2..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_line_name.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_line_noselect.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_line_noselect.png deleted file mode 100644 index bda5e1d105..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_line_noselect.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_line_tile.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_line_tile.png deleted file mode 100644 index 44070336fa..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_line_tile.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_map_car_icon.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_map_car_icon.png deleted file mode 100644 index b9c841cc83..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_map_car_icon.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_map_end_icon.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_map_end_icon.png deleted file mode 100644 index 39ffc9052f..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_map_end_icon.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_map_start_icon.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_map_start_icon.png deleted file mode 100644 index c970699aac..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_map_start_icon.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_map_staton_arrived_icon.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_map_staton_arrived_icon.png deleted file mode 100644 index 39be18953c..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_map_staton_arrived_icon.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_map_staton_icon.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_map_staton_icon.png deleted file mode 100644 index d90c5a2b71..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_map_staton_icon.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_p_video_holder.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_p_video_holder.png deleted file mode 100644 index d8c5951e43..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_p_video_holder.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_sky_bg.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_sky_bg.png deleted file mode 100644 index 7b72c07390..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_sky_bg.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_status_bar_logo.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_status_bar_logo.png deleted file mode 100644 index 1f6ea692f5..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_status_bar_logo.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_video_bottom_left.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_video_bottom_left.png deleted file mode 100644 index 5e1fb2c752..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_video_bottom_left.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_video_bottom_right.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_video_bottom_right.png deleted file mode 100644 index 19ae887a57..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_video_bottom_right.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_video_top_left.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_video_top_left.png deleted file mode 100644 index 3fb0a40ce3..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_video_top_left.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_video_top_right.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_video_top_right.png deleted file mode 100644 index dbc80b2254..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_video_top_right.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_youzhuan_open.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_youzhuan_open.png deleted file mode 100644 index bbd2c12d90..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_youzhuan_open.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_youzhuan_un_open.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_youzhuan_un_open.png deleted file mode 100644 index 7c0dcaabe1..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_youzhuan_un_open.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_zuozhuan_open.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_zuozhuan_open.png deleted file mode 100644 index 9bbda22cb7..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_zuozhuan_open.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_zuozhuan_un_open.png b/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_zuozhuan_un_open.png deleted file mode 100644 index 7c33fddbd9..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/drawable-nodpi/bus_p_m2_zuozhuan_un_open.png and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_driving_arrived_notice.xml b/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_driving_arrived_notice.xml deleted file mode 100644 index f9fea1ec61..0000000000 --- a/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_driving_arrived_notice.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_driving_distance_lefttime.xml b/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_driving_distance_lefttime.xml deleted file mode 100644 index 75670794d2..0000000000 --- a/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_driving_distance_lefttime.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_driving_info.xml b/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_driving_info.xml deleted file mode 100644 index b99cfe6efd..0000000000 --- a/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_driving_info.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_driving_selector.xml b/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_driving_selector.xml deleted file mode 100644 index 21a6524032..0000000000 --- a/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_driving_selector.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_p_m2_arrived_station.xml b/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_p_m2_arrived_station.xml deleted file mode 100644 index 1824c74bbf..0000000000 --- a/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_p_m2_arrived_station.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_p_m2_auto.xml b/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_p_m2_auto.xml deleted file mode 100644 index 0c40c7ee4b..0000000000 --- a/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_p_m2_auto.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_p_m2_traffic_light.xml b/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_p_m2_traffic_light.xml deleted file mode 100644 index 5a27da20e0..0000000000 --- a/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_p_m2_traffic_light.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_pnc.xml b/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_pnc.xml deleted file mode 100644 index cf40e4a77b..0000000000 --- a/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_bg_pnc.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_brakelight_background_daytime.xml b/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_brakelight_background_daytime.xml deleted file mode 100644 index 42320a2531..0000000000 --- a/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_brakelight_background_daytime.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_power_seekbar_style.xml b/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_power_seekbar_style.xml deleted file mode 100644 index 3ac0c761ba..0000000000 --- a/OCH/bus/passenger/src/main/res/m2/drawable/bus_p_m2_power_seekbar_style.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_driving_info_fragment.xml b/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_driving_info_fragment.xml deleted file mode 100644 index 05ab9eae6f..0000000000 --- a/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_driving_info_fragment.xml +++ /dev/null @@ -1,380 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_fragment.xml b/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_fragment.xml deleted file mode 100644 index b9ef96c15f..0000000000 --- a/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_fragment.xml +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_hpmap_fragment.xml b/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_hpmap_fragment.xml deleted file mode 100644 index 5c9a902baa..0000000000 --- a/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_hpmap_fragment.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_traffic_light_view.xml b/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_traffic_light_view.xml deleted file mode 100644 index 3fd9e2e972..0000000000 --- a/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_traffic_light_view.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_turn_light_status.xml b/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_turn_light_status.xml deleted file mode 100644 index ec5a62ef4d..0000000000 --- a/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_turn_light_status.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_view_blue_tooth.xml b/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_view_blue_tooth.xml deleted file mode 100644 index 6f8a5129f0..0000000000 --- a/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_view_blue_tooth.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_view_status_bar.xml b/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_view_status_bar.xml deleted file mode 100644 index f9c166a3ef..0000000000 --- a/OCH/bus/passenger/src/main/res/m2/layout/bus_p_m2_view_status_bar.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/m2/raw/star_marker.nt3d b/OCH/bus/passenger/src/main/res/m2/raw/star_marker.nt3d deleted file mode 100644 index c6e546fc31..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/raw/star_marker.nt3d and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/raw/station_marker.nt3d b/OCH/bus/passenger/src/main/res/m2/raw/station_marker.nt3d deleted file mode 100644 index a00207ba3f..0000000000 Binary files a/OCH/bus/passenger/src/main/res/m2/raw/station_marker.nt3d and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/m2/values/dimens.xml b/OCH/bus/passenger/src/main/res/m2/values/dimens.xml deleted file mode 100644 index 55344e5192..0000000000 --- a/OCH/bus/passenger/src/main/res/m2/values/dimens.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/m2/values/strings.xml b/OCH/bus/passenger/src/main/res/m2/values/strings.xml deleted file mode 100644 index 7ee723e068..0000000000 --- a/OCH/bus/passenger/src/main/res/m2/values/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - KM/H - m2_map_style.data - m2_map_style_extra.data - AUTO - 已到站 - 暂无站点 - 前方到站 - —公里 - —分钟 - 请按秩序下车 - 暂无路线 - \ No newline at end of file diff --git a/OCH/bus/passenger/src/main/res/raw/bus_di.mp3 b/OCH/bus/passenger/src/main/res/raw/bus_di.mp3 deleted file mode 100644 index 15b31ed247..0000000000 Binary files a/OCH/bus/passenger/src/main/res/raw/bus_di.mp3 and /dev/null differ diff --git a/OCH/bus/passenger/src/main/res/values/colors.xml b/OCH/bus/passenger/src/main/res/values/colors.xml deleted file mode 100644 index 9011d8750f..0000000000 --- a/OCH/bus/passenger/src/main/res/values/colors.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - #FFFFFF - #0B1E38 - #BBDAFB - #0B1E38 - #5D7199 - #A5D8FF - #1B2546 - #23355D - #8895B7 - - - #C8EFFF - #203555 - #17417B - #2D3E5F - #34A61F - #AEEDB8 - #43CEFE - #1466FB - #7094AD - - #99AFC9E7 - #6617417B - #80FFFFFF - #5D7199 - #CCE9EFFC - #C7D2E1 - #2D3E5F - #203555 - #2D3E5F - #596A8A - #D8E5F8 - #FFB327 - #2D3E5F - #0043FF - #276AFE - #0043FF - #276AFE - #FFC125 - #FF8131 - #31BFF2 - #3257E9 - #FFFFFF - #CDDBF6 - #2D3E5F - #0043FF - #2D3E5F - #E6E9EFFC - #33394C63 - #2D3E5F - #33394C63 - - #43CEFE - #1466FB - - #17417B - #6617417B - #A9B6CA - #1F82FB - - #992D3E5F - - \ No newline at end of file diff --git a/OCH/bus/passenger/src/test/java/com/mogo/och/bus/passenger/ExampleUnitTest.java b/OCH/bus/passenger/src/test/java/com/mogo/och/bus/passenger/ExampleUnitTest.java deleted file mode 100644 index dd13881f86..0000000000 --- a/OCH/bus/passenger/src/test/java/com/mogo/och/bus/passenger/ExampleUnitTest.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.mogo.och.bus.passenger; - -import org.junit.Test; - -/** - * Example local unit test, which will execute on the development machine (host). - * - * @see Testing documentation - */ -public class ExampleUnitTest { - //@Test - public void addition_isCorrect() { - - } -} \ No newline at end of file diff --git a/OCH/facade/script/och.gradle b/OCH/facade/script/och.gradle index 7ef5b3e8ae..a7ca13bec8 100644 --- a/OCH/facade/script/och.gradle +++ b/OCH/facade/script/och.gradle @@ -11,27 +11,19 @@ project.dependencies { implementation project.project(':OCH:offline:driver') implementation project.project(':OCH:shuttle:driver_weaknet') } else if (isCurrentPassenger("B1")) { - implementation project.project(':OCH:bus:passenger') - implementation project.project(':OCH:shuttle:passenger') implementation project.project(':OCH:shuttle:passenger_weaknet') } else if (isCurrentBaiLing("B1")) { implementation project.project(':OCH:shuttle:driver_weaknet') - implementation project.project(':OCH:bus:passenger') - implementation project.project(':OCH:shuttle:passenger') implementation project.project(':OCH:shuttle:passenger_weaknet') } else if (isCurrentDriver("M1")) { implementation project.project(':OCH:charter:driver') implementation project.project(':OCH:shuttle:driver_weaknet') } else if (isCurrentPassenger("M1")) { - implementation project.project(':OCH:charter:passenger') - implementation project.project(':OCH:shuttle:passenger') implementation project.project(':OCH:shuttle:passenger_weaknet') } else if (isCurrentDriver("B2")) { implementation project.project(':OCH:offline:driver') implementation project.project(':OCH:shuttle:driver_weaknet') } else if (isCurrentPassenger("B2")) { - implementation project.project(':OCH:bus:passenger') - implementation project.project(':OCH:shuttle:passenger') implementation project.project(':OCH:shuttle:passenger_weaknet') } else if (isCurrentDriver("T1T2")) { implementation project.project(':OCH:taxi:driver') @@ -48,17 +40,13 @@ project.dependencies { } else if (isCurrentPassenger("ALL")) { implementation project.project(':OCH:taxi:unmanned-passenger') implementation project.project(':OCH:taxi:passenger') - implementation project.project(':OCH:bus:passenger') implementation project.project(':OCH:charter:passenger') - implementation project.project(':OCH:shuttle:passenger') implementation project.project(':OCH:shuttle:passenger_weaknet') implementation project.project(':OCH:shuttle:driver_weaknet') } else { implementation project.project(':OCH:offline:driver') - implementation project.project(':OCH:bus:passenger') implementation project.project(':OCH:charter:driver') implementation project.project(':OCH:charter:passenger') - implementation project.project(':OCH:shuttle:passenger') implementation project.project(':OCH:sweeper:driver') implementation project.project(':OCH:taxi:driver') implementation project.project(':OCH:taxi:passenger') diff --git a/OCH/facade/src/main/java/com/mogo/och/facade/route/FacadeProvider.kt b/OCH/facade/src/main/java/com/mogo/och/facade/route/FacadeProvider.kt index 59b9d6c0ba..8018098bd5 100644 --- a/OCH/facade/src/main/java/com/mogo/och/facade/route/FacadeProvider.kt +++ b/OCH/facade/src/main/java/com/mogo/och/facade/route/FacadeProvider.kt @@ -109,11 +109,7 @@ abstract class FacadeProvider : IMoGoFunctionProvider, ILoginCallback { if (AppIdentityModeUtils.isBusDriver(FunctionBuildConfig.appIdentityMode)) { return getFragmentByServeName(OchCommonConst.SHUTTLE_DRIVER_WEAKNET) } else if (AppIdentityModeUtils.isShuttleDriver(FunctionBuildConfig.appIdentityMode)) { - return if (ProjectUtils.isSaas()) { - getFragmentByServeName(OchCommonConst.SHUTTLE_DRIVER_WEAKNET) - } else { - getFragmentByServeName(OchCommonConst.SHUTTLE_DRIVER_WEAKNET) - } + return getFragmentByServeName(OchCommonConst.SHUTTLE_DRIVER_WEAKNET) } else if (AppIdentityModeUtils.isCharterDriver(FunctionBuildConfig.appIdentityMode)) { return getFragmentByServeName(OchCommonConst.CHARTER_DRIVER) } else if (AppIdentityModeUtils.isTaxiDriver(FunctionBuildConfig.appIdentityMode)) { @@ -127,13 +123,9 @@ abstract class FacadeProvider : IMoGoFunctionProvider, ILoginCallback { } else if (AppIdentityModeUtils.isSweeper(FunctionBuildConfig.appIdentityMode)) { return getFragmentByServeName(OchCommonConst.SWEEPER_DRIVER) } else if (AppIdentityModeUtils.isBusPassenger(FunctionBuildConfig.appIdentityMode)) { - return getFragmentByServeName(OchCommonConst.BUS_PASSENGER) + return getFragmentByServeName(OchCommonConst.SHUTTLE_PASSENGER_WEAKNET) } else if (AppIdentityModeUtils.isShuttlePassenger(FunctionBuildConfig.appIdentityMode)) { - return if (ProjectUtils.isSaas()) { - getFragmentByServeName(OchCommonConst.SHUTTLE_PASSENGER_WEAKNET) - } else { - getFragmentByServeName(OchCommonConst.SHUTTLE_PASSENGER) - } + return getFragmentByServeName(OchCommonConst.SHUTTLE_PASSENGER_WEAKNET) } else if (AppIdentityModeUtils.isCharterPassenger(FunctionBuildConfig.appIdentityMode)) { return getFragmentByServeName(OchCommonConst.CHARTER_PASSENGER) } else if (AppIdentityModeUtils.isTaxiPassenger(FunctionBuildConfig.appIdentityMode)) { diff --git a/OCH/offline/passenger/.gitignore b/OCH/offline/passenger/.gitignore deleted file mode 100644 index 42afabfd2a..0000000000 --- a/OCH/offline/passenger/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/OCH/offline/passenger/README.md b/OCH/offline/passenger/README.md deleted file mode 100644 index 6175119b78..0000000000 --- a/OCH/offline/passenger/README.md +++ /dev/null @@ -1,15 +0,0 @@ - - - - - -src - - androidTest Android 测试代码 - - basecommon 金旅开沃、接驳车 公用代码部分 - - jinlvvan 金旅开沃 独立代码部分 - - m1 金旅m1 独立代码部分 - - m2 金旅m2 独立代码部分 - - main 所有车型公用代码部分 - - shuttle 接驳车独立代码 因为接驳车和金旅开沃代码耦合厉害暂时放入到mogo-och-bus-passenger里面 - 后期会创建独立module和mogo-och-bus-passenger平级 - - test 普通代码测试 \ No newline at end of file diff --git a/OCH/offline/passenger/build.gradle b/OCH/offline/passenger/build.gradle deleted file mode 100644 index d57d88769c..0000000000 --- a/OCH/offline/passenger/build.gradle +++ /dev/null @@ -1,85 +0,0 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' -apply plugin: 'kotlin-kapt' - -android { - compileSdkVersion rootProject.ext.android.compileSdkVersion - // buildToolsVersion rootProject.ext.android.buildToolsVersion - defaultConfig { - minSdkVersion rootProject.ext.android.minSdkVersion - targetSdkVersion rootProject.ext.android.targetSdkVersion - versionCode Integer.valueOf(VERSION_CODE) - versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION") - - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles "consumer-rules.pro" - - kapt { - useBuildCache = false - arguments { - arg("AROUTER_MODULE_NAME", "offline"+project.getName()) - } - } - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - lintOptions { - abortOnError false - } - - 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' - } - } - - sourceSets { - main { - res.srcDirs = [ - 'src/main/res', - 'src/main/res/m2', - 'src/main/res/jinlv', - ] - java.srcDirs = [ - 'src/main/java', - 'src/main/java/m2', - 'src/main/java/jinlv', - ] - } - } -} - -dependencies { - implementation fileTree(dir: "libs", include: ["*.jar"]) - implementation rootProject.ext.dependencies.kotlinstdlib - implementation rootProject.ext.dependencies.androidxappcompat - implementation rootProject.ext.dependencies.arouter - implementation rootProject.ext.dependencies.androidxrecyclerview - implementation rootProject.ext.dependencies.material - kapt rootProject.ext.dependencies.aroutercompiler - implementation rootProject.ext.dependencies.rxandroid - implementation rootProject.ext.dependencies.androidxconstraintlayout - implementation rootProject.ext.dependencies.amapnavi3dmap - // 串口链接 - implementation rootProject.ext.dependencies.serialport - implementation project(":OCH:common:common") - compileOnly project(":libraries:mogo-map") - implementation project(':core:mogo-core-res') - - androidTestImplementation rootProject.ext.dependencies.androidxjunit - testImplementation rootProject.ext.dependencies.junit - -} - -apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString() \ No newline at end of file diff --git a/OCH/offline/passenger/consumer-rules.pro b/OCH/offline/passenger/consumer-rules.pro deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/OCH/offline/passenger/gradle.properties b/OCH/offline/passenger/gradle.properties deleted file mode 100644 index 2ed1ed2f42..0000000000 --- a/OCH/offline/passenger/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -GROUP=com.mogo.och -POM_ARTIFACT_ID=och-bus-passenger -VERSION_CODE=1 diff --git a/OCH/offline/passenger/proguard-rules.pro b/OCH/offline/passenger/proguard-rules.pro deleted file mode 100644 index 481bb43481..0000000000 --- a/OCH/offline/passenger/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/OCH/offline/passenger/src/androidTest/java/passenger/ExampleInstrumentedTest.java b/OCH/offline/passenger/src/androidTest/java/passenger/ExampleInstrumentedTest.java deleted file mode 100644 index 2685ade0a4..0000000000 --- a/OCH/offline/passenger/src/androidTest/java/passenger/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.mogo.och.bus.passenger; - -import android.content.Context; - -import androidx.test.platform.app.InstrumentationRegistry; -import androidx.test.ext.junit.runners.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import static org.junit.Assert.*; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - @Test - public void useAppContext() { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); - assertEquals("com.mogo.och.bus.passenger.test", appContext.getPackageName()); - } -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/AndroidManifest.xml b/OCH/offline/passenger/src/main/AndroidManifest.xml deleted file mode 100644 index 549784ca83..0000000000 --- a/OCH/offline/passenger/src/main/AndroidManifest.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/assets/m2_map_style.data b/OCH/offline/passenger/src/main/assets/m2_map_style.data deleted file mode 100755 index 77da1f0284..0000000000 Binary files a/OCH/offline/passenger/src/main/assets/m2_map_style.data and /dev/null differ diff --git a/OCH/offline/passenger/src/main/assets/m2_map_style_extra.data b/OCH/offline/passenger/src/main/assets/m2_map_style_extra.data deleted file mode 100755 index 6b25c39519..0000000000 Binary files a/OCH/offline/passenger/src/main/assets/m2_map_style_extra.data and /dev/null differ diff --git a/OCH/offline/passenger/src/main/assets/map_style.data b/OCH/offline/passenger/src/main/assets/map_style.data deleted file mode 100644 index 085e06a2db..0000000000 Binary files a/OCH/offline/passenger/src/main/assets/map_style.data and /dev/null differ diff --git a/OCH/offline/passenger/src/main/assets/map_style_extra.data b/OCH/offline/passenger/src/main/assets/map_style_extra.data deleted file mode 100644 index 892eda73f9..0000000000 Binary files a/OCH/offline/passenger/src/main/assets/map_style_extra.data and /dev/null differ diff --git a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/ShuttlePassengerProvider.kt b/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/ShuttlePassengerProvider.kt deleted file mode 100644 index 3fbe34328f..0000000000 --- a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/ShuttlePassengerProvider.kt +++ /dev/null @@ -1,70 +0,0 @@ -package com.mogo.och.shuttle.passenger - -import android.content.Context -import android.view.View -import androidx.fragment.app.Fragment -import com.alibaba.android.arouter.facade.annotation.Route -import com.mogo.eagle.core.data.config.FunctionBuildConfig -import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils -import com.mogo.eagle.core.utilcode.util.ActivityUtils -import com.mogo.eagle.core.utilcode.util.DeviceUtils -import com.mogo.eagle.core.utilcode.util.MultiDisplayUtils -import com.mogo.och.common.module.constant.OchCommonConst -import com.mogo.och.common.module.biz.provider.CommonServiceImpl -import com.mogo.och.common.module.wigets.media.MediaPlayerActivity -import com.mogo.och.shuttle.passenger.model.TicketModel -import com.mogo.och.shuttle.passenger.ui.BusPStatusBarView -import com.mogo.och.shuttle.passenger.ui.BusPassengerRouteFragment -import com.mogo.och.shuttle.passenger.ui.PM2BaseFragment -import com.mogo.och.shuttle.passenger.ui.widget.M2StatusBarView - -/** - * 网约车-Bus-乘客端 - * - * Created on 2022/3/29 - */ -@Route(path = OchCommonConst.SHUTTLE_PASSENGER) -class ShuttlePassengerProvider : CommonServiceImpl() { - - private val tag = ShuttlePassengerProvider::class.java.simpleName - private var mPM2Fragment: Fragment?=null - - override fun init(context: Context) { - TicketModel.load() - } - - override fun getStatusBarView(context: Context): View { - if(statusBarView==null){ - statusBarView = if (AppIdentityModeUtils.isB2(FunctionBuildConfig.appIdentityMode)) { - M2StatusBarView(context); - } else if (AppIdentityModeUtils.isB1(FunctionBuildConfig.appIdentityMode)) { - BusPStatusBarView(context); - }else{ - BusPStatusBarView(context); - } - } - return statusBarView!! - } - - override fun getFragment(): Fragment { - if (AppIdentityModeUtils.isB1(FunctionBuildConfig.appIdentityMode) && DeviceUtils.isEB5Model()) { - MultiDisplayUtils.startActWithSecond(ActivityUtils.getTopActivity(), MediaPlayerActivity::class.java) - } - if(mPM2Fragment==null){ - mPM2Fragment = if (AppIdentityModeUtils.isB2(FunctionBuildConfig.appIdentityMode)) { - PM2BaseFragment() - }else if (AppIdentityModeUtils.isB1(FunctionBuildConfig.appIdentityMode)) { - BusPassengerRouteFragment() - }else{ - BusPassengerRouteFragment() - } - } - return mPM2Fragment!! - } - - override fun resetFragment() { - super.resetFragment() - mPM2Fragment = null - } - -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/request/PassengerQueryLineRequest.java b/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/request/PassengerQueryLineRequest.java deleted file mode 100644 index 48c312b288..0000000000 --- a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/request/PassengerQueryLineRequest.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.mogo.och.shuttle.passenger.bean.request; - -public -/** - * @author congtaowang - * @since 2021/3/22 - * - * 根据车机行驶线路站点信息 - */ -class PassengerQueryLineRequest { - - private String sn; - public PassengerQueryLineRequest(String sn) { - this.sn = sn; - } -} diff --git a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/request/PassengerWriteOffRequest.java b/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/request/PassengerWriteOffRequest.java deleted file mode 100644 index 1ff5c160a6..0000000000 --- a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/request/PassengerWriteOffRequest.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.mogo.och.shuttle.passenger.bean.request; - -public -/** - * @author congtaowang - * @since 2021/3/22 - * - * 根据车机行驶线路站点信息 - */ -class PassengerWriteOffRequest { - - private String sn; - private String orderNo; - private String uid; - - public PassengerWriteOffRequest(String orderNo, String uid) { - this.orderNo = orderNo; - this.uid = uid; - } - - public PassengerWriteOffRequest(String sn, String orderNo, String uid) { - this.sn = sn; - this.orderNo = orderNo; - this.uid = uid; - } - - public String getSn() { - return sn; - } - - public void setSn(String sn) { - this.sn = sn; - } - - public String getOrderNo() { - return orderNo; - } - - public void setOrderNo(String orderNo) { - this.orderNo = orderNo; - } - - public String getUid() { - return uid; - } - - public void setUid(String uid) { - this.uid = uid; - } -} diff --git a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/response/PassengerOperationStatusResponse.java b/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/response/PassengerOperationStatusResponse.java deleted file mode 100644 index b6781937bb..0000000000 --- a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/response/PassengerOperationStatusResponse.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.mogo.och.shuttle.passenger.bean.response; - -import com.mogo.eagle.core.data.BaseData; - -/** - * @author congtaowang - * @since 2021/3/22 - * - * 小巴车运营状态返回参数 - */ -public class PassengerOperationStatusResponse extends BaseData { - - public Result data; - - public static class Result { - private String sn; //司机屏sn - private String phone; //司机手机号 - public String plateNumber; //车牌号 - public int driverStatus;//0:已收车,1:已出车 - } -} diff --git a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/response/PassengerRoutesResponse.java b/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/response/PassengerRoutesResponse.java deleted file mode 100644 index 3b9fbe3ec1..0000000000 --- a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/response/PassengerRoutesResponse.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.mogo.och.shuttle.passenger.bean.response; - -import com.mogo.eagle.core.data.BaseData; -import com.mogo.och.data.bean.BusRoutesResult; - -/** - * 网约车小巴路线接口请求响应结果 返回的是对应司机屏的线路信息 - * - * @author tongchenfei - */ -public class PassengerRoutesResponse extends BaseData { - private BusRoutesResult data; - - public BusRoutesResult getResult() { - return data; - } - - public void setResult(BusRoutesResult data) { - this.data = data; - } - - @Override - public String toString() { - return "OchBusRoutesResponse{" + - "data=" + data + - '}'; - } - -} diff --git a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/response/PassengerWriteOffResponse.kt b/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/response/PassengerWriteOffResponse.kt deleted file mode 100644 index d46146c23c..0000000000 --- a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/response/PassengerWriteOffResponse.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.mogo.och.shuttle.passenger.bean.response - -import com.mogo.eagle.core.data.BaseData - - -data class PassengerWriteOffResponse(val data: Result?) : BaseData(){ - data class Result( - val phone: String?, - val ticketSize: Int?, - val ticketName: String?, - val remainingTimes: Long? - ) -} diff --git a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/constant/BusPassengerConst.kt b/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/constant/BusPassengerConst.kt deleted file mode 100644 index ab7552ee6a..0000000000 --- a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/constant/BusPassengerConst.kt +++ /dev/null @@ -1,33 +0,0 @@ -package com.mogo.och.shuttle.passenger.constant - -/** - * Created on 2021/12/6 - */ -class BusPassengerConst { - companion object { - - - // 轮询line - const val LOOP_LINE_2S = 2 * 1000L - const val LOOP_LINE_1S = 1 * 1000L - const val LOOP_DELAY = 100L - - // 无状态 - const val STATION_STATUS_IDLE = 0 - // 已过站(历史站) - const val STATION_STATUS_LEAVING = 1 - // 到站(当前站) - const val STATION_STATUS_STOPPED = 2 - // 未到站(未到站) - const val STATION_STATUS_ARRIVING = 3 - - //bus平均速度 bus的平均里程:25km/h - const val BUS_AVERAGE_SPEED = 10 - //接驳/B2平均速度 bus的平均里程:10km/h - const val SHUTTLE_AVERAGE_SPEED = 10 - - const val QUERY_BUS_P_STATION_DELAY = 3 * 1000L - - const val ARRIVE_DISTANCE_4_STATION_INTRODUCE = 200 //站点介绍 - } -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/manager/scnner/ScannerChainLogManager.kt b/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/manager/scnner/ScannerChainLogManager.kt deleted file mode 100644 index abc506434e..0000000000 --- a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/manager/scnner/ScannerChainLogManager.kt +++ /dev/null @@ -1,49 +0,0 @@ -package com.mogo.och.shuttle.passenger.manager.scnner - -import android.text.TextUtils -import com.mogo.commons.debug.DebugConfig -import com.mogo.commons.storage.SharedPrefsMgr -import com.mogo.commons.utils.MogoAnalyticUtils -import com.mogo.eagle.core.data.app.AppConfigInfo -import com.mogo.eagle.core.data.deva.chain.ChainConstant -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d -import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant -import com.mogo.eagle.core.utilcode.util.DateTimeUtils -import com.zhjt.service.chain.ChainLog - -object ScannerChainLogManager { - - private val TAG = ScannerChainLogManager::class.java.simpleName - - const val EVENT_KEY_INFE_WITH_CHANGE = "event_key_och_scanner_info" - - /** - * @param Info 事件 - * @param changeInfo 数据 - */ - @ChainLog( - linkChainLog = ChainConstant.CHAIN_TYPE_OCH, - linkCode = ChainConstant.CHAIN_SOURCE_OCH, - nodeAliasCode = ChainConstant.CHAIN_CODE_OCH_COMMON_DISTANCE, - paramIndexes = [0,1] - ) - @JvmStatic - fun writeChainLog(info: String, changeInfo: String,upload:Boolean = true,eventID:String=EVENT_KEY_INFE_WITH_CHANGE) { - try { - d(SceneConstant.M_OCHCOMMON + TAG, info+changeInfo) - if(upload) { - val plateNum = AppConfigInfo.plateNumber - val params = HashMap() - params["sn"] = SharedPrefsMgr.getInstance().sn - params["env"] = DebugConfig.getNetMode() - params["plate_number"] = if (TextUtils.isEmpty(plateNum)) "" else plateNum - params["time"] = DateTimeUtils.getTimeText(DateTimeUtils.yyyy_MM_dd_HH_mm_ss) - params[info] = changeInfo - MogoAnalyticUtils.track(eventID, params) - } - }catch (e:Exception){ - e.printStackTrace() - } - } - -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/manager/scnner/ScannerManager.kt b/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/manager/scnner/ScannerManager.kt deleted file mode 100644 index a5e19b5757..0000000000 --- a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/manager/scnner/ScannerManager.kt +++ /dev/null @@ -1,257 +0,0 @@ -package com.mogo.och.shuttle.passenger.manager.scnner - -import android.net.Uri -import com.mogo.commons.AbsMogoApplication -import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener -import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager -import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger -import com.mogo.eagle.core.utilcode.mogo.logger.Logger -import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant -import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS_P -import com.mogo.eagle.core.utilcode.util.GsonUtils -import com.mogo.eagle.core.utilcode.util.StringUtils -import com.mogo.och.common.module.manager.socket.lan.bean.WriteOffDevicesMsg -import com.mogo.och.common.module.manager.socket.lan.bean.WriteOffMsg -import com.mogo.och.common.module.constant.OchCommonConst -import com.mogo.och.common.module.manager.socket.lan.LanSocketManager -import com.mogo.support.serialport.client.SerialPortManager -import com.mogo.support.serialport.client.SerialPortManager.SERVICE_STATE -import com.mogo.support.serialport.client.listener.OnDeviceVerificationListener -import com.mogo.support.serialport.client.listener.OnSerialPortListener -import com.mogo.support.serialport.common.verification.UnpackStatus -import com.mogo.support.serialport.common.verification.data.VerificationActiveData -import java.util.concurrent.ConcurrentHashMap -import kotlin.properties.Delegates - - -object ScannerManager : OnSerialPortListener, OnDeviceVerificationListener(), IReceivedMsgListener { - - private val TAG = "ScannerManager" - - private var serialPortManager = SerialPortManager() - - private val stateChanageListeners: ConcurrentHashMap = - ConcurrentHashMap() - - private var driverSn:String by Delegates.observable("") { _, oldV, newV -> - if (oldV != newV) { - // sn 发生了改变 需要向司机屏推送当前链接的状态 - sendScannerState() - } - } - - private var bindStatus: BindStatus by Delegates.observable(BindStatus.NOTHING) { _, oldV, newV -> - if (oldV != newV) { - try { - CallerLogger.d(SceneConstant.M_OCHCOMMON + TAG, "状态发生变化old:${oldV}_new:${newV}") - if(newV!=BindStatus.BIND_SUCCEED) { - dispatchMsg(newV) - } - if (stateChanageListeners.size > 0) { - stateChanageListeners.forEach { - it.value.stateChange(newV, openStatus) - } - } - } catch (e: Exception) { - CallerLogger.e(SceneConstant.M_OCHCOMMON + TAG, "扫码枪bind错误") - } - } - } - - private var openStatus: OpenStatus by Delegates.observable(OpenStatus.Unopen) { _, oldV, newV -> - if (oldV != newV) { - try { - if (stateChanageListeners.size > 0) { - stateChanageListeners.forEach { - it.value.stateChange(bindStatus, newV) - } - } - } catch (e: Exception) { - CallerLogger.e(SceneConstant.M_OCHCOMMON + TAG, "扫码枪open错误") - } - } - } - - init { - //监听司机端消息 - CallerTelematicListenerManager.addListener(TAG, this) - } - - fun addStateChangeListener(tag: String, listener: StateChangeListener) { - if (stateChanageListeners.containsKey(tag)) { - return - } - stateChanageListeners[tag] = listener - } - - fun bindService() { - serialPortManager.bindService(AbsMogoApplication.getApp(), this)//绑定服务 - } - - override fun onServiceState(serviceState: Int) { - ScannerChainLogManager.writeChainLog(TAG+"bindStatus","绑定服务结果:serviceState:${serviceState}") - when (serviceState) { - SERVICE_STATE.BIND_SUCCEED -> { - CallerLogger.d(M_BUS_P + TAG, "服务绑定成功") - bindStatus = BindStatus.BIND_SUCCEED - serialPortManager.openVerificationDevice(this) - } - SERVICE_STATE.BIND_FAILURE_UNINSTALLED -> { - CallerLogger.d(M_BUS_P + TAG, "服务绑定失败:未安装串口服务端APP") - bindStatus = BindStatus.BIND_FAILURE_UNINSTALLED - } - SERVICE_STATE.BIND_FAILURE_NO_PERMISSION_NOT_FOUND -> { - CallerLogger.d(M_BUS_P + TAG, "服务绑定失败:没有绑定权限或找不到服务(如果是此状态,基本上安装后就可以找到,主要就是权限问题)") - bindStatus = BindStatus.BIND_FAILURE_NO_PERMISSION_NOT_FOUND - } - SERVICE_STATE.EXCEPTION -> { - CallerLogger.d(M_BUS_P + TAG, "服务被异常销毁") - bindStatus = BindStatus.EXCEPTION - } - else -> {} - } - } - - // 查询串口 - override fun onFindSerialPort(paths: Array?) { - CallerLogger.d(M_BUS_P + TAG, "$paths") - ScannerChainLogManager.writeChainLog(TAG+"onFindSerialPort","查询串口:${paths}") - if(paths==null) { - bindStatus = BindStatus.BIND_FAILURE_NO_PERMISSION_NOT_FOUND - } - } - - override fun onSerialPortState( - path: String?, - isOpen: Boolean, - throwableMessage: String? - ) { - CallerLogger.d( - M_BUS_P + TAG, - "path ${path}---isOpen${isOpen}--throwableMessage${throwableMessage}" - ) - ScannerChainLogManager.writeChainLog(TAG+"onSerialPortState","扫码枪是否打开:path${path}_isOpen${isOpen}_throwableMessage${throwableMessage}") - openStatus = if (isOpen) { - sendMessage2Driver(true,"扫码枪打开成功") - OpenStatus.Open - } else { - sendMessage2Driver(false,"扫码枪打开错误:${throwableMessage}_${path}") - OpenStatus.Unopen - } - } - - override fun onActiveDataReceive(data: VerificationActiveData?) { - ScannerChainLogManager.writeChainLog(TAG+"onActiveDataReceive","扫码结果:data:${data}") - data?.let { - if(data.unpackStatus==UnpackStatus.SUCCEED){ - "数据类型${it.dataType.name}" - CallerLogger.d(M_BUS_P + TAG, "data $it") - if(!StringUtils.isEmpty(it.payload)){ - parseParams(it.payload) - }else{ - CallerLogger.d(M_BUS_P + TAG, "数据错误") - sendMessage2DriverWriteOffInfo("扫码数据为空") - } - }else{ - sendMessage2DriverWriteOffInfo("解包失败") - CallerLogger.d(M_BUS_P + TAG, "解包失败") - } - } - } - - private fun parseParams(payload: String?) { - val parse = Uri.parse("${OchCommonConst.getShuttleUrl()}?${payload}") - val queryParameterNames = parse.queryParameterNames - val mutableMapOf = mutableMapOf() - queryParameterNames.forEach { - val queryParameter = parse.getQueryParameter(it) - if(it!=null&&queryParameter!=null){ - mutableMapOf[it] = queryParameter - } - } - if(mutableMapOf.isNotEmpty()){ - if (stateChanageListeners.size > 0) { - stateChanageListeners.forEach { - it.value.parseData(mutableMapOf,payload) - } - } - }else{ - sendMessage2DriverWriteOffInfo("扫码参数数据为空:${payload}") - } - - } - - /** - * @param isConnectScanner 是否打开设备 - */ - private fun sendMessage2Driver(isConnectScanner:Boolean,message:String){ - val msg = WriteOffDevicesMsg(isConnectScanner, message) - CallerLogger.d(M_BUS_P + TAG, "sendTaskDetailsToClients = " + GsonUtils.toJson(msg)) - if(driverSn.isNotEmpty()) { - LanSocketManager.sendMsgToServer(msg) - } - } - - /** - * 打开设备后数据异常 - */ - private fun sendMessage2DriverWriteOffInfo(message:String){ - val msg = WriteOffMsg(false, "", 0, "", message,"") - CallerLogger.d(M_BUS_P + TAG, "sendTaskDetailsToClients = " + GsonUtils.toJson(msg)) - LanSocketManager.sendMsgToServer(msg) - } - - override fun onReceivedMsg(type: Int, byteArray: ByteArray) { - - } - - override fun onReceivedServerSn(sn: String?) { - Logger.d(M_BUS_P + TAG, "司机屏sn:$sn") - driverSn = sn?:"" - } - - /** - * 链接司机屏后向司机屏同步扫码枪状态 - */ - private fun sendScannerState() { - if(bindStatus==BindStatus.BIND_SUCCEED&& openStatus==OpenStatus.Open){ - sendMessage2Driver(true,"扫码枪打开状态") - }else{ - if(bindStatus==BindStatus.BIND_SUCCEED&& openStatus==OpenStatus.Unopen){ - sendMessage2Driver(false,"绑定成功、打开失败") - }else{ - dispatchMsg(bindStatus) - } - } - } - - private fun dispatchMsg(newV: BindStatus) { - when (newV) { - BindStatus.BIND_FAILURE_UNINSTALLED -> { - // 服务绑定失败:未安装串口服务端APP - sendMessage2Driver(false,"服务绑定失败:未安装串口服务端APP") - } - BindStatus.BIND_FAILURE_NO_PERMISSION_NOT_FOUND -> { - // 服务绑定失败:没有绑定权限或找不到服务(如果是此状态,基本上安装后就可以找到,主要就是权限问题) - sendMessage2Driver(false,"服务绑定失败:没有绑定权限或找不到服务") - } - BindStatus.EXCEPTION -> { - // 扫码枪open错误 - sendMessage2Driver(false,"扫码枪打开错误") - } - BindStatus.NOTHING -> {} - else -> {} - } - } - - -} - -enum class BindStatus { - BIND_SUCCEED, BIND_FAILURE_UNINSTALLED ,BIND_FAILURE_NO_PERMISSION_NOT_FOUND,EXCEPTION,NOTHING -} - -enum class OpenStatus { - Open, Unopen -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/manager/scnner/ScannerStateView.kt b/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/manager/scnner/ScannerStateView.kt deleted file mode 100644 index f7b335c3a2..0000000000 --- a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/manager/scnner/ScannerStateView.kt +++ /dev/null @@ -1,38 +0,0 @@ -package com.mogo.och.shuttle.passenger.manager.scnner - -import android.content.Context -import android.util.AttributeSet -import android.view.View -import androidx.appcompat.widget.AppCompatImageView -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.R - -class ScannerStateView @JvmOverloads constructor( - context: Context, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : AppCompatImageView(context, attrs, defStyleAttr), StateChangeListener { - private val TAG = "ScannerStateView" - - init { - setImageResource(R.drawable.driver_connect_statis) - ScannerManager.addStateChangeListener(TAG,this) - } - - override fun stateChange(newBindValue: BindStatus, newOpentValue: OpenStatus) { - CallerLogger.d(SceneConstant.M_BUS_P + TAG, "newBindValue = $newBindValue newOpentValue = $newOpentValue") - when (newOpentValue) { - OpenStatus.Open -> { - //成功打开 - visibility = View.GONE - } - OpenStatus.Unopen -> { - // 打开失败 - setImageResource(R.drawable.driver_connect_statis) - } - } - } - - -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/manager/scnner/StateChangeListener.kt b/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/manager/scnner/StateChangeListener.kt deleted file mode 100644 index 12698fa45e..0000000000 --- a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/manager/scnner/StateChangeListener.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.mogo.och.shuttle.passenger.manager.scnner - -interface StateChangeListener { - fun stateChange(newBindValue:BindStatus,newOpentValue:OpenStatus){} - fun parseData(params: MutableMap, payload: String?){} -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/model/TicketModel.kt b/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/model/TicketModel.kt deleted file mode 100644 index e6fa3753ef..0000000000 --- a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/model/TicketModel.kt +++ /dev/null @@ -1,103 +0,0 @@ -package com.mogo.och.shuttle.passenger.model - -import com.mogo.commons.AbsMogoApplication -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger -import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS_P -import com.mogo.eagle.core.utilcode.util.GsonUtils -import com.mogo.och.common.module.manager.socket.lan.bean.WriteOffMsg -import com.mogo.och.common.module.manager.socket.lan.LanSocketManager -import com.mogo.och.common.module.network.OchCommonServiceCallback -import com.mogo.och.shuttle.passenger.bean.request.PassengerWriteOffRequest -import com.mogo.och.shuttle.passenger.bean.response.PassengerWriteOffResponse -import com.mogo.och.shuttle.passenger.manager.scnner.ScannerChainLogManager -import com.mogo.och.shuttle.passenger.manager.scnner.ScannerManager -import com.mogo.och.shuttle.passenger.manager.scnner.StateChangeListener -import com.mogo.och.shuttle.passenger.network.PassengerServiceManager - -object TicketModel : StateChangeListener { - - private const val TAG = "TicketModel" - - init { - ScannerManager.bindService() - ScannerManager.addStateChangeListener(TAG, this) - } - - fun load(){ - - } - - override fun parseData(params: MutableMap, payload: String?) { - val orderNo = params["orderNo"] - val uid = params["uid"] - if(orderNo is String && uid is String){ - writeOffTicket(orderNo,uid) - }else{ - // 通知司机屏二维码错误 - sendMessage2Driver("参数错误:${payload}") - } - } - - private fun writeOffTicket(orderNo: String, uid: String) { - val passengerWriteOffRequest = PassengerWriteOffRequest(orderNo, uid) - PassengerServiceManager.writeOffTicket(AbsMogoApplication.getApp(), - passengerWriteOffRequest, - object : OchCommonServiceCallback { - override fun onSuccess(data: PassengerWriteOffResponse?) { - if (data?.data == null) return - val ticketInfo = - "核销成功:票种名称:${data.data.ticketName},车票数量:${data.data.ticketSize},预留手机号:${data.data.phone},时间:${data.data.remainingTimes}" - CallerLogger.d(M_BUS_P + TAG, ticketInfo) - sendMessage2DriverSuccess(data.data,orderNo) - } - - override fun onFail(code: Int, msg: String?) { - CallerLogger.d(M_BUS_P + TAG, "核销失败 ${code}-----${msg}") - when (code) { - 6002 -> {sendMessage2Driver("同一订单核销间隔时间需大于2分钟")} - 1009 -> {sendMessage2Driver("车票所选乘车日期非今日")} - 1005 -> {sendMessage2Driver("车辆未登录、或没有任务")} - 1006 -> {sendMessage2Driver("车票路线信息与当前车辆执行任务的路线信息不符合")} - 1008 -> {sendMessage2Driver("车票剩余可用次数为0")} - 6001 -> {sendMessage2Driver("二维码已过期")} - 1012 -> {sendMessage2Driver("当前用户下单路线非当前的车辆所属公司")} - else -> { - when (msg) { - "6002" -> {sendMessage2Driver("同一订单核销间隔时间需大于2分钟")} - "1009" -> {sendMessage2Driver("车票所选乘车日期非今日")} - "1005" -> {sendMessage2Driver("车辆未登录、或没有任务")} - "1006" -> {sendMessage2Driver("车票路线信息与当前车辆执行任务的路线信息不符合")} - "1008" -> {sendMessage2Driver("车票剩余可用次数为0")} - "6001" -> {sendMessage2Driver("二维码已过期")} - "1012" -> {sendMessage2Driver("当前用户下单路线非当前的车辆所属公司")} - else -> { - sendMessage2Driver(msg?:"") - } - } - } - } - } - - override fun onError(message: String) { - ScannerChainLogManager.writeChainLog(TAG +"onError","/och-vehicle/api/scanner/device/writeOff接口请求错误orderNo:${orderNo}__uid:${uid}__reaseon:${message}") - sendMessage2Driver("网络错误") - } - } - ) - } - - private fun sendMessage2Driver(message:String){ - val msg = WriteOffMsg(false, "", 0, "", message,"") - CallerLogger.d(M_BUS_P + TAG, "sendTaskDetailsToClients = " + GsonUtils.toJson(msg)) - LanSocketManager.sendMsgToServer(msg) - ScannerChainLogManager.writeChainLog(TAG +"sendMessage2Driver","核验失败:message:${message}") - } - private fun sendMessage2DriverSuccess(message: PassengerWriteOffResponse.Result,orderNo: String){ - val msg = WriteOffMsg(true, message.phone, message.ticketSize, message.ticketName, "",orderNo) - CallerLogger.d(M_BUS_P + TAG, "sendTaskDetailsToClients = " + GsonUtils.toJson(msg)) - LanSocketManager.sendMsgToServer(msg) - ScannerChainLogManager.writeChainLog(TAG +"sendMessage2DriverSuccess","核验成功:message:${message}") - } - - -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/network/PassengerServiceManager.kt b/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/network/PassengerServiceManager.kt deleted file mode 100644 index b30d911249..0000000000 --- a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/network/PassengerServiceManager.kt +++ /dev/null @@ -1,112 +0,0 @@ -package com.mogo.och.shuttle.passenger.network - -import android.content.Context -import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager.getServerToken -import com.mogo.cloud.passport.MoGoAiCloudClientConfig -import com.mogo.eagle.core.network.MoGoRetrofitFactory -import com.mogo.commons.storage.SharedPrefsMgr -import com.mogo.eagle.core.utilcode.util.StringUtils -import com.mogo.eagle.core.utilcode.util.ToastUtils -import com.mogo.och.common.module.constant.OchCommonConst -import com.mogo.och.common.module.network.OchCommonServiceCallback -import com.mogo.och.common.module.network.OchCommonSubscribeImpl -import com.mogo.och.common.module.network.interceptor.transformTry -import com.mogo.och.shuttle.passenger.bean.request.PassengerQueryLineRequest -import com.mogo.och.shuttle.passenger.bean.request.PassengerWriteOffRequest -import com.mogo.och.shuttle.passenger.bean.response.PassengerOperationStatusResponse -import com.mogo.och.shuttle.passenger.bean.response.PassengerRoutesResponse -import com.mogo.och.shuttle.passenger.bean.response.PassengerWriteOffResponse -import com.mogo.och.shuttle.passenger.manager.scnner.ScannerChainLogManager - -/** - * Created on 2022/3/31 - */ -object PassengerServiceManager { - - private var driverSnCache = "" - - private val TAG = "PassengerServiceManager" - - private var mShuttleBusPassengerServiceApi = - MoGoRetrofitFactory.getInstance(OchCommonConst.getShuttleUrl()).create( - ServiceApi::class.java) - - /** - * 获取Bus司机端的sn - * @return - */ - val driverAppSn: String - get() { - val serverToken = getServerToken() - if (serverToken != driverSnCache && serverToken.isNotEmpty()) { - driverSnCache = serverToken - } - return driverSnCache - } - - /** - * 查询绑定行驶的小巴车路线 - * @param context - * @param callback - */ - @JvmStatic - fun queryDriverSiteByCoordinate( - context: Context, callback: OchCommonServiceCallback? - ) { - mShuttleBusPassengerServiceApi.queryDriverSiteByCoordinate( - MoGoAiCloudClientConfig.getInstance().serviceAppId, - SharedPrefsMgr.getInstance().token, - PassengerQueryLineRequest( - driverAppSn - ) - ).transformTry() - .subscribe(OchCommonSubscribeImpl(context, callback, "queryDriverSiteByCoordinate")) - } - - /** - * 查询司机端出车收车状态,以及车牌号 - * @param context - * @param callback - */ - @JvmStatic - fun queryDriverOperationStatus( - context: Context, - callback: OchCommonServiceCallback? - ) { - mShuttleBusPassengerServiceApi.queryDriverOperationStatus( - MoGoAiCloudClientConfig.getInstance().serviceAppId, - SharedPrefsMgr.getInstance().token, - driverAppSn - ) - .transformTry() - .subscribe(OchCommonSubscribeImpl(context, callback, "queryDriverOperationStatus")) - - } - - /** - * 查询司机端出车收车状态,以及车牌号 - * @param context - * @param callback - */ - @JvmStatic - fun writeOffTicket( - context: Context, - ticketInfo: PassengerWriteOffRequest, - callback: OchCommonServiceCallback?, - ) { - ticketInfo.sn = driverAppSn - if(StringUtils.isEmpty(driverAppSn)){ - ToastUtils.showShort("请链接司机屏${ticketInfo.uid}") - ScannerChainLogManager.writeChainLog(TAG +"onError","无司机屏sn请处理") - return - } - mShuttleBusPassengerServiceApi.writeOffTicket( - MoGoAiCloudClientConfig.getInstance().serviceAppId, - SharedPrefsMgr.getInstance().token, - ticketInfo - ) - .transformTry() - .subscribe(OchCommonSubscribeImpl(context, callback, "writeOff")) - - } -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/network/ServiceApi.java b/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/network/ServiceApi.java deleted file mode 100644 index 4394df464f..0000000000 --- a/OCH/offline/passenger/src/main/java/com/mogo/och/shuttle/passenger/network/ServiceApi.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.mogo.och.shuttle.passenger.network; - -import com.mogo.och.shuttle.passenger.bean.request.PassengerQueryLineRequest; -import com.mogo.och.shuttle.passenger.bean.request.PassengerWriteOffRequest; -import com.mogo.och.shuttle.passenger.bean.response.PassengerOperationStatusResponse; -import com.mogo.och.shuttle.passenger.bean.response.PassengerRoutesResponse; -import com.mogo.och.shuttle.passenger.bean.response.PassengerWriteOffResponse; - -import io.reactivex.Observable; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.POST; -import retrofit2.http.Query; - -/** - * Created on 2022/3/31 - * - * Bus乘客端接口定义 - */ -public interface ServiceApi { - /** - * 查询bus司机端绑定路线 - * @return 接口返回数据 - */ - @Headers( {"Content-Type:application/json;charset=UTF-8"} ) - @POST( "/och-shuttle-cabin/api/business/v1/passenger/lineDataWithDriver/query" ) - Observable queryDriverSiteByCoordinate(@Header("appId") String appId, @Header("ticket") String ticket, @Body PassengerQueryLineRequest request); - - /** - * 查询司机端的登陆状态 - * @param sn - * @return - */ - @Headers({"Content-type:application/json;charset=UTF-8"}) -// @GET("/autopilot-car-hailing/car/v2/driver/bus/passenger/takeOrderStatus/query") - @GET("/och-shuttle-cabin/api/business/v1/passenger/loginStatus") - Observable queryDriverOperationStatus(@Header ("appId") String appId, @Header("ticket") String ticket, @Query("sn") String sn); - - /** - * 核销接口 - */ - @Headers({"Content-type:application/json;charset=UTF-8"}) - @POST("/och-vehicle/api/scanner/device/writeOff") - Observable writeOffTicket(@Header ("appId") String appId, @Header("ticket") String ticket, @Body PassengerWriteOffRequest request); -} diff --git a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassegerDriverStatusCallback.java b/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassegerDriverStatusCallback.java deleted file mode 100644 index 73b44accf1..0000000000 --- a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassegerDriverStatusCallback.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.mogo.och.shuttle.passenger.callback; - -/** - * @author: wangmingjun - * @date: 2021/10/22 - */ -public interface IBusPassegerDriverStatusCallback { - void changeOperationStatus(boolean changeStatus); -} diff --git a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerADASStatusCallback.java b/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerADASStatusCallback.java deleted file mode 100644 index b410513938..0000000000 --- a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerADASStatusCallback.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.mogo.och.shuttle.passenger.callback; - -/** - * Created on 2022/3/31 - * - * Model->Presenter回调:ADAS相关(自动驾驶状态回调,到达终点等等) - */ -public interface IBusPassengerADASStatusCallback { - - // 自动驾驶可用状态 - void onAutopilotEnable(); - - // 自动驾驶不可用状态 - void onAutopilotDisable(); - - // 自动驾驶运行中 - void onAutopilotRunning(); -} diff --git a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerAutopilotPlanningCallback.java b/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerAutopilotPlanningCallback.java deleted file mode 100644 index 37d813d299..0000000000 --- a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerAutopilotPlanningCallback.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.mogo.och.shuttle.passenger.callback; - -/** - * Created on 2022/3/31 - */ -public interface IBusPassengerAutopilotPlanningCallback { - void routePlanningToNextStationChanged(long meters, long timeInSecond); - -} diff --git a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerControllerStatusCallback.java b/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerControllerStatusCallback.java deleted file mode 100644 index 29407a28dc..0000000000 --- a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerControllerStatusCallback.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.mogo.och.shuttle.passenger.callback; - -import com.mogo.eagle.core.data.map.MogoLocation; - -/** - * Created on 2022/3/31 - * - * Model->Presenter回调:状态控制器监听(accOn、adas ui show、voice ui show、push ui show、v2x ui show等等) - */ -public interface IBusPassengerControllerStatusCallback { - // 自车定位 - void onCarLocationChanged(MogoLocation location); -} diff --git a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerRouteLineInfoCallback.java b/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerRouteLineInfoCallback.java deleted file mode 100644 index aeebb9dfd4..0000000000 --- a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerRouteLineInfoCallback.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.mogo.och.shuttle.passenger.callback; - -import com.mogo.och.data.bean.BusStationBean; - -import java.util.List; - -/** - * @author: wangmingjun - * @date: 2022/4/6 - */ -public interface IBusPassengerRouteLineInfoCallback { - void updateLineInfo(String lineName); - void updateStationsInfo(List stations, int currentStationIndex, boolean isArrived); - void showNoTaskView(); - void hideNoTaskView(); -} diff --git a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/model/BusPassengerModel.java b/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/model/BusPassengerModel.java deleted file mode 100644 index e923f1a3bc..0000000000 --- a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/model/BusPassengerModel.java +++ /dev/null @@ -1,493 +0,0 @@ -package com.mogo.och.shuttle.passenger.model; - -import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P; -import static com.mogo.och.shuttle.passenger.constant.BusPassengerConst.QUERY_BUS_P_STATION_DELAY; -import static com.mogo.och.shuttle.passenger.constant.BusPassengerConst.STATION_STATUS_STOPPED; - -import android.content.Context; -import android.content.Intent; -import android.net.ConnectivityManager; -import android.os.Handler; -import android.os.Message; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; - - -import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager; -import com.mogo.commons.module.intent.IMogoIntentListener; -import com.mogo.commons.module.intent.IntentManager; -import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener; -import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager; -import com.mogo.eagle.core.utilcode.mogo.logger.Logger; -import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant; -import com.mogo.eagle.core.utilcode.util.GsonUtils; -import com.mogo.eagle.core.utilcode.util.StringUtils; -import com.mogo.eagle.core.utilcode.util.ToastUtils; -import com.mogo.och.common.module.manager.autopilot.autopilot.IOchAutopilotStatusListener; -import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotStatusListenerManager; -import com.mogo.och.common.module.manager.socket.lan.LanSocketManager; -import com.mogo.och.common.module.manager.socket.lan.bean.BusinessType; -import com.mogo.och.common.module.voice.VoiceNotice; -import com.mogo.och.shuttle.passenger.R; -import com.mogo.och.common.module.manager.socket.lan.bean.AppConnectMsg; -import com.mogo.och.common.module.manager.socket.lan.bean.BaseDPMsg; -import com.mogo.och.common.module.manager.socket.lan.bean.DPMsgType; -import com.mogo.och.common.module.manager.socket.lan.bean.TaskDetailsMsg; -import com.mogo.och.common.module.manager.socket.cloud.OCHSocketMessageManager; -import com.mogo.och.common.module.constant.OchCommonConst; -import com.mogo.och.common.module.manager.distance.IDistanceListener; -import com.mogo.och.common.module.manager.distance.TrajectoryAndDistanceManager; -import com.mogo.och.common.module.utils.DateTimeUtil; -import com.mogo.commons.module.status.StatusDescriptor; -import com.mogo.eagle.core.data.config.FunctionBuildConfig; -import com.mogo.eagle.core.data.map.MogoLocation; -import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; -import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener; -import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager; -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; -import com.mogo.eagle.core.utilcode.util.NetworkUtils; -import com.mogo.och.shuttle.passenger.bean.response.PassengerOperationStatusResponse; -import com.mogo.och.shuttle.passenger.bean.response.PassengerRoutesResponse; -import com.mogo.och.shuttle.passenger.callback.IBusPassegerDriverStatusCallback; -import com.mogo.och.shuttle.passenger.callback.IBusPassengerADASStatusCallback; -import com.mogo.och.shuttle.passenger.callback.IBusPassengerAutopilotPlanningCallback; -import com.mogo.och.shuttle.passenger.callback.IBusPassengerControllerStatusCallback; -import com.mogo.och.shuttle.passenger.callback.IBusPassengerRouteLineInfoCallback; -import com.mogo.och.shuttle.passenger.constant.BusPassengerConst; -import com.mogo.och.shuttle.passenger.network.BusPassengerModelLoopManager; -import com.mogo.och.common.module.network.OchCommonServiceCallback; -import com.mogo.och.common.module.manager.socket.cloud.AbnormalFactorsLoopManager; -import com.mogo.och.data.bean.BusRoutesResult; -import com.mogo.och.data.bean.BusStationBean; -import com.mogo.och.data.bean.BusTransferData; -import com.mogo.och.shuttle.passenger.network.PassengerServiceManager; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -/** - * Created on 2022/3/31 - */ -public class BusPassengerModel { - private static final String TAG = BusPassengerModel.class.getSimpleName(); - private static final class SingletonHolder { - private static final BusPassengerModel INSTANCE = new BusPassengerModel(); - } - - public static BusPassengerModel getInstance() { - return SingletonHolder.INSTANCE; - } - - private Context mContext; - private IBusPassengerADASStatusCallback mADASStatusCallback; //Model->Presenter:自动驾驶状态相关 - private IBusPassengerAutopilotPlanningCallback mAutopilotPlanningCallback; //Model->Presenter:自动驾驶线路规划 - private Map mControllerStatusCallbackMap = new ConcurrentHashMap<>(); - - private IBusPassegerDriverStatusCallback mDriverStatusCallback; //出车收车状态 - private IBusPassengerRouteLineInfoCallback mRouteLineInfoCallback; // bus路线信息更新 - - private BusRoutesResult routesResult = null; - - List mStations = new ArrayList<>(); - private int mNextStationIndex = 0;// 要到达站的index - - private volatile boolean isGoingToNextStation = false; - - private static final int MSG_QUERY_BUS_P_STATION = 1001; - private final Handler handler = new Handler(new Handler.Callback() { - @Override - public boolean handleMessage(Message msg) { - if ( msg.what == MSG_QUERY_BUS_P_STATION ) { - queryDriverOperationStatus(); - return true; - } - return false; - } - }); - - private BusPassengerModel() { - } - - public void init( Context context ) { - mContext = context.getApplicationContext(); - initListeners(); - queryDriverOperationStatus(); - queryDriverByLocalDriver(); - startOrStopOrderLoop(true); - } - - private void queryDriverByLocalDriver() { - //本地去请求司机端 - TaskDetailsMsg msg = new TaskDetailsMsg("task", BusinessType.shuttle); - - LanSocketManager.sendMsgToServer(msg); - } - - public void setDriverStatusCallback(IBusPassegerDriverStatusCallback callback){ - this.mDriverStatusCallback = callback; - } - - public void setRouteLineInfoCallback(IBusPassengerRouteLineInfoCallback callback){ - this.mRouteLineInfoCallback = callback; - } - - private void queryDriverOperationDelay() { - handler.sendEmptyMessageDelayed( MSG_QUERY_BUS_P_STATION, QUERY_BUS_P_STATION_DELAY ); - } - - private void queryDriverOperationStatus() { - PassengerServiceManager.queryDriverOperationStatus(mContext - , new OchCommonServiceCallback() { - @Override - public void onSuccess(PassengerOperationStatusResponse data) { - if (data == null || data.data == null) return; - if (mDriverStatusCallback != null) { - CallerLogger.d( M_BUS_P + TAG, "queryDriverOperationStatus = %s", data.data.plateNumber ); - mDriverStatusCallback.changeOperationStatus(data.data.driverStatus == 1); - } - } - - @Override - public void onError() { - if (!NetworkUtils.isConnected(mContext)) { - ToastUtils.showShort(mContext.getString(R.string.network_error_tip)); - } else { - ToastUtils.showShort(mContext.getString(R.string.request_error_tip)); - } - } - - @Override - public void onFail(int code, String msg) { - //延迟3s再次查询 - queryDriverOperationDelay(); - } - }); - } - - public void queryDriverSiteByCoordinate(){ - PassengerServiceManager.queryDriverSiteByCoordinate(mContext - , new OchCommonServiceCallback() { - @Override - public void onSuccess(PassengerRoutesResponse data) { - if ( data == null || data.getResult() == null) { - CallerLogger.d( M_BUS_P + TAG, "queryDriverSiteByCoordinate = null"); - clearLocalRouteResult(); - return; - } - if (routesResult != null && data.getResult().equals(routesResult)){ - CallerLogger.d( M_BUS_P + TAG, "queryDriverSiteByCoordinate = not update"); - return; - } - - if (routesResult != null && - routesResult.getWriteVersion() < data.getResult().getWriteVersion()){ - routesResult = data.getResult(); - } - - if (routesResult == null){ - routesResult = data.getResult(); - } - - updatePassengerRouteInfo(routesResult); - } - - @Override - public void onError() { - CallerLogger.d( M_BUS_P + TAG, "queryDriverSiteByCoordinate = onError =" - + ", sn = " +PassengerServiceManager.INSTANCE.getDriverAppSn()); - queryDriverByLocalDriver(); - } - - @Override - public void onFail(int code, String msg) { - CallerLogger.d( M_BUS_P + TAG, "queryDriverSiteByCoordinate = %s", msg - + ", sn = " +PassengerServiceManager.INSTANCE.getDriverAppSn()); - if (code == 1003){ - queryDriverOperationDelay(); - } - if (PassengerServiceManager.INSTANCE.getDriverAppSn().isEmpty()){ - //此处拦截是为了防止过程中乘客屏和司机端断连,拿不到司机端sn, 造成请求失败去刷新了界面 - return; - } - if (code == 1003){ - routesResult = null; - cleanStation("queryDriverSiteByCoordinate 1003"); - return; - } - queryDriverByLocalDriver(); - } - }); - } - - private void clearLocalRouteResult() { - if (routesResult != null) { - routesResult = null; - } - mNextStationIndex = 0; - cleanStation("queryDriverSiteByCoordinate"); - if (mRouteLineInfoCallback != null){ - mRouteLineInfoCallback.showNoTaskView(); - } - } - - private void updatePassengerRouteInfo(BusRoutesResult result) { - if (result == null){ - clearLocalRouteResult(); - return; - } - CallerLogger.d( M_BUS_P + TAG, "queryDriverSiteByCoordinate = update"); - routesResult = result; - - if (mRouteLineInfoCallback != null){ - mRouteLineInfoCallback.updateLineInfo(result.getName()); - mRouteLineInfoCallback.hideNoTaskView(); - if (result.getSites() != null){ - List stations = result.getSites(); - mStations.clear(); - mStations.addAll(stations); - for (int i = 0; i< stations.size(); i++){ - BusStationBean station = stations.get(i); - if (station.getDrivingStatus() == STATION_STATUS_STOPPED && station.isLeaving() && i+1 < stations.size()){ - Logger.d(M_BUS_P + TAG, "order = station= leave"); - isGoingToNextStation = true; - mRouteLineInfoCallback.updateStationsInfo(stations,i+1,false); - mNextStationIndex = i+1; - BusStationBean startStation = mStations.get(i); - BusStationBean endStation = mStations.get(i+1); - setTrajectoryStation(startStation, endStation, result.getLineId()); - return; - }else if (station.getDrivingStatus() == STATION_STATUS_STOPPED && !station.isLeaving()){ - if (i == stations.size() - 1) { - cleanStation("updatePassengerRouteInfo最后一个站点"); - } - - isGoingToNextStation = false; - Logger.d(M_BUS_P + TAG, "order = station= arrive"); - mRouteLineInfoCallback.updateStationsInfo(stations,i,true); - return; - } - } - } - } - - } - - public void release() { - releaseListeners(); - cleanStation("release"); - startOrStopOrderLoop(false); - } - - public void setMoGoAutopilotPlanningListener(IBusPassengerAutopilotPlanningCallback - moGoAutopilotPlanningCallback) { - this.mAutopilotPlanningCallback = moGoAutopilotPlanningCallback; - } - - public void setADASStatusCallback(IBusPassengerADASStatusCallback callback) { - this.mADASStatusCallback = callback; - } - - public void setControllerStatusCallback(String tag, IBusPassengerControllerStatusCallback callback) { - if (tag == null || "".equals(tag)) return; - - if (callback == null) { - mControllerStatusCallbackMap.remove(tag); - return; - } - - mControllerStatusCallbackMap.put(tag,callback); - - } - - private void initListeners() { - - // 2021.11.1重构自动驾驶 实现接口 IMoGoAutopilotStatusListener 注册监听 替换IMogoAdasOCHCallback接口 - OchAutoPilotStatusListenerManager.INSTANCE.addListener(TAG,mGoAutopilotStatusListener); - IntentManager.getInstance().registerIntentListener(ConnectivityManager.CONNECTIVITY_ACTION, mNetWorkIntentListener ); - // 定位监听 - CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, 3,mMapLocationListener); - - - //监听司机端消息 - CallerTelematicListenerManager.INSTANCE.addListener(TAG,mReceivedMsgListener); - - AbnormalFactorsLoopManager.INSTANCE.startLoopAbnormalFactors(mContext); - TrajectoryAndDistanceManager.INSTANCE.addDistanceListener(TAG, trajectoryListener); - } - - private void releaseListeners() { - - // 注销定位监听 - CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG); - - MogoAiCloudSocketManager.getInstance(mContext) - .unregisterLifecycleListener(10010); - - OchAutoPilotStatusListenerManager.INSTANCE.removeListener(mGoAutopilotStatusListener); - - AbnormalFactorsLoopManager.INSTANCE.stopLoopAbnormalFactors(); - - CallerTelematicListenerManager.INSTANCE.removeListener(TAG); - CallerTelematicListenerManager.INSTANCE.removeListener(TAG); - } - - private final IDistanceListener trajectoryListener = new IDistanceListener() { - @Override - public void stationDistanceCallback(float distance) { - - } - @Override - public void distanceCallback(float distance) { - double lastTime = distance / BusPassengerConst.BUS_AVERAGE_SPEED * 3.6; //秒 - CallerLogger.d(M_BUS_P + TAG, "轨迹排查==lastSumLength = "+distance); - if(routesResult!=null){ - for (BusStationBean site : routesResult.getSites()) { - if (site.getDrivingStatus() == BusPassengerConst.STATION_STATUS_STOPPED && !site.isLeaving()) { - return; - } - } - } - // 小于200m 播报站点介绍 - if(distance<200){ - BusStationBean stationNext = mStations.get(mNextStationIndex); - if(!stationNext.isPlayTts()){ - if (!StringUtils.isEmpty(stationNext.getIntroduction())) { - VoiceNotice.showNotice(stationNext.getIntroduction()); - stationNext.setPlayTts(true); - } - } - } - mAutopilotPlanningCallback.routePlanningToNextStationChanged( - (long)distance, (long)lastTime - ); - } - }; - - private final IReceivedMsgListener mReceivedMsgListener = new IReceivedMsgListener() { - @Override - public void onDemoMode(boolean isDemoMode) { - - } - - @Override - public void onReceivedServerSn(@Nullable String sn) { - Logger.d(SceneConstant.M_BUS_P + TAG, "司机屏sn:"+sn ); - } - - @Override - public void onReceivedMsg(int type, @NonNull byte[] byteArray) { - if (OchCommonConst.BUSINESS_STRING == type) { - - BaseDPMsg baseMsg = GsonUtils.fromJson(new String(byteArray), BaseDPMsg.class); - Logger.d(SceneConstant.M_BUS_P + TAG, "onReceivedMsg = " + GsonUtils.toJson(baseMsg)); - - if (baseMsg != null && baseMsg.getType() == DPMsgType.TYPE_COMMON.getType()) { - AppConnectMsg msg = GsonUtils.fromJson(new String(byteArray), AppConnectMsg.class); - if (msg != null && msg.isViewShow()) { //消息盒子显示内容 - OCHSocketMessageManager.INSTANCE.pushAppOperationalMsgBox( - DateTimeUtil.getCurrentTimeStamp(), msg.getMsg(), - OCHSocketMessageManager.OPERATION_SYSTEM); - } - } else if (baseMsg != null && baseMsg.getType() == DPMsgType.TYPE_TASK_DETAILS.getType()) { - TaskDetailsMsg msg = GsonUtils.fromJson(new String(byteArray), TaskDetailsMsg.class); - - Logger.d(SceneConstant.M_BUS_P + TAG, "onReceivedMsg = " + GsonUtils.toJson(msg)); - if (msg == null || msg.getMsg().isEmpty()) { - clearLocalRouteResult(); - return; - } - BusTransferData result = GsonUtils.fromJson(msg.getMsg(), BusTransferData.class); - if (msg != null && mDriverStatusCallback != null) { - mDriverStatusCallback.changeOperationStatus(result.getLoginStatus() == 1); - } - if (result != null) { //已司机端传来的为准 - routesResult = result.getRoutesResult(); - updatePassengerRouteInfo(routesResult); - } - } - } - } - }; - - - //监听网络变化,避免启动机器时无网导致无法更新订单信息 - private final IMogoIntentListener mNetWorkIntentListener = new IMogoIntentListener() { - @Override - public void onIntentReceived( String intentStr, Intent intent ) { - CallerLogger.d( M_BUS_P + TAG, "onIntentReceived = %s", intentStr ); - if ( ConnectivityManager.CONNECTIVITY_ACTION.equals( intentStr ) ) { - if ( NetworkUtils.isConnected( mContext ) ) { - queryDriverOperationStatus(); - } - } - } - }; - - private final IMoGoChassisLocationGCJ02Listener mMapLocationListener = new IMoGoChassisLocationGCJ02Listener() { - @Override - public void onChassisLocationGCJ02(@Nullable MogoLocation gnssInfo) { - if (null == gnssInfo) return; - for (IBusPassengerControllerStatusCallback callback :mControllerStatusCallbackMap.values()){ - callback.onCarLocationChanged(gnssInfo); - } - } - }; - - private final IOchAutopilotStatusListener mGoAutopilotStatusListener = new IOchAutopilotStatusListener(){ - - @Override - public void onAutopilotStatusResponse(int state) { - if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) { - //2022.7.20 自动驾驶更换成带档位的 - if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotRunning(); - } else{ - if (FunctionBuildConfig.isDemoMode && - mNextStationIndex>= 0 && mNextStationIndex <= mStations.size() - 1 - && isGoingToNextStation){ - Logger.d(M_BUS_P + TAG, "FunctionBuildConfig.isDemoMode is true"); - return; - } - - if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE) { - if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotEnable(); - } else if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE) { - if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotDisable(); - }else if (state == IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING){ - if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotRunning(); - } - } - } - }; - - private void startOrStopOrderLoop(boolean start) { - CallerLogger.d(M_BUS_P + TAG, "startOrStopOrderLoop() " + start); - if (start) { - BusPassengerModelLoopManager.getInstance().startQueryDriverLineLoop(); - } else { - BusPassengerModelLoopManager.getInstance().stopQueryDriverLineLoop(); - } - } - - private void setTrajectoryStation( - BusStationBean startStationInfo , - BusStationBean endStationInfo, - int lineId - ) { - MogoLocation startStation = new MogoLocation(); - startStation.setLongitude(startStationInfo.getGcjLon()); - startStation.setLatitude(startStationInfo.getGcjLat()); - MogoLocation endStation = new MogoLocation(); - endStation.setLongitude(endStationInfo.getGcjLon()); - endStation.setLatitude(endStationInfo.getGcjLat()); - TrajectoryAndDistanceManager.INSTANCE.setStationPoint(startStation, endStation, (long)lineId); - } - - private void cleanStation(String type) { - CallerLogger.d(M_BUS_P + TAG, "清理站点:"+type); - TrajectoryAndDistanceManager.INSTANCE.setStationPoint(null, null, -1L); - } - -} diff --git a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/network/BusPassengerModelLoopManager.java b/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/network/BusPassengerModelLoopManager.java deleted file mode 100644 index 09f7837cf5..0000000000 --- a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/network/BusPassengerModelLoopManager.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.mogo.och.shuttle.passenger.network; - -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; -import com.mogo.och.shuttle.passenger.model.BusPassengerModel; - -import java.util.concurrent.TimeUnit; - -import io.reactivex.Observable; -import io.reactivex.android.schedulers.AndroidSchedulers; -import io.reactivex.disposables.CompositeDisposable; -import io.reactivex.disposables.Disposable; -import io.reactivex.schedulers.Schedulers; - -import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P; -import static com.mogo.och.shuttle.passenger.constant.BusPassengerConst.LOOP_DELAY; -import static com.mogo.och.shuttle.passenger.constant.BusPassengerConst.LOOP_LINE_2S; - -/** - * Created on 2021/11/22 - * - * 管理轮询逻辑(订单轮询、新单轮询、新单抢单结果轮询等等) - */ -public class BusPassengerModelLoopManager { - - private static final String TAG = BusPassengerModelLoopManager.class.getSimpleName(); - - private static final class SingletonHolder { - private static final BusPassengerModelLoopManager INSTANCE = new BusPassengerModelLoopManager(); - } - - public static BusPassengerModelLoopManager getInstance() { - return SingletonHolder.INSTANCE; - } - - private Disposable mQueryLineDisposable; //心跳轮询 - - public void startQueryDriverLineLoop() { - if (mQueryLineDisposable != null && !mQueryLineDisposable.isDisposed()) { - return; - } - CallerLogger.i(M_BUS_P + TAG, "startQueryDriverLineLoop()"); - mQueryLineDisposable = Observable.interval(LOOP_DELAY, - LOOP_LINE_2S, TimeUnit.MILLISECONDS) - .map((aLong -> aLong + 1)) - .subscribeOn(Schedulers.io()) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(aLong -> BusPassengerModel.getInstance().queryDriverSiteByCoordinate()); - } - - public void stopQueryDriverLineLoop() { - if (mQueryLineDisposable != null) { - CallerLogger.i(M_BUS_P + TAG, "stopQueryDriverLineLoop()"); - mQueryLineDisposable.dispose(); - mQueryLineDisposable = null; - } - } - -} diff --git a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/presenter/BaseBusPassengerPresenter.java b/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/presenter/BaseBusPassengerPresenter.java deleted file mode 100644 index 2d5a815653..0000000000 --- a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/presenter/BaseBusPassengerPresenter.java +++ /dev/null @@ -1,192 +0,0 @@ -package com.mogo.och.shuttle.passenger.presenter; - -import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P; - -import android.os.Looper; - -import androidx.annotation.NonNull; -import androidx.lifecycle.LifecycleOwner; - -import com.mogo.commons.AbsMogoApplication; -import com.mogo.commons.mvp.Presenter; -import com.mogo.eagle.core.data.map.MogoLocation; -import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; -import com.mogo.eagle.core.utilcode.util.UiThreadHandler; -import com.mogo.och.shuttle.passenger.callback.IBusPassegerDriverStatusCallback; -import com.mogo.och.shuttle.passenger.callback.IBusPassengerADASStatusCallback; -import com.mogo.och.shuttle.passenger.callback.IBusPassengerAutopilotPlanningCallback; -import com.mogo.och.shuttle.passenger.callback.IBusPassengerControllerStatusCallback; -import com.mogo.och.shuttle.passenger.callback.IBusPassengerRouteLineInfoCallback; -import com.mogo.och.shuttle.passenger.model.BusPassengerModel; -import com.mogo.och.shuttle.passenger.ui.BusPassengerRouteFragment; -import com.mogo.och.data.bean.BusStationBean; - -import java.util.List; - -/** - * Created on 2022/3/31 - */ -public class BaseBusPassengerPresenter extends Presenter implements - IBusPassengerADASStatusCallback, IBusPassengerControllerStatusCallback, IBusPassegerDriverStatusCallback, IBusPassengerRouteLineInfoCallback, IBusPassengerAutopilotPlanningCallback { - private static final String TAG = BaseBusPassengerPresenter.class.getSimpleName(); - - public BaseBusPassengerPresenter(BusPassengerRouteFragment view) { - super(view); - BusPassengerModel.getInstance().init(AbsMogoApplication.getApp()); - initListeners(); - } - - @Override - public void onCreate(@NonNull LifecycleOwner owner) { - super.onCreate(owner); - CallerLogger.d(M_BUS_P + TAG, "Bus乘客端Presenter onCreate()"); - } - - @Override - public void onDestroy(@NonNull LifecycleOwner owner) { - super.onDestroy(owner); - - releaseListeners(); - BusPassengerModel.getInstance().release(); - } - - private void initListeners() { - BusPassengerModel.getInstance().setADASStatusCallback(this); - BusPassengerModel.getInstance().setControllerStatusCallback(TAG, this); - BusPassengerModel.getInstance().setDriverStatusCallback(this); - BusPassengerModel.getInstance().setRouteLineInfoCallback(this); - BusPassengerModel.getInstance().setMoGoAutopilotPlanningListener(this); - } - - private void releaseListeners() { - BusPassengerModel.getInstance().setADASStatusCallback(null); - BusPassengerModel.getInstance().setControllerStatusCallback(TAG, null); - BusPassengerModel.getInstance().setDriverStatusCallback(null); - BusPassengerModel.getInstance().setRouteLineInfoCallback(null); - BusPassengerModel.getInstance().setMoGoAutopilotPlanningListener(null); - } - - @Override - public void onAutopilotEnable() { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - if (mView != null) { - mView.onAutopilotStatusChanged( - IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE); - } - } - }, UiThreadHandler.MODE.QUEUE); - } - - @Override - public void onAutopilotDisable() { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - if (mView != null) { - mView.onAutopilotStatusChanged( - IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE); - } - } - }, UiThreadHandler.MODE.QUEUE); - } - - @Override - public void onAutopilotRunning() { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - if (mView != null) { - mView.onAutopilotStatusChanged( - IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING); - } - } - }, UiThreadHandler.MODE.QUEUE); - } - - @Override - public void onCarLocationChanged(MogoLocation location) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - if (location != null && mView != null) { - mView.onCarLocationChanged(location); - } - } - }, UiThreadHandler.MODE.QUEUE); - } - - @Override - public void changeOperationStatus(boolean changeStatus) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - if (mView != null) { - mView.changeOperationStatus(changeStatus); - } - } - }, UiThreadHandler.MODE.QUEUE); - } - - @Override - public void updateLineInfo(String lineName) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - if (mView != null) { - mView.updateLineInfo(lineName); - } - } - }, UiThreadHandler.MODE.QUEUE); - } - - @Override - public void updateStationsInfo(List stations, int currentStationIndex, boolean isArrived) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - if (mView != null) { - mView.updateStationsInfo(stations, currentStationIndex, isArrived); - } - } - }, UiThreadHandler.MODE.QUEUE); - } - - @Override - public void showNoTaskView() { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - if (mView != null) { - mView.showNoTaskView(); - } - } - }, UiThreadHandler.MODE.QUEUE); - } - - @Override - public void hideNoTaskView() { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - if (mView != null) { - mView.hideNoTaskView(); - } - } - }, UiThreadHandler.MODE.QUEUE); - } - - @Override - public void routePlanningToNextStationChanged(long meters, long timeInSecond) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - if (mView != null) { - mView.updateRoutePlanningToNextStation(meters, timeInSecond); - } - } - }, UiThreadHandler.MODE.QUEUE); - } -} diff --git a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPBlueToothView.kt b/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPBlueToothView.kt deleted file mode 100644 index 985057174c..0000000000 --- a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPBlueToothView.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui - -import android.content.Context -import android.util.AttributeSet -import android.view.LayoutInflater -import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener -import com.mogo.eagle.core.function.hmi.ui.widget.BlueToothView -import com.mogo.eagle.core.utilcode.util.ThreadUtils -import com.mogo.och.shuttle.passenger.R -import kotlinx.android.synthetic.main.shuttle_p_jl_view_blue_tooth.view.blueView - -/** - * 魔戒蓝牙控件 - * 放置于StatusBar右侧位置 - */ -class BusPBlueToothView @JvmOverloads constructor( - context: Context, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : BlueToothView(context, attrs, defStyleAttr),IMoGoDevaToolsListener { - - init { - LayoutInflater.from(context).inflate(R.layout.shuttle_p_jl_view_blue_tooth, this, true) - } - - override fun mofangStatus(status: Boolean) { - ThreadUtils.runOnUiThread { - if (status) { - blueView.setImageResource(R.drawable.shuttle_p_jl_blue_tooth_close) - } else { - blueView.setImageResource(R.drawable.shuttle_p_jl_blue_tooth_open) - } - } - } - -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPStatusBarView.kt b/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPStatusBarView.kt deleted file mode 100644 index cd2c21f70a..0000000000 --- a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPStatusBarView.kt +++ /dev/null @@ -1,70 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui - -import android.annotation.* -import android.content.Context -import android.util.AttributeSet -import android.view.LayoutInflater -import android.view.ViewGroup -import androidx.constraintlayout.widget.ConstraintLayout -import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener -import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener -import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager -import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager -import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager -import com.mogo.eagle.core.utilcode.kotlin.* -import com.mogo.eagle.core.utilcode.util.AppUtils -import com.mogo.och.shuttle.passenger.R -import kotlinx.android.synthetic.main.shuttle_p_jl_view_status_bar.view.tv_shuttle_b1_p_version -import kotlinx.coroutines.* -import me.jessyan.autosize.utils.AutoSizeUtils - -/** - * @author: wangmingjun - * @date: 2023/2/14 - */ -class BusPStatusBarView @JvmOverloads constructor( - context: Context, attrs: AttributeSet? = null -) : ConstraintLayout(context, attrs), IViewControlListener, IMoGoSkinModeChangeListener{ - - companion object { - const val TAG = "BusPStatusBarView" - } - - init { - LayoutInflater.from(context).inflate(R.layout.shuttle_p_jl_view_status_bar, this, true) - setBackgroundResource(R.drawable.shuttle_p_jl_bg_status_bar) - isClickable = true - isFocusable = true - - tv_shuttle_b1_p_version.text = "版本:${AppUtils.getAppVersionName()}" - } - - - @SuppressLint("ClickableViewAccessibility") - override fun onAttachedToWindow() { - super.onAttachedToWindow() - post { - val params: ViewGroup.LayoutParams = getLayoutParams() - params.height = AutoSizeUtils.dp2px(context,40f) - layoutParams = params - } - //添加view控制 - CallerHmiViewControlListenerManager.addListener(TAG,this) - // 添加换肤监听 - CallerSkinModeListenerManager.addListener(TAG, this) - } - - override fun onSkinModeChange(skinMode: Int) { - when (skinMode) { - 0 -> setStatusBarDarkOrLight(false) - 1 -> setStatusBarDarkOrLight(true) - } - } - - override fun onDetachedFromWindow() { - super.onDetachedFromWindow() - CallerHmiViewControlListenerManager.removeListener(TAG) - CallerSkinModeListenerManager.removeListener(TAG) - CallerDevaToolsManager.hideStatusBar() - } -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPassengerBaseFragment.java b/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPassengerBaseFragment.java deleted file mode 100644 index a15e0da496..0000000000 --- a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPassengerBaseFragment.java +++ /dev/null @@ -1,96 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui; - -import android.os.Bundle; -import android.view.LayoutInflater; -import android.widget.FrameLayout; - -import androidx.annotation.NonNull; - -import com.mogo.commons.mvp.IView; -import com.mogo.commons.mvp.MvpFragment; - -import com.mogo.commons.mvp.Presenter; -import com.mogo.eagle.core.function.hmi.ui.widget.RomaPassengerView; -import com.mogo.eagle.core.function.view.MapBizView; -import com.mogo.och.shuttle.passenger.R; - -/** - * Created on 2022/3/31 - *

- * Bus乘客端基础Fragment - */ -public abstract class BusPassengerBaseFragment> extends MvpFragment { - private static final String TAG = BusPassengerBaseFragment.class.getSimpleName(); - - private MapBizView mapBizView; - private FrameLayout flContainer; - private RomaPassengerView romaPView; - - @Override - protected int getLayoutId() { - return R.layout.shuttle_p_jl_base_fragment; - } - - @Override - public String getTagName() { - return TAG; - } - - @Override - protected void initViews() { - mapBizView = findViewById(R.id.mapBizView); - - showRouteFragment(); - } - - @Override - protected void initViews(Bundle savedInstanceState) { - super.initViews(savedInstanceState); - mapBizView.onCreate(savedInstanceState); - } - - @Override - public void onResume() { - super.onResume(); - mapBizView.onResume(); - } - - @Override - public void onSaveInstanceState(@NonNull Bundle outState) { - super.onSaveInstanceState(outState); - mapBizView.onSaveInstanceState(outState); - } - - @Override - public void onLowMemory() { - super.onLowMemory(); - mapBizView.onLowMemory(); - } - - @Override - public void onPause() { - super.onPause(); - mapBizView.onPause(); - } - - @Override - public void onDestroyView() { - mapBizView.onDestroy(); - super.onDestroyView(); - } - - /** - * 获取站点面板view,在{@link #initViews()}时候添加到container中 - * - * @return 站点面板view - */ - public abstract int getStationPanelViewId(); - - /** - * 显示线路信息 - */ - public void showRouteFragment() { - flContainer = findViewById(R.id.bus_p_route_panel); - LayoutInflater.from(getContext()).inflate(getStationPanelViewId(), flContainer); - } -} diff --git a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPassengerRouteFragment.java b/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPassengerRouteFragment.java deleted file mode 100644 index 0009a3b75a..0000000000 --- a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPassengerRouteFragment.java +++ /dev/null @@ -1,383 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui; - -import android.content.Context; -import android.graphics.drawable.AnimationDrawable; -import android.os.Bundle; -import android.text.Html; -import android.view.Gravity; -import android.view.View; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.appcompat.widget.AppCompatImageView; -import androidx.appcompat.widget.AppCompatTextView; -import androidx.constraintlayout.widget.ConstraintLayout; -import androidx.constraintlayout.widget.Group; -import androidx.recyclerview.widget.RecyclerView; - -import com.amap.api.maps.model.LatLng; -import com.elegant.utils.UiThreadHandler; -import com.mogo.eagle.core.data.enums.SidePattern; -import com.mogo.eagle.core.data.map.MogoLocation; -import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; -import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager; -import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView; -import com.mogo.map.overlay.IMoGoOverlayManager; -import com.mogo.och.common.module.utils.ResourcesUtils; -import com.mogo.och.shuttle.passenger.R; -import com.mogo.och.shuttle.passenger.ui.adapter.BusPassengerLineStationsAdapter; -import com.mogo.och.shuttle.passenger.presenter.BaseBusPassengerPresenter; -import com.mogo.och.shuttle.passenger.ui.layoutmanager.CenterLayoutManager; -import com.mogo.och.common.module.wigets.mapdirectionview.MapDirectionView; -import com.mogo.och.common.module.utils.NumberFormatUtil; -import com.mogo.och.common.module.wigets.MarqueeTextView; -import com.mogo.och.common.module.wigets.OCHGradientTextView; -import com.mogo.och.data.bean.BusStationBean; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author: wangmingjun - * @date: 2022/4/12 - */ -public class BusPassengerRouteFragment extends - BusPassengerBaseFragment { - - public static final String TAG = "BusPassengerRouteFragment"; - - private final List mStationsList = new ArrayList<>(); - - private OCHGradientTextView mSpeedTv; - private ConstraintLayout mNoLineInfoView; - private MarqueeTextView mLineName; - private Group mRouteInfoView; - private RecyclerView mStationsListRv; - private MapDirectionView mMapDirectionView; - private BusPassengerLineStationsAdapter mAdapter; - private TextView emptyTv; - private AppCompatImageView mAutopilotIv; - private AppCompatTextView mCurrentArriveStation; - private AppCompatTextView mCurrentArriveStationTitle; - private AppCompatTextView mCurrentArriveTip; - private AppCompatImageView mSpeakArrivedIv; - - /** - * 改变自动驾驶状态 - * - * @param status 2 - running 1 - enable 2 - disable - */ - private int mPrevAPStatus = -1; - - @Override - public int getStationPanelViewId() { - return R.layout.shuttle_p_jl_route_fragment; - } - - @NonNull - @Override - protected BaseBusPassengerPresenter createPresenter() { - return new BaseBusPassengerPresenter(this); - } - - @Override - protected void initViews() { - super.initViews(); - - mSpeedTv = findViewById(R.id.bus_p_speed_tv); - mSpeedTv.setVertrial(true); - mSpeedTv.setmColorList(new int[]{ResourcesUtils.getColor(R.color.shuttle_p_jl_speed_color_start), - ResourcesUtils.getColor(R.color.shuttle_p_jl_speed_color_end)}); - - mNoLineInfoView =findViewById(R.id.bus_p_no_order_data_view); - emptyTv = findViewById(R.id.no_order_data_tv); - - mLineName = findViewById(R.id.bus_p_line_name_tv); - mAutopilotIv = findViewById(R.id.auto_status_iv); - mCurrentArriveStation = findViewById(R.id.bus_p_cur_station_name); - mCurrentArriveStationTitle = findViewById(R.id.bus_p_cur_station_title); - mCurrentArriveTip = findViewById(R.id.bus_p_cur_station_tip); - mSpeakArrivedIv = findViewById(R.id.speak_arrived_iv); - - mRouteInfoView = findViewById(R.id.bus_p_line_cl); - mStationsListRv = findViewById(R.id.bus_p_line_stations_rl); - - CenterLayoutManager manager = new CenterLayoutManager(getContext()); - mStationsListRv.setLayoutManager(manager); - mAdapter = new BusPassengerLineStationsAdapter(getContext(), mStationsList); - mStationsListRv.setAdapter(mAdapter); - - mSpeedTv.setOnLongClickListener(v -> { - Context context = getContext(); - if(context!=null){ - ToggleDebugView.Companion. - getToggleDebugView().toggle(context, Gravity.RIGHT, SidePattern.RIGHT); - } - return true; - }); - } - - @Override - protected void initViews(Bundle savedInstanceState) { - super.initViews(savedInstanceState); - mMapDirectionView = findViewById(R.id.bus_p_line_map_view); - mMapDirectionView.onCreateView(savedInstanceState); - } - - @Override - public void onResume() { - super.onResume(); - if (mMapDirectionView != null) { - mMapDirectionView.onResume(); - } - } - - @Override - public void onPause() { - super.onPause(); - if (mMapDirectionView != null) { - mMapDirectionView.onPause(); - } - } - - @Override - public void onDestroyView() { - if (mPresenter != null) { - mPresenter.onDestroy(this); - } - IMoGoOverlayManager overlayManager = CallerMapUIServiceManager.INSTANCE.getOverlayManager(); - if(overlayManager!=null) { - overlayManager.removeAllLines(); - overlayManager.removeAllPoints(); - } - super.onDestroyView(); - } - - @Override - public void onDestroy() { - super.onDestroy(); - if (mMapDirectionView != null) { - mMapDirectionView.onDestroy(); - } - } - - public void clearMapView() { - if (mMapDirectionView != null) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - mMapDirectionView.clearPolyline(); - mMapDirectionView.clearCoordinatesLatLng(); - } - }); - } - } - - public void clearMapMarkers() { - if (mMapDirectionView != null) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - mMapDirectionView.clearLineMarkers(); - } - }); - } - } - - public void changeOperationStatus(boolean status) { - if (!status) { - emptyTv.setText(getString(R.string.shuttle_p_jl_no_out)); - mNoLineInfoView.setVisibility(View.VISIBLE); - mRouteInfoView.setVisibility(View.GONE); - mLineName.setText(getContext().getString(R.string.shuttle_p_jl_no_line)); - updateArrivedStation(null,0,true); - clearMapView(); - clearMapMarkers(); - } - } - - public void showNoTaskView(){ - if (mNoLineInfoView.getVisibility() == View.GONE){ - mNoLineInfoView.setVisibility(View.VISIBLE); - mRouteInfoView.setVisibility(View.GONE); - mLineName.setText(getContext().getString(R.string.shuttle_p_jl_no_line)); - updateArrivedStation(null,0,true); - clearMapView(); - clearMapMarkers(); - } - emptyTv.setText(getString(R.string.shuttle_p_jl_no_task)); - } - - public void hideNoTaskView(){ - if (mNoLineInfoView.getVisibility() == View.VISIBLE){ - mNoLineInfoView.setVisibility(View.GONE); - } - if (mRouteInfoView.getVisibility() == View.GONE){ - mRouteInfoView.setVisibility(View.VISIBLE); - } - } - - public void updateLineInfo(String lineName) { - mLineName.setText(lineName); - } - - /** - * - * @param stations - * @param currentStationIndex - * @param isArrived 是否到站并离开,true 到达当前站 currentStationIndex 未离开, false 正在前往此站 currentStationIndex - */ - public void updateStationsInfo(List stations, int currentStationIndex, boolean isArrived) { - updateArrivedStation(stations.get(currentStationIndex).getName(),currentStationIndex,isArrived); - mStationsList.clear(); - mStationsList.addAll(stations); - mAdapter.notifyDataSetChanged(); - - if (currentStationIndex > -1){ - updateCurrentStation(currentStationIndex); - } - - if (currentStationIndex == 0 && isArrived){ //到达始发站且并未出发, 恢复站点marker 清楚路径 清空路径点 - clearMapView(); - } - - if (stations.size() > 0){ - updateWayPointList(stations,currentStationIndex); - } - } - - private void updateWayPointList(List stations,int currentStationIndex) { - List mLineStationsList = new ArrayList<>(); - for (int i = 0; i< stations.size(); i++) {//站点集合 - LatLng latLng = new LatLng(stations.get(i).getGcjLat(),stations.get(i).getGcjLon());// lat,lon - mLineStationsList.add(latLng); - } - - if (mMapDirectionView != null) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - mMapDirectionView.setLinePointMarkerAndDraw(mLineStationsList,currentStationIndex); - } - }); - } - } - -// @Override -// public void onCameraChange(float bearing) { -//// startIvCompass(bearing); -// } - -// /** -// * 设置指南针旋转 -// * -// * @param bearing -// */ -// private void startIvCompass(float bearing) { -// bearing = 360 - bearing; -// CallerLogger.d(M_BUS_P + TAG, "startIvCompass: " + bearing); -// rotateAnimation = new RotateAnimation(lastBearing, bearing, Animation.RELATIVE_TO_SELF -// , 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); -// rotateAnimation.setFillAfter(true); -// -// mMapArrowIcon.startAnimation(rotateAnimation); -// lastBearing = bearing; -// } - - public void onCarLocationChanged(MogoLocation location) { - updateSpeedView((float) location.getGnssSpeed()); - } - - public void updateSpeedView(float speed){ - int speedKM = (int) (Math.abs(speed) * 3.6F); - mSpeedTv.setText(String.valueOf(speedKM)); - } - - public void updateCurrentStation(int position) { - if (mStationsListRv != null){ - mStationsListRv.smoothScrollToPosition(position); - } - } - - public void updateArrivedStation(String station,int currentIndex,boolean isArrived){ - if (null == station){ - mCurrentArriveStation.setText("----"); - mCurrentArriveStationTitle.setText(ResourcesUtils.getString(R.string.shuttle_p_jl_cur_station_title)); - mCurrentArriveTip.setText(ResourcesUtils.getString(R.string.shuttle_p_jl_cur_station_arrived_tip)); - mCurrentArriveTip.setBackgroundResource(R.drawable.shuttle_p_jl_cur_station_arrived_bg); - handleArrivingSpeakIconDrawable(); - }else { - mCurrentArriveStation.setText(station); - if (currentIndex == 0){ - mCurrentArriveStationTitle.setText(ResourcesUtils.getString(R.string.shuttle_p_jl_cur_station_title)); - mCurrentArriveTip.setText(ResourcesUtils.getString(R.string.shuttle_p_jl_cur_station_arrived_tip)); - mCurrentArriveTip.setBackgroundResource(R.drawable.shuttle_p_jl_cur_station_arrived_bg); - handleArrivingSpeakIconDrawable(); - return; - } - if (isArrived){ - mCurrentArriveStationTitle.setText(ResourcesUtils.getString(R.string.shuttle_p_jl_cur_station_title)); - mCurrentArriveTip.setText(ResourcesUtils.getString(R.string.shuttle_p_jl_cur_station_arrived_tip)); - mCurrentArriveTip.setBackgroundResource(R.drawable.shuttle_p_jl_cur_station_arrived_bg); - handleArrivedSpeakIconDrawable(); - }else { - mCurrentArriveStationTitle.setText(ResourcesUtils.getString(R.string.shuttle_p_jl_cur_next_station_title)); - mCurrentArriveTip.setBackgroundResource(R.drawable.shuttle_p_jl_cur_station_un_arrived_bg); - handleArrivingSpeakIconDrawable(); - } - } - - } - - private void handleArrivedSpeakIconDrawable(){ - AnimationDrawable animationDrawable = (AnimationDrawable) mSpeakArrivedIv.getDrawable(); - animationDrawable.start(); - mSpeakArrivedIv.setVisibility(View.VISIBLE); - } - - private void handleArrivingSpeakIconDrawable(){ - AnimationDrawable animationDrawable = (AnimationDrawable) mSpeakArrivedIv.getDrawable(); - animationDrawable.stop(); - mSpeakArrivedIv.setVisibility(View.GONE); - } - - public void updateRoutePlanningToNextStation(long meters, long timeInSecond){ - //更新进度条 - String dis = "0"; - String disUnit = "公里"; - if (meters > 0){ - if (meters / 1000 < 1){ - disUnit = "米"; - dis = String.valueOf(Math.round(meters)); - }else { - disUnit = "公里"; - dis = NumberFormatUtil.formatLong((double)meters / 1000); - } - } -// String strHtml2 = "距离 " + "" + dis + "" + " "+disUnit+"" -// + "   剩余 " + "" + (int)Math.ceil((double)timeInSecond/ 60f) + "" + " 分钟"; - String str = dis+disUnit+" | "+(int)Math.ceil((double)timeInSecond/ 60f)+"分钟"; - mCurrentArriveTip.setText(Html.fromHtml(str)); - } - - public void onAutopilotStatusChanged(int status) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - // 3. 其他过程直接更新 - if (mPrevAPStatus != status){ - AutopilotStatusChanged(status); - } - mPrevAPStatus = status; - } - }); - } - - public void AutopilotStatusChanged(int status) { - if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == status) { - mAutopilotIv.setImageResource(R.drawable.shuttle_p_jl_auto_open); - } else { - mAutopilotIv.setImageResource(R.drawable.shuttle_p_jl_auto_close); - } - } -} diff --git a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPassengerTrafficLightView.kt b/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPassengerTrafficLightView.kt deleted file mode 100644 index f2178f347d..0000000000 --- a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPassengerTrafficLightView.kt +++ /dev/null @@ -1,181 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui - -import android.content.Context -import android.util.AttributeSet -import android.view.LayoutInflater -import android.widget.LinearLayout -import com.mogo.eagle.core.data.enums.DataSourceType -import com.mogo.eagle.core.data.enums.TrafficLightEnum -import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTrafficLightListener -import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager -import com.mogo.eagle.core.utilcode.util.UiThreadHandler -import com.mogo.och.shuttle.passenger.R -import kotlinx.android.synthetic.main.shuttle_p_jl_traffic_light_view.view.bus_p_traffic_light_bg -import kotlinx.android.synthetic.main.shuttle_p_jl_traffic_light_view.view.bus_p_traffic_light_iv -import kotlinx.android.synthetic.main.shuttle_p_jl_traffic_light_view.view.bus_p_traffic_light_time_tv - -/** - * bus乘客端:红绿灯view - * - * Created on 2022/3/14 - */ -class BusPassengerTrafficLightView @JvmOverloads constructor( - context: Context?, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : LinearLayout(context, attrs, defStyleAttr), IMoGoTrafficLightListener { - - companion object { - private const val TAG = "BusPassengerTrafficLightView" - } - - private var mCurrentLightId = TrafficLightEnum.BLACK - - init { - init(context) - } - - private fun init(context: Context?) { - LayoutInflater.from(context).inflate(R.layout.shuttle_p_jl_traffic_light_view, this, true) - } - - override fun onAttachedToWindow() { - super.onAttachedToWindow() - CallerTrafficLightListenerManager.addListener(TAG, this) - } - - override fun onDetachedFromWindow() { - super.onDetachedFromWindow() - CallerTrafficLightListenerManager.removeListener(TAG) - } - - /** - * 展示红绿灯预警 - * - * @param checkLightId 0-都是默认,1-红,2-黄,3-绿 - * @param lightSource 1:云端下发;2:自车感知 - */ - override fun showTrafficLight(checkLightId: TrafficLightEnum, lightSource: DataSourceType) { - super.showTrafficLight(checkLightId, lightSource) - mCurrentLightId = checkLightId - updateTrafficLightIcon(checkLightId) - } - - /** - * 关闭红绿灯预警展示,并重制灯态 - */ - override fun disableTrafficLight() { - super.disableTrafficLight() - UiThreadHandler.post { - mCurrentLightId = TrafficLightEnum.BLACK - this@BusPassengerTrafficLightView.visibility = GONE - } - } - - /** - * @param redNum 红灯倒计时 - * @param yellowNum 黄灯倒计时 - * @param greenNum 绿灯倒计时 - */ - override fun changeCountdownTrafficLightNum(redNum: Int, yellowNum: Int, greenNum: Int) { - super.changeCountdownTrafficLightNum(redNum, yellowNum, greenNum) - resetView() - when (mCurrentLightId) { - TrafficLightEnum.RED -> changeCountdownRed(redNum) - TrafficLightEnum.YELLOW -> changeCountdownYellow(yellowNum) - TrafficLightEnum.GREEN -> changeCountdownGreen(greenNum) - else -> UiThreadHandler.post { bus_p_traffic_light_time_tv.text = "" } - } - } - - override fun changeCountdownRed(redNum: Int) { - super.changeCountdownRed(redNum) - UiThreadHandler.post { - if (redNum > 0) { - resetView() - bus_p_traffic_light_time_tv.text = redNum.toString() - } else { - disableTrafficLightCountDown() - bus_p_traffic_light_time_tv.text = "" - } - } - } - - override fun changeCountdownGreen(greenNum: Int) { - super.changeCountdownGreen(greenNum) - UiThreadHandler.post { - if (greenNum > 0) { - resetView() - bus_p_traffic_light_time_tv.text = greenNum.toString() - } else { - disableTrafficLightCountDown() - bus_p_traffic_light_time_tv.text = "" - } - } - } - - override fun changeCountdownYellow(yellowNum: Int) { - super.changeCountdownYellow(yellowNum) - UiThreadHandler.post { - if (yellowNum > 0) { - resetView() - bus_p_traffic_light_time_tv.text = yellowNum.toString() - } else { - disableTrafficLightCountDown() - bus_p_traffic_light_time_tv.text = "" - } - } - } - - /** - * 更新红绿灯icon - * - * @param lightId 0-都是默认,1-红,2-黄,3-绿 - */ - private fun updateTrafficLightIcon(lightId: TrafficLightEnum) { - UiThreadHandler.post { - when (lightId) { - TrafficLightEnum.RED -> { - bus_p_traffic_light_iv.setBackgroundResource(R.drawable.shuttle_p_jl_light_red_nor) - this@BusPassengerTrafficLightView.visibility = VISIBLE - } - TrafficLightEnum.YELLOW -> { - bus_p_traffic_light_iv.setBackgroundResource(R.drawable.shuttle_p_jl_light_yellow_nor) - this@BusPassengerTrafficLightView.visibility = VISIBLE - } - TrafficLightEnum.GREEN -> { - bus_p_traffic_light_iv.setBackgroundResource(R.drawable.shuttle_p_jl_light_green_nor) - this@BusPassengerTrafficLightView.visibility = VISIBLE - } - else -> this@BusPassengerTrafficLightView.visibility = GONE - } - } - } - - override fun disableTrafficLightCountDown() { - super.disableTrafficLightCountDown() - UiThreadHandler.post { - val layoutParams = layoutParams - if (layoutParams is MarginLayoutParams) { - val lp = layoutParams - lp.width = resources.getDimension(R.dimen.shuttle_p_jl_traffic_light_icon_size).toInt() - setLayoutParams(lp) - bus_p_traffic_light_time_tv.visibility = GONE - bus_p_traffic_light_bg.layoutParams.width = - resources.getDimension(R.dimen.dp_90).toInt() - } - } - } - - private fun resetView() { - val layoutParams = layoutParams - if (layoutParams is MarginLayoutParams) { - val lp = layoutParams - lp.width = resources.getDimension(R.dimen.shuttle_p_jl_route_traffic_light_view_width).toInt() - setLayoutParams(lp) - bus_p_traffic_light_time_tv.visibility = VISIBLE - bus_p_traffic_light_bg.layoutParams.width = - resources.getDimension(R.dimen.shuttle_p_jl_traffic_light_bg_width).toInt() - } - } -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/adapter/BusPassengerLineStationsAdapter.java b/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/adapter/BusPassengerLineStationsAdapter.java deleted file mode 100644 index ed9c65b87f..0000000000 --- a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/adapter/BusPassengerLineStationsAdapter.java +++ /dev/null @@ -1,140 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui.adapter; - -import android.content.Context; -import android.text.TextUtils; -import android.util.Log; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ImageView; - -import androidx.annotation.NonNull; -import androidx.recyclerview.widget.RecyclerView; - -import com.mogo.och.shuttle.passenger.R; -import com.mogo.och.common.module.utils.BlinkAnimationUtil; -import com.mogo.och.common.module.wigets.MarqueeTextView; -import com.mogo.och.data.bean.BusStationBean; - -import java.util.List; - -import static com.mogo.och.shuttle.passenger.constant.BusPassengerConst.STATION_STATUS_ARRIVING; -import static com.mogo.och.shuttle.passenger.constant.BusPassengerConst.STATION_STATUS_LEAVING; -import static com.mogo.och.shuttle.passenger.constant.BusPassengerConst.STATION_STATUS_STOPPED; - -/** - * @author: wangmingjun - * @date: 2022/4/6 - */ -public class BusPassengerLineStationsAdapter extends RecyclerView.Adapter { - - private Context mContext; - private List mStations; - - public BusPassengerLineStationsAdapter(Context context, List stations){ - this.mContext = context; - this.mStations = stations; - } - - @NonNull - @Override - public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { - View view = LayoutInflater.from(mContext).inflate(R.layout.shuttle_p_jl_stations_common_item,parent,false); - StationViewHolder viewHolder = new StationViewHolder(view); - return viewHolder; - } - - @Override - public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { - BusStationBean station = mStations.get(position); - StationViewHolder viewHolder = (StationViewHolder)holder; - viewHolder.stationName.setText(station.getName()); - BlinkAnimationUtil.clearAnimation(viewHolder.stationCircle); - if (position == 0){ //第一个 起点 - viewHolder.curArrowBg.setVisibility(View.GONE); - viewHolder.curArrowBottomBg.setVisibility(View.VISIBLE); - Log.d("onBindViewHolder" , "position0 = "+position); - viewHolder.stationCircle.setImageResource(R.drawable.shuttle_p_jl_bg_start_tag_bg); - if (station.getDrivingStatus() == STATION_STATUS_STOPPED && !station.isLeaving()){//到达未离开 - viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.shuttle_p_jl_clock_17417B)); - BlinkAnimationUtil.setAnimation(viewHolder.stationCircle); - viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.MARQUEE); - viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_1F82FB)); - }else { - viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.shuttle_p_jl_clock_992D3E5F)); - viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.END); - viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_A9B6CA)); - } - }else{ - viewHolder.curArrowBg.setVisibility(View.VISIBLE); - viewHolder.curArrowBottomBg.setVisibility(View.VISIBLE); - BusStationBean preStation = mStations.get(position -1); - if (station.getDrivingStatus() == STATION_STATUS_LEAVING || - (station.getDrivingStatus() == STATION_STATUS_STOPPED && station.isLeaving())){ //过站 - viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.shuttle_p_jl_clock_992D3E5F)); - viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_A9B6CA)); - viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_A9B6CA)); - viewHolder.stationCircle.setImageResource(R.drawable.shuttle_p_jl_point_gray); - viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.END); - Log.d("onBindViewHolder" , "position 1 = "+position); - } else if (station.getDrivingStatus() == STATION_STATUS_STOPPED && !station.isLeaving()){//刚到站未离开的 - viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.shuttle_p_jl_clock_17417B)); - viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_A9B6CA)); - viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_1F82FB)); - viewHolder.stationCircle.setImageResource(R.drawable.shuttle_p_jl_arrive_line_green); - if (position == mStations.size() - 1){ - viewHolder.stationCircle.setImageResource(R.drawable.shuttle_p_jl_bg_end_tag_bg); - viewHolder.curArrowBottomBg.setVisibility(View.GONE); - } - Log.d("onBindViewHolder" , "position2 = "+position); - BlinkAnimationUtil.setAnimation(viewHolder.stationCircle); - viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.MARQUEE); - }else if (station.getDrivingStatus() == STATION_STATUS_ARRIVING && preStation.isLeaving()){//即将到站 - viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.shuttle_p_jl_panel_cur_station_tips_color)); - viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_A9B6CA)); - viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_1F82FB)); - viewHolder.stationCircle.setImageResource(R.drawable.shuttle_p_jl_arrive_line_blue); - Log.d("onBindViewHolder" , "position3 = "+position); - - if (position == mStations.size() - 1){ - viewHolder.curArrowBottomBg.setVisibility(View.GONE); - } - - }else if (station.getDrivingStatus() == STATION_STATUS_ARRIVING && - (preStation.getDrivingStatus() == STATION_STATUS_ARRIVING - || preStation.getDrivingStatus() == STATION_STATUS_STOPPED)){ //未到站的并且前面也是未到站或者刚到站的 - viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.shuttle_p_jl_panel_cur_station_tips_color)); - viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_1F82FB)); - viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_1F82FB)); - viewHolder.stationCircle.setImageResource(R.drawable.shuttle_p_jl_point_blue); - viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.END); - - if (position == mStations.size() - 1){ - viewHolder.stationCircle.setImageResource(R.drawable.shuttle_p_jl_bg_end_tag_bg); - viewHolder.curArrowBottomBg.setVisibility(View.GONE); - } - Log.d("onBindViewHolder" , "position4 = "+position); - } - } - } - - @Override - public int getItemCount() { - return mStations.size(); - } -} -class StationViewHolder extends RecyclerView.ViewHolder{ - public MarqueeTextView stationName; - public ImageView stationCircle; - public ImageView curArrowBg; - public ImageView curArrowBottomBg; - public StationViewHolder(@NonNull View itemView) { - super(itemView); - stationName = itemView.findViewById(R.id.bus_p_station); - stationCircle = itemView.findViewById(R.id.bus_p_circle); - curArrowBg = itemView.findViewById(R.id.bus_p_cur_arrow_bg); - curArrowBottomBg = itemView.findViewById(R.id.bus_p_cur_arrow_bottom_bg); - } -} - - diff --git a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/layoutmanager/CenterLayoutManager.java b/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/layoutmanager/CenterLayoutManager.java deleted file mode 100644 index d7b712d6ea..0000000000 --- a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/layoutmanager/CenterLayoutManager.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui.layoutmanager; - -import android.content.Context; -import android.util.AttributeSet; - -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.LinearSmoothScroller; -import androidx.recyclerview.widget.RecyclerView; - -public class CenterLayoutManager extends LinearLayoutManager { - public CenterLayoutManager(Context context) { - super(context); - } - - public CenterLayoutManager(Context context, int orientation, boolean reverseLayout) { - super(context, orientation, reverseLayout); - } - - public CenterLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { - super(context, attrs, defStyleAttr, defStyleRes); - } - - @Override - public void smoothScrollToPosition(RecyclerView recyclerView, RecyclerView.State state, int position) { - RecyclerView.SmoothScroller smoothScroller = new CenterSmoothScroller(recyclerView.getContext()); - smoothScroller.setTargetPosition(position); - startSmoothScroll(smoothScroller); - } - - private static class CenterSmoothScroller extends LinearSmoothScroller { - - CenterSmoothScroller(Context context) { - super(context); - } - - @Override - public int calculateDtToFit(int viewStart, int viewEnd, int boxStart, int boxEnd, int snapPreference) { - return (boxStart + (boxEnd - boxStart) / 2) - (viewStart + (viewEnd - viewStart) / 2); - } - } - -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/widget/BusPTurnLightView.kt b/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/widget/BusPTurnLightView.kt deleted file mode 100644 index 14dc19bd74..0000000000 --- a/OCH/offline/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/widget/BusPTurnLightView.kt +++ /dev/null @@ -1,197 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui.widget - -import android.animation.AnimatorSet -import android.animation.ObjectAnimator -import android.content.Context -import android.util.AttributeSet -import android.view.LayoutInflater -import android.view.View -import android.view.animation.AlphaAnimation -import android.view.animation.Animation -import android.widget.ImageView -import androidx.constraintlayout.widget.ConstraintLayout -import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTurnLightListener -import com.mogo.eagle.core.function.call.v2x.CallerTurnLightListenerManager -import com.mogo.eagle.core.utilcode.util.ThreadUtils -import com.mogo.och.shuttle.passenger.R -import com.mogo.och.common.module.manager.light.TurnLightManager -import kotlinx.android.synthetic.main.shuttle_p_jl_turn_light_status.view.left_nor_image -import kotlinx.android.synthetic.main.shuttle_p_jl_turn_light_status.view.left_select_image -import kotlinx.android.synthetic.main.shuttle_p_jl_turn_light_status.view.right_nor_image -import kotlinx.android.synthetic.main.shuttle_p_jl_turn_light_status.view.right_select_image -import kotlinx.android.synthetic.main.shuttle_p_jl_turn_light_status.view.turn_light_layout - -/** - * @author: wangmingjun - * @date: 2023/2/13 - */ -class BusPTurnLightView @JvmOverloads constructor( - context: Context, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : ConstraintLayout(context, attrs, defStyleAttr), - IMoGoTurnLightListener, TurnLightManager.TurnLightListener { - - - companion object { - private const val TAG = "TurnLightViewStatus" - } - - private var isLeftLight: Boolean = false - private var isRightLight: Boolean = false - private var isDisappear: Boolean = false - - init { - LayoutInflater.from(context) - .inflate(R.layout.shuttle_p_jl_turn_light_status, this, true) - } - - override fun onAttachedToWindow() { - super.onAttachedToWindow() - CallerTurnLightListenerManager.addListener(TAG,this) - TurnLightManager.addTurnLightStatusChangeListener(TAG,this) - } - - override fun onDetachedFromWindow() { - super.onDetachedFromWindow() - CallerTurnLightListenerManager.removeListener(TAG) - TurnLightManager.removeTurnLightStatusChangeListener(TAG) - } - - override fun hideTurnLightView() { - ThreadUtils.runOnUiThread{ - if (!isDisappear) { - isDisappear = true - isLeftLight = false - isRightLight = false - animationDisappear() - } - } - } - - override fun statusChange(newStatus: TurnLightManager.TurnLightStatus) { - ThreadUtils.runOnUiThread { - setTurnLight(newStatus) - } - } - - /** - * 转向灯动画 - */ - private fun setTurnLight(directionLight: TurnLightManager.TurnLightStatus) { - if (!isAttachedToWindow) { - return - } - //根据左右进行显示和隐藏,实际要判断每个来的时间和频度 - when (directionLight) { - TurnLightManager.TurnLightStatus.TURN_LIGHT_LEFT -> { //左转向 - if (!isLeftLight) { - isLeftLight = true - isRightLight = false - isDisappear = false - showNormalAnimation() - left_select_image.visibility = View.VISIBLE - right_select_image.visibility = View.GONE - right_select_image.clearAnimation() - setAnimation(left_select_image) - } - } - TurnLightManager.TurnLightStatus.TURN_LIGHT_RIGHT -> { //右转向 - if (!isRightLight) { - isRightLight = true - isLeftLight = false - isDisappear = false - showNormalAnimation() - left_select_image.visibility = View.GONE - right_select_image.visibility = View.VISIBLE - left_select_image.clearAnimation() - setAnimation(right_select_image) - } - } - TurnLightManager.TurnLightStatus.TURN_LIGHT_NONE -> { //消失 - if (!isDisappear) { - isDisappear = true - isLeftLight = false - isRightLight = false - animationDisappear() - } - } - } - } - - //显示背景 - private fun showNormalAnimation() { - val appearAnimation = AlphaAnimation(0f, 1.0f) - appearAnimation.duration = 300 - val appearAnimationImage = AlphaAnimation(0f, 1.0f) - appearAnimation.duration = 500 - turn_light_layout.startAnimation(appearAnimation) - left_nor_image.startAnimation(appearAnimationImage) - right_nor_image.startAnimation(appearAnimationImage) - - turn_light_layout.visibility = View.VISIBLE - left_nor_image.visibility = View.VISIBLE - right_nor_image.visibility = View.VISIBLE - } - - //消失动画,当转向等数据为空时候 - private fun animationDisappear() { - left_select_image.visibility = View.GONE - right_select_image.visibility = View.GONE - left_select_image.clearAnimation() - right_select_image.clearAnimation() - - left_nor_image.clearAnimation() - right_nor_image.clearAnimation() - turn_light_layout.clearAnimation() - - val disappearAnimationLeft = AlphaAnimation(1.0f, 0f) - disappearAnimationLeft.duration = 300 - - val disappearAnimationBg = AlphaAnimation(1.0f, 0f) - disappearAnimationBg.duration = 500 - - left_nor_image.startAnimation(disappearAnimationLeft) - right_nor_image.startAnimation(disappearAnimationLeft) - turn_light_layout.startAnimation(disappearAnimationBg) - - disappearAnimationLeft.setAnimationListener(object : Animation.AnimationListener { - override fun onAnimationRepeat(p0: Animation?) { - } - - override fun onAnimationStart(p0: Animation?) { - } - - override fun onAnimationEnd(p0: Animation?) { - left_nor_image.visibility = View.GONE - right_nor_image.visibility = View.GONE - } - }) - - disappearAnimationBg.setAnimationListener(object : Animation.AnimationListener { - override fun onAnimationRepeat(p0: Animation?) { - } - - override fun onAnimationStart(p0: Animation?) { - } - - override fun onAnimationEnd(p0: Animation?) { - turn_light_layout.visibility = View.GONE - } - }) - } - - //实现图片闪烁效果 - private fun setAnimation(imageView: ImageView) { - val animationSet = AnimatorSet() - val valueAnimator = ObjectAnimator.ofFloat(imageView, "alpha", 0f, 1.0f) - val valueAnimatorDisappear = ObjectAnimator.ofFloat(imageView, "alpha", 1.0f, 0f) - valueAnimator.duration = 1000 - valueAnimatorDisappear.duration = 800 - valueAnimator.repeatCount = -1 - valueAnimatorDisappear.repeatCount = -1 - animationSet.playTogether(valueAnimatorDisappear, valueAnimator) - animationSet.start() - } - -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/callback/ADASCallback.kt b/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/callback/ADASCallback.kt deleted file mode 100644 index b5b490e29d..0000000000 --- a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/callback/ADASCallback.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.mogo.och.shuttle.passenger.callback - -/** - * @author: wangmingjun - * @date: 2023/2/15 - */ -interface ADASCallback { - fun updateHDMapStations(stations: MutableList>) - fun removeHDMapStations() -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/callback/AutoPilotStatusCallback.kt b/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/callback/AutoPilotStatusCallback.kt deleted file mode 100644 index 44b2075170..0000000000 --- a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/callback/AutoPilotStatusCallback.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.mogo.och.shuttle.passenger.callback - -/** - * @author: wangmingjun - * @date: 2023/2/13 - */ -interface AutoPilotStatusCallback { - /** - * false: 未开启自驾, true : 开启自驾 - */ - fun updateAutoStatus(isOpen: Boolean) - - fun updateAutoStatus(status: Int) -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/callback/DrivingInfoCallback.kt b/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/callback/DrivingInfoCallback.kt deleted file mode 100644 index 88ab043327..0000000000 --- a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/callback/DrivingInfoCallback.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.mogo.och.shuttle.passenger.callback - -import com.mogo.och.data.bean.BusStationBean - -/** - * @author: wangmingjun - * @date: 2023/2/2 - */ -interface DrivingInfoCallback { - fun updateSpeed(speed: Int) - fun updatePlateNumber(carNum: String) - fun updateLine(lineName: String, lineDuring: String) - fun updateRemainMT(meters : Long, timeInSecond : Long) // 米,秒 - fun changeOperationStatus(loginStatus : Boolean) - fun showNoTaskView(isTrue : Boolean) - fun updateLineStations(stations: MutableList) - fun updateStationsInfo(stations: MutableList, i: Int, isArrived: Boolean) - fun clearCustomPolyline() -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/constant/M2Const.kt b/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/constant/M2Const.kt deleted file mode 100644 index fd9097ad64..0000000000 --- a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/constant/M2Const.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.mogo.och.shuttle.passenger.constant - -/** - * Created on 2021/12/6 - */ -class M2Const { - companion object { - //站点UUID - const val M2_MAP_STATION_MAKER = "m2_map_station_maker" - - /** - * Marker类型 - */ - const val TYPE_MARKER_M2_LINE = "TYPE_MARKER_M2_LINE" - } -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/model/PM2ADASModel.kt b/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/model/PM2ADASModel.kt deleted file mode 100644 index 3994625de7..0000000000 --- a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/model/PM2ADASModel.kt +++ /dev/null @@ -1,45 +0,0 @@ -package com.mogo.och.shuttle.passenger.model - -import android.content.Context -import com.mogo.och.shuttle.passenger.callback.ADASCallback -import com.mogo.och.data.bean.BusStationBean - -/** - * @author: wangmingjun - * @date: 2023/2/2 - */ -class PM2ADASModel private constructor() { - - private var mContext: Context? = null - private var mAdasCallback: ADASCallback? = null - - companion object { - val TAG = PM2ADASModel::class.java.simpleName - val INSTANCE: PM2ADASModel by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) { - PM2ADASModel() - } - } - - fun init(context : Context){ - this.mContext = context - } - - fun setAdasCallback(adasCallback: ADASCallback?){ - this.mAdasCallback = adasCallback - } - - fun updateHDMapStations(stations: MutableList){ - var stationsList = mutableListOf>() - for (i in stations.indices){ - var listLatLng = mutableListOf() // 0: long 1:lat - listLatLng.add(stations[i].lon) - listLatLng.add(stations[i].lat) - stationsList.add(listLatLng) - } - mAdasCallback?.updateHDMapStations(stationsList) - } - - fun removeHDMapStations(){ - mAdasCallback?.removeHDMapStations() - } -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/model/PM2DrivingModel.kt b/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/model/PM2DrivingModel.kt deleted file mode 100644 index 427f4eb0f5..0000000000 --- a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/model/PM2DrivingModel.kt +++ /dev/null @@ -1,478 +0,0 @@ -package com.mogo.och.shuttle.passenger.model - -import android.content.Context -import android.media.AudioAttributes -import android.media.AudioFocusRequest -import android.media.AudioManager -import android.net.ConnectivityManager -import android.os.Build -import android.os.Handler -import androidx.annotation.RequiresApi -import com.mogo.commons.module.intent.IMogoIntentListener -import com.mogo.commons.module.intent.IntentManager -import com.mogo.commons.voice.AIAssist -import com.mogo.commons.voice.IMogoVoiceCmdCallBack -import com.mogo.eagle.core.data.config.FunctionBuildConfig -import com.mogo.eagle.core.data.map.MogoLocation -import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener -import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener -import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener -import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager -import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager -import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d -import com.mogo.eagle.core.utilcode.mogo.logger.Logger -import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant -import com.mogo.eagle.core.utilcode.util.GsonUtils -import com.mogo.eagle.core.utilcode.util.NetworkUtils -import com.mogo.eagle.core.utilcode.util.StringUtils -import com.mogo.eagle.core.utilcode.util.ToastUtils -import com.mogo.och.common.module.manager.socket.cloud.OCHSocketMessageManager.pushAppOperationalMsgBox -import com.mogo.och.common.module.constant.OchCommonConst -import com.mogo.och.common.module.manager.autopilot.autopilot.IOchAutopilotStatusListener -import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotStatusListenerManager -import com.mogo.och.common.module.network.OchCommonServiceCallback -import com.mogo.och.common.module.manager.distance.IDistanceListener -import com.mogo.och.common.module.manager.distance.TrajectoryAndDistanceManager -import com.mogo.och.common.module.manager.loop.BizLoopManager -import com.mogo.och.common.module.manager.loop.LoopInfo -import com.mogo.och.common.module.manager.socket.lan.LanSocketManager -import com.mogo.och.common.module.manager.socket.lan.bean.AppConnectMsg -import com.mogo.och.common.module.manager.socket.lan.bean.BaseDPMsg -import com.mogo.och.common.module.manager.socket.lan.bean.BusinessType -import com.mogo.och.common.module.manager.socket.lan.bean.DPMsgType -import com.mogo.och.common.module.manager.socket.lan.bean.TaskDetailsMsg -import com.mogo.och.common.module.utils.DateTimeUtil -import com.mogo.och.common.module.voice.VoiceNotice.showNotice -import com.mogo.och.data.bean.BusRoutesResult -import com.mogo.och.data.bean.BusStationBean -import com.mogo.och.data.bean.BusTransferData -import com.mogo.och.shuttle.passenger.R -import com.mogo.och.shuttle.passenger.bean.response.PassengerOperationStatusResponse -import com.mogo.och.shuttle.passenger.bean.response.PassengerRoutesResponse -import com.mogo.och.shuttle.passenger.callback.AutoPilotStatusCallback -import com.mogo.och.shuttle.passenger.callback.DrivingInfoCallback -import com.mogo.och.shuttle.passenger.constant.BusPassengerConst -import com.mogo.och.shuttle.passenger.network.PassengerServiceManager -import io.reactivex.schedulers.Schedulers -import kotlin.math.abs - -/** - * @author: wangmingjun - * @date: 2023/1/31 - */ -class PM2DrivingModel private constructor() { - - private var mContext: Context? = null - - private var routesResult: BusRoutesResult? = null - - - var mStations = mutableListOf() - private var mNextStationIndex = 0 // A-B要到达站的index - private var isGoingToNextStation = false //是否前往下一站过程中 - - private var mDrivingInfoCallback: DrivingInfoCallback? = null //行程信息 - private var mAutoStatusCallback: AutoPilotStatusCallback? = null //自动驾驶状态 - - private var operationStatus: PassengerOperationStatusResponse.Result? = null - - private val handler = Handler(Handler.Callback { msg -> - if (msg.what == MSG_QUERY_BUS_P_STATION) { - queryDriverOperationStatus() - return@Callback true - } - false - }) - - companion object { - val TAG = PM2DrivingModel::class.java.simpleName - const val MSG_QUERY_BUS_P_STATION = 1001 - val INSTANCE: PM2DrivingModel by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) { - PM2DrivingModel() - } - } - - fun init(context: Context) { - mContext = context - initListener() - queryDriverByLocalDriver() - queryDriverOperationStatus() - BizLoopManager.setLoopFunction(TAG, LoopInfo(2,::queryDriverSiteByCoordinate, scheduler = Schedulers.io())) - } - - private fun queryDriverByLocalDriver() { - //本地去请求司机端 - val msg = TaskDetailsMsg("task", BusinessType.shuttle) - LanSocketManager.sendMsgToServer(msg) - } - - private fun initListener() { - //自动驾驶状态监听 - OchAutoPilotStatusListenerManager.addListener(TAG, mAutoPilotStatusListener) - - // 定位监听 - CallerChassisLocationGCJ02ListenerManager.addListener(TAG, 3, mMapLocationListener) - - //司乘屏通信监听 - CallerTelematicListenerManager.addListener(TAG, mReceivedMsgListener) - - //网络监听 - IntentManager.getInstance() - .registerIntentListener(ConnectivityManager.CONNECTIVITY_ACTION, mNetWorkIntentListener) - - TrajectoryAndDistanceManager.addDistanceListener(TAG, trajectoryListener) - - } - - fun releaseListener() { - //自动驾驶状态监听 - CallerAutoPilotStatusListenerManager.removeListener(TAG) - - // 定位监听 - CallerChassisLocationGCJ02ListenerManager.removeListener(TAG) - - CallerTelematicListenerManager.removeListener(TAG) - - cleanStation("release") - - TrajectoryAndDistanceManager.removeListener(TAG) - - } - - fun setDrivingInfoCallback(drivingInfoCallback : DrivingInfoCallback?){ - mDrivingInfoCallback = drivingInfoCallback - } - - fun setAutoStatusCallback(autoPilotStatusCallback: AutoPilotStatusCallback?){ - mAutoStatusCallback = autoPilotStatusCallback - } - - private val mNetWorkIntentListener = IMogoIntentListener { intentStr, _ -> - if (ConnectivityManager.CONNECTIVITY_ACTION == intentStr) { - if (NetworkUtils.isConnected(mContext)) { - queryDriverOperationStatus() - } - } - } - - private val mReceivedMsgListener: IReceivedMsgListener = - object : IReceivedMsgListener{ - @RequiresApi(Build.VERSION_CODES.O) - override fun onReceivedMsg(type: Int, byteArray: ByteArray) {//接收司机端发来的信息 - if (OchCommonConst.BUSINESS_STRING == type){ - val baseMsg = GsonUtils.fromJson(String(byteArray), BaseDPMsg::class.java) - Logger.d( - SceneConstant.M_BUS_P + TAG, "onReceivedMsg = " + GsonUtils.toJson(baseMsg) - ) - - if (baseMsg != null && baseMsg.type == DPMsgType.TYPE_COMMON.type) { - val msg = GsonUtils.fromJson(String(byteArray), AppConnectMsg::class.java) - - if (msg != null && msg.isPlay){ //播报 - speakTTS(msg.msg) - } - - if (msg != null && msg.isViewShow) { //消息盒子显示内容 - pushAppOperationalMsgBox( - DateTimeUtil.getCurrentTimeStamp(),msg.msg) - } - }else if (baseMsg != null && baseMsg.type == DPMsgType.TYPE_TASK_DETAILS.type) { - val msg = GsonUtils.fromJson(String(byteArray), TaskDetailsMsg::class.java) - Logger.d( - SceneConstant.M_BUS_P + TAG, "onReceivedMsg = " + GsonUtils.toJson(msg) - ) - if (msg == null || msg.msg?.isEmpty() == true) { - updateLocalOrder() - return - } - val result = GsonUtils.fromJson(msg.msg, BusTransferData::class.java) - mDrivingInfoCallback?.changeOperationStatus(result.loginStatus == 1) - if (result != null && result.routesResult == null){ - updateLocalOrder() - } - - if (routesResult == null || - (result != null && result.routesResult?.writeVersion!! > routesResult!!.writeVersion)) { - routesResult = result.routesResult - updatePassengerRouteInfo(routesResult!!) - } - - } - } - } - } - - private val trajectoryListener: IDistanceListener = object : IDistanceListener { - override fun distanceCallback(distance: Float) { - val lastTime = distance / BusPassengerConst.BUS_AVERAGE_SPEED * 3.6 //秒 - d(SceneConstant.M_BUS_P + TAG, "轨迹排查==lastSumLength = $distance") - if (routesResult != null) { - for (site in routesResult!!.sites) { - if (site.drivingStatus == BusPassengerConst.STATION_STATUS_STOPPED && !site.isLeaving) { - return - } - } - } - // 小于200m 播报站点介绍 - if (distance < 200) { - val stationNext = mStations[mNextStationIndex] - if (!stationNext.isPlayTts) { - if (!StringUtils.isEmpty(stationNext.introduction)) { - showNotice(stationNext.introduction) - stationNext.isPlayTts = true - } - } - } - mDrivingInfoCallback?.updateRemainMT( - distance.toLong(), - lastTime.toLong() - ) - } - } - - @RequiresApi(Build.VERSION_CODES.O) - private fun speakTTS(msg: String) { - - val mAudioManager = mContext?.getSystemService(Context.AUDIO_SERVICE) as AudioManager - val mAudioAttributes = AudioAttributes.Builder() - .setUsage(AudioAttributes.USAGE_MEDIA) //设置声音的用途 - .setContentType(AudioAttributes.CONTENT_TYPE_MUSIC) //设置声音的类型 - .build() - val mAudioFocusRequest = AudioFocusRequest.Builder(AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK) //设置焦点类型 - .setAudioAttributes(mAudioAttributes) //设置声音属性 - .setAcceptsDelayedFocusGain(false) //设置接受延迟获取焦点,需要设置OnAudioFocusChangeListener来监听焦点的获取 - .build() - mAudioManager.requestAudioFocus(mAudioFocusRequest) //抢占焦点 - - AIAssist.getInstance(mContext).speakTTSVoiceWithLevel(msg,AIAssist.LEVEL0,object : IMogoVoiceCmdCallBack{ - override fun onSpeakEnd(speakText: String?) { - mAudioManager.abandonAudioFocusRequest(mAudioFocusRequest) - } - - override fun onSpeakError(speakText: String?, errorMsg: String?) { - mAudioManager.abandonAudioFocusRequest(mAudioFocusRequest) - } - - override fun onSpeakSelectTimeOut(speakText: String?) { - mAudioManager.abandonAudioFocusRequest(mAudioFocusRequest) - } - }) - } - - private val mMapLocationListener: IMoGoChassisLocationGCJ02Listener = - object : IMoGoChassisLocationGCJ02Listener{ - override fun onChassisLocationGCJ02(mogoLocation: MogoLocation?) { - if (null == mogoLocation) return - updateSpeed(mogoLocation) - } - } - - private fun updateSpeed(mogoLocation: MogoLocation) { - // km/h - val speedKM = (abs(mogoLocation.gnssSpeed) * 3.6f).toInt() - - mDrivingInfoCallback?.updateSpeed(speedKM) - } - - private val mAutoPilotStatusListener: IOchAutopilotStatusListener = - object : IOchAutopilotStatusListener { - - override fun onAutopilotStatusResponse(state: Int) { - super.onAutopilotStatusResponse(state) - d(SceneConstant.M_BUS_P+TAG, "onAutopilotStatusResponse ===== $state") - if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING != state){ - //美化模式下且行程中 - if (FunctionBuildConfig.isDemoMode && - mNextStationIndex>= 0 && mNextStationIndex <= mStations.size - 1 - && isGoingToNextStation){ - mAutoStatusCallback?.updateAutoStatus(true) - }else{//非美化模式下 - mAutoStatusCallback?.updateAutoStatus(false) - } - }else{//自驾状态 2 - mAutoStatusCallback?.updateAutoStatus(true) - } - } - - } - - private fun queryDriverOperationDelay() { - handler.sendEmptyMessageDelayed(MSG_QUERY_BUS_P_STATION, - BusPassengerConst.QUERY_BUS_P_STATION_DELAY - ) - } - - private fun queryDriverOperationStatus() { - mContext?.let { - PassengerServiceManager.queryDriverOperationStatus( - it, - object : OchCommonServiceCallback { - override fun onSuccess(data: PassengerOperationStatusResponse?) { - if (data?.data == null) return - if (data.data.driverStatus != operationStatus?.driverStatus - || data.data.plateNumber != operationStatus?.plateNumber){ - d(SceneConstant.M_BUS_P+TAG, "queryDriverOperationStatus ===== 车牌或者登陆状态有变更") - mDrivingInfoCallback?.changeOperationStatus(data.data.driverStatus == 1) - } - operationStatus = data.data as PassengerOperationStatusResponse.Result - } - - override fun onError() { - if (!NetworkUtils.isConnected(mContext)) { - ToastUtils.showShort(mContext!!.getString(R.string.network_error_tip)) - } else { - ToastUtils.showShort(mContext!!.getString(R.string.request_error_tip)) - } - queryDriverByLocalDriver() - } - - override fun onFail(code: Int, msg: String) { - //延迟3s再次查询 - queryDriverOperationDelay() - } - }) - } - } - - fun queryDriverSiteByCoordinate(){ - mContext?.let { - PassengerServiceManager.queryDriverSiteByCoordinate(it, - object : OchCommonServiceCallback { - override fun onSuccess(data: PassengerRoutesResponse?) { - - if (data == null || data.result == null){ - if (routesResult != null) { - routesResult = null - updateLocalOrder() - d(SceneConstant.M_BUS_P+TAG, "queryDriverSiteByCoordinate= result is null") - return - } - return - } - if (data.result != null && data.result.equals(routesResult)){ - d(SceneConstant.M_BUS_P+TAG, "queryDriverSiteByCoordinate= not update") - return - } - - if (routesResult != null && - routesResult!!.writeVersion < data.result.writeVersion - ) { - routesResult = data.result - } - - if (routesResult == null) { - routesResult = data.result - } - updatePassengerRouteInfo(data.result) - } - - override fun onError() { - CallerLogger.d( - SceneConstant.Companion.M_BUS_P + TAG, - "queryDriverSiteByCoordinate = onError =" - + ", sn = " + PassengerServiceManager.driverAppSn - ) - queryDriverByLocalDriver() - } - - override fun onFail(code: Int, msg: String?) { - d(SceneConstant.M_BUS_P+TAG, "queryDriverSiteByCoordinate = %s", msg) - if (code == 1003){ - queryDriverOperationDelay() - cleanStation("queryDriverSiteByCoordinate 1003") - } - if (PassengerServiceManager.driverAppSn.isEmpty()){ - return - } - if (code == 1003) { - routesResult = null - isGoingToNextStation = false - return - } - } - - }) - } - } - - private fun updateLocalOrder(){ - routesResult = null - mNextStationIndex = 0 - cleanStation("queryDriverSiteByCoordinate") - isGoingToNextStation = false - mDrivingInfoCallback?.showNoTaskView(true) - } - - private fun updatePassengerRouteInfo(result: BusRoutesResult) { - - if (result == null) { - updateLocalOrder() - return - } - - if (routesResult != null && routesResult!!.lineId != result.lineId){ - d(SceneConstant.M_BUS_P+TAG, "lineId change= clearCustomPolyline") - mDrivingInfoCallback?.clearCustomPolyline() - } - - d(SceneConstant.M_BUS_P+TAG, "queryDriverSiteByCoordinate= update") - routesResult = result - - mDrivingInfoCallback?.updateLine(result.name, result.runningDur) - if (result.sites != null) { - mDrivingInfoCallback?.showNoTaskView(false) - val stations: List = result.sites - mStations.clear() - mStations.addAll(stations) - mDrivingInfoCallback?.updateLineStations(mStations) - for (i in stations.indices) { - val station: BusStationBean = stations[i] - if (station.drivingStatus == BusPassengerConst.STATION_STATUS_STOPPED - && station.isLeaving && i + 1 < stations.size) { - mDrivingInfoCallback?.updateStationsInfo(stations as MutableList, i + 1, false) - d(SceneConstant.M_BUS_P+TAG,"och-rotting--mNextStationIndex = $mNextStationIndex , i = $i") - d(SceneConstant.M_BUS_P+TAG,"och-rotting--start ") - isGoingToNextStation = true - mNextStationIndex = i + 1 - val startStation = mStations[i] - val endStation = mStations[i + 1] - setTrajectoryStation(startStation, endStation, result.lineId) - return - } else if (station.drivingStatus == BusPassengerConst.STATION_STATUS_STOPPED && !station.isLeaving) { - d(SceneConstant.M_BUS_P+TAG,"och-rotting--mNextStationIndex = $mNextStationIndex , i = $i") - d(SceneConstant.M_BUS_P+TAG,"och-rotting--arrived ") - if (i == stations.size - 1) { - cleanStation("updatePassengerRouteInfo最后一个站点") - } - isGoingToNextStation = false - mDrivingInfoCallback?.updateStationsInfo(stations as MutableList, i, true) - return - }else{ -// d(SceneConstant.M_BUS_P+TAG,"och-rotting--BusStationBean = " + GsonUtils.toJson(station)) - } - } - } - - } - - private fun setTrajectoryStation( - startStationInfo: BusStationBean, - endStationInfo: BusStationBean, - lineId: Int - ) { - val startStation = MogoLocation() - startStation.longitude = startStationInfo.gcjLon - startStation.latitude = startStationInfo.gcjLat - val endStation = MogoLocation() - endStation.longitude = endStationInfo.gcjLon - endStation.latitude = endStationInfo.gcjLat - TrajectoryAndDistanceManager.setStationPoint(startStation, endStation, lineId.toLong()) - } - - private fun cleanStation(type: String) { - d(SceneConstant.M_BUS_P + TAG, "清理站点:$type") - TrajectoryAndDistanceManager.setStationPoint(null, null, -1L) - } -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/presenter/PM2ADASPresenter.kt b/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/presenter/PM2ADASPresenter.kt deleted file mode 100644 index 4e28ee57de..0000000000 --- a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/presenter/PM2ADASPresenter.kt +++ /dev/null @@ -1,41 +0,0 @@ -package com.mogo.och.shuttle.passenger.presenter - -import androidx.lifecycle.LifecycleOwner -import com.mogo.commons.mvp.Presenter -import com.mogo.och.shuttle.passenger.callback.ADASCallback -import com.mogo.och.shuttle.passenger.constant.M2Const.Companion.M2_MAP_STATION_MAKER -import com.mogo.och.shuttle.passenger.model.PM2ADASModel -import com.mogo.och.shuttle.passenger.ui.PM2HPMapFragment - -class PM2ADASPresenter(view: PM2HPMapFragment?) : - Presenter(view), ADASCallback { - - init { - PM2ADASModel.INSTANCE.init(context) - initListener() - } - - private fun initListener() { - PM2ADASModel.INSTANCE.setAdasCallback(this) - } - - private fun removeListener() { - PM2ADASModel.INSTANCE.setAdasCallback(null) - } - - override fun onDestroy(owner: LifecycleOwner) { - super.onDestroy(owner) - removeListener() - } - - override fun updateHDMapStations(stations: MutableList>) { - for (i in stations.indices){ - mView?.setMapMaker(M2_MAP_STATION_MAKER+i,stations[i]) - } - - } - - override fun removeHDMapStations() { - mView?.removeMapMaker(M2_MAP_STATION_MAKER) - } -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/presenter/PM2DrivingPresenter.kt b/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/presenter/PM2DrivingPresenter.kt deleted file mode 100644 index 419f50e7ac..0000000000 --- a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/presenter/PM2DrivingPresenter.kt +++ /dev/null @@ -1,143 +0,0 @@ -package com.mogo.och.shuttle.passenger.presenter - -import androidx.lifecycle.LifecycleOwner -import com.amap.api.maps.model.LatLng -import com.mogo.commons.mvp.Presenter -import com.mogo.eagle.core.utilcode.util.ThreadUtils -import com.mogo.och.shuttle.passenger.callback.AutoPilotStatusCallback -import com.mogo.och.shuttle.passenger.callback.DrivingInfoCallback -import com.mogo.och.shuttle.passenger.model.PM2ADASModel -import com.mogo.och.shuttle.passenger.model.PM2DrivingModel -import com.mogo.och.shuttle.passenger.ui.PM2DrivingInfoFragment -import com.mogo.och.data.bean.BusStationBean - -class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) : - Presenter(view), DrivingInfoCallback, AutoPilotStatusCallback { - - init { - PM2DrivingModel.INSTANCE.init(context) - PM2ADASModel.INSTANCE.init(context) - initListener() - } - - override fun onDestroy(owner: LifecycleOwner) { - super.onDestroy(owner) - destroyListener() - PM2DrivingModel.INSTANCE.releaseListener() - } - - private fun initListener(){ - PM2DrivingModel.INSTANCE.setDrivingInfoCallback(this) - PM2DrivingModel.INSTANCE.setAutoStatusCallback(this) - } - - private fun destroyListener(){ - PM2DrivingModel.INSTANCE.setDrivingInfoCallback(null) - PM2DrivingModel.INSTANCE.setAutoStatusCallback(null) - } - - override fun updateSpeed(speed: Int) { -// CallerLogger.d( -// SceneConstant.M_BUS_P + "speed = ",speed.toString() -// ) - ThreadUtils.runOnUiThread { - mView?.updateSpeed(speed) - } - } - - override fun updatePlateNumber(carNum: String) { - ThreadUtils.runOnUiThread { - mView?.updateCarPlateNum(carNum) - } - } - - override fun updateLine(lineName: String, lineDuring: String) { - ThreadUtils.runOnUiThread { - mView?.updateTaskName(lineName) - mView?.updateTaskDuringTime(lineDuring) - } - } - - override fun updateRemainMT(meters: Long, timeInSecond: Long) { - ThreadUtils.runOnUiThread { - mView?.updateRemainMT(meters, timeInSecond) //米,秒 - } - } - - override fun changeOperationStatus(loginStatus: Boolean) { - ThreadUtils.runOnUiThread { - mView?.changeOperationStatus(loginStatus) - } - } - - override fun showNoTaskView(isTrue: Boolean) { - ThreadUtils.runOnUiThread { - mView?.showNoTaskView(!isTrue) - } - if (isTrue){ - PM2ADASModel.INSTANCE.removeHDMapStations() - } - } - - override fun updateLineStations(stations: MutableList) { - - val stationsList = mutableListOf() - val stationsListPass = mutableListOf() - var startStation: LatLng? = null - var endStation: LatLng? = null - - for (i in stations.indices){ - val station = stations[i] - val latLng = LatLng(station.gcjLat,station.gcjLon) - if(i==0){ - startStation = latLng - continue - } - if(i==stations.size-1){ - endStation = latLng - continue - } - if(station.drivingStatus==1){//行驶信息,0初始值;1已经过;2当前站;3未到站 - stationsListPass.add(latLng) - }else if(station.drivingStatus==2){ - if(station.isLeaving){ - stationsListPass.add(latLng) - }else{ - stationsList.add(latLng) - } - }else{ - stationsList.add(latLng) - } - - } - - ThreadUtils.runOnUiThread { - mView?.updateLineStations(stationsList,stationsListPass,startStation,endStation) - } - PM2ADASModel.INSTANCE.updateHDMapStations(stations) - } - - override fun updateStationsInfo(stations: MutableList, i: Int, isArrived: Boolean) { - ThreadUtils.runOnUiThread { - mView?.updateStationsInfo(stations,i,isArrived) - } - } - - override fun clearCustomPolyline() { - ThreadUtils.runOnUiThread { - mView?.clearCustomPolyline() - } - } - - override fun updateAutoStatus(isOpen: Boolean) { - ThreadUtils.runOnUiThread { - mView?.updateAutoStatus(isOpen) - } - } - - override fun updateAutoStatus(status: Int) { - - } - - -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/presenter/PM2Presenter.kt b/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/presenter/PM2Presenter.kt deleted file mode 100644 index 450109ef98..0000000000 --- a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/presenter/PM2Presenter.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.mogo.och.shuttle.passenger.presenter - -import com.mogo.commons.mvp.Presenter -import com.mogo.och.shuttle.passenger.ui.PM2BaseFragment - -class PM2Presenter(view: PM2BaseFragment?) : - Presenter(view) \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/PM2BaseFragment.kt b/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/PM2BaseFragment.kt deleted file mode 100644 index 38717d851a..0000000000 --- a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/PM2BaseFragment.kt +++ /dev/null @@ -1,73 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui - -import com.mogo.commons.mvp.MvpFragment -import com.mogo.eagle.core.utilcode.util.AppUtils -import com.mogo.och.shuttle.passenger.R -import com.mogo.och.shuttle.passenger.presenter.PM2Presenter -import com.mogo.och.common.module.wigets.media.MediaPlayerFragment -import kotlinx.android.synthetic.main.shuttle_p_m2_fragment.tv_shuttle_b2_p_version - - -/** - * @author: wangmingjun - * @date: 2022/4/12 - */ -class PM2BaseFragment : - MvpFragment() { - - private var drivingFragment : PM2DrivingInfoFragment? = null - private var hdMapFragment : PM2HPMapFragment? = null - private var mediaFragment : MediaPlayerFragment? = null - - override fun getLayoutId(): Int { - return R.layout.shuttle_p_m2_fragment - } - - override fun getTagName(): String { - return TAG - } - - override fun initViews() { - //横竖屏 -// setScreenDirection() - tv_shuttle_b2_p_version.text = "版本:${AppUtils.getAppVersionName()}" - //隐藏小地图 - initFragment() - } - -// private fun setScreenDirection() { -// var ro = Settings.System.getInt(context?.contentResolver, -// Settings.System.USER_ROTATION,Surface.ROTATION_270) -// if (ro != Surface.ROTATION_270){ -// ro = Surface.ROTATION_270 -// } -// Settings.System.putInt(context?.contentResolver, -// Settings.System.USER_ROTATION,ro) -// } - - /** - * 初始化行程信息,高静地图,宣传 三个fragment - */ - private fun initFragment() { - - if (drivingFragment == null) drivingFragment = PM2DrivingInfoFragment() - childFragmentManager.beginTransaction().add(R.id.driving_fragment, drivingFragment!!) - .show(drivingFragment!!).commitAllowingStateLoss() - - if (hdMapFragment == null) hdMapFragment = PM2HPMapFragment() - childFragmentManager.beginTransaction().add(R.id.hd_map_fragment, hdMapFragment!!) - .show(hdMapFragment!!).commitAllowingStateLoss() - - if (mediaFragment == null) mediaFragment = MediaPlayerFragment() - childFragmentManager.beginTransaction().add(R.id.video_fragment, mediaFragment!!) - .show(mediaFragment!!).commitAllowingStateLoss() - } - - override fun createPresenter(): PM2Presenter { - return PM2Presenter(this) - } - - companion object { - public val TAG = PM2BaseFragment::class.java.simpleName - } -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/PM2DrivingInfoFragment.kt b/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/PM2DrivingInfoFragment.kt deleted file mode 100644 index 7f36c761cc..0000000000 --- a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/PM2DrivingInfoFragment.kt +++ /dev/null @@ -1,301 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui - -import android.graphics.BitmapFactory -import android.graphics.drawable.AnimationDrawable -import android.os.Bundle -import android.view.View -import androidx.core.content.ContextCompat -import com.amap.api.maps.model.LatLng -import com.mogo.commons.AbsMogoApplication -import com.mogo.commons.mvp.MvpFragment -import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView -import com.mogo.eagle.core.function.view.SiteMarkerBean -import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider -import com.mogo.och.shuttle.passenger.R -import com.mogo.och.shuttle.passenger.presenter.PM2DrivingPresenter -import com.mogo.och.common.module.utils.DateTimeUtil.* -import com.mogo.och.common.module.utils.NumberFormatUtil -import com.mogo.och.data.bean.BusStationBean -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.auto_tv -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.clg_distance_left_time -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.group_not_select_line -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.group_stationinfo -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.iv_animal_list -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.line_during_tv -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.line_name_tv -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.overMapView -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.speed_tv -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.station_name_tv -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.tv_arrived_notice -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.tv_distance -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.tv_left_time -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.tv_next_station_title - -import me.jessyan.autosize.utils.AutoSizeUtils -import kotlin.math.ceil -import kotlin.math.roundToInt - -/** - * @author: wangmingjun - * @date: 2022/4/12 - */ -class PM2DrivingInfoFragment : - MvpFragment() { - - val stationIcon = BitmapFactory.decodeResource(AbsMogoApplication.getApp().resources, R.drawable.shuttle_p_m2_map_staton_icon) - val stationPassIcon = BitmapFactory.decodeResource(AbsMogoApplication.getApp().resources, R.drawable.shuttle_p_m2_map_staton_arrived_icon) - val startStationIcon = BitmapFactory.decodeResource(AbsMogoApplication.getApp().resources, R.drawable.shuttle_p_m2_map_start_icon) - val endStationIcon = BitmapFactory.decodeResource(AbsMogoApplication.getApp().resources, R.drawable.shuttle_p_m2_map_end_icon) - - /** - * 改变自动驾驶状态 - * - * @param status 2 - running 1 - enable 2 - disable - */ - override fun getLayoutId(): Int { - return R.layout.shuttle_p_m2_driving_info_fragment - } - - override fun getTagName(): String { - return TAG - } - - override fun initViews() { - speed_tv.setOnLongClickListener { - context?.let { ToggleDebugView.toggleDebugView.toggle(it) } - true - } - - line_name_tv.setTextColor(resources.getColor(R.color.shuttle_p_m2_line_name_tv_color)) - station_name_tv.setTextColor(resources.getColor(R.color.shuttle_p_m2_line_name_tv_color)) - speed_tv.setVertrial(true) - val intArrayOf = intArrayOf( - requireContext().resources.getColor(R.color.shuttle_p_m2_color_43cefe), - requireContext().resources.getColor(R.color.shuttle_p_m2_color_1466fb) - ) - speed_tv.setmColorList(intArrayOf) - -// current_time_tv.onClick { - -// //测试V2X消息 -// CallerMsgBoxManager.saveMsgBox( -// MsgBoxBean( -// MsgBoxType.V2X, -// V2XMsg( -// "6666", -// "超速行驶", -// "" -// ) -// ) -// ) -// -// val noticeTrafficStylePushData = NoticeTrafficStylePushData() -// noticeTrafficStylePushData.content= "测试公告布局" -// val noticeFromCloudMsg = NoticeFrCloudMsg(null, noticeTrafficStylePushData, 1) -// CallerMsgBoxManager.saveMsgBox( -// MsgBoxBean( -// MsgBoxType.NOTICE, noticeFromCloudMsg) -// ) -// BPRouteDataTestUtils.converToRouteData() -// } - } - - override fun initViews(savedInstanceState: Bundle?) { - super.initViews(savedInstanceState) - overMapView?.let { - it.onCreateView(savedInstanceState) - val radius = AutoSizeUtils.dp2px(requireContext(), 16f) - it.outlineProvider = TextureVideoViewOutlineProvider(radius.toFloat()) - it.clipToOutline = true - } - } - - override fun onResume() { - super.onResume() - overMapView?.let{ - it.onResume() - } - } - - override fun onPause() { - super.onPause() - overMapView?.let{ - it.onPause() - } - } - - override fun onDestroyView() { - overMapView?.onDestroy() - if (mPresenter != null) { - mPresenter?.onDestroy(this) - } - super.onDestroyView() - } - - fun updateSpeed(speed: Int){ - speed_tv.text = speed.toString() - } - - fun updateCarPlateNum(plateNum : String){ - - } - - fun updateTaskName(name: String){ - line_name_tv.text = name - } - - fun updateTaskDuringTime(time : String){ - line_during_tv.text = time - } - - fun changeOperationStatus(status:Boolean){ - if (!status){ - updateNoOrderUI() - } - } - - fun showNoTaskView(haveTask: Boolean){ - setLineInfoView(haveTask) - } - - private fun setLineInfoView(isShow: Boolean){ - if (!isShow){ - updateNoOrderUI() - } - } - - private fun updateNoOrderUI() { - line_name_tv.text = resources.getString(R.string.shuttle_p_m2_not_select_line_content) - updateNoStationView() - overMapView?.let { - it.clearSiteMarkers() - } - clearCustomPolyline() - } - - fun clearCustomPolyline(){ - overMapView?.let { - it.clearCustomPolyline() - } - } - private fun updateNoStationView(){ - station_name_tv.setTextColor(resources.getColor(R.color.shuttle_p_m2_next_tv_color)) - station_name_tv.text = resources.getString(R.string.shuttle_p_m2_empty_tv) - tv_distance.text = resources.getString(R.string.shuttle_p_m2_empty_remain_km) - tv_left_time.text = resources.getString(R.string.shuttle_p_m2_empty_remain_minute) - noLineShow() - } - - override fun createPresenter(): PM2DrivingPresenter { - return PM2DrivingPresenter(this) - } - - fun updateAutoStatus(isAutoPilot: Boolean) { - if (isAutoPilot){ - context?.let { auto_tv.setTextColor(ContextCompat.getColor(it,R.color.shuttle_p_m2_white_color)) } - context?.let { auto_tv.background = ContextCompat.getDrawable(it,R.drawable.shuttle_p_m2_auto_button_bg) } - }else{ - context?.let { auto_tv.setTextColor(ContextCompat.getColor(it,R.color.shuttle_p_m2_color_7094ad)) } - context?.let { auto_tv.background = ContextCompat.getDrawable(it,R.drawable.shuttle_p_m2_bg_p_m2_auto) } - } - } - - fun updateLineStations( - stations: MutableList, - stationsPass: MutableList, - startStation: LatLng?, - endStation: LatLng? - ){ - overMapView?.let { - val stationsList: MutableList = mutableListOf() - startStation?.let { start-> - stationsList.add(SiteMarkerBean(start,startStationIcon,0.5f,0.5f)) - } - for (stationsPass in stationsPass) { - stationsList.add(SiteMarkerBean(stationsPass,stationPassIcon,0.5f,0.5f)) - } - for (stationsPass in stations) { - stationsList.add(SiteMarkerBean(stationsPass,stationIcon,0.5f,0.5f)) - } - endStation?.let {end-> - stationsList.add(SiteMarkerBean(end,endStationIcon,0.5f,0.5f)) - } - it.drawSiteMarkers(stationsList) - } - } - - fun updateStationsInfo(stations: MutableList, i: Int, isArrived: Boolean){ - if (stations.size == 0) return - if (0<= i && i 0) { - if (meters / 1000 < 1) { - disUnit = "米" - remainDis = meters.toFloat().roundToInt().toString() - } else { - disUnit = "公里" - remainDis = NumberFormatUtil.formatLong(meters.toDouble() / 1000) - } - } - - val time = ceil(timeInSecond / 60f).toInt() - - "$remainDis$disUnit".also { tv_distance.text = it } - "${time}分钟".also { tv_left_time.text = it } - } - - fun noLineShow(){ - // 没有线路展示 - group_not_select_line.visibility = View.VISIBLE - // 下一个站点 - group_stationinfo.visibility = View.GONE - // 距离和剩余大概时间 - clg_distance_left_time.visibility = View.GONE - // 到达站点 - tv_arrived_notice.visibility = View.GONE - - iv_animal_list.visibility = View.GONE - } - // 有线路正在到站点 - fun haveLineAndArriveingStation(){ - group_not_select_line.visibility = View.GONE - group_stationinfo.visibility = View.VISIBLE - clg_distance_left_time.visibility = View.VISIBLE - tv_arrived_notice.visibility = View.GONE - iv_animal_list.visibility = View.GONE - } - // 有线路到达站点 - private fun haveLineAndArrivedStation(){ - group_not_select_line.visibility = View.GONE - group_stationinfo.visibility = View.VISIBLE - clg_distance_left_time.visibility = View.GONE - tv_arrived_notice.visibility = View.VISIBLE - iv_animal_list.visibility = View.VISIBLE - val animationDrawable = iv_animal_list.drawable as AnimationDrawable - animationDrawable.start() - } - - companion object { - private val TAG = PM2DrivingInfoFragment::class.java.simpleName - } -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/PM2HPMapFragment.kt b/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/PM2HPMapFragment.kt deleted file mode 100644 index e278d6c4ae..0000000000 --- a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/PM2HPMapFragment.kt +++ /dev/null @@ -1,131 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui - -import android.os.Bundle -import com.mogo.commons.mvp.MvpFragment -import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d -import com.mogo.map.overlay.core.Level -import com.mogo.map.overlay.point.Point -import com.mogo.map.MapDataWrapper -import com.mogo.och.shuttle.passenger.R -import com.mogo.och.shuttle.passenger.constant.M2Const.Companion.TYPE_MARKER_M2_LINE -import com.mogo.och.shuttle.passenger.presenter.PM2ADASPresenter -import com.mogo.och.common.module.utils.OCHThreadPoolManager -import kotlinx.android.synthetic.main.shuttle_p_m2_hpmap_fragment.mapBizView - -import java.util.* - -/** - * @author: wangmingjun - * @date: 2022/4/12 - */ -class PM2HPMapFragment : - MvpFragment() { - /** - * 改变自动驾驶状态 - * - * @param status 2 - running 1 - enable 2 - disable - */ - override fun getLayoutId(): Int { - return R.layout.shuttle_p_m2_hpmap_fragment - } - - override fun getTagName(): String { - return TAG - } - - override fun initViews() { - } - - override fun initViews(savedInstanceState: Bundle?) { - super.initViews(savedInstanceState) - mapBizView.onCreate(savedInstanceState) - } - - override fun onResume() { - super.onResume() - mapBizView.onResume() - } - - override fun onLowMemory() { - super.onLowMemory() - mapBizView.onLowMemory() - } - - override fun onSaveInstanceState(outState: Bundle) { - super.onSaveInstanceState(outState) - mapBizView.onSaveInstanceState(outState) - } - - override fun onPause() { - super.onPause() - mapBizView.onPause() - } - - override fun onDestroyView() { - mapBizView.onDestroy() - CallerMapUIServiceManager.getOverlayManager()?.let { - it.removeAllLines() - it.removeAllPoints() - } - super.onDestroyView() - } - - override fun createPresenter(): PM2ADASPresenter { - return PM2ADASPresenter(this) - } - - companion object { - private val TAG = PM2HPMapFragment::class.java.simpleName - } - - fun setMapMaker( - uuid: String, - station: MutableList, - ) { - //开启线程执行起终点marker设置 - val setMapMarkerRunnable = Runnable { - d( - "setMapMaker= " + Thread.currentThread().name, - uuid + "=latitude=" + station[1] + ",longitude=" + station[0] - ) - - val builder = Point.Options.Builder( - TYPE_MARKER_M2_LINE, - Level.MAP_MARKER - ) - .setId(uuid) - .anchor(0.5f, 0.5f) - .set3DMode(true) - .isUseGps(true) - .controlAngle(true) - .icon3DRes(R.raw.star_marker) - .longitude(station[0]) - .latitude(station[1]) - MapDataWrapper.getCenterLineInfo( - station[0], station[1], -1f - ) { - // 有可能鹰眼map为空没有角度。判空使用后可能造成maker角度跟道路角度不一致 地图未初始化会返回空 - it?.let{ - builder.rotate(it.angle.toFloat()) - } - } - val overlayManager = CallerMapUIServiceManager.getOverlayManager() - overlayManager?.showOrUpdatePoint(builder.build()) - } - OCHThreadPoolManager.getsInstance().execute(setMapMarkerRunnable) - } - - fun removeMapMaker( - uuid: String, - ) { - //开启线程移除起终点marker设置 - val removeMapMarkerRunnable = Runnable { - d("RemoveMapMaker=" + Thread.currentThread().name, uuid) - val overlayManager = CallerMapUIServiceManager.getOverlayManager() - overlayManager?.removeAllPointsInOwner(TYPE_MARKER_M2_LINE) - } - OCHThreadPoolManager.getsInstance().execute(removeMapMarkerRunnable) - } - -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2BlueToothView.kt b/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2BlueToothView.kt deleted file mode 100644 index 42d43b81db..0000000000 --- a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2BlueToothView.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui.widget - -import android.content.Context -import android.util.AttributeSet -import android.view.LayoutInflater -import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener -import com.mogo.eagle.core.function.hmi.ui.widget.BlueToothView -import com.mogo.eagle.core.utilcode.util.ThreadUtils -import com.mogo.och.shuttle.passenger.R -import kotlinx.android.synthetic.main.shuttle_p_m2_view_blue_tooth.view.blueView - -/** - * 魔戒蓝牙控件 - * 放置于StatusBar右侧位置 - */ -class M2BlueToothView @JvmOverloads constructor( - context: Context, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : BlueToothView(context, attrs, defStyleAttr),IMoGoDevaToolsListener { - - init { - LayoutInflater.from(context).inflate(R.layout.shuttle_p_m2_view_blue_tooth, this, true) - } - - override fun mofangStatus(status: Boolean) { - ThreadUtils.runOnUiThread { - if (status) { - blueView.setImageResource(R.drawable.shuttle_p_m2_blue_tooth_close) - } else { - blueView.setImageResource(R.drawable.shuttle_p_m2_blue_tooth_open) - } - } - } - -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2PTrafficLightView.kt b/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2PTrafficLightView.kt deleted file mode 100644 index 17e0c7e594..0000000000 --- a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2PTrafficLightView.kt +++ /dev/null @@ -1,181 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui.widget - -import android.content.Context -import android.util.AttributeSet -import android.view.LayoutInflater -import android.widget.LinearLayout -import com.mogo.eagle.core.data.enums.DataSourceType -import com.mogo.eagle.core.data.enums.TrafficLightEnum -import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTrafficLightListener -import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager -import com.mogo.eagle.core.utilcode.util.UiThreadHandler -import com.mogo.och.shuttle.passenger.R -import kotlinx.android.synthetic.main.shuttle_p_m2_traffic_light_view.view.m2_p_traffic_light_bg -import kotlinx.android.synthetic.main.shuttle_p_m2_traffic_light_view.view.m2_p_traffic_light_iv -import kotlinx.android.synthetic.main.shuttle_p_m2_traffic_light_view.view.m2_p_traffic_light_time_tv - -/** - * bus乘客端:红绿灯view - * - * Created on 2022/3/14 - */ -class M2PTrafficLightView @JvmOverloads constructor( - context: Context?, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : LinearLayout(context, attrs, defStyleAttr), IMoGoTrafficLightListener { - - companion object { - private const val TAG = "M2PTrafficLightView" - } - - private var mCurrentLightId = TrafficLightEnum.BLACK - - init { - init(context) - } - - private fun init(context: Context?) { - LayoutInflater.from(context).inflate(R.layout.shuttle_p_m2_traffic_light_view, this, true) - } - - override fun onAttachedToWindow() { - super.onAttachedToWindow() - CallerTrafficLightListenerManager.addListener(TAG, this) - } - - override fun onDetachedFromWindow() { - super.onDetachedFromWindow() - CallerTrafficLightListenerManager.removeListener(TAG) - } - - /** - * 展示红绿灯预警 - * - * @param checkLightId 0-都是默认,1-红,2-黄,3-绿 - * @param lightSource 1:云端下发;2:自车感知 - */ - override fun showTrafficLight(checkLightId: TrafficLightEnum, lightSource: DataSourceType) { - super.showTrafficLight(checkLightId, lightSource) - mCurrentLightId = checkLightId - updateTrafficLightIcon(checkLightId) - } - - /** - * 关闭红绿灯预警展示,并重制灯态 - */ - override fun disableTrafficLight() { - super.disableTrafficLight() - UiThreadHandler.post { - mCurrentLightId = TrafficLightEnum.BLACK - this@M2PTrafficLightView.visibility = GONE - } - } - - /** - * @param redNum 红灯倒计时 - * @param yellowNum 黄灯倒计时 - * @param greenNum 绿灯倒计时 - */ - override fun changeCountdownTrafficLightNum(redNum: Int, yellowNum: Int, greenNum: Int) { - super.changeCountdownTrafficLightNum(redNum, yellowNum, greenNum) - resetView() - when (mCurrentLightId) { - TrafficLightEnum.RED -> changeCountdownRed(redNum) - TrafficLightEnum.YELLOW -> changeCountdownYellow(yellowNum) - TrafficLightEnum.GREEN -> changeCountdownGreen(greenNum) - else -> UiThreadHandler.post { m2_p_traffic_light_time_tv.text = "" } - } - } - - override fun changeCountdownRed(redNum: Int) { - super.changeCountdownRed(redNum) - UiThreadHandler.post { - if (redNum > 0) { - resetView() - m2_p_traffic_light_time_tv.text = redNum.toString() - } else { - disableTrafficLightCountDown() - m2_p_traffic_light_time_tv.text = "" - } - } - } - - override fun changeCountdownGreen(greenNum: Int) { - super.changeCountdownGreen(greenNum) - UiThreadHandler.post { - if (greenNum > 0) { - resetView() - m2_p_traffic_light_time_tv.text = greenNum.toString() - } else { - disableTrafficLightCountDown() - m2_p_traffic_light_time_tv.text = "" - } - } - } - - override fun changeCountdownYellow(yellowNum: Int) { - super.changeCountdownYellow(yellowNum) - UiThreadHandler.post { - if (yellowNum > 0) { - resetView() - m2_p_traffic_light_time_tv.text = yellowNum.toString() - } else { - disableTrafficLightCountDown() - m2_p_traffic_light_time_tv.text = "" - } - } - } - - /** - * 更新红绿灯icon - * - * @param lightId 0-都是默认,1-红,2-黄,3-绿 - */ - private fun updateTrafficLightIcon(lightId: TrafficLightEnum) { - UiThreadHandler.post { - when (lightId) { - TrafficLightEnum.RED -> { - m2_p_traffic_light_iv.setBackgroundResource(R.drawable.shuttle_p_m2_light_red_nor) - this@M2PTrafficLightView.visibility = VISIBLE - } - TrafficLightEnum.YELLOW -> { - m2_p_traffic_light_iv.setBackgroundResource(R.drawable.shuttle_p_m2_light_yellow_nor) - this@M2PTrafficLightView.visibility = VISIBLE - } - TrafficLightEnum.GREEN -> { - m2_p_traffic_light_iv.setBackgroundResource(R.drawable.shuttle_p_m2_light_green_nor) - this@M2PTrafficLightView.visibility = VISIBLE - } - else -> this@M2PTrafficLightView.visibility = GONE - } - } - } - - override fun disableTrafficLightCountDown() { - super.disableTrafficLightCountDown() - UiThreadHandler.post { - val layoutParams = layoutParams - if (layoutParams is MarginLayoutParams) { - val lp = layoutParams - lp.width = resources.getDimension(R.dimen.dp_40).toInt() - setLayoutParams(lp) - m2_p_traffic_light_time_tv.visibility = GONE - m2_p_traffic_light_bg.layoutParams.width = - resources.getDimension(R.dimen.dp_40).toInt() - } - } - } - - private fun resetView() { - val layoutParams = layoutParams - if (layoutParams is MarginLayoutParams) { - val lp = layoutParams - lp.width = resources.getDimension(R.dimen.dp_60).toInt() - setLayoutParams(lp) - m2_p_traffic_light_time_tv.visibility = VISIBLE - m2_p_traffic_light_bg.layoutParams.width = - resources.getDimension(R.dimen.dp_60).toInt() - } - } -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2StatusBarView.kt b/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2StatusBarView.kt deleted file mode 100644 index 9d837d88bb..0000000000 --- a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2StatusBarView.kt +++ /dev/null @@ -1,110 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui.widget - -import android.annotation.* -import android.content.Context -import android.graphics.Color -import android.util.AttributeSet -import android.view.LayoutInflater -import android.view.ViewGroup -import androidx.constraintlayout.widget.ConstraintLayout -import chassis.ChassisStatesOuterClass -import com.mogo.eagle.core.function.api.autopilot.IMoGoBatteryManagementSystemListener -import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener -import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener -import com.mogo.eagle.core.function.call.autopilot.CallerBatteryManagementSystemListenerManager -import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager -import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager -import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager -import com.mogo.eagle.core.utilcode.kotlin.* -import com.mogo.eagle.core.utilcode.util.ClickUtils -import com.mogo.och.shuttle.passenger.R -import kotlinx.android.synthetic.main.shuttle_p_m2_view_status_bar.view.progress -import kotlinx.android.synthetic.main.shuttle_p_m2_view_status_bar.view.tv_power_cos -import kotlinx.coroutines.* -import me.jessyan.autosize.utils.AutoSizeUtils - -/** - * @author: wangmingjun - * @date: 2023/2/14 - */ -class M2StatusBarView @JvmOverloads constructor( - context: Context, attrs: AttributeSet? = null -) : ConstraintLayout(context, attrs), IViewControlListener, IMoGoSkinModeChangeListener, - IMoGoBatteryManagementSystemListener { - - companion object { - const val TAG = "M2StatusBarView" - } - - @Volatile - private var oldBmsSoc: Float = -1.0f - - init { - LayoutInflater.from(context).inflate(R.layout.shuttle_p_m2_view_status_bar, this, true) - setBackgroundColor(Color.parseColor("#80FFFFFF")) - isClickable = true - isFocusable = true - } - - - @SuppressLint("ClickableViewAccessibility") - override fun onAttachedToWindow() { - super.onAttachedToWindow() - post { - val params: ViewGroup.LayoutParams = getLayoutParams() - params.height = AutoSizeUtils.dp2px(context,40f) - layoutParams = params - } - //添加view控制 - CallerHmiViewControlListenerManager.addListener(TAG,this) - // 添加换肤监听 - CallerSkinModeListenerManager.addListener(TAG, this) - //电量 - CallerBatteryManagementSystemListenerManager.addListener(TAG,this) - - progress?.also { - it.progress = 50 - } - tv_power_cos?.also { - it.text = "50%" - } - } - - override fun onSkinModeChange(skinMode: Int) { - when (skinMode) { - 0 -> setStatusBarDarkOrLight(false) - 1 -> setStatusBarDarkOrLight(true) - } - } - - override fun onDetachedFromWindow() { - super.onDetachedFromWindow() - CallerHmiViewControlListenerManager.removeListener(TAG) - CallerSkinModeListenerManager.removeListener(TAG) - CallerDevaToolsManager.hideStatusBar() - } - - @SuppressLint("SetTextI18n") - override fun onBatteryManagementSystemStates(states: ChassisStatesOuterClass.BMSSystemStates) { - if (ClickUtils.isClickTooFrequent(this,1000)) { - return - } - val bmsSoc = states.bmsSoc - try { - if (oldBmsSoc != bmsSoc ) { - scope.launch { - if(bmsSoc >1){ - progress?.also { it.progress = bmsSoc.toInt() } - tv_power_cos?.also { it.text = "${bmsSoc.toInt()}%" } - }else{ - val power = (bmsSoc * 100).toInt() - progress?.also { it.progress = power } - tv_power_cos?.also {it.text = "$power%" } - } - } - } - } finally { - oldBmsSoc = bmsSoc - } - } -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2TurnLightView.kt b/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2TurnLightView.kt deleted file mode 100644 index a565d41a0e..0000000000 --- a/OCH/offline/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2TurnLightView.kt +++ /dev/null @@ -1,197 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui.widget - -import android.animation.AnimatorSet -import android.animation.ObjectAnimator -import android.content.Context -import android.util.AttributeSet -import android.view.LayoutInflater -import android.view.View -import android.view.animation.AlphaAnimation -import android.view.animation.Animation -import android.widget.ImageView -import androidx.constraintlayout.widget.ConstraintLayout -import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTurnLightListener -import com.mogo.eagle.core.function.call.v2x.CallerTurnLightListenerManager -import com.mogo.eagle.core.utilcode.util.ThreadUtils -import com.mogo.och.shuttle.passenger.R -import com.mogo.och.common.module.manager.light.TurnLightManager -import kotlinx.android.synthetic.main.shuttle_p_jl_turn_light_status.view.left_nor_image -import kotlinx.android.synthetic.main.shuttle_p_jl_turn_light_status.view.left_select_image -import kotlinx.android.synthetic.main.shuttle_p_jl_turn_light_status.view.right_nor_image -import kotlinx.android.synthetic.main.shuttle_p_jl_turn_light_status.view.right_select_image -import kotlinx.android.synthetic.main.shuttle_p_jl_turn_light_status.view.turn_light_layout - -/** - * @author: wangmingjun - * @date: 2023/2/13 - */ -class M2TurnLightView @JvmOverloads constructor( - context: Context, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : ConstraintLayout(context, attrs, defStyleAttr), - IMoGoTurnLightListener, TurnLightManager.TurnLightListener { - - - companion object { - private const val TAG = "TurnLightViewStatus" - } - - private var isLeftLight: Boolean = false - private var isRightLight: Boolean = false - private var isDisappear: Boolean = false - - init { - LayoutInflater.from(context) - .inflate(R.layout.shuttle_p_m2_turn_light_status, this, true) - } - - override fun onAttachedToWindow() { - super.onAttachedToWindow() - CallerTurnLightListenerManager.addListener(TAG,this) - TurnLightManager.addTurnLightStatusChangeListener(TAG,this) - } - - override fun onDetachedFromWindow() { - super.onDetachedFromWindow() - CallerTurnLightListenerManager.removeListener(TAG) - TurnLightManager.removeTurnLightStatusChangeListener(TAG) - } - - override fun hideTurnLightView() { - ThreadUtils.runOnUiThread{ - if (!isDisappear) { - isDisappear = true - isLeftLight = false - isRightLight = false - animationDisappear() - } - } - } - - override fun statusChange(newStatus: TurnLightManager.TurnLightStatus) { - ThreadUtils.runOnUiThread { - setTurnLight(newStatus) - } - } - - /** - * 转向灯动画 - */ - private fun setTurnLight(directionLight: TurnLightManager.TurnLightStatus) { - if (!isAttachedToWindow) { - return - } - //根据左右进行显示和隐藏,实际要判断每个来的时间和频度 - when (directionLight) { - TurnLightManager.TurnLightStatus.TURN_LIGHT_LEFT -> { //左转向 - if (!isLeftLight) { - isLeftLight = true - isRightLight = false - isDisappear = false - showNormalAnimation() - left_select_image.visibility = View.VISIBLE - right_select_image.visibility = View.GONE - right_select_image.clearAnimation() - setAnimation(left_select_image) - } - } - TurnLightManager.TurnLightStatus.TURN_LIGHT_RIGHT -> { //右转向 - if (!isRightLight) { - isRightLight = true - isLeftLight = false - isDisappear = false - showNormalAnimation() - left_select_image.visibility = View.GONE - right_select_image.visibility = View.VISIBLE - left_select_image.clearAnimation() - setAnimation(right_select_image) - } - } - TurnLightManager.TurnLightStatus.TURN_LIGHT_NONE -> { //消失 - if (!isDisappear) { - isDisappear = true - isLeftLight = false - isRightLight = false - animationDisappear() - } - } - } - } - - //显示背景 - private fun showNormalAnimation() { - val appearAnimation = AlphaAnimation(0f, 1.0f) - appearAnimation.duration = 300 - val appearAnimationImage = AlphaAnimation(0f, 1.0f) - appearAnimation.duration = 500 - turn_light_layout.startAnimation(appearAnimation) - left_nor_image.startAnimation(appearAnimationImage) - right_nor_image.startAnimation(appearAnimationImage) - - turn_light_layout.visibility = View.VISIBLE - left_nor_image.visibility = View.VISIBLE - right_nor_image.visibility = View.VISIBLE - } - - //消失动画,当转向等数据为空时候 - private fun animationDisappear() { - left_select_image.visibility = View.GONE - right_select_image.visibility = View.GONE - left_select_image.clearAnimation() - right_select_image.clearAnimation() - - left_nor_image.clearAnimation() - right_nor_image.clearAnimation() - turn_light_layout.clearAnimation() - - val disappearAnimationLeft = AlphaAnimation(1.0f, 0f) - disappearAnimationLeft.duration = 300 - - val disappearAnimationBg = AlphaAnimation(1.0f, 0f) - disappearAnimationBg.duration = 500 - - left_nor_image.startAnimation(disappearAnimationLeft) - right_nor_image.startAnimation(disappearAnimationLeft) - turn_light_layout.startAnimation(disappearAnimationBg) - - disappearAnimationLeft.setAnimationListener(object : Animation.AnimationListener { - override fun onAnimationRepeat(p0: Animation?) { - } - - override fun onAnimationStart(p0: Animation?) { - } - - override fun onAnimationEnd(p0: Animation?) { - left_nor_image.visibility = View.GONE - right_nor_image.visibility = View.GONE - } - }) - - disappearAnimationBg.setAnimationListener(object : Animation.AnimationListener { - override fun onAnimationRepeat(p0: Animation?) { - } - - override fun onAnimationStart(p0: Animation?) { - } - - override fun onAnimationEnd(p0: Animation?) { - turn_light_layout.visibility = View.GONE - } - }) - } - - //实现图片闪烁效果 - private fun setAnimation(imageView: ImageView) { - val animationSet = AnimatorSet() - val valueAnimator = ObjectAnimator.ofFloat(imageView, "alpha", 0f, 1.0f) - val valueAnimatorDisappear = ObjectAnimator.ofFloat(imageView, "alpha", 1.0f, 0f) - valueAnimator.duration = 1000 - valueAnimatorDisappear.duration = 800 - valueAnimator.repeatCount = -1 - valueAnimatorDisappear.repeatCount = -1 - animationSet.playTogether(valueAnimatorDisappear, valueAnimator) - animationSet.start() - } - -} \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/drawable/scanner_qr_code.xml b/OCH/offline/passenger/src/main/res/drawable/scanner_qr_code.xml deleted file mode 100644 index 7b205e5aed..0000000000 --- a/OCH/offline/passenger/src/main/res/drawable/scanner_qr_code.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_arrive_line_blue.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_arrive_line_blue.png deleted file mode 100644 index 88247c204f..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_arrive_line_blue.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_arrive_line_green.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_arrive_line_green.png deleted file mode 100644 index 0fd2398cfb..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_arrive_line_green.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_auto_close.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_auto_close.png deleted file mode 100644 index bed91e16ee..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_auto_close.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_auto_open.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_auto_open.png deleted file mode 100644 index 8ecc2ca1e9..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_auto_open.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bg_arrived_station.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bg_arrived_station.png deleted file mode 100644 index f47f628224..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bg_arrived_station.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bg_end_tag_bg.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bg_end_tag_bg.png deleted file mode 100644 index a679341790..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bg_end_tag_bg.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bg_start_tag_bg.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bg_start_tag_bg.png deleted file mode 100644 index c0fcf5d0ea..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bg_start_tag_bg.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_blue_tooth_close.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_blue_tooth_close.png deleted file mode 100644 index 0c292d2cf3..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_blue_tooth_close.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_blue_tooth_open.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_blue_tooth_open.png deleted file mode 100644 index cccf9e10fa..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_blue_tooth_open.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bus_line_logo.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bus_line_logo.png deleted file mode 100644 index 60064ae514..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bus_line_logo.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_cur_station_arrived_bg.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_cur_station_arrived_bg.png deleted file mode 100644 index 355af19afc..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_cur_station_arrived_bg.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_cur_station_un_arrived_bg.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_cur_station_un_arrived_bg.png deleted file mode 100644 index ea4214cf51..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_cur_station_un_arrived_bg.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_light_green_nor.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_light_green_nor.png deleted file mode 100644 index 939d5c0214..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_light_green_nor.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_light_red_nor.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_light_red_nor.png deleted file mode 100644 index 97d774140a..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_light_red_nor.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_light_yellow_nor.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_light_yellow_nor.png deleted file mode 100644 index a782062c34..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_light_yellow_nor.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_line_blue.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_line_blue.png deleted file mode 100755 index 233be50bd5..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_line_blue.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_line_green.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_line_green.png deleted file mode 100755 index 902cd19c2f..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_line_green.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_arrived_point.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_arrived_point.png deleted file mode 100644 index ac317649b4..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_arrived_point.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_arrow_arrived.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_arrow_arrived.png deleted file mode 100644 index fea5cfd033..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_arrow_arrived.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_arrow_un_arrive.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_arrow_un_arrive.png deleted file mode 100644 index 254662d297..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_arrow_un_arrive.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_car.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_car.png deleted file mode 100644 index 702f10f265..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_car.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_end_point.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_end_point.png deleted file mode 100644 index 39262e5ecb..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_end_point.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_start_point.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_start_point.png deleted file mode 100644 index b2e4c69ada..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_start_point.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_unarrived_point.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_unarrived_point.png deleted file mode 100644 index ec6081f5a3..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_unarrived_point.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_no_order_data.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_no_order_data.png deleted file mode 100755 index 65625ca374..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_no_order_data.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_point_blue.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_point_blue.png deleted file mode 100755 index ef08c49f25..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_point_blue.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_point_gray.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_point_gray.png deleted file mode 100755 index deec63de9d..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_point_gray.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_right_route_bg.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_right_route_bg.png deleted file mode 100644 index 5d9bf564af..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_right_route_bg.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_route_bg.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_route_bg.png deleted file mode 100644 index 5c4f302cc2..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_route_bg.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_speak_arrived_icon_0.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_speak_arrived_icon_0.png deleted file mode 100644 index 24a13e704e..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_speak_arrived_icon_0.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_speak_arrived_icon_1.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_speak_arrived_icon_1.png deleted file mode 100644 index c15a70a3ee..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_speak_arrived_icon_1.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_speak_arrived_icon_2.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_speak_arrived_icon_2.png deleted file mode 100644 index 8c1c118673..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_speak_arrived_icon_2.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_split_line_bg.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_split_line_bg.png deleted file mode 100644 index 2f392c64b6..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_split_line_bg.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_status_bar_logo.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_status_bar_logo.png deleted file mode 100644 index ffaacad3c6..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_status_bar_logo.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_youzhuan_open.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_youzhuan_open.png deleted file mode 100644 index fb728e515e..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_youzhuan_open.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_youzhuan_un_open.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_youzhuan_un_open.png deleted file mode 100644 index 4de98ca6dd..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_youzhuan_un_open.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_zuozhuan_open.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_zuozhuan_open.png deleted file mode 100644 index 5762da6053..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_zuozhuan_open.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_zuozhuan_un_open.png b/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_zuozhuan_un_open.png deleted file mode 100644 index ae29f98f34..0000000000 Binary files a/OCH/offline/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_zuozhuan_un_open.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_end_station_circle.xml b/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_end_station_circle.xml deleted file mode 100644 index cb17f7f2c3..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_end_station_circle.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_middle_station_circle.xml b/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_middle_station_circle.xml deleted file mode 100644 index 13b479db48..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_middle_station_circle.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_progress_bar.xml b/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_progress_bar.xml deleted file mode 100644 index 78d4679853..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_progress_bar.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_speak_icon_arrived.xml b/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_speak_icon_arrived.xml deleted file mode 100644 index 5590838117..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_speak_icon_arrived.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_start_station_circle.xml b/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_start_station_circle.xml deleted file mode 100644 index 2516df8c8e..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_start_station_circle.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_status_bar.xml b/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_status_bar.xml deleted file mode 100644 index 5b8da3c82c..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_status_bar.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_traffic_light_background.xml b/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_traffic_light_background.xml deleted file mode 100644 index 4982506777..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_traffic_light_background.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_brakelight_background_daytime.xml b/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_brakelight_background_daytime.xml deleted file mode 100644 index 6409baca2f..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_brakelight_background_daytime.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_dividing_line_bg.xml b/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_dividing_line_bg.xml deleted file mode 100644 index d5d41809d0..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_dividing_line_bg.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_panel_cur_station_panel.xml b/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_panel_cur_station_panel.xml deleted file mode 100644 index 9cc2472376..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_panel_cur_station_panel.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_progress_item_round.xml b/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_progress_item_round.xml deleted file mode 100644 index 2d74f8fd54..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_progress_item_round.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_base_fragment.xml b/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_base_fragment.xml deleted file mode 100644 index 62f371742b..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_base_fragment.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_map_view.xml b/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_map_view.xml deleted file mode 100644 index d9fadd6ef5..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_map_view.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_no_data_common_view.xml b/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_no_data_common_view.xml deleted file mode 100644 index 8240758212..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_no_data_common_view.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_route_fragment.xml b/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_route_fragment.xml deleted file mode 100644 index 2e0ad54917..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_route_fragment.xml +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_stations_common_item.xml b/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_stations_common_item.xml deleted file mode 100644 index 60d2419315..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_stations_common_item.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_traffic_light_view.xml b/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_traffic_light_view.xml deleted file mode 100644 index 41eacc318b..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_traffic_light_view.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_turn_light_status.xml b/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_turn_light_status.xml deleted file mode 100644 index dfbed02b59..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_turn_light_status.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_view_blue_tooth.xml b/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_view_blue_tooth.xml deleted file mode 100644 index 5bb43874e5..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_view_blue_tooth.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_view_status_bar.xml b/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_view_status_bar.xml deleted file mode 100644 index f82c6b44fd..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/layout/shuttle_p_jl_view_status_bar.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/jinlv/values/colors.xml b/OCH/offline/passenger/src/main/res/jinlv/values/colors.xml deleted file mode 100644 index 6620187e95..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/values/colors.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - #5D7199 - #CCE9EFFC - #C7D2E1 - #203555 - #FFB327 - #2D3E5F - #276AFE - #CDDBF6 - #2D3E5F - #2D3E5F - - #43CEFE - #1466FB - - #17417B - #6617417B - #A9B6CA - #1F82FB - - #992D3E5F - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/jinlv/values/dimens.xml b/OCH/offline/passenger/src/main/res/jinlv/values/dimens.xml deleted file mode 100644 index 07076fd91d..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/values/dimens.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - 750dp - 804dp - 40dp - 48dp - 422dp - - 158dp - 90dp - 45dp - 158dp - 90dp - 45dp - 90dp - 90dp - 3dp - - 34dp - - 38dp - - 90dp - 27dp - - 10dp - 38dp - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/jinlv/values/strings.xml b/OCH/offline/passenger/src/main/res/jinlv/values/strings.xml deleted file mode 100644 index 4170e113bf..0000000000 --- a/OCH/offline/passenger/src/main/res/jinlv/values/strings.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - KM/H - 您已收车 - 暂无班次 - 暂无线路 - 已到站: - 前方到站: - 请按秩序下车 - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_amap_arrived_road.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_amap_arrived_road.png deleted file mode 100644 index f4d80f4cc7..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_amap_arrived_road.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_amap_arriving_road.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_amap_arriving_road.png deleted file mode 100644 index a9aae488fb..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_amap_arriving_road.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_amap_custom_corner.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_amap_custom_corner.png deleted file mode 100644 index 6f0795edaf..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_amap_custom_corner.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_arrived_an_0.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_arrived_an_0.png deleted file mode 100644 index 62ed7bb92d..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_arrived_an_0.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_arrived_an_1.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_arrived_an_1.png deleted file mode 100644 index 34f7c0e1f2..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_arrived_an_1.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_arrived_an_2.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_arrived_an_2.png deleted file mode 100644 index 8b4b214814..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_arrived_an_2.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_auto_button_bg.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_auto_button_bg.png deleted file mode 100644 index fb4ddc5279..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_auto_button_bg.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_bg_driving_info_image.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_bg_driving_info_image.png deleted file mode 100644 index a829d5b88d..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_bg_driving_info_image.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_blue_tooth_close.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_blue_tooth_close.png deleted file mode 100644 index 0c292d2cf3..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_blue_tooth_close.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_blue_tooth_open.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_blue_tooth_open.png deleted file mode 100644 index cccf9e10fa..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_blue_tooth_open.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_bottom_bg.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_bottom_bg.png deleted file mode 100644 index cec9275411..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_bottom_bg.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_card_split.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_card_split.png deleted file mode 100644 index 5446226be7..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_card_split.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_clock_bg.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_clock_bg.png deleted file mode 100644 index a380c3f3b7..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_clock_bg.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_img_drive_bg.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_img_drive_bg.png deleted file mode 100644 index 7412ab3c90..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_img_drive_bg.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_img_line_bg.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_img_line_bg.png deleted file mode 100644 index dd78f6fc9e..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_img_line_bg.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_img_time_bg.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_img_time_bg.png deleted file mode 100644 index ba735834b6..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_img_time_bg.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_light_green_nor.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_light_green_nor.png deleted file mode 100644 index 3135524a79..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_light_green_nor.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_light_red_nor.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_light_red_nor.png deleted file mode 100644 index e873c2b85e..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_light_red_nor.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_light_yellow_nor.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_light_yellow_nor.png deleted file mode 100644 index 8046782601..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_light_yellow_nor.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_lightyellow_nor.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_lightyellow_nor.png deleted file mode 100644 index bae01408fd..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_lightyellow_nor.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_line_name.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_line_name.png deleted file mode 100644 index beed2f2ad2..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_line_name.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_line_noselect.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_line_noselect.png deleted file mode 100644 index bda5e1d105..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_line_noselect.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_line_tile.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_line_tile.png deleted file mode 100644 index 44070336fa..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_line_tile.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_car_icon.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_car_icon.png deleted file mode 100644 index b9c841cc83..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_car_icon.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_end_icon.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_end_icon.png deleted file mode 100644 index 39ffc9052f..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_end_icon.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_start_icon.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_start_icon.png deleted file mode 100644 index c970699aac..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_start_icon.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_staton_arrived_icon.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_staton_arrived_icon.png deleted file mode 100644 index 39be18953c..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_staton_arrived_icon.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_staton_icon.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_staton_icon.png deleted file mode 100644 index d90c5a2b71..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_staton_icon.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_p_video_holder.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_p_video_holder.png deleted file mode 100644 index d8c5951e43..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_p_video_holder.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_sky_bg.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_sky_bg.png deleted file mode 100644 index 7b72c07390..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_sky_bg.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_status_bar_logo.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_status_bar_logo.png deleted file mode 100644 index 1f6ea692f5..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_status_bar_logo.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_bottom_left.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_bottom_left.png deleted file mode 100644 index 5e1fb2c752..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_bottom_left.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_bottom_right.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_bottom_right.png deleted file mode 100644 index 19ae887a57..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_bottom_right.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_top_left.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_top_left.png deleted file mode 100644 index 3fb0a40ce3..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_top_left.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_top_right.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_top_right.png deleted file mode 100644 index dbc80b2254..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_top_right.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_youzhuan_open.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_youzhuan_open.png deleted file mode 100644 index bbd2c12d90..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_youzhuan_open.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_youzhuan_un_open.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_youzhuan_un_open.png deleted file mode 100644 index 7c0dcaabe1..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_youzhuan_un_open.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_zuozhuan_open.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_zuozhuan_open.png deleted file mode 100644 index 9bbda22cb7..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_zuozhuan_open.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_zuozhuan_un_open.png b/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_zuozhuan_un_open.png deleted file mode 100644 index 7c33fddbd9..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_zuozhuan_un_open.png and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_dashed_line.xml b/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_dashed_line.xml deleted file mode 100644 index b26187608d..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_dashed_line.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_arrived_notice.xml b/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_arrived_notice.xml deleted file mode 100644 index 0924ac7748..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_arrived_notice.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_distance_lefttime.xml b/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_distance_lefttime.xml deleted file mode 100644 index d7e80d7738..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_distance_lefttime.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_info.xml b/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_info.xml deleted file mode 100644 index 38b5f30517..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_info.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_selector.xml b/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_selector.xml deleted file mode 100644 index 21a6524032..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_selector.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_p_m2_arrived_station.xml b/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_p_m2_arrived_station.xml deleted file mode 100644 index 826ca50b64..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_p_m2_arrived_station.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_p_m2_auto.xml b/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_p_m2_auto.xml deleted file mode 100644 index 4189fb8509..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_p_m2_auto.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_p_m2_traffic_light.xml b/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_p_m2_traffic_light.xml deleted file mode 100644 index 5a27da20e0..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_p_m2_traffic_light.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_pnc.xml b/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_pnc.xml deleted file mode 100644 index 38d10320ae..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_pnc.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_brakelight_background_daytime.xml b/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_brakelight_background_daytime.xml deleted file mode 100644 index ba372d59df..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_brakelight_background_daytime.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_power_seekbar_style.xml b/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_power_seekbar_style.xml deleted file mode 100644 index 3ac0c761ba..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/drawable/shuttle_p_m2_power_seekbar_style.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_driving_info_fragment.xml b/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_driving_info_fragment.xml deleted file mode 100644 index 29cc67ae25..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_driving_info_fragment.xml +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_fragment.xml b/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_fragment.xml deleted file mode 100644 index cb409b7a2b..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_fragment.xml +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_hpmap_fragment.xml b/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_hpmap_fragment.xml deleted file mode 100644 index 5c9a902baa..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_hpmap_fragment.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_traffic_light_view.xml b/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_traffic_light_view.xml deleted file mode 100644 index 83567814d2..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_traffic_light_view.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_turn_light_status.xml b/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_turn_light_status.xml deleted file mode 100644 index a1699ac360..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_turn_light_status.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_video_fragment.xml b/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_video_fragment.xml deleted file mode 100644 index 66e95d9087..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_video_fragment.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_video_view.xml b/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_video_view.xml deleted file mode 100644 index 9d75478ee1..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_video_view.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_view_blue_tooth.xml b/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_view_blue_tooth.xml deleted file mode 100644 index 61448bf16d..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_view_blue_tooth.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_view_status_bar.xml b/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_view_status_bar.xml deleted file mode 100644 index b76e888eac..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/layout/shuttle_p_m2_view_status_bar.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/raw/star_marker.nt3d b/OCH/offline/passenger/src/main/res/m2/raw/star_marker.nt3d deleted file mode 100644 index 94440d9eb6..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/raw/star_marker.nt3d and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/raw/station_marker.nt3d b/OCH/offline/passenger/src/main/res/m2/raw/station_marker.nt3d deleted file mode 100644 index 04c83821aa..0000000000 Binary files a/OCH/offline/passenger/src/main/res/m2/raw/station_marker.nt3d and /dev/null differ diff --git a/OCH/offline/passenger/src/main/res/m2/values/colors.xml b/OCH/offline/passenger/src/main/res/m2/values/colors.xml deleted file mode 100644 index b0196c0ce9..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/values/colors.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - #FFFFFF - #0B1E38 - #BBDAFB - #0B1E38 - #5D7199 - #A5D8FF - #1B2546 - #23355D - #8895B7 - - - #C8EFFF - #203555 - #17417B - #2D3E5F - #34A61F - #AEEDB8 - #43CEFE - #1466FB - #7094AD - #80FFFFFF - - #99AFC9E7 - #6617417B - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/values/dimens.xml b/OCH/offline/passenger/src/main/res/m2/values/dimens.xml deleted file mode 100644 index 55344e5192..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/values/dimens.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/OCH/offline/passenger/src/main/res/m2/values/strings.xml b/OCH/offline/passenger/src/main/res/m2/values/strings.xml deleted file mode 100644 index d2faf78c18..0000000000 --- a/OCH/offline/passenger/src/main/res/m2/values/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - KM/H - m2_map_style.data - m2_map_style_extra.data - AUTO - 已到站 - 暂无站点 - 前方到站 - —公里 - —分钟 - 请按秩序下车 - 暂无路线 - \ No newline at end of file diff --git a/OCH/offline/passenger/src/test/java/passenger/ExampleUnitTest.java b/OCH/offline/passenger/src/test/java/passenger/ExampleUnitTest.java deleted file mode 100644 index d940b2948f..0000000000 --- a/OCH/offline/passenger/src/test/java/passenger/ExampleUnitTest.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.mogo.och.bus.passenger; - -import org.junit.Test; - -/** - * Example local unit test, which will execute on the development machine (host). - * - * @see Testing documentation - */ -public class ExampleUnitTest { - @Test - public void addition_isCorrect() { - - } -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/.gitignore b/OCH/shuttle/passenger/.gitignore deleted file mode 100644 index 42afabfd2a..0000000000 --- a/OCH/shuttle/passenger/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/OCH/shuttle/passenger/README.md b/OCH/shuttle/passenger/README.md deleted file mode 100644 index 6175119b78..0000000000 --- a/OCH/shuttle/passenger/README.md +++ /dev/null @@ -1,15 +0,0 @@ - - - - - -src - - androidTest Android 测试代码 - - basecommon 金旅开沃、接驳车 公用代码部分 - - jinlvvan 金旅开沃 独立代码部分 - - m1 金旅m1 独立代码部分 - - m2 金旅m2 独立代码部分 - - main 所有车型公用代码部分 - - shuttle 接驳车独立代码 因为接驳车和金旅开沃代码耦合厉害暂时放入到mogo-och-bus-passenger里面 - 后期会创建独立module和mogo-och-bus-passenger平级 - - test 普通代码测试 \ No newline at end of file diff --git a/OCH/shuttle/passenger/build.gradle b/OCH/shuttle/passenger/build.gradle deleted file mode 100644 index 2a19ed8914..0000000000 --- a/OCH/shuttle/passenger/build.gradle +++ /dev/null @@ -1,83 +0,0 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' -apply plugin: 'kotlin-kapt' - -android { - compileSdkVersion rootProject.ext.android.compileSdkVersion - // buildToolsVersion rootProject.ext.android.buildToolsVersion - defaultConfig { - minSdkVersion rootProject.ext.android.minSdkVersion - targetSdkVersion rootProject.ext.android.targetSdkVersion - versionCode Integer.valueOf(VERSION_CODE) - versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION") - - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles "consumer-rules.pro" - - kapt { - useBuildCache = false - arguments { - arg("AROUTER_MODULE_NAME", "shuttle"+project.getName()) - } - } - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - lintOptions { - abortOnError false - } - - 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' - } - } - - sourceSets { - main { - res.srcDirs = [ - 'src/main/res', - 'src/main/res/m2', - 'src/main/res/jinlv', - ] - java.srcDirs = [ - 'src/main/java', - 'src/main/java/m2', - 'src/main/java/jinlv', - ] - } - } -} - -dependencies { - implementation fileTree(dir: "libs", include: ["*.jar"]) - implementation rootProject.ext.dependencies.kotlinstdlib - implementation rootProject.ext.dependencies.androidxappcompat - implementation rootProject.ext.dependencies.arouter - implementation rootProject.ext.dependencies.androidxrecyclerview - implementation rootProject.ext.dependencies.material - kapt rootProject.ext.dependencies.aroutercompiler - implementation rootProject.ext.dependencies.rxandroid - implementation rootProject.ext.dependencies.androidxconstraintlayout - implementation rootProject.ext.dependencies.amapnavi3dmap - implementation project(":OCH:common:common") - compileOnly project(":libraries:mogo-map") - implementation project(':core:mogo-core-res') - - androidTestImplementation rootProject.ext.dependencies.androidxjunit - testImplementation rootProject.ext.dependencies.junit - -} - -apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString() \ No newline at end of file diff --git a/OCH/shuttle/passenger/consumer-rules.pro b/OCH/shuttle/passenger/consumer-rules.pro deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/OCH/shuttle/passenger/gradle.properties b/OCH/shuttle/passenger/gradle.properties deleted file mode 100644 index 2ed1ed2f42..0000000000 --- a/OCH/shuttle/passenger/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -GROUP=com.mogo.och -POM_ARTIFACT_ID=och-bus-passenger -VERSION_CODE=1 diff --git a/OCH/shuttle/passenger/proguard-rules.pro b/OCH/shuttle/passenger/proguard-rules.pro deleted file mode 100644 index 481bb43481..0000000000 --- a/OCH/shuttle/passenger/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/androidTest/java/passenger/ExampleInstrumentedTest.java b/OCH/shuttle/passenger/src/androidTest/java/passenger/ExampleInstrumentedTest.java deleted file mode 100644 index 2685ade0a4..0000000000 --- a/OCH/shuttle/passenger/src/androidTest/java/passenger/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.mogo.och.bus.passenger; - -import android.content.Context; - -import androidx.test.platform.app.InstrumentationRegistry; -import androidx.test.ext.junit.runners.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import static org.junit.Assert.*; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - @Test - public void useAppContext() { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); - assertEquals("com.mogo.och.bus.passenger.test", appContext.getPackageName()); - } -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/AndroidManifest.xml b/OCH/shuttle/passenger/src/main/AndroidManifest.xml deleted file mode 100644 index 549784ca83..0000000000 --- a/OCH/shuttle/passenger/src/main/AndroidManifest.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/assets/m2_map_style.data b/OCH/shuttle/passenger/src/main/assets/m2_map_style.data deleted file mode 100755 index 8e06219090..0000000000 Binary files a/OCH/shuttle/passenger/src/main/assets/m2_map_style.data and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/assets/m2_map_style_extra.data b/OCH/shuttle/passenger/src/main/assets/m2_map_style_extra.data deleted file mode 100755 index e5a16d46be..0000000000 Binary files a/OCH/shuttle/passenger/src/main/assets/m2_map_style_extra.data and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/assets/map_style.data b/OCH/shuttle/passenger/src/main/assets/map_style.data deleted file mode 100644 index d4d4bc8214..0000000000 Binary files a/OCH/shuttle/passenger/src/main/assets/map_style.data and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/assets/map_style_extra.data b/OCH/shuttle/passenger/src/main/assets/map_style_extra.data deleted file mode 100644 index 88c4e33256..0000000000 Binary files a/OCH/shuttle/passenger/src/main/assets/map_style_extra.data and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/ShuttlePassengerProvider.kt b/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/ShuttlePassengerProvider.kt deleted file mode 100644 index 3fbe34328f..0000000000 --- a/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/ShuttlePassengerProvider.kt +++ /dev/null @@ -1,70 +0,0 @@ -package com.mogo.och.shuttle.passenger - -import android.content.Context -import android.view.View -import androidx.fragment.app.Fragment -import com.alibaba.android.arouter.facade.annotation.Route -import com.mogo.eagle.core.data.config.FunctionBuildConfig -import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils -import com.mogo.eagle.core.utilcode.util.ActivityUtils -import com.mogo.eagle.core.utilcode.util.DeviceUtils -import com.mogo.eagle.core.utilcode.util.MultiDisplayUtils -import com.mogo.och.common.module.constant.OchCommonConst -import com.mogo.och.common.module.biz.provider.CommonServiceImpl -import com.mogo.och.common.module.wigets.media.MediaPlayerActivity -import com.mogo.och.shuttle.passenger.model.TicketModel -import com.mogo.och.shuttle.passenger.ui.BusPStatusBarView -import com.mogo.och.shuttle.passenger.ui.BusPassengerRouteFragment -import com.mogo.och.shuttle.passenger.ui.PM2BaseFragment -import com.mogo.och.shuttle.passenger.ui.widget.M2StatusBarView - -/** - * 网约车-Bus-乘客端 - * - * Created on 2022/3/29 - */ -@Route(path = OchCommonConst.SHUTTLE_PASSENGER) -class ShuttlePassengerProvider : CommonServiceImpl() { - - private val tag = ShuttlePassengerProvider::class.java.simpleName - private var mPM2Fragment: Fragment?=null - - override fun init(context: Context) { - TicketModel.load() - } - - override fun getStatusBarView(context: Context): View { - if(statusBarView==null){ - statusBarView = if (AppIdentityModeUtils.isB2(FunctionBuildConfig.appIdentityMode)) { - M2StatusBarView(context); - } else if (AppIdentityModeUtils.isB1(FunctionBuildConfig.appIdentityMode)) { - BusPStatusBarView(context); - }else{ - BusPStatusBarView(context); - } - } - return statusBarView!! - } - - override fun getFragment(): Fragment { - if (AppIdentityModeUtils.isB1(FunctionBuildConfig.appIdentityMode) && DeviceUtils.isEB5Model()) { - MultiDisplayUtils.startActWithSecond(ActivityUtils.getTopActivity(), MediaPlayerActivity::class.java) - } - if(mPM2Fragment==null){ - mPM2Fragment = if (AppIdentityModeUtils.isB2(FunctionBuildConfig.appIdentityMode)) { - PM2BaseFragment() - }else if (AppIdentityModeUtils.isB1(FunctionBuildConfig.appIdentityMode)) { - BusPassengerRouteFragment() - }else{ - BusPassengerRouteFragment() - } - } - return mPM2Fragment!! - } - - override fun resetFragment() { - super.resetFragment() - mPM2Fragment = null - } - -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/request/PassengerQueryLineRequest.java b/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/request/PassengerQueryLineRequest.java deleted file mode 100644 index 48c312b288..0000000000 --- a/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/request/PassengerQueryLineRequest.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.mogo.och.shuttle.passenger.bean.request; - -public -/** - * @author congtaowang - * @since 2021/3/22 - * - * 根据车机行驶线路站点信息 - */ -class PassengerQueryLineRequest { - - private String sn; - public PassengerQueryLineRequest(String sn) { - this.sn = sn; - } -} diff --git a/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/request/PassengerWriteOffRequest.java b/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/request/PassengerWriteOffRequest.java deleted file mode 100644 index 1ff5c160a6..0000000000 --- a/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/request/PassengerWriteOffRequest.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.mogo.och.shuttle.passenger.bean.request; - -public -/** - * @author congtaowang - * @since 2021/3/22 - * - * 根据车机行驶线路站点信息 - */ -class PassengerWriteOffRequest { - - private String sn; - private String orderNo; - private String uid; - - public PassengerWriteOffRequest(String orderNo, String uid) { - this.orderNo = orderNo; - this.uid = uid; - } - - public PassengerWriteOffRequest(String sn, String orderNo, String uid) { - this.sn = sn; - this.orderNo = orderNo; - this.uid = uid; - } - - public String getSn() { - return sn; - } - - public void setSn(String sn) { - this.sn = sn; - } - - public String getOrderNo() { - return orderNo; - } - - public void setOrderNo(String orderNo) { - this.orderNo = orderNo; - } - - public String getUid() { - return uid; - } - - public void setUid(String uid) { - this.uid = uid; - } -} diff --git a/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/response/PassengerOperationStatusResponse.java b/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/response/PassengerOperationStatusResponse.java deleted file mode 100644 index b6781937bb..0000000000 --- a/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/response/PassengerOperationStatusResponse.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.mogo.och.shuttle.passenger.bean.response; - -import com.mogo.eagle.core.data.BaseData; - -/** - * @author congtaowang - * @since 2021/3/22 - * - * 小巴车运营状态返回参数 - */ -public class PassengerOperationStatusResponse extends BaseData { - - public Result data; - - public static class Result { - private String sn; //司机屏sn - private String phone; //司机手机号 - public String plateNumber; //车牌号 - public int driverStatus;//0:已收车,1:已出车 - } -} diff --git a/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/response/PassengerRoutesResponse.java b/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/response/PassengerRoutesResponse.java deleted file mode 100644 index 3b9fbe3ec1..0000000000 --- a/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/response/PassengerRoutesResponse.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.mogo.och.shuttle.passenger.bean.response; - -import com.mogo.eagle.core.data.BaseData; -import com.mogo.och.data.bean.BusRoutesResult; - -/** - * 网约车小巴路线接口请求响应结果 返回的是对应司机屏的线路信息 - * - * @author tongchenfei - */ -public class PassengerRoutesResponse extends BaseData { - private BusRoutesResult data; - - public BusRoutesResult getResult() { - return data; - } - - public void setResult(BusRoutesResult data) { - this.data = data; - } - - @Override - public String toString() { - return "OchBusRoutesResponse{" + - "data=" + data + - '}'; - } - -} diff --git a/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/response/PassengerWriteOffResponse.kt b/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/response/PassengerWriteOffResponse.kt deleted file mode 100644 index d46146c23c..0000000000 --- a/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/bean/response/PassengerWriteOffResponse.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.mogo.och.shuttle.passenger.bean.response - -import com.mogo.eagle.core.data.BaseData - - -data class PassengerWriteOffResponse(val data: Result?) : BaseData(){ - data class Result( - val phone: String?, - val ticketSize: Int?, - val ticketName: String?, - val remainingTimes: Long? - ) -} diff --git a/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/constant/BusPassengerConst.kt b/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/constant/BusPassengerConst.kt deleted file mode 100644 index b820d0de58..0000000000 --- a/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/constant/BusPassengerConst.kt +++ /dev/null @@ -1,32 +0,0 @@ -package com.mogo.och.shuttle.passenger.constant - -/** - * Created on 2021/12/6 - */ -class BusPassengerConst { - companion object { - - // 轮询line - const val LOOP_LINE_2S = 2 * 1000L - const val LOOP_LINE_1S = 1 * 1000L - const val LOOP_DELAY = 100L - - // 无状态 - const val STATION_STATUS_IDLE = 0 - // 已过站(历史站) - const val STATION_STATUS_LEAVING = 1 - // 到站(当前站) - const val STATION_STATUS_STOPPED = 2 - // 未到站(未到站) - const val STATION_STATUS_ARRIVING = 3 - - //bus平均速度 bus的平均里程:25km/h - const val BUS_AVERAGE_SPEED = 10 - //接驳/B2平均速度 bus的平均里程:10km/h - const val SHUTTLE_AVERAGE_SPEED = 10 - - const val QUERY_BUS_P_STATION_DELAY = 3 * 1000L - - const val ARRIVE_DISTANCE_4_STATION_INTRODUCE = 200 //站点介绍 - } -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/model/TicketModel.kt b/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/model/TicketModel.kt deleted file mode 100644 index 5f82e1c20c..0000000000 --- a/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/model/TicketModel.kt +++ /dev/null @@ -1,107 +0,0 @@ -package com.mogo.och.shuttle.passenger.model - -import com.mogo.commons.AbsMogoApplication -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger -import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS_P -import com.mogo.eagle.core.utilcode.util.GsonUtils -import com.mogo.eagle.core.utilcode.util.RegexUtils -import com.mogo.och.common.module.manager.socket.lan.bean.WriteOffMsg -import com.mogo.och.common.module.manager.socket.lan.LanSocketManager -import com.mogo.och.common.module.network.OchCommonServiceCallback -import com.mogo.och.shuttle.passenger.bean.request.PassengerWriteOffRequest -import com.mogo.och.shuttle.passenger.bean.response.PassengerWriteOffResponse -import com.mogo.och.common.module.manager.scnner.ScannerManager -import com.mogo.och.common.module.manager.scnner.StateChangeListener -import com.mogo.och.shuttle.passenger.network.PassengerServiceManager - -object TicketModel : StateChangeListener { - - private const val TAG = "TicketModel" - - init { - ScannerManager.addStateChangeListener(TAG, this) - } - - fun load(){ - - } - - override fun parseData(params: MutableMap, payload: String?) { - val orderNo = params["orderNo"] - val uid = params["uid"] - val phone = params["phone"] - if(orderNo is String && uid is String){ - var phoneNum = "" - if(phone is String){ - if (RegexUtils.isMobileExact(phone)) { - phoneNum = phone - } - } - writeOffTicket(orderNo,uid,phoneNum) - }else{ - // 通知司机屏二维码错误 - sendMessage2Driver("参数错误:${payload}","") - } - } - - private fun writeOffTicket(orderNo: String, uid: String, phoneNum: String) { - val passengerWriteOffRequest = PassengerWriteOffRequest(orderNo, uid) - PassengerServiceManager.writeOffTicket(AbsMogoApplication.getApp(), - passengerWriteOffRequest, - object : OchCommonServiceCallback { - override fun onSuccess(data: PassengerWriteOffResponse?) { - if (data?.data == null) return - val ticketInfo = - "核销成功:票种名称:${data.data.ticketName},车票数量:${data.data.ticketSize},预留手机号:${data.data.phone},时间:${data.data.remainingTimes}" - CallerLogger.d(M_BUS_P + TAG, ticketInfo) - sendMessage2DriverSuccess(data.data,orderNo) - } - - override fun onFail(code: Int, msg: String?) { - CallerLogger.d(M_BUS_P + TAG, "核销失败 ${code}-----${msg}") - - when (code) { - 6002 -> {sendMessage2Driver("同一订单核销间隔时间需大于2分钟",phoneNum)} - 1009 -> {sendMessage2Driver("车票所选乘车日期非今日",phoneNum)} - 1005 -> {sendMessage2Driver("车辆未登录、或没有任务",phoneNum)} - 1006 -> {sendMessage2Driver("车票路线信息与当前车辆执行任务的路线信息不符合",phoneNum)} - 1008 -> {sendMessage2Driver("车票剩余可用次数为0",phoneNum)} - 6001 -> {sendMessage2Driver("二维码已过期",phoneNum)} - 1012 -> {sendMessage2Driver("当前用户下单路线非当前的车辆所属公司",phoneNum)} - else -> { - when (msg) { - "6002" -> {sendMessage2Driver("同一订单核销间隔时间需大于2分钟",phoneNum)} - "1009" -> {sendMessage2Driver("车票所选乘车日期非今日",phoneNum)} - "1005" -> {sendMessage2Driver("车辆未登录、或没有任务",phoneNum)} - "1006" -> {sendMessage2Driver("车票路线信息与当前车辆执行任务的路线信息不符合",phoneNum)} - "1008" -> {sendMessage2Driver("车票剩余可用次数为0",phoneNum)} - "6001" -> {sendMessage2Driver("二维码已过期",phoneNum)} - "1012" -> {sendMessage2Driver("当前用户下单路线非当前的车辆所属公司",phoneNum)} - else -> { - sendMessage2Driver(msg?:"",phoneNum) - } - } - } - } - } - - override fun onError(message: String) { - sendMessage2Driver("网络错误",phoneNum) - } - } - ) - } - - private fun sendMessage2Driver(message:String,phone:String){ - val msg = WriteOffMsg(false, phone, 0, "", "验票失败,${message}","") - CallerLogger.d(M_BUS_P + TAG, "sendTaskDetailsToClients = " + GsonUtils.toJson(msg)) - LanSocketManager.sendMsgToServer(msg) - } - private fun sendMessage2DriverSuccess(message: PassengerWriteOffResponse.Result,orderNo: String){ - val msg = WriteOffMsg(true, message.phone, message.ticketSize, message.ticketName, "",orderNo) - CallerLogger.d(M_BUS_P + TAG, "sendTaskDetailsToClients = " + GsonUtils.toJson(msg)) - LanSocketManager.sendMsgToServer(msg) - } - - -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/network/PassengerServiceManager.kt b/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/network/PassengerServiceManager.kt deleted file mode 100644 index 45ac65db37..0000000000 --- a/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/network/PassengerServiceManager.kt +++ /dev/null @@ -1,99 +0,0 @@ -package com.mogo.och.shuttle.passenger.network - -import android.content.Context -import com.mogo.cloud.passport.MoGoAiCloudClientConfig -import com.mogo.eagle.core.network.MoGoRetrofitFactory -import com.mogo.commons.storage.SharedPrefsMgr -import com.mogo.eagle.core.utilcode.util.StringUtils -import com.mogo.eagle.core.utilcode.util.ToastUtils -import com.mogo.och.common.module.biz.lansocket.LoginLanPassengerSocket -import com.mogo.och.common.module.constant.OchCommonConst -import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager -import com.mogo.och.common.module.network.OchCommonServiceCallback -import com.mogo.och.common.module.network.OchCommonSubscribeImpl -import com.mogo.och.common.module.network.interceptor.transformTry -import com.mogo.och.shuttle.passenger.bean.request.PassengerQueryLineRequest -import com.mogo.och.shuttle.passenger.bean.request.PassengerWriteOffRequest -import com.mogo.och.shuttle.passenger.bean.response.PassengerOperationStatusResponse -import com.mogo.och.shuttle.passenger.bean.response.PassengerRoutesResponse -import com.mogo.och.shuttle.passenger.bean.response.PassengerWriteOffResponse - -/** - * Created on 2022/3/31 - */ -object PassengerServiceManager { - - private var driverSnCache = "" - - private val TAG = "PassengerServiceManager" - - private var mShuttleBusPassengerServiceApi = - MoGoRetrofitFactory.getInstance(OchCommonConst.getShuttleUrl()).create( - ServiceApi::class.java) - - /** - * 查询绑定行驶的小巴车路线 - * @param context - * @param callback - */ - @JvmStatic - fun queryDriverSiteByCoordinate( - context: Context, callback: OchCommonServiceCallback? - ) { - mShuttleBusPassengerServiceApi.queryDriverSiteByCoordinate( - MoGoAiCloudClientConfig.getInstance().serviceAppId, - SharedPrefsMgr.getInstance().token, - PassengerQueryLineRequest( - LoginLanPassengerSocket.driverSn - ) - ).transformTry() - .subscribe(OchCommonSubscribeImpl(context, callback, "queryDriverSiteByCoordinate",false)) - } - - /** - * 查询司机端出车收车状态,以及车牌号 - * @param context - * @param callback - */ - @JvmStatic - fun queryDriverOperationStatus( - context: Context, - callback: OchCommonServiceCallback? - ) { - mShuttleBusPassengerServiceApi.queryDriverOperationStatus( - MoGoAiCloudClientConfig.getInstance().serviceAppId, - SharedPrefsMgr.getInstance().token, - LoginLanPassengerSocket.driverSn - ) - .transformTry() - .subscribe(OchCommonSubscribeImpl(context, callback, "queryDriverOperationStatus")) - - } - - /** - * 查询司机端出车收车状态,以及车牌号 - * @param context - * @param callback - */ - @JvmStatic - fun writeOffTicket( - context: Context, - ticketInfo: PassengerWriteOffRequest, - callback: OchCommonServiceCallback?, - ) { - ticketInfo.sn = LoginLanPassengerSocket.driverSn - if(StringUtils.isEmpty(LoginLanPassengerSocket.driverSn)){ - ToastUtils.showShort("请链接司机屏${ticketInfo.uid}") - OchChainLogManager.writeChainLogScanner(TAG +"onError","无司机屏sn请处理") - return - } - mShuttleBusPassengerServiceApi.writeOffTicket( - MoGoAiCloudClientConfig.getInstance().serviceAppId, - SharedPrefsMgr.getInstance().token, - ticketInfo - ) - .transformTry() - .subscribe(OchCommonSubscribeImpl(context, callback, "writeOff")) - - } -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/network/ServiceApi.java b/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/network/ServiceApi.java deleted file mode 100644 index 4394df464f..0000000000 --- a/OCH/shuttle/passenger/src/main/java/com/mogo/och/shuttle/passenger/network/ServiceApi.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.mogo.och.shuttle.passenger.network; - -import com.mogo.och.shuttle.passenger.bean.request.PassengerQueryLineRequest; -import com.mogo.och.shuttle.passenger.bean.request.PassengerWriteOffRequest; -import com.mogo.och.shuttle.passenger.bean.response.PassengerOperationStatusResponse; -import com.mogo.och.shuttle.passenger.bean.response.PassengerRoutesResponse; -import com.mogo.och.shuttle.passenger.bean.response.PassengerWriteOffResponse; - -import io.reactivex.Observable; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.POST; -import retrofit2.http.Query; - -/** - * Created on 2022/3/31 - * - * Bus乘客端接口定义 - */ -public interface ServiceApi { - /** - * 查询bus司机端绑定路线 - * @return 接口返回数据 - */ - @Headers( {"Content-Type:application/json;charset=UTF-8"} ) - @POST( "/och-shuttle-cabin/api/business/v1/passenger/lineDataWithDriver/query" ) - Observable queryDriverSiteByCoordinate(@Header("appId") String appId, @Header("ticket") String ticket, @Body PassengerQueryLineRequest request); - - /** - * 查询司机端的登陆状态 - * @param sn - * @return - */ - @Headers({"Content-type:application/json;charset=UTF-8"}) -// @GET("/autopilot-car-hailing/car/v2/driver/bus/passenger/takeOrderStatus/query") - @GET("/och-shuttle-cabin/api/business/v1/passenger/loginStatus") - Observable queryDriverOperationStatus(@Header ("appId") String appId, @Header("ticket") String ticket, @Query("sn") String sn); - - /** - * 核销接口 - */ - @Headers({"Content-type:application/json;charset=UTF-8"}) - @POST("/och-vehicle/api/scanner/device/writeOff") - Observable writeOffTicket(@Header ("appId") String appId, @Header("ticket") String ticket, @Body PassengerWriteOffRequest request); -} diff --git a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassegerDriverStatusCallback.java b/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassegerDriverStatusCallback.java deleted file mode 100644 index 73b44accf1..0000000000 --- a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassegerDriverStatusCallback.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.mogo.och.shuttle.passenger.callback; - -/** - * @author: wangmingjun - * @date: 2021/10/22 - */ -public interface IBusPassegerDriverStatusCallback { - void changeOperationStatus(boolean changeStatus); -} diff --git a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerADASStatusCallback.java b/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerADASStatusCallback.java deleted file mode 100644 index b410513938..0000000000 --- a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerADASStatusCallback.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.mogo.och.shuttle.passenger.callback; - -/** - * Created on 2022/3/31 - * - * Model->Presenter回调:ADAS相关(自动驾驶状态回调,到达终点等等) - */ -public interface IBusPassengerADASStatusCallback { - - // 自动驾驶可用状态 - void onAutopilotEnable(); - - // 自动驾驶不可用状态 - void onAutopilotDisable(); - - // 自动驾驶运行中 - void onAutopilotRunning(); -} diff --git a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerAutopilotPlanningCallback.java b/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerAutopilotPlanningCallback.java deleted file mode 100644 index 37d813d299..0000000000 --- a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerAutopilotPlanningCallback.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.mogo.och.shuttle.passenger.callback; - -/** - * Created on 2022/3/31 - */ -public interface IBusPassengerAutopilotPlanningCallback { - void routePlanningToNextStationChanged(long meters, long timeInSecond); - -} diff --git a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerControllerStatusCallback.java b/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerControllerStatusCallback.java deleted file mode 100644 index 29407a28dc..0000000000 --- a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerControllerStatusCallback.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.mogo.och.shuttle.passenger.callback; - -import com.mogo.eagle.core.data.map.MogoLocation; - -/** - * Created on 2022/3/31 - * - * Model->Presenter回调:状态控制器监听(accOn、adas ui show、voice ui show、push ui show、v2x ui show等等) - */ -public interface IBusPassengerControllerStatusCallback { - // 自车定位 - void onCarLocationChanged(MogoLocation location); -} diff --git a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerRouteLineInfoCallback.java b/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerRouteLineInfoCallback.java deleted file mode 100644 index aeebb9dfd4..0000000000 --- a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/callback/IBusPassengerRouteLineInfoCallback.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.mogo.och.shuttle.passenger.callback; - -import com.mogo.och.data.bean.BusStationBean; - -import java.util.List; - -/** - * @author: wangmingjun - * @date: 2022/4/6 - */ -public interface IBusPassengerRouteLineInfoCallback { - void updateLineInfo(String lineName); - void updateStationsInfo(List stations, int currentStationIndex, boolean isArrived); - void showNoTaskView(); - void hideNoTaskView(); -} diff --git a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/model/BusPassengerModel.java b/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/model/BusPassengerModel.java deleted file mode 100644 index 418ebab629..0000000000 --- a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/model/BusPassengerModel.java +++ /dev/null @@ -1,495 +0,0 @@ -package com.mogo.och.shuttle.passenger.model; - -import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P; -import static com.mogo.och.shuttle.passenger.constant.BusPassengerConst.QUERY_BUS_P_STATION_DELAY; -import static com.mogo.och.shuttle.passenger.constant.BusPassengerConst.STATION_STATUS_STOPPED; - -import android.content.Context; -import android.content.Intent; -import android.net.ConnectivityManager; -import android.os.Handler; -import android.os.Message; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; - - -import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager; -import com.mogo.commons.module.intent.IMogoIntentListener; -import com.mogo.commons.module.intent.IntentManager; -import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener; -import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager; -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.GsonUtils; -import com.mogo.eagle.core.utilcode.util.StringUtils; -import com.mogo.eagle.core.utilcode.util.ToastUtils; -import com.mogo.och.common.module.biz.lansocket.LoginLanPassengerSocket; -import com.mogo.och.common.module.manager.autopilot.autopilot.IOchAutopilotStatusListener; -import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotStatusListenerManager; -import com.mogo.och.common.module.manager.autopilot.location.OchLocationManager; -import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager; -import com.mogo.och.common.module.manager.socket.lan.LanSocketManager; -import com.mogo.och.common.module.manager.socket.lan.bean.BusinessType; -import com.mogo.och.common.module.voice.VoiceNotice; -import com.mogo.och.shuttle.passenger.R; -import com.mogo.och.common.module.manager.socket.lan.bean.AppConnectMsg; -import com.mogo.och.common.module.manager.socket.lan.bean.BaseDPMsg; -import com.mogo.och.common.module.manager.socket.lan.bean.DPMsgType; -import com.mogo.och.common.module.manager.socket.lan.bean.TaskDetailsMsg; -import com.mogo.och.common.module.manager.socket.cloud.OCHSocketMessageManager; -import com.mogo.och.common.module.constant.OchCommonConst; -import com.mogo.och.common.module.manager.distance.IDistanceListener; -import com.mogo.och.common.module.manager.distance.TrajectoryAndDistanceManager; -import com.mogo.och.common.module.utils.DateTimeUtil; -import com.mogo.eagle.core.data.config.FunctionBuildConfig; -import com.mogo.eagle.core.data.map.MogoLocation; -import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; -import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener; -import com.mogo.eagle.core.utilcode.util.NetworkUtils; -import com.mogo.och.shuttle.passenger.bean.response.PassengerOperationStatusResponse; -import com.mogo.och.shuttle.passenger.bean.response.PassengerRoutesResponse; -import com.mogo.och.shuttle.passenger.callback.IBusPassegerDriverStatusCallback; -import com.mogo.och.shuttle.passenger.callback.IBusPassengerADASStatusCallback; -import com.mogo.och.shuttle.passenger.callback.IBusPassengerAutopilotPlanningCallback; -import com.mogo.och.shuttle.passenger.callback.IBusPassengerControllerStatusCallback; -import com.mogo.och.shuttle.passenger.callback.IBusPassengerRouteLineInfoCallback; -import com.mogo.och.shuttle.passenger.constant.BusPassengerConst; -import com.mogo.och.shuttle.passenger.network.BusPassengerModelLoopManager; -import com.mogo.och.common.module.network.OchCommonServiceCallback; -import com.mogo.och.common.module.manager.socket.cloud.AbnormalFactorsLoopManager; -import com.mogo.och.data.bean.BusRoutesResult; -import com.mogo.och.data.bean.BusStationBean; -import com.mogo.och.data.bean.BusTransferData; -import com.mogo.och.shuttle.passenger.network.PassengerServiceManager; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -/** - * Created on 2022/3/31 - */ -public class BusPassengerModel { - private static final String TAG = BusPassengerModel.class.getSimpleName(); - private static final class SingletonHolder { - private static final BusPassengerModel INSTANCE = new BusPassengerModel(); - } - - public static BusPassengerModel getInstance() { - return SingletonHolder.INSTANCE; - } - - private Context mContext; - private IBusPassengerADASStatusCallback mADASStatusCallback; //Model->Presenter:自动驾驶状态相关 - private IBusPassengerAutopilotPlanningCallback mAutopilotPlanningCallback; //Model->Presenter:自动驾驶线路规划 - private Map mControllerStatusCallbackMap = new ConcurrentHashMap<>(); - - private IBusPassegerDriverStatusCallback mDriverStatusCallback; //出车收车状态 - private IBusPassengerRouteLineInfoCallback mRouteLineInfoCallback; // bus路线信息更新 - - private BusRoutesResult routesResult = null; - - List mStations = new ArrayList<>(); - private int mNextStationIndex = 0;// 要到达站的index - - private volatile boolean isGoingToNextStation = false; - - private static final int MSG_QUERY_BUS_P_STATION = 1001; - private final Handler handler = new Handler(new Handler.Callback() { - @Override - public boolean handleMessage(Message msg) { - if ( msg.what == MSG_QUERY_BUS_P_STATION ) { - queryDriverOperationStatus(); - return true; - } - return false; - } - }); - - private BusPassengerModel() { - } - - public void init( Context context ) { - mContext = context.getApplicationContext(); - initListeners(); - queryDriverOperationStatus(); - queryDriverByLocalDriver(); - startOrStopOrderLoop(true); - } - - private void queryDriverByLocalDriver() { - //本地去请求司机端 - TaskDetailsMsg msg = new TaskDetailsMsg("task", BusinessType.shuttle); - - LanSocketManager.sendMsgToServer(msg); - } - - public void setDriverStatusCallback(IBusPassegerDriverStatusCallback callback){ - this.mDriverStatusCallback = callback; - } - - public void setRouteLineInfoCallback(IBusPassengerRouteLineInfoCallback callback){ - this.mRouteLineInfoCallback = callback; - } - - private void queryDriverOperationDelay() { - handler.sendEmptyMessageDelayed( MSG_QUERY_BUS_P_STATION, QUERY_BUS_P_STATION_DELAY ); - } - - private void queryDriverOperationStatus() { - PassengerServiceManager.queryDriverOperationStatus(mContext - , new OchCommonServiceCallback() { - @Override - public void onSuccess(PassengerOperationStatusResponse data) { - if (data == null || data.data == null) return; - if (mDriverStatusCallback != null) { - CallerLogger.d( M_BUS_P + TAG, "queryDriverOperationStatus = %s", data.data.plateNumber ); - mDriverStatusCallback.changeOperationStatus(data.data.driverStatus == 1); - } - } - - @Override - public void onError() { - if (!NetworkUtils.isConnected(mContext)) { - ToastUtils.showShort(mContext.getString(R.string.network_error_tip)); - } else { - ToastUtils.showShort(mContext.getString(R.string.request_error_tip)); - } - } - - @Override - public void onFail(int code, String msg) { - //延迟3s再次查询 - queryDriverOperationDelay(); - } - }); - } - - public void queryDriverSiteByCoordinate(){ - PassengerServiceManager.queryDriverSiteByCoordinate(mContext - , new OchCommonServiceCallback() { - @Override - public void onSuccess(PassengerRoutesResponse data) { - if ( data == null || data.getResult() == null) { - CallerLogger.d( M_BUS_P + TAG, "queryDriverSiteByCoordinate = null"); - clearLocalRouteResult(); - return; - } - if (routesResult != null && data.getResult().equals(routesResult)){ - CallerLogger.d( M_BUS_P + TAG, "queryDriverSiteByCoordinate = not update"); - return; - } - - OchChainLogManager.writeChainLog("线路发生变化",data.toString()); - - if (routesResult != null && - routesResult.getWriteVersion() < data.getResult().getWriteVersion()){ - routesResult = data.getResult(); - } - - if (routesResult == null){ - routesResult = data.getResult(); - } - - updatePassengerRouteInfo(routesResult); - } - - @Override - public void onError() { - CallerLogger.d( M_BUS_P + TAG, "queryDriverSiteByCoordinate = onError =" - + ", sn = " + LoginLanPassengerSocket.INSTANCE.getDriverSn()); - queryDriverByLocalDriver(); - } - - @Override - public void onFail(int code, String msg) { - CallerLogger.d( M_BUS_P + TAG, "queryDriverSiteByCoordinate = %s", msg - + ", sn = " +LoginLanPassengerSocket.INSTANCE.getDriverSn()); - if (code == 1003){ - queryDriverOperationDelay(); - } - if (LoginLanPassengerSocket.INSTANCE.getDriverSn().isEmpty()){ - //此处拦截是为了防止过程中乘客屏和司机端断连,拿不到司机端sn, 造成请求失败去刷新了界面 - return; - } - if (code == 1003){ - routesResult = null; - cleanStation("queryDriverSiteByCoordinate 1003"); - return; - } - queryDriverByLocalDriver(); - } - }); - } - - private void clearLocalRouteResult() { - if (routesResult != null) { - routesResult = null; - } - mNextStationIndex = 0; - cleanStation("queryDriverSiteByCoordinate"); - if (mRouteLineInfoCallback != null){ - mRouteLineInfoCallback.showNoTaskView(); - } - } - - private void updatePassengerRouteInfo(BusRoutesResult result) { - if (result == null){ - clearLocalRouteResult(); - return; - } - CallerLogger.d( M_BUS_P + TAG, "queryDriverSiteByCoordinate = update"); - routesResult = result; - - if (mRouteLineInfoCallback != null){ - mRouteLineInfoCallback.updateLineInfo(result.getName()); - mRouteLineInfoCallback.hideNoTaskView(); - if (result.getSites() != null){ - List stations = result.getSites(); - mStations.clear(); - mStations.addAll(stations); - for (int i = 0; i< stations.size(); i++){ - BusStationBean station = stations.get(i); - if (station.getDrivingStatus() == STATION_STATUS_STOPPED && station.isLeaving() && i+1 < stations.size()){ - CallerLogger.d(M_BUS_P + TAG, "order = station= leave"); - isGoingToNextStation = true; - mRouteLineInfoCallback.updateStationsInfo(stations,i+1,false); - mNextStationIndex = i+1; - BusStationBean startStation = mStations.get(i); - BusStationBean endStation = mStations.get(i+1); - setTrajectoryStation(startStation, endStation, result.getLineId()); - return; - }else if (station.getDrivingStatus() == STATION_STATUS_STOPPED && !station.isLeaving()){ - if (i == stations.size() - 1) { - cleanStation("updatePassengerRouteInfo最后一个站点"); - } - - isGoingToNextStation = false; - CallerLogger.d(M_BUS_P + TAG, "order = station= arrive"); - mRouteLineInfoCallback.updateStationsInfo(stations,i,true); - return; - } - } - } - } - - } - - public void release() { - releaseListeners(); - cleanStation("release"); - startOrStopOrderLoop(false); - } - - public void setMoGoAutopilotPlanningListener(IBusPassengerAutopilotPlanningCallback - moGoAutopilotPlanningCallback) { - this.mAutopilotPlanningCallback = moGoAutopilotPlanningCallback; - } - - public void setADASStatusCallback(IBusPassengerADASStatusCallback callback) { - this.mADASStatusCallback = callback; - } - - public void setControllerStatusCallback(String tag, IBusPassengerControllerStatusCallback callback) { - if (tag == null || "".equals(tag)) return; - - if (callback == null) { - mControllerStatusCallbackMap.remove(tag); - return; - } - - mControllerStatusCallbackMap.put(tag,callback); - - } - - private void initListeners() { - - // 2021.11.1重构自动驾驶 实现接口 IMoGoAutopilotStatusListener 注册监听 替换IMogoAdasOCHCallback接口 - OchAutoPilotStatusListenerManager.INSTANCE.addListener(TAG,mGoAutopilotStatusListener); - IntentManager.getInstance().registerIntentListener(ConnectivityManager.CONNECTIVITY_ACTION, mNetWorkIntentListener ); - // 定位监听 - OchLocationManager.addGCJ02Listener(TAG, 3,mMapLocationListener); - - - //监听司机端消息 - CallerTelematicListenerManager.INSTANCE.addListener(TAG,mReceivedMsgListener); - - AbnormalFactorsLoopManager.INSTANCE.startLoopAbnormalFactors(mContext); - TrajectoryAndDistanceManager.INSTANCE.addDistanceListener(TAG, trajectoryListener); - } - - private void releaseListeners() { - - // 注销定位监听 - OchLocationManager.removeGCJ02Listener(TAG); - - MogoAiCloudSocketManager.getInstance(mContext) - .unregisterLifecycleListener(10010); - - OchAutoPilotStatusListenerManager.INSTANCE.removeListener(mGoAutopilotStatusListener); - - AbnormalFactorsLoopManager.INSTANCE.stopLoopAbnormalFactors(); - - CallerTelematicListenerManager.INSTANCE.removeListener(TAG); - CallerTelematicListenerManager.INSTANCE.removeListener(TAG); - } - - private final IDistanceListener trajectoryListener = new IDistanceListener() { - @Override - public void stationDistanceCallback(float distance) { - - } - @Override - public void distanceCallback(float distance) { - double lastTime = distance / BusPassengerConst.BUS_AVERAGE_SPEED * 3.6; //秒 - CallerLogger.d(M_BUS_P + TAG, "轨迹排查==lastSumLength = "+distance); - if(routesResult!=null){ - for (BusStationBean site : routesResult.getSites()) { - if (site.getDrivingStatus() == BusPassengerConst.STATION_STATUS_STOPPED && !site.isLeaving()) { - return; - } - } - } - // 小于200m 播报站点介绍 - if(distance<200){ - BusStationBean stationNext = mStations.get(mNextStationIndex); - if(!stationNext.isPlayTts()){ - if (!StringUtils.isEmpty(stationNext.getIntroduction())) { - VoiceNotice.showNotice(stationNext.getIntroduction()); - stationNext.setPlayTts(true); - } - } - } - mAutopilotPlanningCallback.routePlanningToNextStationChanged( - (long)distance, (long)lastTime - ); - } - }; - - private final IReceivedMsgListener mReceivedMsgListener = new IReceivedMsgListener() { - @Override - public void onDemoMode(boolean isDemoMode) { - - } - - @Override - public void onReceivedServerSn(@Nullable String sn) { - CallerLogger.d(SceneConstant.M_BUS_P + TAG, "司机屏sn:"+sn ); - } - - @Override - public void onReceivedMsg(int type, @NonNull byte[] byteArray) { - if (OchCommonConst.BUSINESS_STRING == type) { - - BaseDPMsg baseMsg = GsonUtils.fromJson(new String(byteArray), BaseDPMsg.class); - CallerLogger.d(SceneConstant.M_BUS_P + TAG, "onReceivedMsg = " + GsonUtils.toJson(baseMsg)); - - if (baseMsg != null && baseMsg.getType() == DPMsgType.TYPE_COMMON.getType()) { - AppConnectMsg msg = GsonUtils.fromJson(new String(byteArray), AppConnectMsg.class); - if (msg != null && msg.isViewShow()) { //消息盒子显示内容 - OCHSocketMessageManager.INSTANCE.pushAppOperationalMsgBox( - DateTimeUtil.getCurrentTimeStamp(), msg.getMsg(), - OCHSocketMessageManager.OPERATION_SYSTEM); - } - } else if (baseMsg != null && baseMsg.getType() == DPMsgType.TYPE_TASK_DETAILS.getType()) { - TaskDetailsMsg msg = GsonUtils.fromJson(new String(byteArray), TaskDetailsMsg.class); - - CallerLogger.d(SceneConstant.M_BUS_P + TAG, "onReceivedMsg = " + GsonUtils.toJson(msg)); - if (msg == null || msg.getMsg().isEmpty()) { - clearLocalRouteResult(); - return; - } - BusTransferData result = GsonUtils.fromJson(msg.getMsg(), BusTransferData.class); - if (msg != null && mDriverStatusCallback != null) { - mDriverStatusCallback.changeOperationStatus(result.getLoginStatus() == 1); - } - if (result != null) { //已司机端传来的为准 - routesResult = result.getRoutesResult(); - updatePassengerRouteInfo(routesResult); - } - } - } - } - }; - - - //监听网络变化,避免启动机器时无网导致无法更新订单信息 - private final IMogoIntentListener mNetWorkIntentListener = new IMogoIntentListener() { - @Override - public void onIntentReceived( String intentStr, Intent intent ) { - CallerLogger.d( M_BUS_P + TAG, "onIntentReceived = %s", intentStr ); - if ( ConnectivityManager.CONNECTIVITY_ACTION.equals( intentStr ) ) { - if ( NetworkUtils.isConnected( mContext ) ) { - queryDriverOperationStatus(); - } - } - } - }; - - private final IMoGoChassisLocationGCJ02Listener mMapLocationListener = new IMoGoChassisLocationGCJ02Listener() { - @Override - public void onChassisLocationGCJ02(@Nullable MogoLocation gnssInfo) { - if (null == gnssInfo) return; - for (IBusPassengerControllerStatusCallback callback :mControllerStatusCallbackMap.values()){ - callback.onCarLocationChanged(gnssInfo); - } - } - }; - - private final IOchAutopilotStatusListener mGoAutopilotStatusListener = new IOchAutopilotStatusListener(){ - - @Override - public void onAutopilotStatusResponse(int state) { - if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) { - //2022.7.20 自动驾驶更换成带档位的 - if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotRunning(); - } else{ - if (FunctionBuildConfig.isDemoMode && - mNextStationIndex>= 0 && mNextStationIndex <= mStations.size() - 1 - && isGoingToNextStation){ - CallerLogger.d(M_BUS_P + TAG, "FunctionBuildConfig.isDemoMode is true"); - return; - } - - if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE) { - if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotEnable(); - } else if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE) { - if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotDisable(); - }else if (state == IMoGoAutopilotStatusListener.STATUS_PARALLEL_DRIVING){ - if (mADASStatusCallback != null) mADASStatusCallback.onAutopilotRunning(); - } - } - } - }; - - private void startOrStopOrderLoop(boolean start) { - CallerLogger.d(M_BUS_P + TAG, "startOrStopOrderLoop() " + start); - if (start) { - BusPassengerModelLoopManager.getInstance().startQueryDriverLineLoop(); - } else { - BusPassengerModelLoopManager.getInstance().stopQueryDriverLineLoop(); - } - } - - private void setTrajectoryStation( - BusStationBean startStationInfo , - BusStationBean endStationInfo, - int lineId - ) { - MogoLocation startStation = new MogoLocation(); - startStation.setLongitude(startStationInfo.getGcjLon()); - startStation.setLatitude(startStationInfo.getGcjLat()); - MogoLocation endStation = new MogoLocation(); - endStation.setLongitude(endStationInfo.getGcjLon()); - endStation.setLatitude(endStationInfo.getGcjLat()); - TrajectoryAndDistanceManager.INSTANCE.setStationPoint(startStation, endStation, (long)lineId); - } - - private void cleanStation(String type) { - CallerLogger.d(M_BUS_P + TAG, "清理站点:"+type); - TrajectoryAndDistanceManager.INSTANCE.setStationPoint(null, null, -1L); - } - -} diff --git a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/network/BusPassengerModelLoopManager.java b/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/network/BusPassengerModelLoopManager.java deleted file mode 100644 index 09f7837cf5..0000000000 --- a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/network/BusPassengerModelLoopManager.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.mogo.och.shuttle.passenger.network; - -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; -import com.mogo.och.shuttle.passenger.model.BusPassengerModel; - -import java.util.concurrent.TimeUnit; - -import io.reactivex.Observable; -import io.reactivex.android.schedulers.AndroidSchedulers; -import io.reactivex.disposables.CompositeDisposable; -import io.reactivex.disposables.Disposable; -import io.reactivex.schedulers.Schedulers; - -import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P; -import static com.mogo.och.shuttle.passenger.constant.BusPassengerConst.LOOP_DELAY; -import static com.mogo.och.shuttle.passenger.constant.BusPassengerConst.LOOP_LINE_2S; - -/** - * Created on 2021/11/22 - * - * 管理轮询逻辑(订单轮询、新单轮询、新单抢单结果轮询等等) - */ -public class BusPassengerModelLoopManager { - - private static final String TAG = BusPassengerModelLoopManager.class.getSimpleName(); - - private static final class SingletonHolder { - private static final BusPassengerModelLoopManager INSTANCE = new BusPassengerModelLoopManager(); - } - - public static BusPassengerModelLoopManager getInstance() { - return SingletonHolder.INSTANCE; - } - - private Disposable mQueryLineDisposable; //心跳轮询 - - public void startQueryDriverLineLoop() { - if (mQueryLineDisposable != null && !mQueryLineDisposable.isDisposed()) { - return; - } - CallerLogger.i(M_BUS_P + TAG, "startQueryDriverLineLoop()"); - mQueryLineDisposable = Observable.interval(LOOP_DELAY, - LOOP_LINE_2S, TimeUnit.MILLISECONDS) - .map((aLong -> aLong + 1)) - .subscribeOn(Schedulers.io()) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(aLong -> BusPassengerModel.getInstance().queryDriverSiteByCoordinate()); - } - - public void stopQueryDriverLineLoop() { - if (mQueryLineDisposable != null) { - CallerLogger.i(M_BUS_P + TAG, "stopQueryDriverLineLoop()"); - mQueryLineDisposable.dispose(); - mQueryLineDisposable = null; - } - } - -} diff --git a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/presenter/BaseBusPassengerPresenter.java b/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/presenter/BaseBusPassengerPresenter.java deleted file mode 100644 index 2d5a815653..0000000000 --- a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/presenter/BaseBusPassengerPresenter.java +++ /dev/null @@ -1,192 +0,0 @@ -package com.mogo.och.shuttle.passenger.presenter; - -import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS_P; - -import android.os.Looper; - -import androidx.annotation.NonNull; -import androidx.lifecycle.LifecycleOwner; - -import com.mogo.commons.AbsMogoApplication; -import com.mogo.commons.mvp.Presenter; -import com.mogo.eagle.core.data.map.MogoLocation; -import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; -import com.mogo.eagle.core.utilcode.util.UiThreadHandler; -import com.mogo.och.shuttle.passenger.callback.IBusPassegerDriverStatusCallback; -import com.mogo.och.shuttle.passenger.callback.IBusPassengerADASStatusCallback; -import com.mogo.och.shuttle.passenger.callback.IBusPassengerAutopilotPlanningCallback; -import com.mogo.och.shuttle.passenger.callback.IBusPassengerControllerStatusCallback; -import com.mogo.och.shuttle.passenger.callback.IBusPassengerRouteLineInfoCallback; -import com.mogo.och.shuttle.passenger.model.BusPassengerModel; -import com.mogo.och.shuttle.passenger.ui.BusPassengerRouteFragment; -import com.mogo.och.data.bean.BusStationBean; - -import java.util.List; - -/** - * Created on 2022/3/31 - */ -public class BaseBusPassengerPresenter extends Presenter implements - IBusPassengerADASStatusCallback, IBusPassengerControllerStatusCallback, IBusPassegerDriverStatusCallback, IBusPassengerRouteLineInfoCallback, IBusPassengerAutopilotPlanningCallback { - private static final String TAG = BaseBusPassengerPresenter.class.getSimpleName(); - - public BaseBusPassengerPresenter(BusPassengerRouteFragment view) { - super(view); - BusPassengerModel.getInstance().init(AbsMogoApplication.getApp()); - initListeners(); - } - - @Override - public void onCreate(@NonNull LifecycleOwner owner) { - super.onCreate(owner); - CallerLogger.d(M_BUS_P + TAG, "Bus乘客端Presenter onCreate()"); - } - - @Override - public void onDestroy(@NonNull LifecycleOwner owner) { - super.onDestroy(owner); - - releaseListeners(); - BusPassengerModel.getInstance().release(); - } - - private void initListeners() { - BusPassengerModel.getInstance().setADASStatusCallback(this); - BusPassengerModel.getInstance().setControllerStatusCallback(TAG, this); - BusPassengerModel.getInstance().setDriverStatusCallback(this); - BusPassengerModel.getInstance().setRouteLineInfoCallback(this); - BusPassengerModel.getInstance().setMoGoAutopilotPlanningListener(this); - } - - private void releaseListeners() { - BusPassengerModel.getInstance().setADASStatusCallback(null); - BusPassengerModel.getInstance().setControllerStatusCallback(TAG, null); - BusPassengerModel.getInstance().setDriverStatusCallback(null); - BusPassengerModel.getInstance().setRouteLineInfoCallback(null); - BusPassengerModel.getInstance().setMoGoAutopilotPlanningListener(null); - } - - @Override - public void onAutopilotEnable() { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - if (mView != null) { - mView.onAutopilotStatusChanged( - IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE); - } - } - }, UiThreadHandler.MODE.QUEUE); - } - - @Override - public void onAutopilotDisable() { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - if (mView != null) { - mView.onAutopilotStatusChanged( - IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE); - } - } - }, UiThreadHandler.MODE.QUEUE); - } - - @Override - public void onAutopilotRunning() { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - if (mView != null) { - mView.onAutopilotStatusChanged( - IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING); - } - } - }, UiThreadHandler.MODE.QUEUE); - } - - @Override - public void onCarLocationChanged(MogoLocation location) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - if (location != null && mView != null) { - mView.onCarLocationChanged(location); - } - } - }, UiThreadHandler.MODE.QUEUE); - } - - @Override - public void changeOperationStatus(boolean changeStatus) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - if (mView != null) { - mView.changeOperationStatus(changeStatus); - } - } - }, UiThreadHandler.MODE.QUEUE); - } - - @Override - public void updateLineInfo(String lineName) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - if (mView != null) { - mView.updateLineInfo(lineName); - } - } - }, UiThreadHandler.MODE.QUEUE); - } - - @Override - public void updateStationsInfo(List stations, int currentStationIndex, boolean isArrived) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - if (mView != null) { - mView.updateStationsInfo(stations, currentStationIndex, isArrived); - } - } - }, UiThreadHandler.MODE.QUEUE); - } - - @Override - public void showNoTaskView() { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - if (mView != null) { - mView.showNoTaskView(); - } - } - }, UiThreadHandler.MODE.QUEUE); - } - - @Override - public void hideNoTaskView() { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - if (mView != null) { - mView.hideNoTaskView(); - } - } - }, UiThreadHandler.MODE.QUEUE); - } - - @Override - public void routePlanningToNextStationChanged(long meters, long timeInSecond) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - if (mView != null) { - mView.updateRoutePlanningToNextStation(meters, timeInSecond); - } - } - }, UiThreadHandler.MODE.QUEUE); - } -} diff --git a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPBlueToothView.kt b/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPBlueToothView.kt deleted file mode 100644 index 985057174c..0000000000 --- a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPBlueToothView.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui - -import android.content.Context -import android.util.AttributeSet -import android.view.LayoutInflater -import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener -import com.mogo.eagle.core.function.hmi.ui.widget.BlueToothView -import com.mogo.eagle.core.utilcode.util.ThreadUtils -import com.mogo.och.shuttle.passenger.R -import kotlinx.android.synthetic.main.shuttle_p_jl_view_blue_tooth.view.blueView - -/** - * 魔戒蓝牙控件 - * 放置于StatusBar右侧位置 - */ -class BusPBlueToothView @JvmOverloads constructor( - context: Context, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : BlueToothView(context, attrs, defStyleAttr),IMoGoDevaToolsListener { - - init { - LayoutInflater.from(context).inflate(R.layout.shuttle_p_jl_view_blue_tooth, this, true) - } - - override fun mofangStatus(status: Boolean) { - ThreadUtils.runOnUiThread { - if (status) { - blueView.setImageResource(R.drawable.shuttle_p_jl_blue_tooth_close) - } else { - blueView.setImageResource(R.drawable.shuttle_p_jl_blue_tooth_open) - } - } - } - -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPStatusBarView.kt b/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPStatusBarView.kt deleted file mode 100644 index cd2c21f70a..0000000000 --- a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPStatusBarView.kt +++ /dev/null @@ -1,70 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui - -import android.annotation.* -import android.content.Context -import android.util.AttributeSet -import android.view.LayoutInflater -import android.view.ViewGroup -import androidx.constraintlayout.widget.ConstraintLayout -import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener -import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener -import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager -import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager -import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager -import com.mogo.eagle.core.utilcode.kotlin.* -import com.mogo.eagle.core.utilcode.util.AppUtils -import com.mogo.och.shuttle.passenger.R -import kotlinx.android.synthetic.main.shuttle_p_jl_view_status_bar.view.tv_shuttle_b1_p_version -import kotlinx.coroutines.* -import me.jessyan.autosize.utils.AutoSizeUtils - -/** - * @author: wangmingjun - * @date: 2023/2/14 - */ -class BusPStatusBarView @JvmOverloads constructor( - context: Context, attrs: AttributeSet? = null -) : ConstraintLayout(context, attrs), IViewControlListener, IMoGoSkinModeChangeListener{ - - companion object { - const val TAG = "BusPStatusBarView" - } - - init { - LayoutInflater.from(context).inflate(R.layout.shuttle_p_jl_view_status_bar, this, true) - setBackgroundResource(R.drawable.shuttle_p_jl_bg_status_bar) - isClickable = true - isFocusable = true - - tv_shuttle_b1_p_version.text = "版本:${AppUtils.getAppVersionName()}" - } - - - @SuppressLint("ClickableViewAccessibility") - override fun onAttachedToWindow() { - super.onAttachedToWindow() - post { - val params: ViewGroup.LayoutParams = getLayoutParams() - params.height = AutoSizeUtils.dp2px(context,40f) - layoutParams = params - } - //添加view控制 - CallerHmiViewControlListenerManager.addListener(TAG,this) - // 添加换肤监听 - CallerSkinModeListenerManager.addListener(TAG, this) - } - - override fun onSkinModeChange(skinMode: Int) { - when (skinMode) { - 0 -> setStatusBarDarkOrLight(false) - 1 -> setStatusBarDarkOrLight(true) - } - } - - override fun onDetachedFromWindow() { - super.onDetachedFromWindow() - CallerHmiViewControlListenerManager.removeListener(TAG) - CallerSkinModeListenerManager.removeListener(TAG) - CallerDevaToolsManager.hideStatusBar() - } -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPassengerBaseFragment.java b/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPassengerBaseFragment.java deleted file mode 100644 index a15e0da496..0000000000 --- a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPassengerBaseFragment.java +++ /dev/null @@ -1,96 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui; - -import android.os.Bundle; -import android.view.LayoutInflater; -import android.widget.FrameLayout; - -import androidx.annotation.NonNull; - -import com.mogo.commons.mvp.IView; -import com.mogo.commons.mvp.MvpFragment; - -import com.mogo.commons.mvp.Presenter; -import com.mogo.eagle.core.function.hmi.ui.widget.RomaPassengerView; -import com.mogo.eagle.core.function.view.MapBizView; -import com.mogo.och.shuttle.passenger.R; - -/** - * Created on 2022/3/31 - *

- * Bus乘客端基础Fragment - */ -public abstract class BusPassengerBaseFragment> extends MvpFragment { - private static final String TAG = BusPassengerBaseFragment.class.getSimpleName(); - - private MapBizView mapBizView; - private FrameLayout flContainer; - private RomaPassengerView romaPView; - - @Override - protected int getLayoutId() { - return R.layout.shuttle_p_jl_base_fragment; - } - - @Override - public String getTagName() { - return TAG; - } - - @Override - protected void initViews() { - mapBizView = findViewById(R.id.mapBizView); - - showRouteFragment(); - } - - @Override - protected void initViews(Bundle savedInstanceState) { - super.initViews(savedInstanceState); - mapBizView.onCreate(savedInstanceState); - } - - @Override - public void onResume() { - super.onResume(); - mapBizView.onResume(); - } - - @Override - public void onSaveInstanceState(@NonNull Bundle outState) { - super.onSaveInstanceState(outState); - mapBizView.onSaveInstanceState(outState); - } - - @Override - public void onLowMemory() { - super.onLowMemory(); - mapBizView.onLowMemory(); - } - - @Override - public void onPause() { - super.onPause(); - mapBizView.onPause(); - } - - @Override - public void onDestroyView() { - mapBizView.onDestroy(); - super.onDestroyView(); - } - - /** - * 获取站点面板view,在{@link #initViews()}时候添加到container中 - * - * @return 站点面板view - */ - public abstract int getStationPanelViewId(); - - /** - * 显示线路信息 - */ - public void showRouteFragment() { - flContainer = findViewById(R.id.bus_p_route_panel); - LayoutInflater.from(getContext()).inflate(getStationPanelViewId(), flContainer); - } -} diff --git a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPassengerRouteFragment.java b/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPassengerRouteFragment.java deleted file mode 100644 index 0009a3b75a..0000000000 --- a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPassengerRouteFragment.java +++ /dev/null @@ -1,383 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui; - -import android.content.Context; -import android.graphics.drawable.AnimationDrawable; -import android.os.Bundle; -import android.text.Html; -import android.view.Gravity; -import android.view.View; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.appcompat.widget.AppCompatImageView; -import androidx.appcompat.widget.AppCompatTextView; -import androidx.constraintlayout.widget.ConstraintLayout; -import androidx.constraintlayout.widget.Group; -import androidx.recyclerview.widget.RecyclerView; - -import com.amap.api.maps.model.LatLng; -import com.elegant.utils.UiThreadHandler; -import com.mogo.eagle.core.data.enums.SidePattern; -import com.mogo.eagle.core.data.map.MogoLocation; -import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; -import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager; -import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView; -import com.mogo.map.overlay.IMoGoOverlayManager; -import com.mogo.och.common.module.utils.ResourcesUtils; -import com.mogo.och.shuttle.passenger.R; -import com.mogo.och.shuttle.passenger.ui.adapter.BusPassengerLineStationsAdapter; -import com.mogo.och.shuttle.passenger.presenter.BaseBusPassengerPresenter; -import com.mogo.och.shuttle.passenger.ui.layoutmanager.CenterLayoutManager; -import com.mogo.och.common.module.wigets.mapdirectionview.MapDirectionView; -import com.mogo.och.common.module.utils.NumberFormatUtil; -import com.mogo.och.common.module.wigets.MarqueeTextView; -import com.mogo.och.common.module.wigets.OCHGradientTextView; -import com.mogo.och.data.bean.BusStationBean; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author: wangmingjun - * @date: 2022/4/12 - */ -public class BusPassengerRouteFragment extends - BusPassengerBaseFragment { - - public static final String TAG = "BusPassengerRouteFragment"; - - private final List mStationsList = new ArrayList<>(); - - private OCHGradientTextView mSpeedTv; - private ConstraintLayout mNoLineInfoView; - private MarqueeTextView mLineName; - private Group mRouteInfoView; - private RecyclerView mStationsListRv; - private MapDirectionView mMapDirectionView; - private BusPassengerLineStationsAdapter mAdapter; - private TextView emptyTv; - private AppCompatImageView mAutopilotIv; - private AppCompatTextView mCurrentArriveStation; - private AppCompatTextView mCurrentArriveStationTitle; - private AppCompatTextView mCurrentArriveTip; - private AppCompatImageView mSpeakArrivedIv; - - /** - * 改变自动驾驶状态 - * - * @param status 2 - running 1 - enable 2 - disable - */ - private int mPrevAPStatus = -1; - - @Override - public int getStationPanelViewId() { - return R.layout.shuttle_p_jl_route_fragment; - } - - @NonNull - @Override - protected BaseBusPassengerPresenter createPresenter() { - return new BaseBusPassengerPresenter(this); - } - - @Override - protected void initViews() { - super.initViews(); - - mSpeedTv = findViewById(R.id.bus_p_speed_tv); - mSpeedTv.setVertrial(true); - mSpeedTv.setmColorList(new int[]{ResourcesUtils.getColor(R.color.shuttle_p_jl_speed_color_start), - ResourcesUtils.getColor(R.color.shuttle_p_jl_speed_color_end)}); - - mNoLineInfoView =findViewById(R.id.bus_p_no_order_data_view); - emptyTv = findViewById(R.id.no_order_data_tv); - - mLineName = findViewById(R.id.bus_p_line_name_tv); - mAutopilotIv = findViewById(R.id.auto_status_iv); - mCurrentArriveStation = findViewById(R.id.bus_p_cur_station_name); - mCurrentArriveStationTitle = findViewById(R.id.bus_p_cur_station_title); - mCurrentArriveTip = findViewById(R.id.bus_p_cur_station_tip); - mSpeakArrivedIv = findViewById(R.id.speak_arrived_iv); - - mRouteInfoView = findViewById(R.id.bus_p_line_cl); - mStationsListRv = findViewById(R.id.bus_p_line_stations_rl); - - CenterLayoutManager manager = new CenterLayoutManager(getContext()); - mStationsListRv.setLayoutManager(manager); - mAdapter = new BusPassengerLineStationsAdapter(getContext(), mStationsList); - mStationsListRv.setAdapter(mAdapter); - - mSpeedTv.setOnLongClickListener(v -> { - Context context = getContext(); - if(context!=null){ - ToggleDebugView.Companion. - getToggleDebugView().toggle(context, Gravity.RIGHT, SidePattern.RIGHT); - } - return true; - }); - } - - @Override - protected void initViews(Bundle savedInstanceState) { - super.initViews(savedInstanceState); - mMapDirectionView = findViewById(R.id.bus_p_line_map_view); - mMapDirectionView.onCreateView(savedInstanceState); - } - - @Override - public void onResume() { - super.onResume(); - if (mMapDirectionView != null) { - mMapDirectionView.onResume(); - } - } - - @Override - public void onPause() { - super.onPause(); - if (mMapDirectionView != null) { - mMapDirectionView.onPause(); - } - } - - @Override - public void onDestroyView() { - if (mPresenter != null) { - mPresenter.onDestroy(this); - } - IMoGoOverlayManager overlayManager = CallerMapUIServiceManager.INSTANCE.getOverlayManager(); - if(overlayManager!=null) { - overlayManager.removeAllLines(); - overlayManager.removeAllPoints(); - } - super.onDestroyView(); - } - - @Override - public void onDestroy() { - super.onDestroy(); - if (mMapDirectionView != null) { - mMapDirectionView.onDestroy(); - } - } - - public void clearMapView() { - if (mMapDirectionView != null) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - mMapDirectionView.clearPolyline(); - mMapDirectionView.clearCoordinatesLatLng(); - } - }); - } - } - - public void clearMapMarkers() { - if (mMapDirectionView != null) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - mMapDirectionView.clearLineMarkers(); - } - }); - } - } - - public void changeOperationStatus(boolean status) { - if (!status) { - emptyTv.setText(getString(R.string.shuttle_p_jl_no_out)); - mNoLineInfoView.setVisibility(View.VISIBLE); - mRouteInfoView.setVisibility(View.GONE); - mLineName.setText(getContext().getString(R.string.shuttle_p_jl_no_line)); - updateArrivedStation(null,0,true); - clearMapView(); - clearMapMarkers(); - } - } - - public void showNoTaskView(){ - if (mNoLineInfoView.getVisibility() == View.GONE){ - mNoLineInfoView.setVisibility(View.VISIBLE); - mRouteInfoView.setVisibility(View.GONE); - mLineName.setText(getContext().getString(R.string.shuttle_p_jl_no_line)); - updateArrivedStation(null,0,true); - clearMapView(); - clearMapMarkers(); - } - emptyTv.setText(getString(R.string.shuttle_p_jl_no_task)); - } - - public void hideNoTaskView(){ - if (mNoLineInfoView.getVisibility() == View.VISIBLE){ - mNoLineInfoView.setVisibility(View.GONE); - } - if (mRouteInfoView.getVisibility() == View.GONE){ - mRouteInfoView.setVisibility(View.VISIBLE); - } - } - - public void updateLineInfo(String lineName) { - mLineName.setText(lineName); - } - - /** - * - * @param stations - * @param currentStationIndex - * @param isArrived 是否到站并离开,true 到达当前站 currentStationIndex 未离开, false 正在前往此站 currentStationIndex - */ - public void updateStationsInfo(List stations, int currentStationIndex, boolean isArrived) { - updateArrivedStation(stations.get(currentStationIndex).getName(),currentStationIndex,isArrived); - mStationsList.clear(); - mStationsList.addAll(stations); - mAdapter.notifyDataSetChanged(); - - if (currentStationIndex > -1){ - updateCurrentStation(currentStationIndex); - } - - if (currentStationIndex == 0 && isArrived){ //到达始发站且并未出发, 恢复站点marker 清楚路径 清空路径点 - clearMapView(); - } - - if (stations.size() > 0){ - updateWayPointList(stations,currentStationIndex); - } - } - - private void updateWayPointList(List stations,int currentStationIndex) { - List mLineStationsList = new ArrayList<>(); - for (int i = 0; i< stations.size(); i++) {//站点集合 - LatLng latLng = new LatLng(stations.get(i).getGcjLat(),stations.get(i).getGcjLon());// lat,lon - mLineStationsList.add(latLng); - } - - if (mMapDirectionView != null) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - mMapDirectionView.setLinePointMarkerAndDraw(mLineStationsList,currentStationIndex); - } - }); - } - } - -// @Override -// public void onCameraChange(float bearing) { -//// startIvCompass(bearing); -// } - -// /** -// * 设置指南针旋转 -// * -// * @param bearing -// */ -// private void startIvCompass(float bearing) { -// bearing = 360 - bearing; -// CallerLogger.d(M_BUS_P + TAG, "startIvCompass: " + bearing); -// rotateAnimation = new RotateAnimation(lastBearing, bearing, Animation.RELATIVE_TO_SELF -// , 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); -// rotateAnimation.setFillAfter(true); -// -// mMapArrowIcon.startAnimation(rotateAnimation); -// lastBearing = bearing; -// } - - public void onCarLocationChanged(MogoLocation location) { - updateSpeedView((float) location.getGnssSpeed()); - } - - public void updateSpeedView(float speed){ - int speedKM = (int) (Math.abs(speed) * 3.6F); - mSpeedTv.setText(String.valueOf(speedKM)); - } - - public void updateCurrentStation(int position) { - if (mStationsListRv != null){ - mStationsListRv.smoothScrollToPosition(position); - } - } - - public void updateArrivedStation(String station,int currentIndex,boolean isArrived){ - if (null == station){ - mCurrentArriveStation.setText("----"); - mCurrentArriveStationTitle.setText(ResourcesUtils.getString(R.string.shuttle_p_jl_cur_station_title)); - mCurrentArriveTip.setText(ResourcesUtils.getString(R.string.shuttle_p_jl_cur_station_arrived_tip)); - mCurrentArriveTip.setBackgroundResource(R.drawable.shuttle_p_jl_cur_station_arrived_bg); - handleArrivingSpeakIconDrawable(); - }else { - mCurrentArriveStation.setText(station); - if (currentIndex == 0){ - mCurrentArriveStationTitle.setText(ResourcesUtils.getString(R.string.shuttle_p_jl_cur_station_title)); - mCurrentArriveTip.setText(ResourcesUtils.getString(R.string.shuttle_p_jl_cur_station_arrived_tip)); - mCurrentArriveTip.setBackgroundResource(R.drawable.shuttle_p_jl_cur_station_arrived_bg); - handleArrivingSpeakIconDrawable(); - return; - } - if (isArrived){ - mCurrentArriveStationTitle.setText(ResourcesUtils.getString(R.string.shuttle_p_jl_cur_station_title)); - mCurrentArriveTip.setText(ResourcesUtils.getString(R.string.shuttle_p_jl_cur_station_arrived_tip)); - mCurrentArriveTip.setBackgroundResource(R.drawable.shuttle_p_jl_cur_station_arrived_bg); - handleArrivedSpeakIconDrawable(); - }else { - mCurrentArriveStationTitle.setText(ResourcesUtils.getString(R.string.shuttle_p_jl_cur_next_station_title)); - mCurrentArriveTip.setBackgroundResource(R.drawable.shuttle_p_jl_cur_station_un_arrived_bg); - handleArrivingSpeakIconDrawable(); - } - } - - } - - private void handleArrivedSpeakIconDrawable(){ - AnimationDrawable animationDrawable = (AnimationDrawable) mSpeakArrivedIv.getDrawable(); - animationDrawable.start(); - mSpeakArrivedIv.setVisibility(View.VISIBLE); - } - - private void handleArrivingSpeakIconDrawable(){ - AnimationDrawable animationDrawable = (AnimationDrawable) mSpeakArrivedIv.getDrawable(); - animationDrawable.stop(); - mSpeakArrivedIv.setVisibility(View.GONE); - } - - public void updateRoutePlanningToNextStation(long meters, long timeInSecond){ - //更新进度条 - String dis = "0"; - String disUnit = "公里"; - if (meters > 0){ - if (meters / 1000 < 1){ - disUnit = "米"; - dis = String.valueOf(Math.round(meters)); - }else { - disUnit = "公里"; - dis = NumberFormatUtil.formatLong((double)meters / 1000); - } - } -// String strHtml2 = "距离 " + "" + dis + "" + " "+disUnit+"" -// + "   剩余 " + "" + (int)Math.ceil((double)timeInSecond/ 60f) + "" + " 分钟"; - String str = dis+disUnit+" | "+(int)Math.ceil((double)timeInSecond/ 60f)+"分钟"; - mCurrentArriveTip.setText(Html.fromHtml(str)); - } - - public void onAutopilotStatusChanged(int status) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - // 3. 其他过程直接更新 - if (mPrevAPStatus != status){ - AutopilotStatusChanged(status); - } - mPrevAPStatus = status; - } - }); - } - - public void AutopilotStatusChanged(int status) { - if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING == status) { - mAutopilotIv.setImageResource(R.drawable.shuttle_p_jl_auto_open); - } else { - mAutopilotIv.setImageResource(R.drawable.shuttle_p_jl_auto_close); - } - } -} diff --git a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPassengerTrafficLightView.kt b/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPassengerTrafficLightView.kt deleted file mode 100644 index f2178f347d..0000000000 --- a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/BusPassengerTrafficLightView.kt +++ /dev/null @@ -1,181 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui - -import android.content.Context -import android.util.AttributeSet -import android.view.LayoutInflater -import android.widget.LinearLayout -import com.mogo.eagle.core.data.enums.DataSourceType -import com.mogo.eagle.core.data.enums.TrafficLightEnum -import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTrafficLightListener -import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager -import com.mogo.eagle.core.utilcode.util.UiThreadHandler -import com.mogo.och.shuttle.passenger.R -import kotlinx.android.synthetic.main.shuttle_p_jl_traffic_light_view.view.bus_p_traffic_light_bg -import kotlinx.android.synthetic.main.shuttle_p_jl_traffic_light_view.view.bus_p_traffic_light_iv -import kotlinx.android.synthetic.main.shuttle_p_jl_traffic_light_view.view.bus_p_traffic_light_time_tv - -/** - * bus乘客端:红绿灯view - * - * Created on 2022/3/14 - */ -class BusPassengerTrafficLightView @JvmOverloads constructor( - context: Context?, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : LinearLayout(context, attrs, defStyleAttr), IMoGoTrafficLightListener { - - companion object { - private const val TAG = "BusPassengerTrafficLightView" - } - - private var mCurrentLightId = TrafficLightEnum.BLACK - - init { - init(context) - } - - private fun init(context: Context?) { - LayoutInflater.from(context).inflate(R.layout.shuttle_p_jl_traffic_light_view, this, true) - } - - override fun onAttachedToWindow() { - super.onAttachedToWindow() - CallerTrafficLightListenerManager.addListener(TAG, this) - } - - override fun onDetachedFromWindow() { - super.onDetachedFromWindow() - CallerTrafficLightListenerManager.removeListener(TAG) - } - - /** - * 展示红绿灯预警 - * - * @param checkLightId 0-都是默认,1-红,2-黄,3-绿 - * @param lightSource 1:云端下发;2:自车感知 - */ - override fun showTrafficLight(checkLightId: TrafficLightEnum, lightSource: DataSourceType) { - super.showTrafficLight(checkLightId, lightSource) - mCurrentLightId = checkLightId - updateTrafficLightIcon(checkLightId) - } - - /** - * 关闭红绿灯预警展示,并重制灯态 - */ - override fun disableTrafficLight() { - super.disableTrafficLight() - UiThreadHandler.post { - mCurrentLightId = TrafficLightEnum.BLACK - this@BusPassengerTrafficLightView.visibility = GONE - } - } - - /** - * @param redNum 红灯倒计时 - * @param yellowNum 黄灯倒计时 - * @param greenNum 绿灯倒计时 - */ - override fun changeCountdownTrafficLightNum(redNum: Int, yellowNum: Int, greenNum: Int) { - super.changeCountdownTrafficLightNum(redNum, yellowNum, greenNum) - resetView() - when (mCurrentLightId) { - TrafficLightEnum.RED -> changeCountdownRed(redNum) - TrafficLightEnum.YELLOW -> changeCountdownYellow(yellowNum) - TrafficLightEnum.GREEN -> changeCountdownGreen(greenNum) - else -> UiThreadHandler.post { bus_p_traffic_light_time_tv.text = "" } - } - } - - override fun changeCountdownRed(redNum: Int) { - super.changeCountdownRed(redNum) - UiThreadHandler.post { - if (redNum > 0) { - resetView() - bus_p_traffic_light_time_tv.text = redNum.toString() - } else { - disableTrafficLightCountDown() - bus_p_traffic_light_time_tv.text = "" - } - } - } - - override fun changeCountdownGreen(greenNum: Int) { - super.changeCountdownGreen(greenNum) - UiThreadHandler.post { - if (greenNum > 0) { - resetView() - bus_p_traffic_light_time_tv.text = greenNum.toString() - } else { - disableTrafficLightCountDown() - bus_p_traffic_light_time_tv.text = "" - } - } - } - - override fun changeCountdownYellow(yellowNum: Int) { - super.changeCountdownYellow(yellowNum) - UiThreadHandler.post { - if (yellowNum > 0) { - resetView() - bus_p_traffic_light_time_tv.text = yellowNum.toString() - } else { - disableTrafficLightCountDown() - bus_p_traffic_light_time_tv.text = "" - } - } - } - - /** - * 更新红绿灯icon - * - * @param lightId 0-都是默认,1-红,2-黄,3-绿 - */ - private fun updateTrafficLightIcon(lightId: TrafficLightEnum) { - UiThreadHandler.post { - when (lightId) { - TrafficLightEnum.RED -> { - bus_p_traffic_light_iv.setBackgroundResource(R.drawable.shuttle_p_jl_light_red_nor) - this@BusPassengerTrafficLightView.visibility = VISIBLE - } - TrafficLightEnum.YELLOW -> { - bus_p_traffic_light_iv.setBackgroundResource(R.drawable.shuttle_p_jl_light_yellow_nor) - this@BusPassengerTrafficLightView.visibility = VISIBLE - } - TrafficLightEnum.GREEN -> { - bus_p_traffic_light_iv.setBackgroundResource(R.drawable.shuttle_p_jl_light_green_nor) - this@BusPassengerTrafficLightView.visibility = VISIBLE - } - else -> this@BusPassengerTrafficLightView.visibility = GONE - } - } - } - - override fun disableTrafficLightCountDown() { - super.disableTrafficLightCountDown() - UiThreadHandler.post { - val layoutParams = layoutParams - if (layoutParams is MarginLayoutParams) { - val lp = layoutParams - lp.width = resources.getDimension(R.dimen.shuttle_p_jl_traffic_light_icon_size).toInt() - setLayoutParams(lp) - bus_p_traffic_light_time_tv.visibility = GONE - bus_p_traffic_light_bg.layoutParams.width = - resources.getDimension(R.dimen.dp_90).toInt() - } - } - } - - private fun resetView() { - val layoutParams = layoutParams - if (layoutParams is MarginLayoutParams) { - val lp = layoutParams - lp.width = resources.getDimension(R.dimen.shuttle_p_jl_route_traffic_light_view_width).toInt() - setLayoutParams(lp) - bus_p_traffic_light_time_tv.visibility = VISIBLE - bus_p_traffic_light_bg.layoutParams.width = - resources.getDimension(R.dimen.shuttle_p_jl_traffic_light_bg_width).toInt() - } - } -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/adapter/BusPassengerLineStationsAdapter.java b/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/adapter/BusPassengerLineStationsAdapter.java deleted file mode 100644 index ed9c65b87f..0000000000 --- a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/adapter/BusPassengerLineStationsAdapter.java +++ /dev/null @@ -1,140 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui.adapter; - -import android.content.Context; -import android.text.TextUtils; -import android.util.Log; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ImageView; - -import androidx.annotation.NonNull; -import androidx.recyclerview.widget.RecyclerView; - -import com.mogo.och.shuttle.passenger.R; -import com.mogo.och.common.module.utils.BlinkAnimationUtil; -import com.mogo.och.common.module.wigets.MarqueeTextView; -import com.mogo.och.data.bean.BusStationBean; - -import java.util.List; - -import static com.mogo.och.shuttle.passenger.constant.BusPassengerConst.STATION_STATUS_ARRIVING; -import static com.mogo.och.shuttle.passenger.constant.BusPassengerConst.STATION_STATUS_LEAVING; -import static com.mogo.och.shuttle.passenger.constant.BusPassengerConst.STATION_STATUS_STOPPED; - -/** - * @author: wangmingjun - * @date: 2022/4/6 - */ -public class BusPassengerLineStationsAdapter extends RecyclerView.Adapter { - - private Context mContext; - private List mStations; - - public BusPassengerLineStationsAdapter(Context context, List stations){ - this.mContext = context; - this.mStations = stations; - } - - @NonNull - @Override - public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { - View view = LayoutInflater.from(mContext).inflate(R.layout.shuttle_p_jl_stations_common_item,parent,false); - StationViewHolder viewHolder = new StationViewHolder(view); - return viewHolder; - } - - @Override - public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { - BusStationBean station = mStations.get(position); - StationViewHolder viewHolder = (StationViewHolder)holder; - viewHolder.stationName.setText(station.getName()); - BlinkAnimationUtil.clearAnimation(viewHolder.stationCircle); - if (position == 0){ //第一个 起点 - viewHolder.curArrowBg.setVisibility(View.GONE); - viewHolder.curArrowBottomBg.setVisibility(View.VISIBLE); - Log.d("onBindViewHolder" , "position0 = "+position); - viewHolder.stationCircle.setImageResource(R.drawable.shuttle_p_jl_bg_start_tag_bg); - if (station.getDrivingStatus() == STATION_STATUS_STOPPED && !station.isLeaving()){//到达未离开 - viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.shuttle_p_jl_clock_17417B)); - BlinkAnimationUtil.setAnimation(viewHolder.stationCircle); - viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.MARQUEE); - viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_1F82FB)); - }else { - viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.shuttle_p_jl_clock_992D3E5F)); - viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.END); - viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_A9B6CA)); - } - }else{ - viewHolder.curArrowBg.setVisibility(View.VISIBLE); - viewHolder.curArrowBottomBg.setVisibility(View.VISIBLE); - BusStationBean preStation = mStations.get(position -1); - if (station.getDrivingStatus() == STATION_STATUS_LEAVING || - (station.getDrivingStatus() == STATION_STATUS_STOPPED && station.isLeaving())){ //过站 - viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.shuttle_p_jl_clock_992D3E5F)); - viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_A9B6CA)); - viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_A9B6CA)); - viewHolder.stationCircle.setImageResource(R.drawable.shuttle_p_jl_point_gray); - viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.END); - Log.d("onBindViewHolder" , "position 1 = "+position); - } else if (station.getDrivingStatus() == STATION_STATUS_STOPPED && !station.isLeaving()){//刚到站未离开的 - viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.shuttle_p_jl_clock_17417B)); - viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_A9B6CA)); - viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_1F82FB)); - viewHolder.stationCircle.setImageResource(R.drawable.shuttle_p_jl_arrive_line_green); - if (position == mStations.size() - 1){ - viewHolder.stationCircle.setImageResource(R.drawable.shuttle_p_jl_bg_end_tag_bg); - viewHolder.curArrowBottomBg.setVisibility(View.GONE); - } - Log.d("onBindViewHolder" , "position2 = "+position); - BlinkAnimationUtil.setAnimation(viewHolder.stationCircle); - viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.MARQUEE); - }else if (station.getDrivingStatus() == STATION_STATUS_ARRIVING && preStation.isLeaving()){//即将到站 - viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.shuttle_p_jl_panel_cur_station_tips_color)); - viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_A9B6CA)); - viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_1F82FB)); - viewHolder.stationCircle.setImageResource(R.drawable.shuttle_p_jl_arrive_line_blue); - Log.d("onBindViewHolder" , "position3 = "+position); - - if (position == mStations.size() - 1){ - viewHolder.curArrowBottomBg.setVisibility(View.GONE); - } - - }else if (station.getDrivingStatus() == STATION_STATUS_ARRIVING && - (preStation.getDrivingStatus() == STATION_STATUS_ARRIVING - || preStation.getDrivingStatus() == STATION_STATUS_STOPPED)){ //未到站的并且前面也是未到站或者刚到站的 - viewHolder.stationName.setTextColor(mContext.getResources().getColor(R.color.shuttle_p_jl_panel_cur_station_tips_color)); - viewHolder.curArrowBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_1F82FB)); - viewHolder.curArrowBottomBg.setBackgroundColor(mContext.getColor(R.color.shuttle_p_jl_clock_1F82FB)); - viewHolder.stationCircle.setImageResource(R.drawable.shuttle_p_jl_point_blue); - viewHolder.stationName.setEllipsize(TextUtils.TruncateAt.END); - - if (position == mStations.size() - 1){ - viewHolder.stationCircle.setImageResource(R.drawable.shuttle_p_jl_bg_end_tag_bg); - viewHolder.curArrowBottomBg.setVisibility(View.GONE); - } - Log.d("onBindViewHolder" , "position4 = "+position); - } - } - } - - @Override - public int getItemCount() { - return mStations.size(); - } -} -class StationViewHolder extends RecyclerView.ViewHolder{ - public MarqueeTextView stationName; - public ImageView stationCircle; - public ImageView curArrowBg; - public ImageView curArrowBottomBg; - public StationViewHolder(@NonNull View itemView) { - super(itemView); - stationName = itemView.findViewById(R.id.bus_p_station); - stationCircle = itemView.findViewById(R.id.bus_p_circle); - curArrowBg = itemView.findViewById(R.id.bus_p_cur_arrow_bg); - curArrowBottomBg = itemView.findViewById(R.id.bus_p_cur_arrow_bottom_bg); - } -} - - diff --git a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/layoutmanager/CenterLayoutManager.java b/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/layoutmanager/CenterLayoutManager.java deleted file mode 100644 index d7b712d6ea..0000000000 --- a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/layoutmanager/CenterLayoutManager.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui.layoutmanager; - -import android.content.Context; -import android.util.AttributeSet; - -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.LinearSmoothScroller; -import androidx.recyclerview.widget.RecyclerView; - -public class CenterLayoutManager extends LinearLayoutManager { - public CenterLayoutManager(Context context) { - super(context); - } - - public CenterLayoutManager(Context context, int orientation, boolean reverseLayout) { - super(context, orientation, reverseLayout); - } - - public CenterLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { - super(context, attrs, defStyleAttr, defStyleRes); - } - - @Override - public void smoothScrollToPosition(RecyclerView recyclerView, RecyclerView.State state, int position) { - RecyclerView.SmoothScroller smoothScroller = new CenterSmoothScroller(recyclerView.getContext()); - smoothScroller.setTargetPosition(position); - startSmoothScroll(smoothScroller); - } - - private static class CenterSmoothScroller extends LinearSmoothScroller { - - CenterSmoothScroller(Context context) { - super(context); - } - - @Override - public int calculateDtToFit(int viewStart, int viewEnd, int boxStart, int boxEnd, int snapPreference) { - return (boxStart + (boxEnd - boxStart) / 2) - (viewStart + (viewEnd - viewStart) / 2); - } - } - -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/widget/BusPTurnLightView.kt b/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/widget/BusPTurnLightView.kt deleted file mode 100644 index 14dc19bd74..0000000000 --- a/OCH/shuttle/passenger/src/main/java/jinlv/com/mogo/och/shuttle/passenger/ui/widget/BusPTurnLightView.kt +++ /dev/null @@ -1,197 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui.widget - -import android.animation.AnimatorSet -import android.animation.ObjectAnimator -import android.content.Context -import android.util.AttributeSet -import android.view.LayoutInflater -import android.view.View -import android.view.animation.AlphaAnimation -import android.view.animation.Animation -import android.widget.ImageView -import androidx.constraintlayout.widget.ConstraintLayout -import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTurnLightListener -import com.mogo.eagle.core.function.call.v2x.CallerTurnLightListenerManager -import com.mogo.eagle.core.utilcode.util.ThreadUtils -import com.mogo.och.shuttle.passenger.R -import com.mogo.och.common.module.manager.light.TurnLightManager -import kotlinx.android.synthetic.main.shuttle_p_jl_turn_light_status.view.left_nor_image -import kotlinx.android.synthetic.main.shuttle_p_jl_turn_light_status.view.left_select_image -import kotlinx.android.synthetic.main.shuttle_p_jl_turn_light_status.view.right_nor_image -import kotlinx.android.synthetic.main.shuttle_p_jl_turn_light_status.view.right_select_image -import kotlinx.android.synthetic.main.shuttle_p_jl_turn_light_status.view.turn_light_layout - -/** - * @author: wangmingjun - * @date: 2023/2/13 - */ -class BusPTurnLightView @JvmOverloads constructor( - context: Context, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : ConstraintLayout(context, attrs, defStyleAttr), - IMoGoTurnLightListener, TurnLightManager.TurnLightListener { - - - companion object { - private const val TAG = "TurnLightViewStatus" - } - - private var isLeftLight: Boolean = false - private var isRightLight: Boolean = false - private var isDisappear: Boolean = false - - init { - LayoutInflater.from(context) - .inflate(R.layout.shuttle_p_jl_turn_light_status, this, true) - } - - override fun onAttachedToWindow() { - super.onAttachedToWindow() - CallerTurnLightListenerManager.addListener(TAG,this) - TurnLightManager.addTurnLightStatusChangeListener(TAG,this) - } - - override fun onDetachedFromWindow() { - super.onDetachedFromWindow() - CallerTurnLightListenerManager.removeListener(TAG) - TurnLightManager.removeTurnLightStatusChangeListener(TAG) - } - - override fun hideTurnLightView() { - ThreadUtils.runOnUiThread{ - if (!isDisappear) { - isDisappear = true - isLeftLight = false - isRightLight = false - animationDisappear() - } - } - } - - override fun statusChange(newStatus: TurnLightManager.TurnLightStatus) { - ThreadUtils.runOnUiThread { - setTurnLight(newStatus) - } - } - - /** - * 转向灯动画 - */ - private fun setTurnLight(directionLight: TurnLightManager.TurnLightStatus) { - if (!isAttachedToWindow) { - return - } - //根据左右进行显示和隐藏,实际要判断每个来的时间和频度 - when (directionLight) { - TurnLightManager.TurnLightStatus.TURN_LIGHT_LEFT -> { //左转向 - if (!isLeftLight) { - isLeftLight = true - isRightLight = false - isDisappear = false - showNormalAnimation() - left_select_image.visibility = View.VISIBLE - right_select_image.visibility = View.GONE - right_select_image.clearAnimation() - setAnimation(left_select_image) - } - } - TurnLightManager.TurnLightStatus.TURN_LIGHT_RIGHT -> { //右转向 - if (!isRightLight) { - isRightLight = true - isLeftLight = false - isDisappear = false - showNormalAnimation() - left_select_image.visibility = View.GONE - right_select_image.visibility = View.VISIBLE - left_select_image.clearAnimation() - setAnimation(right_select_image) - } - } - TurnLightManager.TurnLightStatus.TURN_LIGHT_NONE -> { //消失 - if (!isDisappear) { - isDisappear = true - isLeftLight = false - isRightLight = false - animationDisappear() - } - } - } - } - - //显示背景 - private fun showNormalAnimation() { - val appearAnimation = AlphaAnimation(0f, 1.0f) - appearAnimation.duration = 300 - val appearAnimationImage = AlphaAnimation(0f, 1.0f) - appearAnimation.duration = 500 - turn_light_layout.startAnimation(appearAnimation) - left_nor_image.startAnimation(appearAnimationImage) - right_nor_image.startAnimation(appearAnimationImage) - - turn_light_layout.visibility = View.VISIBLE - left_nor_image.visibility = View.VISIBLE - right_nor_image.visibility = View.VISIBLE - } - - //消失动画,当转向等数据为空时候 - private fun animationDisappear() { - left_select_image.visibility = View.GONE - right_select_image.visibility = View.GONE - left_select_image.clearAnimation() - right_select_image.clearAnimation() - - left_nor_image.clearAnimation() - right_nor_image.clearAnimation() - turn_light_layout.clearAnimation() - - val disappearAnimationLeft = AlphaAnimation(1.0f, 0f) - disappearAnimationLeft.duration = 300 - - val disappearAnimationBg = AlphaAnimation(1.0f, 0f) - disappearAnimationBg.duration = 500 - - left_nor_image.startAnimation(disappearAnimationLeft) - right_nor_image.startAnimation(disappearAnimationLeft) - turn_light_layout.startAnimation(disappearAnimationBg) - - disappearAnimationLeft.setAnimationListener(object : Animation.AnimationListener { - override fun onAnimationRepeat(p0: Animation?) { - } - - override fun onAnimationStart(p0: Animation?) { - } - - override fun onAnimationEnd(p0: Animation?) { - left_nor_image.visibility = View.GONE - right_nor_image.visibility = View.GONE - } - }) - - disappearAnimationBg.setAnimationListener(object : Animation.AnimationListener { - override fun onAnimationRepeat(p0: Animation?) { - } - - override fun onAnimationStart(p0: Animation?) { - } - - override fun onAnimationEnd(p0: Animation?) { - turn_light_layout.visibility = View.GONE - } - }) - } - - //实现图片闪烁效果 - private fun setAnimation(imageView: ImageView) { - val animationSet = AnimatorSet() - val valueAnimator = ObjectAnimator.ofFloat(imageView, "alpha", 0f, 1.0f) - val valueAnimatorDisappear = ObjectAnimator.ofFloat(imageView, "alpha", 1.0f, 0f) - valueAnimator.duration = 1000 - valueAnimatorDisappear.duration = 800 - valueAnimator.repeatCount = -1 - valueAnimatorDisappear.repeatCount = -1 - animationSet.playTogether(valueAnimatorDisappear, valueAnimator) - animationSet.start() - } - -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/callback/ADASCallback.kt b/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/callback/ADASCallback.kt deleted file mode 100644 index b5b490e29d..0000000000 --- a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/callback/ADASCallback.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.mogo.och.shuttle.passenger.callback - -/** - * @author: wangmingjun - * @date: 2023/2/15 - */ -interface ADASCallback { - fun updateHDMapStations(stations: MutableList>) - fun removeHDMapStations() -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/callback/AutoPilotStatusCallback.kt b/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/callback/AutoPilotStatusCallback.kt deleted file mode 100644 index 44b2075170..0000000000 --- a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/callback/AutoPilotStatusCallback.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.mogo.och.shuttle.passenger.callback - -/** - * @author: wangmingjun - * @date: 2023/2/13 - */ -interface AutoPilotStatusCallback { - /** - * false: 未开启自驾, true : 开启自驾 - */ - fun updateAutoStatus(isOpen: Boolean) - - fun updateAutoStatus(status: Int) -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/callback/DrivingInfoCallback.kt b/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/callback/DrivingInfoCallback.kt deleted file mode 100644 index 88ab043327..0000000000 --- a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/callback/DrivingInfoCallback.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.mogo.och.shuttle.passenger.callback - -import com.mogo.och.data.bean.BusStationBean - -/** - * @author: wangmingjun - * @date: 2023/2/2 - */ -interface DrivingInfoCallback { - fun updateSpeed(speed: Int) - fun updatePlateNumber(carNum: String) - fun updateLine(lineName: String, lineDuring: String) - fun updateRemainMT(meters : Long, timeInSecond : Long) // 米,秒 - fun changeOperationStatus(loginStatus : Boolean) - fun showNoTaskView(isTrue : Boolean) - fun updateLineStations(stations: MutableList) - fun updateStationsInfo(stations: MutableList, i: Int, isArrived: Boolean) - fun clearCustomPolyline() -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/constant/M2Const.kt b/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/constant/M2Const.kt deleted file mode 100644 index fd9097ad64..0000000000 --- a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/constant/M2Const.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.mogo.och.shuttle.passenger.constant - -/** - * Created on 2021/12/6 - */ -class M2Const { - companion object { - //站点UUID - const val M2_MAP_STATION_MAKER = "m2_map_station_maker" - - /** - * Marker类型 - */ - const val TYPE_MARKER_M2_LINE = "TYPE_MARKER_M2_LINE" - } -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/model/PM2ADASModel.kt b/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/model/PM2ADASModel.kt deleted file mode 100644 index 3994625de7..0000000000 --- a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/model/PM2ADASModel.kt +++ /dev/null @@ -1,45 +0,0 @@ -package com.mogo.och.shuttle.passenger.model - -import android.content.Context -import com.mogo.och.shuttle.passenger.callback.ADASCallback -import com.mogo.och.data.bean.BusStationBean - -/** - * @author: wangmingjun - * @date: 2023/2/2 - */ -class PM2ADASModel private constructor() { - - private var mContext: Context? = null - private var mAdasCallback: ADASCallback? = null - - companion object { - val TAG = PM2ADASModel::class.java.simpleName - val INSTANCE: PM2ADASModel by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) { - PM2ADASModel() - } - } - - fun init(context : Context){ - this.mContext = context - } - - fun setAdasCallback(adasCallback: ADASCallback?){ - this.mAdasCallback = adasCallback - } - - fun updateHDMapStations(stations: MutableList){ - var stationsList = mutableListOf>() - for (i in stations.indices){ - var listLatLng = mutableListOf() // 0: long 1:lat - listLatLng.add(stations[i].lon) - listLatLng.add(stations[i].lat) - stationsList.add(listLatLng) - } - mAdasCallback?.updateHDMapStations(stationsList) - } - - fun removeHDMapStations(){ - mAdasCallback?.removeHDMapStations() - } -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/model/PM2DrivingModel.kt b/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/model/PM2DrivingModel.kt deleted file mode 100644 index 9f427ac5d5..0000000000 --- a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/model/PM2DrivingModel.kt +++ /dev/null @@ -1,480 +0,0 @@ -package com.mogo.och.shuttle.passenger.model - -import android.content.Context -import android.media.AudioAttributes -import android.media.AudioFocusRequest -import android.media.AudioManager -import android.net.ConnectivityManager -import android.os.Build -import android.os.Handler -import androidx.annotation.RequiresApi -import com.mogo.commons.module.intent.IMogoIntentListener -import com.mogo.commons.module.intent.IntentManager -import com.mogo.commons.voice.AIAssist -import com.mogo.commons.voice.IMogoVoiceCmdCallBack -import com.mogo.eagle.core.data.config.FunctionBuildConfig -import com.mogo.eagle.core.data.map.MogoLocation -import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener -import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener -import com.mogo.eagle.core.function.api.telematic.IReceivedMsgListener -import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager -import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d -import com.mogo.eagle.core.utilcode.mogo.logger.Logger -import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant -import com.mogo.eagle.core.utilcode.util.GsonUtils -import com.mogo.eagle.core.utilcode.util.NetworkUtils -import com.mogo.eagle.core.utilcode.util.StringUtils -import com.mogo.eagle.core.utilcode.util.ToastUtils -import com.mogo.och.common.module.biz.lansocket.LoginLanPassengerSocket -import com.mogo.och.common.module.manager.socket.cloud.OCHSocketMessageManager.pushAppOperationalMsgBox -import com.mogo.och.common.module.constant.OchCommonConst -import com.mogo.och.common.module.manager.autopilot.autopilot.IOchAutopilotStatusListener -import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotStatusListenerManager -import com.mogo.och.common.module.manager.autopilot.location.OchLocationManager -import com.mogo.och.common.module.network.OchCommonServiceCallback -import com.mogo.och.common.module.manager.distance.IDistanceListener -import com.mogo.och.common.module.manager.distance.TrajectoryAndDistanceManager -import com.mogo.och.common.module.manager.loop.BizLoopManager -import com.mogo.och.common.module.manager.loop.LoopInfo -import com.mogo.och.common.module.manager.socket.lan.LanSocketManager -import com.mogo.och.common.module.manager.socket.lan.bean.AppConnectMsg -import com.mogo.och.common.module.manager.socket.lan.bean.BaseDPMsg -import com.mogo.och.common.module.manager.socket.lan.bean.BusinessType -import com.mogo.och.common.module.manager.socket.lan.bean.DPMsgType -import com.mogo.och.common.module.manager.socket.lan.bean.TaskDetailsMsg -import com.mogo.och.common.module.utils.DateTimeUtil -import com.mogo.och.common.module.voice.VoiceNotice -import com.mogo.och.common.module.voice.VoiceNotice.showNotice -import com.mogo.och.data.bean.BusRoutesResult -import com.mogo.och.data.bean.BusStationBean -import com.mogo.och.data.bean.BusTransferData -import com.mogo.och.shuttle.passenger.R -import com.mogo.och.shuttle.passenger.bean.response.PassengerOperationStatusResponse -import com.mogo.och.shuttle.passenger.bean.response.PassengerRoutesResponse -import com.mogo.och.shuttle.passenger.callback.AutoPilotStatusCallback -import com.mogo.och.shuttle.passenger.callback.DrivingInfoCallback -import com.mogo.och.shuttle.passenger.constant.BusPassengerConst -import com.mogo.och.shuttle.passenger.network.PassengerServiceManager -import io.reactivex.schedulers.Schedulers -import kotlin.math.abs - -/** - * @author: wangmingjun - * @date: 2023/1/31 - */ -class PM2DrivingModel private constructor() { - - private var mContext: Context? = null - - private var routesResult: BusRoutesResult? = null - - - var mStations = mutableListOf() - private var mNextStationIndex = 0 // A-B要到达站的index - private var isGoingToNextStation = false //是否前往下一站过程中 - - private var mDrivingInfoCallback: DrivingInfoCallback? = null //行程信息 - private var mAutoStatusCallback: AutoPilotStatusCallback? = null //自动驾驶状态 - - private var operationStatus: PassengerOperationStatusResponse.Result? = null - - private val handler = Handler(Handler.Callback { msg -> - if (msg.what == MSG_QUERY_BUS_P_STATION) { - queryDriverOperationStatus() - return@Callback true - } - false - }) - - companion object { - val TAG = PM2DrivingModel::class.java.simpleName - const val MSG_QUERY_BUS_P_STATION = 1001 - val INSTANCE: PM2DrivingModel by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) { - PM2DrivingModel() - } - } - - fun init(context: Context) { - mContext = context - initListener() - queryDriverByLocalDriver() - queryDriverOperationStatus() - BizLoopManager.setLoopFunction(TAG, LoopInfo(2,::queryDriverSiteByCoordinate, scheduler = Schedulers.io())) - } - - private fun queryDriverByLocalDriver() { - //本地去请求司机端 - val msg = TaskDetailsMsg("task", BusinessType.shuttle) - LanSocketManager.sendMsgToServer(msg) - } - - private fun initListener() { - //自动驾驶状态监听 - OchAutoPilotStatusListenerManager.addListener(TAG, mAutoPilotStatusListener) - - // 定位监听 - OchLocationManager.addGCJ02Listener(TAG, 3, mMapLocationListener) - - //司乘屏通信监听 - CallerTelematicListenerManager.addListener(TAG, mReceivedMsgListener) - - //网络监听 - IntentManager.getInstance() - .registerIntentListener(ConnectivityManager.CONNECTIVITY_ACTION, mNetWorkIntentListener) - - TrajectoryAndDistanceManager.addDistanceListener(TAG, trajectoryListener) - - } - - fun releaseListener() { - //自动驾驶状态监听 - CallerAutoPilotStatusListenerManager.removeListener(TAG) - - // 定位监听 - OchLocationManager.removeGCJ02Listener(TAG) - - CallerTelematicListenerManager.removeListener(TAG) - - cleanStation("release") - - TrajectoryAndDistanceManager.removeListener(TAG) - - } - - fun setDrivingInfoCallback(drivingInfoCallback : DrivingInfoCallback?){ - mDrivingInfoCallback = drivingInfoCallback - } - - fun setAutoStatusCallback(autoPilotStatusCallback: AutoPilotStatusCallback?){ - mAutoStatusCallback = autoPilotStatusCallback - } - - private val mNetWorkIntentListener = IMogoIntentListener { intentStr, _ -> - if (ConnectivityManager.CONNECTIVITY_ACTION == intentStr) { - if (NetworkUtils.isConnected(mContext)) { - queryDriverOperationStatus() - } - } - } - - private val mReceivedMsgListener: IReceivedMsgListener = - object : IReceivedMsgListener{ - @RequiresApi(Build.VERSION_CODES.O) - override fun onReceivedMsg(type: Int, byteArray: ByteArray) {//接收司机端发来的信息 - if (OchCommonConst.BUSINESS_STRING == type){ - val baseMsg = GsonUtils.fromJson(String(byteArray), BaseDPMsg::class.java) - Logger.d( - SceneConstant.M_BUS_P + TAG, "onReceivedMsg = " + GsonUtils.toJson(baseMsg) - ) - - if (baseMsg != null && baseMsg.type == DPMsgType.TYPE_COMMON.type) { - val msg = GsonUtils.fromJson(String(byteArray), AppConnectMsg::class.java) - - if (msg != null && msg.isPlay){ //播报 - speakTTS(msg.msg) - } - - if (msg != null && msg.isViewShow) { //消息盒子显示内容 - pushAppOperationalMsgBox( - DateTimeUtil.getCurrentTimeStamp(),msg.msg) - } - }else if (baseMsg != null && baseMsg.type == DPMsgType.TYPE_TASK_DETAILS.type) { - val msg = GsonUtils.fromJson(String(byteArray), TaskDetailsMsg::class.java) - Logger.d( - SceneConstant.M_BUS_P + TAG, "onReceivedMsg = " + GsonUtils.toJson(msg) - ) - if (msg == null || msg.msg?.isEmpty() == true) { - updateLocalOrder() - return - } - val result = GsonUtils.fromJson(msg.msg, BusTransferData::class.java) - mDrivingInfoCallback?.changeOperationStatus(result.loginStatus == 1) - if (result != null && result.routesResult == null){ - updateLocalOrder() - } - - if (routesResult == null || - (result != null && result.routesResult?.writeVersion!! > routesResult!!.writeVersion)) { - routesResult = result.routesResult - updatePassengerRouteInfo(routesResult!!) - } - - } - } - } - } - - private val trajectoryListener: IDistanceListener = object : IDistanceListener { - override fun distanceCallback(distance: Float) { - val lastTime = distance / BusPassengerConst.BUS_AVERAGE_SPEED * 3.6 //秒 - d(SceneConstant.M_BUS_P + TAG, "轨迹排查==lastSumLength = $distance") - if (routesResult != null) { - for (site in routesResult!!.sites) { - if (site.drivingStatus == BusPassengerConst.STATION_STATUS_STOPPED && !site.isLeaving) { - return - } - } - } - // 小于200m 播报站点介绍 - if (distance < 200) { - val stationNext = mStations[mNextStationIndex] - if (!stationNext.isPlayTts) { - if (!StringUtils.isEmpty(stationNext.introduction)) { - showNotice(stationNext.introduction) - stationNext.isPlayTts = true - } - } - } - mDrivingInfoCallback?.updateRemainMT( - distance.toLong(), - lastTime.toLong() - ) - } - } - - @RequiresApi(Build.VERSION_CODES.O) - private fun speakTTS(msg: String) { - - val mAudioManager = mContext?.getSystemService(Context.AUDIO_SERVICE) as AudioManager - val mAudioAttributes = AudioAttributes.Builder() - .setUsage(AudioAttributes.USAGE_MEDIA) //设置声音的用途 - .setContentType(AudioAttributes.CONTENT_TYPE_MUSIC) //设置声音的类型 - .build() - val mAudioFocusRequest = AudioFocusRequest.Builder(AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK) //设置焦点类型 - .setAudioAttributes(mAudioAttributes) //设置声音属性 - .setAcceptsDelayedFocusGain(false) //设置接受延迟获取焦点,需要设置OnAudioFocusChangeListener来监听焦点的获取 - .build() - mAudioManager.requestAudioFocus(mAudioFocusRequest) //抢占焦点 - - VoiceNotice.speakTTSVoiceWithLevel(msg,AIAssist.LEVEL0,object : IMogoVoiceCmdCallBack{ - override fun onSpeakEnd(speakText: String?) { - mAudioManager.abandonAudioFocusRequest(mAudioFocusRequest) - } - - override fun onSpeakError(speakText: String?, errorMsg: String?) { - mAudioManager.abandonAudioFocusRequest(mAudioFocusRequest) - } - - override fun onSpeakSelectTimeOut(speakText: String?) { - mAudioManager.abandonAudioFocusRequest(mAudioFocusRequest) - } - }) - } - - private val mMapLocationListener: IMoGoChassisLocationGCJ02Listener = - object : IMoGoChassisLocationGCJ02Listener{ - override fun onChassisLocationGCJ02(mogoLocation: MogoLocation?) { - if (null == mogoLocation) return - updateSpeed(mogoLocation) - } - } - - private fun updateSpeed(mogoLocation: MogoLocation) { - // km/h - val speedKM = (abs(mogoLocation.gnssSpeed) * 3.6f).toInt() - - mDrivingInfoCallback?.updateSpeed(speedKM) - } - - private val mAutoPilotStatusListener: IOchAutopilotStatusListener = - object : IOchAutopilotStatusListener { - - override fun onAutopilotStatusResponse(state: Int) { - super.onAutopilotStatusResponse(state) - d(SceneConstant.M_BUS_P+TAG, "onAutopilotStatusResponse ===== $state") - if (IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING != state){ - //美化模式下且行程中 - if (FunctionBuildConfig.isDemoMode && - mNextStationIndex>= 0 && mNextStationIndex <= mStations.size - 1 - && isGoingToNextStation){ - mAutoStatusCallback?.updateAutoStatus(true) - }else{//非美化模式下 - mAutoStatusCallback?.updateAutoStatus(false) - } - }else{//自驾状态 2 - mAutoStatusCallback?.updateAutoStatus(true) - } - } - - } - - private fun queryDriverOperationDelay() { - handler.sendEmptyMessageDelayed(MSG_QUERY_BUS_P_STATION, - BusPassengerConst.QUERY_BUS_P_STATION_DELAY - ) - } - - private fun queryDriverOperationStatus() { - mContext?.let { - PassengerServiceManager.queryDriverOperationStatus( - it, - object : OchCommonServiceCallback { - override fun onSuccess(data: PassengerOperationStatusResponse?) { - if (data?.data == null) return - if (data.data.driverStatus != operationStatus?.driverStatus - || data.data.plateNumber != operationStatus?.plateNumber){ - d(SceneConstant.M_BUS_P+TAG, "queryDriverOperationStatus ===== 车牌或者登陆状态有变更") - mDrivingInfoCallback?.changeOperationStatus(data.data.driverStatus == 1) - } - operationStatus = data.data as PassengerOperationStatusResponse.Result - } - - override fun onError() { - if (!NetworkUtils.isConnected(mContext)) { - ToastUtils.showShort(mContext!!.getString(R.string.network_error_tip)) - } else { - ToastUtils.showShort(mContext!!.getString(R.string.request_error_tip)) - } - queryDriverByLocalDriver() - } - - override fun onFail(code: Int, msg: String) { - //延迟3s再次查询 - queryDriverOperationDelay() - } - }) - } - } - - fun queryDriverSiteByCoordinate(){ - mContext?.let { - PassengerServiceManager.queryDriverSiteByCoordinate(it, - object : OchCommonServiceCallback { - override fun onSuccess(data: PassengerRoutesResponse?) { - - if (data == null || data.result == null){ - if (routesResult != null) { - routesResult = null - updateLocalOrder() - d(SceneConstant.M_BUS_P+TAG, "queryDriverSiteByCoordinate= result is null") - return - } - return - } - if (data.result != null && data.result.equals(routesResult)){ - d(SceneConstant.M_BUS_P+TAG, "queryDriverSiteByCoordinate= not update") - return - } - - if (routesResult != null && - routesResult!!.writeVersion < data.result.writeVersion - ) { - routesResult = data.result - } - - if (routesResult == null) { - routesResult = data.result - } - updatePassengerRouteInfo(data.result) - } - - override fun onError() { - CallerLogger.d( - SceneConstant.Companion.M_BUS_P + TAG, - "queryDriverSiteByCoordinate = onError =" - + ", sn = " + LoginLanPassengerSocket.driverSn - ) - queryDriverByLocalDriver() - } - - override fun onFail(code: Int, msg: String?) { - d(SceneConstant.M_BUS_P+TAG, "queryDriverSiteByCoordinate = %s", msg) - if (code == 1003){ - queryDriverOperationDelay() - cleanStation("queryDriverSiteByCoordinate 1003") - } - if (LoginLanPassengerSocket.driverSn.isEmpty()){ - return - } - if (code == 1003) { - routesResult = null - isGoingToNextStation = false - return - } - } - - }) - } - } - - private fun updateLocalOrder(){ - routesResult = null - mNextStationIndex = 0 - cleanStation("queryDriverSiteByCoordinate") - isGoingToNextStation = false - mDrivingInfoCallback?.showNoTaskView(true) - } - - private fun updatePassengerRouteInfo(result: BusRoutesResult) { - - if (result == null) { - updateLocalOrder() - return - } - - if (routesResult != null && routesResult!!.lineId != result.lineId){ - d(SceneConstant.M_BUS_P+TAG, "lineId change= clearCustomPolyline") - mDrivingInfoCallback?.clearCustomPolyline() - } - - d(SceneConstant.M_BUS_P+TAG, "queryDriverSiteByCoordinate= update") - routesResult = result - - mDrivingInfoCallback?.updateLine(result.name, result.runningDur) - if (result.sites != null) { - mDrivingInfoCallback?.showNoTaskView(false) - val stations: List = result.sites - mStations.clear() - mStations.addAll(stations) - mDrivingInfoCallback?.updateLineStations(mStations) - for (i in stations.indices) { - val station: BusStationBean = stations[i] - if (station.drivingStatus == BusPassengerConst.STATION_STATUS_STOPPED - && station.isLeaving && i + 1 < stations.size) { - mDrivingInfoCallback?.updateStationsInfo(stations as MutableList, i + 1, false) - d(SceneConstant.M_BUS_P+TAG,"och-rotting--mNextStationIndex = $mNextStationIndex , i = $i") - d(SceneConstant.M_BUS_P+TAG,"och-rotting--start ") - isGoingToNextStation = true - mNextStationIndex = i + 1 - val startStation = mStations[i] - val endStation = mStations[i + 1] - setTrajectoryStation(startStation, endStation, result.lineId) - return - } else if (station.drivingStatus == BusPassengerConst.STATION_STATUS_STOPPED && !station.isLeaving) { - d(SceneConstant.M_BUS_P+TAG,"och-rotting--mNextStationIndex = $mNextStationIndex , i = $i") - d(SceneConstant.M_BUS_P+TAG,"och-rotting--arrived ") - if (i == stations.size - 1) { - cleanStation("updatePassengerRouteInfo最后一个站点") - } - isGoingToNextStation = false - mDrivingInfoCallback?.updateStationsInfo(stations as MutableList, i, true) - return - }else{ -// d(SceneConstant.M_BUS_P+TAG,"och-rotting--BusStationBean = " + GsonUtils.toJson(station)) - } - } - } - - } - - private fun setTrajectoryStation( - startStationInfo: BusStationBean, - endStationInfo: BusStationBean, - lineId: Int - ) { - val startStation = MogoLocation() - startStation.longitude = startStationInfo.gcjLon - startStation.latitude = startStationInfo.gcjLat - val endStation = MogoLocation() - endStation.longitude = endStationInfo.gcjLon - endStation.latitude = endStationInfo.gcjLat - TrajectoryAndDistanceManager.setStationPoint(startStation, endStation, lineId.toLong()) - } - - private fun cleanStation(type: String) { - d(SceneConstant.M_BUS_P + TAG, "清理站点:$type") - TrajectoryAndDistanceManager.setStationPoint(null, null, -1L) - } -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/presenter/PM2ADASPresenter.kt b/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/presenter/PM2ADASPresenter.kt deleted file mode 100644 index 4e28ee57de..0000000000 --- a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/presenter/PM2ADASPresenter.kt +++ /dev/null @@ -1,41 +0,0 @@ -package com.mogo.och.shuttle.passenger.presenter - -import androidx.lifecycle.LifecycleOwner -import com.mogo.commons.mvp.Presenter -import com.mogo.och.shuttle.passenger.callback.ADASCallback -import com.mogo.och.shuttle.passenger.constant.M2Const.Companion.M2_MAP_STATION_MAKER -import com.mogo.och.shuttle.passenger.model.PM2ADASModel -import com.mogo.och.shuttle.passenger.ui.PM2HPMapFragment - -class PM2ADASPresenter(view: PM2HPMapFragment?) : - Presenter(view), ADASCallback { - - init { - PM2ADASModel.INSTANCE.init(context) - initListener() - } - - private fun initListener() { - PM2ADASModel.INSTANCE.setAdasCallback(this) - } - - private fun removeListener() { - PM2ADASModel.INSTANCE.setAdasCallback(null) - } - - override fun onDestroy(owner: LifecycleOwner) { - super.onDestroy(owner) - removeListener() - } - - override fun updateHDMapStations(stations: MutableList>) { - for (i in stations.indices){ - mView?.setMapMaker(M2_MAP_STATION_MAKER+i,stations[i]) - } - - } - - override fun removeHDMapStations() { - mView?.removeMapMaker(M2_MAP_STATION_MAKER) - } -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/presenter/PM2DrivingPresenter.kt b/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/presenter/PM2DrivingPresenter.kt deleted file mode 100644 index 419f50e7ac..0000000000 --- a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/presenter/PM2DrivingPresenter.kt +++ /dev/null @@ -1,143 +0,0 @@ -package com.mogo.och.shuttle.passenger.presenter - -import androidx.lifecycle.LifecycleOwner -import com.amap.api.maps.model.LatLng -import com.mogo.commons.mvp.Presenter -import com.mogo.eagle.core.utilcode.util.ThreadUtils -import com.mogo.och.shuttle.passenger.callback.AutoPilotStatusCallback -import com.mogo.och.shuttle.passenger.callback.DrivingInfoCallback -import com.mogo.och.shuttle.passenger.model.PM2ADASModel -import com.mogo.och.shuttle.passenger.model.PM2DrivingModel -import com.mogo.och.shuttle.passenger.ui.PM2DrivingInfoFragment -import com.mogo.och.data.bean.BusStationBean - -class PM2DrivingPresenter(view: PM2DrivingInfoFragment?) : - Presenter(view), DrivingInfoCallback, AutoPilotStatusCallback { - - init { - PM2DrivingModel.INSTANCE.init(context) - PM2ADASModel.INSTANCE.init(context) - initListener() - } - - override fun onDestroy(owner: LifecycleOwner) { - super.onDestroy(owner) - destroyListener() - PM2DrivingModel.INSTANCE.releaseListener() - } - - private fun initListener(){ - PM2DrivingModel.INSTANCE.setDrivingInfoCallback(this) - PM2DrivingModel.INSTANCE.setAutoStatusCallback(this) - } - - private fun destroyListener(){ - PM2DrivingModel.INSTANCE.setDrivingInfoCallback(null) - PM2DrivingModel.INSTANCE.setAutoStatusCallback(null) - } - - override fun updateSpeed(speed: Int) { -// CallerLogger.d( -// SceneConstant.M_BUS_P + "speed = ",speed.toString() -// ) - ThreadUtils.runOnUiThread { - mView?.updateSpeed(speed) - } - } - - override fun updatePlateNumber(carNum: String) { - ThreadUtils.runOnUiThread { - mView?.updateCarPlateNum(carNum) - } - } - - override fun updateLine(lineName: String, lineDuring: String) { - ThreadUtils.runOnUiThread { - mView?.updateTaskName(lineName) - mView?.updateTaskDuringTime(lineDuring) - } - } - - override fun updateRemainMT(meters: Long, timeInSecond: Long) { - ThreadUtils.runOnUiThread { - mView?.updateRemainMT(meters, timeInSecond) //米,秒 - } - } - - override fun changeOperationStatus(loginStatus: Boolean) { - ThreadUtils.runOnUiThread { - mView?.changeOperationStatus(loginStatus) - } - } - - override fun showNoTaskView(isTrue: Boolean) { - ThreadUtils.runOnUiThread { - mView?.showNoTaskView(!isTrue) - } - if (isTrue){ - PM2ADASModel.INSTANCE.removeHDMapStations() - } - } - - override fun updateLineStations(stations: MutableList) { - - val stationsList = mutableListOf() - val stationsListPass = mutableListOf() - var startStation: LatLng? = null - var endStation: LatLng? = null - - for (i in stations.indices){ - val station = stations[i] - val latLng = LatLng(station.gcjLat,station.gcjLon) - if(i==0){ - startStation = latLng - continue - } - if(i==stations.size-1){ - endStation = latLng - continue - } - if(station.drivingStatus==1){//行驶信息,0初始值;1已经过;2当前站;3未到站 - stationsListPass.add(latLng) - }else if(station.drivingStatus==2){ - if(station.isLeaving){ - stationsListPass.add(latLng) - }else{ - stationsList.add(latLng) - } - }else{ - stationsList.add(latLng) - } - - } - - ThreadUtils.runOnUiThread { - mView?.updateLineStations(stationsList,stationsListPass,startStation,endStation) - } - PM2ADASModel.INSTANCE.updateHDMapStations(stations) - } - - override fun updateStationsInfo(stations: MutableList, i: Int, isArrived: Boolean) { - ThreadUtils.runOnUiThread { - mView?.updateStationsInfo(stations,i,isArrived) - } - } - - override fun clearCustomPolyline() { - ThreadUtils.runOnUiThread { - mView?.clearCustomPolyline() - } - } - - override fun updateAutoStatus(isOpen: Boolean) { - ThreadUtils.runOnUiThread { - mView?.updateAutoStatus(isOpen) - } - } - - override fun updateAutoStatus(status: Int) { - - } - - -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/presenter/PM2Presenter.kt b/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/presenter/PM2Presenter.kt deleted file mode 100644 index 450109ef98..0000000000 --- a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/presenter/PM2Presenter.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.mogo.och.shuttle.passenger.presenter - -import com.mogo.commons.mvp.Presenter -import com.mogo.och.shuttle.passenger.ui.PM2BaseFragment - -class PM2Presenter(view: PM2BaseFragment?) : - Presenter(view) \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/PM2BaseFragment.kt b/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/PM2BaseFragment.kt deleted file mode 100644 index 38717d851a..0000000000 --- a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/PM2BaseFragment.kt +++ /dev/null @@ -1,73 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui - -import com.mogo.commons.mvp.MvpFragment -import com.mogo.eagle.core.utilcode.util.AppUtils -import com.mogo.och.shuttle.passenger.R -import com.mogo.och.shuttle.passenger.presenter.PM2Presenter -import com.mogo.och.common.module.wigets.media.MediaPlayerFragment -import kotlinx.android.synthetic.main.shuttle_p_m2_fragment.tv_shuttle_b2_p_version - - -/** - * @author: wangmingjun - * @date: 2022/4/12 - */ -class PM2BaseFragment : - MvpFragment() { - - private var drivingFragment : PM2DrivingInfoFragment? = null - private var hdMapFragment : PM2HPMapFragment? = null - private var mediaFragment : MediaPlayerFragment? = null - - override fun getLayoutId(): Int { - return R.layout.shuttle_p_m2_fragment - } - - override fun getTagName(): String { - return TAG - } - - override fun initViews() { - //横竖屏 -// setScreenDirection() - tv_shuttle_b2_p_version.text = "版本:${AppUtils.getAppVersionName()}" - //隐藏小地图 - initFragment() - } - -// private fun setScreenDirection() { -// var ro = Settings.System.getInt(context?.contentResolver, -// Settings.System.USER_ROTATION,Surface.ROTATION_270) -// if (ro != Surface.ROTATION_270){ -// ro = Surface.ROTATION_270 -// } -// Settings.System.putInt(context?.contentResolver, -// Settings.System.USER_ROTATION,ro) -// } - - /** - * 初始化行程信息,高静地图,宣传 三个fragment - */ - private fun initFragment() { - - if (drivingFragment == null) drivingFragment = PM2DrivingInfoFragment() - childFragmentManager.beginTransaction().add(R.id.driving_fragment, drivingFragment!!) - .show(drivingFragment!!).commitAllowingStateLoss() - - if (hdMapFragment == null) hdMapFragment = PM2HPMapFragment() - childFragmentManager.beginTransaction().add(R.id.hd_map_fragment, hdMapFragment!!) - .show(hdMapFragment!!).commitAllowingStateLoss() - - if (mediaFragment == null) mediaFragment = MediaPlayerFragment() - childFragmentManager.beginTransaction().add(R.id.video_fragment, mediaFragment!!) - .show(mediaFragment!!).commitAllowingStateLoss() - } - - override fun createPresenter(): PM2Presenter { - return PM2Presenter(this) - } - - companion object { - public val TAG = PM2BaseFragment::class.java.simpleName - } -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/PM2DrivingInfoFragment.kt b/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/PM2DrivingInfoFragment.kt deleted file mode 100644 index 7f36c761cc..0000000000 --- a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/PM2DrivingInfoFragment.kt +++ /dev/null @@ -1,301 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui - -import android.graphics.BitmapFactory -import android.graphics.drawable.AnimationDrawable -import android.os.Bundle -import android.view.View -import androidx.core.content.ContextCompat -import com.amap.api.maps.model.LatLng -import com.mogo.commons.AbsMogoApplication -import com.mogo.commons.mvp.MvpFragment -import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView -import com.mogo.eagle.core.function.view.SiteMarkerBean -import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider -import com.mogo.och.shuttle.passenger.R -import com.mogo.och.shuttle.passenger.presenter.PM2DrivingPresenter -import com.mogo.och.common.module.utils.DateTimeUtil.* -import com.mogo.och.common.module.utils.NumberFormatUtil -import com.mogo.och.data.bean.BusStationBean -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.auto_tv -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.clg_distance_left_time -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.group_not_select_line -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.group_stationinfo -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.iv_animal_list -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.line_during_tv -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.line_name_tv -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.overMapView -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.speed_tv -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.station_name_tv -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.tv_arrived_notice -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.tv_distance -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.tv_left_time -import kotlinx.android.synthetic.main.shuttle_p_m2_driving_info_fragment.tv_next_station_title - -import me.jessyan.autosize.utils.AutoSizeUtils -import kotlin.math.ceil -import kotlin.math.roundToInt - -/** - * @author: wangmingjun - * @date: 2022/4/12 - */ -class PM2DrivingInfoFragment : - MvpFragment() { - - val stationIcon = BitmapFactory.decodeResource(AbsMogoApplication.getApp().resources, R.drawable.shuttle_p_m2_map_staton_icon) - val stationPassIcon = BitmapFactory.decodeResource(AbsMogoApplication.getApp().resources, R.drawable.shuttle_p_m2_map_staton_arrived_icon) - val startStationIcon = BitmapFactory.decodeResource(AbsMogoApplication.getApp().resources, R.drawable.shuttle_p_m2_map_start_icon) - val endStationIcon = BitmapFactory.decodeResource(AbsMogoApplication.getApp().resources, R.drawable.shuttle_p_m2_map_end_icon) - - /** - * 改变自动驾驶状态 - * - * @param status 2 - running 1 - enable 2 - disable - */ - override fun getLayoutId(): Int { - return R.layout.shuttle_p_m2_driving_info_fragment - } - - override fun getTagName(): String { - return TAG - } - - override fun initViews() { - speed_tv.setOnLongClickListener { - context?.let { ToggleDebugView.toggleDebugView.toggle(it) } - true - } - - line_name_tv.setTextColor(resources.getColor(R.color.shuttle_p_m2_line_name_tv_color)) - station_name_tv.setTextColor(resources.getColor(R.color.shuttle_p_m2_line_name_tv_color)) - speed_tv.setVertrial(true) - val intArrayOf = intArrayOf( - requireContext().resources.getColor(R.color.shuttle_p_m2_color_43cefe), - requireContext().resources.getColor(R.color.shuttle_p_m2_color_1466fb) - ) - speed_tv.setmColorList(intArrayOf) - -// current_time_tv.onClick { - -// //测试V2X消息 -// CallerMsgBoxManager.saveMsgBox( -// MsgBoxBean( -// MsgBoxType.V2X, -// V2XMsg( -// "6666", -// "超速行驶", -// "" -// ) -// ) -// ) -// -// val noticeTrafficStylePushData = NoticeTrafficStylePushData() -// noticeTrafficStylePushData.content= "测试公告布局" -// val noticeFromCloudMsg = NoticeFrCloudMsg(null, noticeTrafficStylePushData, 1) -// CallerMsgBoxManager.saveMsgBox( -// MsgBoxBean( -// MsgBoxType.NOTICE, noticeFromCloudMsg) -// ) -// BPRouteDataTestUtils.converToRouteData() -// } - } - - override fun initViews(savedInstanceState: Bundle?) { - super.initViews(savedInstanceState) - overMapView?.let { - it.onCreateView(savedInstanceState) - val radius = AutoSizeUtils.dp2px(requireContext(), 16f) - it.outlineProvider = TextureVideoViewOutlineProvider(radius.toFloat()) - it.clipToOutline = true - } - } - - override fun onResume() { - super.onResume() - overMapView?.let{ - it.onResume() - } - } - - override fun onPause() { - super.onPause() - overMapView?.let{ - it.onPause() - } - } - - override fun onDestroyView() { - overMapView?.onDestroy() - if (mPresenter != null) { - mPresenter?.onDestroy(this) - } - super.onDestroyView() - } - - fun updateSpeed(speed: Int){ - speed_tv.text = speed.toString() - } - - fun updateCarPlateNum(plateNum : String){ - - } - - fun updateTaskName(name: String){ - line_name_tv.text = name - } - - fun updateTaskDuringTime(time : String){ - line_during_tv.text = time - } - - fun changeOperationStatus(status:Boolean){ - if (!status){ - updateNoOrderUI() - } - } - - fun showNoTaskView(haveTask: Boolean){ - setLineInfoView(haveTask) - } - - private fun setLineInfoView(isShow: Boolean){ - if (!isShow){ - updateNoOrderUI() - } - } - - private fun updateNoOrderUI() { - line_name_tv.text = resources.getString(R.string.shuttle_p_m2_not_select_line_content) - updateNoStationView() - overMapView?.let { - it.clearSiteMarkers() - } - clearCustomPolyline() - } - - fun clearCustomPolyline(){ - overMapView?.let { - it.clearCustomPolyline() - } - } - private fun updateNoStationView(){ - station_name_tv.setTextColor(resources.getColor(R.color.shuttle_p_m2_next_tv_color)) - station_name_tv.text = resources.getString(R.string.shuttle_p_m2_empty_tv) - tv_distance.text = resources.getString(R.string.shuttle_p_m2_empty_remain_km) - tv_left_time.text = resources.getString(R.string.shuttle_p_m2_empty_remain_minute) - noLineShow() - } - - override fun createPresenter(): PM2DrivingPresenter { - return PM2DrivingPresenter(this) - } - - fun updateAutoStatus(isAutoPilot: Boolean) { - if (isAutoPilot){ - context?.let { auto_tv.setTextColor(ContextCompat.getColor(it,R.color.shuttle_p_m2_white_color)) } - context?.let { auto_tv.background = ContextCompat.getDrawable(it,R.drawable.shuttle_p_m2_auto_button_bg) } - }else{ - context?.let { auto_tv.setTextColor(ContextCompat.getColor(it,R.color.shuttle_p_m2_color_7094ad)) } - context?.let { auto_tv.background = ContextCompat.getDrawable(it,R.drawable.shuttle_p_m2_bg_p_m2_auto) } - } - } - - fun updateLineStations( - stations: MutableList, - stationsPass: MutableList, - startStation: LatLng?, - endStation: LatLng? - ){ - overMapView?.let { - val stationsList: MutableList = mutableListOf() - startStation?.let { start-> - stationsList.add(SiteMarkerBean(start,startStationIcon,0.5f,0.5f)) - } - for (stationsPass in stationsPass) { - stationsList.add(SiteMarkerBean(stationsPass,stationPassIcon,0.5f,0.5f)) - } - for (stationsPass in stations) { - stationsList.add(SiteMarkerBean(stationsPass,stationIcon,0.5f,0.5f)) - } - endStation?.let {end-> - stationsList.add(SiteMarkerBean(end,endStationIcon,0.5f,0.5f)) - } - it.drawSiteMarkers(stationsList) - } - } - - fun updateStationsInfo(stations: MutableList, i: Int, isArrived: Boolean){ - if (stations.size == 0) return - if (0<= i && i 0) { - if (meters / 1000 < 1) { - disUnit = "米" - remainDis = meters.toFloat().roundToInt().toString() - } else { - disUnit = "公里" - remainDis = NumberFormatUtil.formatLong(meters.toDouble() / 1000) - } - } - - val time = ceil(timeInSecond / 60f).toInt() - - "$remainDis$disUnit".also { tv_distance.text = it } - "${time}分钟".also { tv_left_time.text = it } - } - - fun noLineShow(){ - // 没有线路展示 - group_not_select_line.visibility = View.VISIBLE - // 下一个站点 - group_stationinfo.visibility = View.GONE - // 距离和剩余大概时间 - clg_distance_left_time.visibility = View.GONE - // 到达站点 - tv_arrived_notice.visibility = View.GONE - - iv_animal_list.visibility = View.GONE - } - // 有线路正在到站点 - fun haveLineAndArriveingStation(){ - group_not_select_line.visibility = View.GONE - group_stationinfo.visibility = View.VISIBLE - clg_distance_left_time.visibility = View.VISIBLE - tv_arrived_notice.visibility = View.GONE - iv_animal_list.visibility = View.GONE - } - // 有线路到达站点 - private fun haveLineAndArrivedStation(){ - group_not_select_line.visibility = View.GONE - group_stationinfo.visibility = View.VISIBLE - clg_distance_left_time.visibility = View.GONE - tv_arrived_notice.visibility = View.VISIBLE - iv_animal_list.visibility = View.VISIBLE - val animationDrawable = iv_animal_list.drawable as AnimationDrawable - animationDrawable.start() - } - - companion object { - private val TAG = PM2DrivingInfoFragment::class.java.simpleName - } -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/PM2HPMapFragment.kt b/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/PM2HPMapFragment.kt deleted file mode 100644 index f0efcd42e8..0000000000 --- a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/PM2HPMapFragment.kt +++ /dev/null @@ -1,132 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui - -import android.os.Bundle -import com.mogo.commons.mvp.MvpFragment -import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d -import com.mogo.map.overlay.core.Level -import com.mogo.map.overlay.point.Point -import com.mogo.map.MapDataWrapper -import com.mogo.och.shuttle.passenger.R -import com.mogo.och.shuttle.passenger.constant.M2Const.Companion.TYPE_MARKER_M2_LINE -import com.mogo.och.shuttle.passenger.presenter.PM2ADASPresenter -import com.mogo.och.common.module.utils.OCHThreadPoolManager -import kotlinx.android.synthetic.main.shuttle_p_m2_hpmap_fragment.mapBizView - -import java.util.* - -/** - * @author: wangmingjun - * @date: 2022/4/12 - */ -class PM2HPMapFragment : - MvpFragment() { - /** - * 改变自动驾驶状态 - * - * @param status 2 - running 1 - enable 2 - disable - */ - override fun getLayoutId(): Int { - return R.layout.shuttle_p_m2_hpmap_fragment - } - - override fun getTagName(): String { - return TAG - } - - override fun initViews() { - } - - override fun initViews(savedInstanceState: Bundle?) { - super.initViews(savedInstanceState) - mapBizView.onCreate(savedInstanceState) - } - - override fun onResume() { - super.onResume() - mapBizView.onResume() - } - - override fun onLowMemory() { - super.onLowMemory() - mapBizView.onLowMemory() - } - - override fun onSaveInstanceState(outState: Bundle) { - super.onSaveInstanceState(outState) - mapBizView.onSaveInstanceState(outState) - } - - override fun onPause() { - super.onPause() - mapBizView.onPause() - } - - override fun onDestroyView() { - mapBizView.onDestroy() - CallerMapUIServiceManager.getOverlayManager()?.let { - it.removeAllLines() - it.removeAllPoints() - } - super.onDestroyView() - } - - override fun createPresenter(): PM2ADASPresenter { - return PM2ADASPresenter(this) - } - - companion object { - private val TAG = PM2HPMapFragment::class.java.simpleName - } - - fun setMapMaker( - uuid: String, - station: MutableList, - ) { - //开启线程执行起终点marker设置 - val setMapMarkerRunnable = Runnable { - d( - "setMapMaker= " + Thread.currentThread().name, - uuid + "=latitude=" + station[1] + ",longitude=" + station[0] - ) - - val builder = Point.Options.Builder( - TYPE_MARKER_M2_LINE, - Level.MAP_MARKER - ) - .setId(uuid) - .anchor(0.5f, 0.5f) - .set3DMode(true) - .isUseGps(true) - .controlAngle(true) - .icon3DRes(R.raw.star_marker) - .longitude(station[0]) - .latitude(station[1]) - MapDataWrapper.getCenterLineInfo( - station[0], station[1], -1f - ) { - // 有可能鹰眼map为空没有角度。判空使用后可能造成maker角度跟道路角度不一致 地图未初始化会返回空 - it?.let{ - builder.rotate(it.angle.toFloat()) - } - val overlayManager = CallerMapUIServiceManager.getOverlayManager() - overlayManager?.showOrUpdatePoint(builder.build()) - } - - } - OCHThreadPoolManager.getsInstance().execute(setMapMarkerRunnable) - } - - fun removeMapMaker( - uuid: String, - ) { - //开启线程移除起终点marker设置 - val removeMapMarkerRunnable = Runnable { - d("RemoveMapMaker=" + Thread.currentThread().name, uuid) - val overlayManager = CallerMapUIServiceManager.getOverlayManager() - overlayManager?.removeAllPointsInOwner(TYPE_MARKER_M2_LINE) - } - OCHThreadPoolManager.getsInstance().execute(removeMapMarkerRunnable) - } - -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2BlueToothView.kt b/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2BlueToothView.kt deleted file mode 100644 index 42d43b81db..0000000000 --- a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2BlueToothView.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui.widget - -import android.content.Context -import android.util.AttributeSet -import android.view.LayoutInflater -import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener -import com.mogo.eagle.core.function.hmi.ui.widget.BlueToothView -import com.mogo.eagle.core.utilcode.util.ThreadUtils -import com.mogo.och.shuttle.passenger.R -import kotlinx.android.synthetic.main.shuttle_p_m2_view_blue_tooth.view.blueView - -/** - * 魔戒蓝牙控件 - * 放置于StatusBar右侧位置 - */ -class M2BlueToothView @JvmOverloads constructor( - context: Context, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : BlueToothView(context, attrs, defStyleAttr),IMoGoDevaToolsListener { - - init { - LayoutInflater.from(context).inflate(R.layout.shuttle_p_m2_view_blue_tooth, this, true) - } - - override fun mofangStatus(status: Boolean) { - ThreadUtils.runOnUiThread { - if (status) { - blueView.setImageResource(R.drawable.shuttle_p_m2_blue_tooth_close) - } else { - blueView.setImageResource(R.drawable.shuttle_p_m2_blue_tooth_open) - } - } - } - -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2PTrafficLightView.kt b/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2PTrafficLightView.kt deleted file mode 100644 index 17e0c7e594..0000000000 --- a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2PTrafficLightView.kt +++ /dev/null @@ -1,181 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui.widget - -import android.content.Context -import android.util.AttributeSet -import android.view.LayoutInflater -import android.widget.LinearLayout -import com.mogo.eagle.core.data.enums.DataSourceType -import com.mogo.eagle.core.data.enums.TrafficLightEnum -import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTrafficLightListener -import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager -import com.mogo.eagle.core.utilcode.util.UiThreadHandler -import com.mogo.och.shuttle.passenger.R -import kotlinx.android.synthetic.main.shuttle_p_m2_traffic_light_view.view.m2_p_traffic_light_bg -import kotlinx.android.synthetic.main.shuttle_p_m2_traffic_light_view.view.m2_p_traffic_light_iv -import kotlinx.android.synthetic.main.shuttle_p_m2_traffic_light_view.view.m2_p_traffic_light_time_tv - -/** - * bus乘客端:红绿灯view - * - * Created on 2022/3/14 - */ -class M2PTrafficLightView @JvmOverloads constructor( - context: Context?, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : LinearLayout(context, attrs, defStyleAttr), IMoGoTrafficLightListener { - - companion object { - private const val TAG = "M2PTrafficLightView" - } - - private var mCurrentLightId = TrafficLightEnum.BLACK - - init { - init(context) - } - - private fun init(context: Context?) { - LayoutInflater.from(context).inflate(R.layout.shuttle_p_m2_traffic_light_view, this, true) - } - - override fun onAttachedToWindow() { - super.onAttachedToWindow() - CallerTrafficLightListenerManager.addListener(TAG, this) - } - - override fun onDetachedFromWindow() { - super.onDetachedFromWindow() - CallerTrafficLightListenerManager.removeListener(TAG) - } - - /** - * 展示红绿灯预警 - * - * @param checkLightId 0-都是默认,1-红,2-黄,3-绿 - * @param lightSource 1:云端下发;2:自车感知 - */ - override fun showTrafficLight(checkLightId: TrafficLightEnum, lightSource: DataSourceType) { - super.showTrafficLight(checkLightId, lightSource) - mCurrentLightId = checkLightId - updateTrafficLightIcon(checkLightId) - } - - /** - * 关闭红绿灯预警展示,并重制灯态 - */ - override fun disableTrafficLight() { - super.disableTrafficLight() - UiThreadHandler.post { - mCurrentLightId = TrafficLightEnum.BLACK - this@M2PTrafficLightView.visibility = GONE - } - } - - /** - * @param redNum 红灯倒计时 - * @param yellowNum 黄灯倒计时 - * @param greenNum 绿灯倒计时 - */ - override fun changeCountdownTrafficLightNum(redNum: Int, yellowNum: Int, greenNum: Int) { - super.changeCountdownTrafficLightNum(redNum, yellowNum, greenNum) - resetView() - when (mCurrentLightId) { - TrafficLightEnum.RED -> changeCountdownRed(redNum) - TrafficLightEnum.YELLOW -> changeCountdownYellow(yellowNum) - TrafficLightEnum.GREEN -> changeCountdownGreen(greenNum) - else -> UiThreadHandler.post { m2_p_traffic_light_time_tv.text = "" } - } - } - - override fun changeCountdownRed(redNum: Int) { - super.changeCountdownRed(redNum) - UiThreadHandler.post { - if (redNum > 0) { - resetView() - m2_p_traffic_light_time_tv.text = redNum.toString() - } else { - disableTrafficLightCountDown() - m2_p_traffic_light_time_tv.text = "" - } - } - } - - override fun changeCountdownGreen(greenNum: Int) { - super.changeCountdownGreen(greenNum) - UiThreadHandler.post { - if (greenNum > 0) { - resetView() - m2_p_traffic_light_time_tv.text = greenNum.toString() - } else { - disableTrafficLightCountDown() - m2_p_traffic_light_time_tv.text = "" - } - } - } - - override fun changeCountdownYellow(yellowNum: Int) { - super.changeCountdownYellow(yellowNum) - UiThreadHandler.post { - if (yellowNum > 0) { - resetView() - m2_p_traffic_light_time_tv.text = yellowNum.toString() - } else { - disableTrafficLightCountDown() - m2_p_traffic_light_time_tv.text = "" - } - } - } - - /** - * 更新红绿灯icon - * - * @param lightId 0-都是默认,1-红,2-黄,3-绿 - */ - private fun updateTrafficLightIcon(lightId: TrafficLightEnum) { - UiThreadHandler.post { - when (lightId) { - TrafficLightEnum.RED -> { - m2_p_traffic_light_iv.setBackgroundResource(R.drawable.shuttle_p_m2_light_red_nor) - this@M2PTrafficLightView.visibility = VISIBLE - } - TrafficLightEnum.YELLOW -> { - m2_p_traffic_light_iv.setBackgroundResource(R.drawable.shuttle_p_m2_light_yellow_nor) - this@M2PTrafficLightView.visibility = VISIBLE - } - TrafficLightEnum.GREEN -> { - m2_p_traffic_light_iv.setBackgroundResource(R.drawable.shuttle_p_m2_light_green_nor) - this@M2PTrafficLightView.visibility = VISIBLE - } - else -> this@M2PTrafficLightView.visibility = GONE - } - } - } - - override fun disableTrafficLightCountDown() { - super.disableTrafficLightCountDown() - UiThreadHandler.post { - val layoutParams = layoutParams - if (layoutParams is MarginLayoutParams) { - val lp = layoutParams - lp.width = resources.getDimension(R.dimen.dp_40).toInt() - setLayoutParams(lp) - m2_p_traffic_light_time_tv.visibility = GONE - m2_p_traffic_light_bg.layoutParams.width = - resources.getDimension(R.dimen.dp_40).toInt() - } - } - } - - private fun resetView() { - val layoutParams = layoutParams - if (layoutParams is MarginLayoutParams) { - val lp = layoutParams - lp.width = resources.getDimension(R.dimen.dp_60).toInt() - setLayoutParams(lp) - m2_p_traffic_light_time_tv.visibility = VISIBLE - m2_p_traffic_light_bg.layoutParams.width = - resources.getDimension(R.dimen.dp_60).toInt() - } - } -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2StatusBarView.kt b/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2StatusBarView.kt deleted file mode 100644 index aa7044667e..0000000000 --- a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2StatusBarView.kt +++ /dev/null @@ -1,114 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui.widget - -import android.annotation.* -import android.content.Context -import android.graphics.Color -import android.util.AttributeSet -import android.view.LayoutInflater -import android.view.ViewGroup -import androidx.constraintlayout.widget.ConstraintLayout -import chassis.ChassisStatesOuterClass -import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisStatesListener -import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener -import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener -import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerManager -import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager -import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager -import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager -import com.mogo.eagle.core.utilcode.kotlin.* -import com.mogo.eagle.core.utilcode.util.ClickUtils -import com.mogo.eagle.core.utilcode.util.ThreadUtils -import com.mogo.och.shuttle.passenger.R -import kotlinx.android.synthetic.main.shuttle_p_m2_view_status_bar.view.progress -import kotlinx.android.synthetic.main.shuttle_p_m2_view_status_bar.view.tv_power_cos -import kotlinx.coroutines.* -import me.jessyan.autosize.utils.AutoSizeUtils - -/** - * @author: wangmingjun - * @date: 2023/2/14 - */ -class M2StatusBarView @JvmOverloads constructor( - context: Context, attrs: AttributeSet? = null -) : ConstraintLayout(context, attrs), IViewControlListener, IMoGoSkinModeChangeListener, - IMoGoChassisStatesListener { - - companion object { - const val TAG = "M2StatusBarView" - } - - @Volatile - private var oldBmsSoc: Float = -1.0f - - init { - LayoutInflater.from(context).inflate(R.layout.shuttle_p_m2_view_status_bar, this, true) - setBackgroundColor(Color.parseColor("#80FFFFFF")) - isClickable = true - isFocusable = true - } - - - @SuppressLint("ClickableViewAccessibility") - override fun onAttachedToWindow() { - super.onAttachedToWindow() - post { - val params: ViewGroup.LayoutParams = getLayoutParams() - params.height = AutoSizeUtils.dp2px(context,40f) - layoutParams = params - } - //添加view控制 - CallerHmiViewControlListenerManager.addListener(TAG,this) - // 添加换肤监听 - CallerSkinModeListenerManager.addListener(TAG, this) - //电量 - CallerChassisStatesListenerManager.addListener(TAG,this) - - progress?.also { - it.progress = 50 - } - tv_power_cos?.also { - it.text = "50%" - } - } - - override fun onSkinModeChange(skinMode: Int) { - when (skinMode) { - 0 -> setStatusBarDarkOrLight(false) - 1 -> setStatusBarDarkOrLight(true) - } - } - - override fun onDetachedFromWindow() { - super.onDetachedFromWindow() - CallerHmiViewControlListenerManager.removeListener(TAG) - CallerSkinModeListenerManager.removeListener(TAG) - CallerChassisStatesListenerManager.removeListener(TAG) - CallerDevaToolsManager.hideStatusBar() - } - - @SuppressLint("SetTextI18n") - override fun onBatteryManagementSystemStates(states: ChassisStatesOuterClass.BMSSystemStates) { - ThreadUtils.runOnUiThread({ - if (ClickUtils.isClickTooFrequent(this,1000)) { - return@runOnUiThread - } - val bmsSoc = states.bmsSoc - try { - if (oldBmsSoc != bmsSoc ) { - scope.launch { - if(bmsSoc >1){ - progress?.also { it.progress = bmsSoc.toInt() } - tv_power_cos?.also { it.text = "${bmsSoc.toInt()}%" } - }else{ - val power = (bmsSoc * 100).toInt() - progress?.also { it.progress = power } - tv_power_cos?.also {it.text = "$power%" } - } - } - } - } finally { - oldBmsSoc = bmsSoc - } - },ThreadUtils.MODE.QUEUE) - } -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2TurnLightView.kt b/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2TurnLightView.kt deleted file mode 100644 index a565d41a0e..0000000000 --- a/OCH/shuttle/passenger/src/main/java/m2/com/mogo/och/shuttle/passenger/ui/widget/M2TurnLightView.kt +++ /dev/null @@ -1,197 +0,0 @@ -package com.mogo.och.shuttle.passenger.ui.widget - -import android.animation.AnimatorSet -import android.animation.ObjectAnimator -import android.content.Context -import android.util.AttributeSet -import android.view.LayoutInflater -import android.view.View -import android.view.animation.AlphaAnimation -import android.view.animation.Animation -import android.widget.ImageView -import androidx.constraintlayout.widget.ConstraintLayout -import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTurnLightListener -import com.mogo.eagle.core.function.call.v2x.CallerTurnLightListenerManager -import com.mogo.eagle.core.utilcode.util.ThreadUtils -import com.mogo.och.shuttle.passenger.R -import com.mogo.och.common.module.manager.light.TurnLightManager -import kotlinx.android.synthetic.main.shuttle_p_jl_turn_light_status.view.left_nor_image -import kotlinx.android.synthetic.main.shuttle_p_jl_turn_light_status.view.left_select_image -import kotlinx.android.synthetic.main.shuttle_p_jl_turn_light_status.view.right_nor_image -import kotlinx.android.synthetic.main.shuttle_p_jl_turn_light_status.view.right_select_image -import kotlinx.android.synthetic.main.shuttle_p_jl_turn_light_status.view.turn_light_layout - -/** - * @author: wangmingjun - * @date: 2023/2/13 - */ -class M2TurnLightView @JvmOverloads constructor( - context: Context, - attrs: AttributeSet? = null, - defStyleAttr: Int = 0 -) : ConstraintLayout(context, attrs, defStyleAttr), - IMoGoTurnLightListener, TurnLightManager.TurnLightListener { - - - companion object { - private const val TAG = "TurnLightViewStatus" - } - - private var isLeftLight: Boolean = false - private var isRightLight: Boolean = false - private var isDisappear: Boolean = false - - init { - LayoutInflater.from(context) - .inflate(R.layout.shuttle_p_m2_turn_light_status, this, true) - } - - override fun onAttachedToWindow() { - super.onAttachedToWindow() - CallerTurnLightListenerManager.addListener(TAG,this) - TurnLightManager.addTurnLightStatusChangeListener(TAG,this) - } - - override fun onDetachedFromWindow() { - super.onDetachedFromWindow() - CallerTurnLightListenerManager.removeListener(TAG) - TurnLightManager.removeTurnLightStatusChangeListener(TAG) - } - - override fun hideTurnLightView() { - ThreadUtils.runOnUiThread{ - if (!isDisappear) { - isDisappear = true - isLeftLight = false - isRightLight = false - animationDisappear() - } - } - } - - override fun statusChange(newStatus: TurnLightManager.TurnLightStatus) { - ThreadUtils.runOnUiThread { - setTurnLight(newStatus) - } - } - - /** - * 转向灯动画 - */ - private fun setTurnLight(directionLight: TurnLightManager.TurnLightStatus) { - if (!isAttachedToWindow) { - return - } - //根据左右进行显示和隐藏,实际要判断每个来的时间和频度 - when (directionLight) { - TurnLightManager.TurnLightStatus.TURN_LIGHT_LEFT -> { //左转向 - if (!isLeftLight) { - isLeftLight = true - isRightLight = false - isDisappear = false - showNormalAnimation() - left_select_image.visibility = View.VISIBLE - right_select_image.visibility = View.GONE - right_select_image.clearAnimation() - setAnimation(left_select_image) - } - } - TurnLightManager.TurnLightStatus.TURN_LIGHT_RIGHT -> { //右转向 - if (!isRightLight) { - isRightLight = true - isLeftLight = false - isDisappear = false - showNormalAnimation() - left_select_image.visibility = View.GONE - right_select_image.visibility = View.VISIBLE - left_select_image.clearAnimation() - setAnimation(right_select_image) - } - } - TurnLightManager.TurnLightStatus.TURN_LIGHT_NONE -> { //消失 - if (!isDisappear) { - isDisappear = true - isLeftLight = false - isRightLight = false - animationDisappear() - } - } - } - } - - //显示背景 - private fun showNormalAnimation() { - val appearAnimation = AlphaAnimation(0f, 1.0f) - appearAnimation.duration = 300 - val appearAnimationImage = AlphaAnimation(0f, 1.0f) - appearAnimation.duration = 500 - turn_light_layout.startAnimation(appearAnimation) - left_nor_image.startAnimation(appearAnimationImage) - right_nor_image.startAnimation(appearAnimationImage) - - turn_light_layout.visibility = View.VISIBLE - left_nor_image.visibility = View.VISIBLE - right_nor_image.visibility = View.VISIBLE - } - - //消失动画,当转向等数据为空时候 - private fun animationDisappear() { - left_select_image.visibility = View.GONE - right_select_image.visibility = View.GONE - left_select_image.clearAnimation() - right_select_image.clearAnimation() - - left_nor_image.clearAnimation() - right_nor_image.clearAnimation() - turn_light_layout.clearAnimation() - - val disappearAnimationLeft = AlphaAnimation(1.0f, 0f) - disappearAnimationLeft.duration = 300 - - val disappearAnimationBg = AlphaAnimation(1.0f, 0f) - disappearAnimationBg.duration = 500 - - left_nor_image.startAnimation(disappearAnimationLeft) - right_nor_image.startAnimation(disappearAnimationLeft) - turn_light_layout.startAnimation(disappearAnimationBg) - - disappearAnimationLeft.setAnimationListener(object : Animation.AnimationListener { - override fun onAnimationRepeat(p0: Animation?) { - } - - override fun onAnimationStart(p0: Animation?) { - } - - override fun onAnimationEnd(p0: Animation?) { - left_nor_image.visibility = View.GONE - right_nor_image.visibility = View.GONE - } - }) - - disappearAnimationBg.setAnimationListener(object : Animation.AnimationListener { - override fun onAnimationRepeat(p0: Animation?) { - } - - override fun onAnimationStart(p0: Animation?) { - } - - override fun onAnimationEnd(p0: Animation?) { - turn_light_layout.visibility = View.GONE - } - }) - } - - //实现图片闪烁效果 - private fun setAnimation(imageView: ImageView) { - val animationSet = AnimatorSet() - val valueAnimator = ObjectAnimator.ofFloat(imageView, "alpha", 0f, 1.0f) - val valueAnimatorDisappear = ObjectAnimator.ofFloat(imageView, "alpha", 1.0f, 0f) - valueAnimator.duration = 1000 - valueAnimatorDisappear.duration = 800 - valueAnimator.repeatCount = -1 - valueAnimatorDisappear.repeatCount = -1 - animationSet.playTogether(valueAnimatorDisappear, valueAnimator) - animationSet.start() - } - -} \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/drawable/scanner_qr_code.xml b/OCH/shuttle/passenger/src/main/res/drawable/scanner_qr_code.xml deleted file mode 100644 index 7b205e5aed..0000000000 --- a/OCH/shuttle/passenger/src/main/res/drawable/scanner_qr_code.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_arrive_line_blue.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_arrive_line_blue.png deleted file mode 100644 index 88247c204f..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_arrive_line_blue.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_arrive_line_green.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_arrive_line_green.png deleted file mode 100644 index 0fd2398cfb..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_arrive_line_green.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_auto_close.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_auto_close.png deleted file mode 100644 index bed91e16ee..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_auto_close.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_auto_open.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_auto_open.png deleted file mode 100644 index 8ecc2ca1e9..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_auto_open.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bg_arrived_station.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bg_arrived_station.png deleted file mode 100644 index f47f628224..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bg_arrived_station.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bg_end_tag_bg.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bg_end_tag_bg.png deleted file mode 100644 index a679341790..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bg_end_tag_bg.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bg_start_tag_bg.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bg_start_tag_bg.png deleted file mode 100644 index c0fcf5d0ea..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bg_start_tag_bg.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_blue_tooth_close.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_blue_tooth_close.png deleted file mode 100644 index 0c292d2cf3..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_blue_tooth_close.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_blue_tooth_open.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_blue_tooth_open.png deleted file mode 100644 index cccf9e10fa..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_blue_tooth_open.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bus_line_logo.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bus_line_logo.png deleted file mode 100644 index 60064ae514..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_bus_line_logo.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_cur_station_arrived_bg.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_cur_station_arrived_bg.png deleted file mode 100644 index 355af19afc..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_cur_station_arrived_bg.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_cur_station_un_arrived_bg.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_cur_station_un_arrived_bg.png deleted file mode 100644 index ea4214cf51..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_cur_station_un_arrived_bg.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_light_green_nor.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_light_green_nor.png deleted file mode 100644 index 939d5c0214..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_light_green_nor.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_light_red_nor.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_light_red_nor.png deleted file mode 100644 index 97d774140a..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_light_red_nor.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_light_yellow_nor.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_light_yellow_nor.png deleted file mode 100644 index a782062c34..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_light_yellow_nor.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_line_blue.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_line_blue.png deleted file mode 100755 index 233be50bd5..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_line_blue.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_line_green.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_line_green.png deleted file mode 100755 index 902cd19c2f..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_line_green.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_arrived_point.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_arrived_point.png deleted file mode 100644 index ac317649b4..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_arrived_point.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_arrow_arrived.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_arrow_arrived.png deleted file mode 100644 index fea5cfd033..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_arrow_arrived.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_arrow_un_arrive.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_arrow_un_arrive.png deleted file mode 100644 index 254662d297..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_arrow_un_arrive.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_car.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_car.png deleted file mode 100644 index 702f10f265..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_car.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_end_point.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_end_point.png deleted file mode 100644 index 39262e5ecb..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_end_point.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_start_point.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_start_point.png deleted file mode 100644 index b2e4c69ada..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_start_point.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_unarrived_point.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_unarrived_point.png deleted file mode 100644 index ec6081f5a3..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_map_unarrived_point.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_no_order_data.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_no_order_data.png deleted file mode 100755 index 65625ca374..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_no_order_data.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_point_blue.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_point_blue.png deleted file mode 100755 index ef08c49f25..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_point_blue.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_point_gray.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_point_gray.png deleted file mode 100755 index deec63de9d..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_point_gray.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_right_route_bg.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_right_route_bg.png deleted file mode 100644 index 5d9bf564af..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_right_route_bg.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_route_bg.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_route_bg.png deleted file mode 100644 index 5c4f302cc2..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_route_bg.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_speak_arrived_icon_0.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_speak_arrived_icon_0.png deleted file mode 100644 index 24a13e704e..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_speak_arrived_icon_0.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_speak_arrived_icon_1.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_speak_arrived_icon_1.png deleted file mode 100644 index c15a70a3ee..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_speak_arrived_icon_1.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_speak_arrived_icon_2.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_speak_arrived_icon_2.png deleted file mode 100644 index 8c1c118673..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_speak_arrived_icon_2.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_split_line_bg.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_split_line_bg.png deleted file mode 100644 index 2f392c64b6..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_split_line_bg.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_status_bar_logo.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_status_bar_logo.png deleted file mode 100644 index ffaacad3c6..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_status_bar_logo.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_youzhuan_open.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_youzhuan_open.png deleted file mode 100644 index fb728e515e..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_youzhuan_open.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_youzhuan_un_open.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_youzhuan_un_open.png deleted file mode 100644 index 4de98ca6dd..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_youzhuan_un_open.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_zuozhuan_open.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_zuozhuan_open.png deleted file mode 100644 index 5762da6053..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_zuozhuan_open.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_zuozhuan_un_open.png b/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_zuozhuan_un_open.png deleted file mode 100644 index ae29f98f34..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/jinlv/drawable-nodpi/shuttle_p_jl_zuozhuan_un_open.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_end_station_circle.xml b/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_end_station_circle.xml deleted file mode 100644 index cb17f7f2c3..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_end_station_circle.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_middle_station_circle.xml b/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_middle_station_circle.xml deleted file mode 100644 index 13b479db48..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_middle_station_circle.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_progress_bar.xml b/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_progress_bar.xml deleted file mode 100644 index 78d4679853..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_progress_bar.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_speak_icon_arrived.xml b/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_speak_icon_arrived.xml deleted file mode 100644 index 5590838117..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_speak_icon_arrived.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_start_station_circle.xml b/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_start_station_circle.xml deleted file mode 100644 index 2516df8c8e..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_start_station_circle.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_status_bar.xml b/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_status_bar.xml deleted file mode 100644 index 5b8da3c82c..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_status_bar.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_traffic_light_background.xml b/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_traffic_light_background.xml deleted file mode 100644 index 4982506777..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_bg_traffic_light_background.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_brakelight_background_daytime.xml b/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_brakelight_background_daytime.xml deleted file mode 100644 index 6409baca2f..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_brakelight_background_daytime.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_dividing_line_bg.xml b/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_dividing_line_bg.xml deleted file mode 100644 index d5d41809d0..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_dividing_line_bg.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_panel_cur_station_panel.xml b/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_panel_cur_station_panel.xml deleted file mode 100644 index 9cc2472376..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_panel_cur_station_panel.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_progress_item_round.xml b/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_progress_item_round.xml deleted file mode 100644 index 2d74f8fd54..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/drawable/shuttle_p_jl_progress_item_round.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_base_fragment.xml b/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_base_fragment.xml deleted file mode 100644 index 62f371742b..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_base_fragment.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_map_view.xml b/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_map_view.xml deleted file mode 100644 index d9fadd6ef5..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_map_view.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_no_data_common_view.xml b/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_no_data_common_view.xml deleted file mode 100644 index 8240758212..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_no_data_common_view.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_route_fragment.xml b/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_route_fragment.xml deleted file mode 100644 index 2e0ad54917..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_route_fragment.xml +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_stations_common_item.xml b/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_stations_common_item.xml deleted file mode 100644 index 60d2419315..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_stations_common_item.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_traffic_light_view.xml b/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_traffic_light_view.xml deleted file mode 100644 index 41eacc318b..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_traffic_light_view.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_turn_light_status.xml b/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_turn_light_status.xml deleted file mode 100644 index dfbed02b59..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_turn_light_status.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_view_blue_tooth.xml b/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_view_blue_tooth.xml deleted file mode 100644 index 5bb43874e5..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_view_blue_tooth.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_view_status_bar.xml b/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_view_status_bar.xml deleted file mode 100644 index f82c6b44fd..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/layout/shuttle_p_jl_view_status_bar.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/values/colors.xml b/OCH/shuttle/passenger/src/main/res/jinlv/values/colors.xml deleted file mode 100644 index 6620187e95..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/values/colors.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - #5D7199 - #CCE9EFFC - #C7D2E1 - #203555 - #FFB327 - #2D3E5F - #276AFE - #CDDBF6 - #2D3E5F - #2D3E5F - - #43CEFE - #1466FB - - #17417B - #6617417B - #A9B6CA - #1F82FB - - #992D3E5F - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/values/dimens.xml b/OCH/shuttle/passenger/src/main/res/jinlv/values/dimens.xml deleted file mode 100644 index 07076fd91d..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/values/dimens.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - 750dp - 804dp - 40dp - 48dp - 422dp - - 158dp - 90dp - 45dp - 158dp - 90dp - 45dp - 90dp - 90dp - 3dp - - 34dp - - 38dp - - 90dp - 27dp - - 10dp - 38dp - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/jinlv/values/strings.xml b/OCH/shuttle/passenger/src/main/res/jinlv/values/strings.xml deleted file mode 100644 index 4170e113bf..0000000000 --- a/OCH/shuttle/passenger/src/main/res/jinlv/values/strings.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - KM/H - 您已收车 - 暂无班次 - 暂无线路 - 已到站: - 前方到站: - 请按秩序下车 - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_amap_arrived_road.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_amap_arrived_road.png deleted file mode 100644 index f4d80f4cc7..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_amap_arrived_road.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_amap_arriving_road.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_amap_arriving_road.png deleted file mode 100644 index a9aae488fb..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_amap_arriving_road.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_amap_custom_corner.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_amap_custom_corner.png deleted file mode 100644 index 6f0795edaf..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_amap_custom_corner.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_arrived_an_0.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_arrived_an_0.png deleted file mode 100644 index 62ed7bb92d..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_arrived_an_0.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_arrived_an_1.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_arrived_an_1.png deleted file mode 100644 index 34f7c0e1f2..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_arrived_an_1.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_arrived_an_2.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_arrived_an_2.png deleted file mode 100644 index 8b4b214814..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_arrived_an_2.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_auto_button_bg.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_auto_button_bg.png deleted file mode 100644 index fb4ddc5279..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_auto_button_bg.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_bg_driving_info_image.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_bg_driving_info_image.png deleted file mode 100644 index a829d5b88d..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_bg_driving_info_image.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_blue_tooth_close.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_blue_tooth_close.png deleted file mode 100644 index 0c292d2cf3..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_blue_tooth_close.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_blue_tooth_open.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_blue_tooth_open.png deleted file mode 100644 index cccf9e10fa..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_blue_tooth_open.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_bottom_bg.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_bottom_bg.png deleted file mode 100644 index cec9275411..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_bottom_bg.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_card_split.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_card_split.png deleted file mode 100644 index 5446226be7..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_card_split.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_clock_bg.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_clock_bg.png deleted file mode 100644 index a380c3f3b7..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_clock_bg.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_img_drive_bg.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_img_drive_bg.png deleted file mode 100644 index 7412ab3c90..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_img_drive_bg.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_img_line_bg.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_img_line_bg.png deleted file mode 100644 index dd78f6fc9e..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_img_line_bg.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_img_time_bg.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_img_time_bg.png deleted file mode 100644 index ba735834b6..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_img_time_bg.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_light_green_nor.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_light_green_nor.png deleted file mode 100644 index 3135524a79..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_light_green_nor.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_light_red_nor.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_light_red_nor.png deleted file mode 100644 index e873c2b85e..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_light_red_nor.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_light_yellow_nor.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_light_yellow_nor.png deleted file mode 100644 index 8046782601..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_light_yellow_nor.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_lightyellow_nor.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_lightyellow_nor.png deleted file mode 100644 index bae01408fd..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_lightyellow_nor.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_line_name.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_line_name.png deleted file mode 100644 index beed2f2ad2..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_line_name.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_line_noselect.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_line_noselect.png deleted file mode 100644 index bda5e1d105..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_line_noselect.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_line_tile.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_line_tile.png deleted file mode 100644 index 44070336fa..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_line_tile.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_car_icon.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_car_icon.png deleted file mode 100644 index b9c841cc83..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_car_icon.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_end_icon.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_end_icon.png deleted file mode 100644 index 39ffc9052f..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_end_icon.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_start_icon.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_start_icon.png deleted file mode 100644 index c970699aac..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_start_icon.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_staton_arrived_icon.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_staton_arrived_icon.png deleted file mode 100644 index 39be18953c..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_staton_arrived_icon.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_staton_icon.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_staton_icon.png deleted file mode 100644 index d90c5a2b71..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_map_staton_icon.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_p_video_holder.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_p_video_holder.png deleted file mode 100644 index d8c5951e43..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_p_video_holder.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_sky_bg.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_sky_bg.png deleted file mode 100644 index 7b72c07390..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_sky_bg.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_status_bar_logo.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_status_bar_logo.png deleted file mode 100644 index 1f6ea692f5..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_status_bar_logo.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_bottom_left.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_bottom_left.png deleted file mode 100644 index 5e1fb2c752..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_bottom_left.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_bottom_right.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_bottom_right.png deleted file mode 100644 index 19ae887a57..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_bottom_right.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_top_left.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_top_left.png deleted file mode 100644 index 3fb0a40ce3..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_top_left.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_top_right.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_top_right.png deleted file mode 100644 index dbc80b2254..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_video_top_right.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_youzhuan_open.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_youzhuan_open.png deleted file mode 100644 index bbd2c12d90..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_youzhuan_open.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_youzhuan_un_open.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_youzhuan_un_open.png deleted file mode 100644 index 7c0dcaabe1..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_youzhuan_un_open.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_zuozhuan_open.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_zuozhuan_open.png deleted file mode 100644 index 9bbda22cb7..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_zuozhuan_open.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_zuozhuan_un_open.png b/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_zuozhuan_un_open.png deleted file mode 100644 index 7c33fddbd9..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/drawable-nodpi/shuttle_p_m2_zuozhuan_un_open.png and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_dashed_line.xml b/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_dashed_line.xml deleted file mode 100644 index b26187608d..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_dashed_line.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_arrived_notice.xml b/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_arrived_notice.xml deleted file mode 100644 index 0924ac7748..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_arrived_notice.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_distance_lefttime.xml b/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_distance_lefttime.xml deleted file mode 100644 index d7e80d7738..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_distance_lefttime.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_info.xml b/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_info.xml deleted file mode 100644 index 38b5f30517..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_info.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_selector.xml b/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_selector.xml deleted file mode 100644 index 21a6524032..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_driving_selector.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_p_m2_arrived_station.xml b/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_p_m2_arrived_station.xml deleted file mode 100644 index 826ca50b64..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_p_m2_arrived_station.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_p_m2_auto.xml b/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_p_m2_auto.xml deleted file mode 100644 index 4189fb8509..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_p_m2_auto.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_p_m2_traffic_light.xml b/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_p_m2_traffic_light.xml deleted file mode 100644 index 5a27da20e0..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_p_m2_traffic_light.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_pnc.xml b/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_pnc.xml deleted file mode 100644 index 38d10320ae..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_bg_pnc.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_brakelight_background_daytime.xml b/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_brakelight_background_daytime.xml deleted file mode 100644 index ba372d59df..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_brakelight_background_daytime.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_power_seekbar_style.xml b/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_power_seekbar_style.xml deleted file mode 100644 index 3ac0c761ba..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/drawable/shuttle_p_m2_power_seekbar_style.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_driving_info_fragment.xml b/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_driving_info_fragment.xml deleted file mode 100644 index 29cc67ae25..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_driving_info_fragment.xml +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_fragment.xml b/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_fragment.xml deleted file mode 100644 index 1ac803d603..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_fragment.xml +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_hpmap_fragment.xml b/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_hpmap_fragment.xml deleted file mode 100644 index 5c9a902baa..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_hpmap_fragment.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_traffic_light_view.xml b/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_traffic_light_view.xml deleted file mode 100644 index 83567814d2..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_traffic_light_view.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_turn_light_status.xml b/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_turn_light_status.xml deleted file mode 100644 index a1699ac360..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_turn_light_status.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_video_fragment.xml b/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_video_fragment.xml deleted file mode 100644 index 66e95d9087..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_video_fragment.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_video_view.xml b/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_video_view.xml deleted file mode 100644 index 9d75478ee1..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_video_view.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_view_blue_tooth.xml b/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_view_blue_tooth.xml deleted file mode 100644 index 61448bf16d..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_view_blue_tooth.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_view_status_bar.xml b/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_view_status_bar.xml deleted file mode 100644 index b76e888eac..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/layout/shuttle_p_m2_view_status_bar.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/raw/star_marker.nt3d b/OCH/shuttle/passenger/src/main/res/m2/raw/star_marker.nt3d deleted file mode 100644 index c6e546fc31..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/raw/star_marker.nt3d and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/raw/station_marker.nt3d b/OCH/shuttle/passenger/src/main/res/m2/raw/station_marker.nt3d deleted file mode 100644 index a00207ba3f..0000000000 Binary files a/OCH/shuttle/passenger/src/main/res/m2/raw/station_marker.nt3d and /dev/null differ diff --git a/OCH/shuttle/passenger/src/main/res/m2/values/colors.xml b/OCH/shuttle/passenger/src/main/res/m2/values/colors.xml deleted file mode 100644 index b0196c0ce9..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/values/colors.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - #FFFFFF - #0B1E38 - #BBDAFB - #0B1E38 - #5D7199 - #A5D8FF - #1B2546 - #23355D - #8895B7 - - - #C8EFFF - #203555 - #17417B - #2D3E5F - #34A61F - #AEEDB8 - #43CEFE - #1466FB - #7094AD - #80FFFFFF - - #99AFC9E7 - #6617417B - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/values/dimens.xml b/OCH/shuttle/passenger/src/main/res/m2/values/dimens.xml deleted file mode 100644 index 55344e5192..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/values/dimens.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/main/res/m2/values/strings.xml b/OCH/shuttle/passenger/src/main/res/m2/values/strings.xml deleted file mode 100644 index d2faf78c18..0000000000 --- a/OCH/shuttle/passenger/src/main/res/m2/values/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - KM/H - m2_map_style.data - m2_map_style_extra.data - AUTO - 已到站 - 暂无站点 - 前方到站 - —公里 - —分钟 - 请按秩序下车 - 暂无路线 - \ No newline at end of file diff --git a/OCH/shuttle/passenger/src/test/java/passenger/ExampleUnitTest.java b/OCH/shuttle/passenger/src/test/java/passenger/ExampleUnitTest.java deleted file mode 100644 index d940b2948f..0000000000 --- a/OCH/shuttle/passenger/src/test/java/passenger/ExampleUnitTest.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.mogo.och.bus.passenger; - -import org.junit.Test; - -/** - * Example local unit test, which will execute on the development machine (host). - * - * @see Testing documentation - */ -public class ExampleUnitTest { - @Test - public void addition_isCorrect() { - - } -} \ No newline at end of file diff --git a/OCH/shuttle/passenger_weaknet/src/main/java/com/mogo/och/shuttle/weaknet/passenger/network/PassengerServiceManager.kt b/OCH/shuttle/passenger_weaknet/src/main/java/com/mogo/och/shuttle/weaknet/passenger/network/PassengerServiceManager.kt index 6d1e58b8f2..8a27b65b91 100644 --- a/OCH/shuttle/passenger_weaknet/src/main/java/com/mogo/och/shuttle/weaknet/passenger/network/PassengerServiceManager.kt +++ b/OCH/shuttle/passenger_weaknet/src/main/java/com/mogo/och/shuttle/weaknet/passenger/network/PassengerServiceManager.kt @@ -2,6 +2,7 @@ package com.mogo.och.shuttle.weaknet.passenger.network import android.content.Context import com.mogo.cloud.passport.MoGoAiCloudClientConfig +import com.mogo.commons.env.ProjectUtils import com.mogo.eagle.core.network.MoGoRetrofitFactory import com.mogo.commons.storage.SharedPrefsMgr import com.mogo.eagle.core.utilcode.util.StringUtils @@ -46,13 +47,22 @@ object PassengerServiceManager { OchChainLogManager.writeChainLogScanner(TAG +"onError","无司机屏sn请处理") return } - mShuttleBusPassengerServiceApi.writeOffTicket( - MoGoAiCloudClientConfig.getInstance().serviceAppId, - SharedPrefsMgr.getInstance().token, - ticketInfo - ) - .transformTry() - .subscribe(OchCommonSubscribeImpl(context, callback, "writeOff")) - + if(ProjectUtils.isSaas()) { + mShuttleBusPassengerServiceApi.saaswriteOffTicket( + MoGoAiCloudClientConfig.getInstance().serviceAppId, + SharedPrefsMgr.getInstance().token, + ticketInfo + ) + .transformTry() + .subscribe(OchCommonSubscribeImpl(context, callback, "writeOff")) + }else if(ProjectUtils.isDali()) { + mShuttleBusPassengerServiceApi.daliwriteOffTicket( + MoGoAiCloudClientConfig.getInstance().serviceAppId, + SharedPrefsMgr.getInstance().token, + ticketInfo + ) + .transformTry() + .subscribe(OchCommonSubscribeImpl(context, callback, "writeOff")) + } } } \ No newline at end of file diff --git a/OCH/shuttle/passenger_weaknet/src/main/java/com/mogo/och/shuttle/weaknet/passenger/network/ServiceApi.java b/OCH/shuttle/passenger_weaknet/src/main/java/com/mogo/och/shuttle/weaknet/passenger/network/ServiceApi.java index cdfeaa4292..1fd9931968 100644 --- a/OCH/shuttle/passenger_weaknet/src/main/java/com/mogo/och/shuttle/weaknet/passenger/network/ServiceApi.java +++ b/OCH/shuttle/passenger_weaknet/src/main/java/com/mogo/och/shuttle/weaknet/passenger/network/ServiceApi.java @@ -26,5 +26,13 @@ public interface ServiceApi { */ @Headers({"Content-type:application/json;charset=UTF-8"}) @POST("/och-vehicle/api/scanner/device/writeOff") - Observable writeOffTicket(@Header ("appId") String appId, @Header("ticket") String ticket, @Body PassengerWriteOffRequest request); + Observable daliwriteOffTicket(@Header ("appId") String appId, @Header("ticket") String ticket, @Body PassengerWriteOffRequest request); + + /** + * 核销接口 + */ + @Headers({"Content-type:application/json;charset=UTF-8"}) + @POST("/och-vehicle/api/car/v2/device/writeOff") + Observable saaswriteOffTicket(@Header ("appId") String appId, @Header("ticket") String ticket, @Body PassengerWriteOffRequest request); + } diff --git a/settings.gradle b/settings.gradle index 9c5912d8a4..0b70ea32fd 100644 --- a/settings.gradle +++ b/settings.gradle @@ -59,7 +59,7 @@ include ':test:crashreport-apmbyte' //OCH 业务模块 //include ':OCH:bus:driver' -include ':OCH:bus:passenger' +//include ':OCH:bus:passenger' include ':OCH:taxi:driver' include ':OCH:taxi:passenger' @@ -79,7 +79,7 @@ include ':OCH:charter:driver' include ':OCH:charter:passenger' //include ':OCH:shuttle:driver' -include ':OCH:shuttle:passenger' +//include ':OCH:shuttle:passenger' include ':OCH:shuttle:driver_weaknet'