This commit is contained in:
zhongchao
2021-05-27 21:16:48 +08:00
16 changed files with 124 additions and 62 deletions

View File

@@ -3,6 +3,7 @@
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />

View File

@@ -5,11 +5,11 @@ project.dependencies {
implementation rootProject.ext.dependencies.crashreport
implementation rootProject.ext.dependencies.crashreportupgrade
debugImplementation rootProject.ext.dependencies.crashreportbugly
releaseImplementation rootProject.ext.dependencies.crashreportnoop
releaseImplementation rootProject.ext.dependencies.crashreportbugly
} else {
implementation project(':test:crashreport')
implementation project(':test:crashreport-upgrade')
debugImplementation project(':test:crashreport-bugly')
releaseImplementation project(':test:crashreport-noop')
implementation project(':test:crashreport-bugly')
releaseImplementation project(':test:crashreport-bugly')
}
}

View File

@@ -12,8 +12,8 @@ ext {
commonIndependentAmapApiValue : "1c3fbc5f5e183619ffb1e7bc01e6751f",
compileSdkVersion : 28,
buildToolsVersion : "29.0.2",
minSdkVersion : 19,
targetSdkVersion : 22,
minSdkVersion : 22,
targetSdkVersion : 23,
]
dependencies = [
// androidx

View File

@@ -91,8 +91,12 @@ class MainService : Service() {
CosUploadManagerImpl.getInstance(AbsMogoApplication.getApp().applicationContext)
.init(BuildConfig.APPLICATION_ID, 0)
serviceApis = ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(this) as IMogoServiceApis
speed = serviceApis.mapServiceApi.getSingletonLocationClient(this).lastKnowLocation.speed
Log.d(TAG, "onStartCommand speed = $speed")
if (serviceApis.mapServiceApi.getSingletonLocationClient(this) != null &&
serviceApis.mapServiceApi.getSingletonLocationClient(this).lastKnowLocation != null) {
speed = serviceApis.mapServiceApi.getSingletonLocationClient(this).lastKnowLocation.speed
Log.d(TAG, "onStartCommand speed = $speed")
}
if (intent != null) {
params = intent.getParcelableExtra("params")
params?.let {

View File

@@ -1,6 +1,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zhidao.mogo.module.main.launcher">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<application>
<activity
android:name=".MainLauncherActivity"

View File

@@ -1,15 +1,24 @@
package com.zhidao.mogo.module.main.launcher;
import android.Manifest;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Process;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.commons.debug.DebugConfig;
@@ -29,6 +38,7 @@ import static com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum.ALERT_T
import static com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_CRASH_WARNING_LEFT;
import static com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_CRASH_WARNING_RIGHT;
import static com.mogo.module.common.entity.V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_CRASH_WARNING_TOP;
import static com.mogo.utils.ProcessUtils.getPackageName;
/**
* 针对作为Launcher的情况做个性化操作
@@ -248,4 +258,5 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
mApps.setVisibility(View.VISIBLE);
}
}
}

View File

@@ -18,6 +18,7 @@ import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.TextView;
@@ -184,6 +185,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
//远景和中景的切换
private ImageView mSwitchMapModeImage;
private FrameLayout mSwitchMapModeLayout;
private TextView mSwitchText;
/**
* 搜索莫模块
@@ -376,9 +378,9 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
mSwitchMapModeLayout = (FrameLayout) findViewById(R.id.module_switch_model_layout);
mSwitchMapModeImage = (ImageView) findViewById(R.id.module_switch_model_icon);
mSwitchMapModeImage.setOnClickListener(clickListener);
mSwitchMapModeLayout.setOnClickListener(clickListener);
mSwitchText = (TextView) findViewById(R.id.module_switch_model_text);
//TODO
if (DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_LENOVO ) {
enterVrMode();
}
@@ -724,7 +726,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
// 进入vr模式不可缩放地图
if (DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_LENOVO ) {
UiThreadHandler.postDelayed(this::stepIntoVrMode, 3_000L );
UiThreadHandler.postDelayed(this::stepIntoVrMode, 3_500L );
}
mClickShareVoiceStrings =
@@ -1367,7 +1369,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
// show panel
debugPanelGroup.setVisibility(View.VISIBLE);
}
} else if (v.getId() == R.id.module_switch_model_icon) { //切换地图的远近视图
} else if (v.getId() == R.id.module_switch_model_layout) { //切换地图的远近视图
if (MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().getCurrentMapVisualAngle().isLongSight()) {
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager(AbsMogoApplication.getApp()).visibleAllMarkers();
MogoApisHandler.getInstance().getApis().getMapServiceApi()

View File

@@ -2,7 +2,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="26px" />
<corners android:radius="60px" />
<solid android:color="@color/module_switch_map_bg" />

View File

@@ -45,26 +45,45 @@
</FrameLayout>
<!--切换地图远近事件-->
<!--切换地图远近事件 @dimen/module_switch_map -->
<FrameLayout
android:id="@+id/module_switch_model_layout"
android:layout_width="@dimen/module_switch_map"
android:layout_height="@dimen/module_switch_map"
android:layout_height="@dimen/module_switch_map_height"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginBottom="26px"
android:background="@drawable/module_switch_map_bg"
android:elevation="@dimen/dp_10"
android:padding="@dimen/dp_20"
android:visibility="gone"
android:background="@drawable/module_switch_map_bg"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent">
<ImageView
android:id="@+id/module_switch_model_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/module_switch_map_angle" />
<LinearLayout
android:id="@+id/module_switch_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/module_switch_model_icon"
android:layout_width="@dimen/module_switch_image"
android:layout_height="@dimen/module_switch_image"
android:paddingLeft="@dimen/module_switch_margin_left"
android:layout_gravity="left|center_vertical"
android:src="@drawable/module_switch_map_angle" />
<TextView
android:id="@+id/module_switch_model_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/module_switch_margin_left"
android:textSize="@dimen/module_switch_text_size"
android:gravity="right|center"
android:text="@string/module_map_model_normal"
android:textColor="@color/module_ext_color_voice_text" />
</LinearLayout>
</FrameLayout>
<androidx.constraintlayout.widget.ConstraintLayout

View File

@@ -163,6 +163,5 @@
<dimen name="module_event_live_error_text_size">36px</dimen>
<dimen name="module_video_window_height_content">393px</dimen>
<dimen name="module_video_window_width_content">700px</dimen>
<dimen name="module_switch_map">108px</dimen>
</resources>

View File

@@ -8,5 +8,9 @@
<dimen name="module_ext_arcView_stroke_with">15px</dimen>
<dimen name="module_ext_arcView_center_text_size">110px</dimen>
<dimen name="module_ext_arcView_des_text_size">40px</dimen>
<dimen name="module_switch_map">145px</dimen>
<dimen name="module_switch_map">279px</dimen>
<dimen name="module_switch_map_height">119px</dimen>
<dimen name="module_switch_margin_left">22px</dimen>
<dimen name="module_switch_text_size">36px</dimen>
<dimen name="module_switch_image">50px</dimen>
</resources>

View File

@@ -14,5 +14,5 @@
<color name="arc_speeding">#DB3137</color>
<color name="arc_speed">#3E77F6</color>
<color name="module_switch_map_bg">#3B4577</color>
<color name="module_switch_map_bg">#323C6F</color>
</resources>

View File

@@ -243,6 +243,9 @@
<dimen name="module_ext_navi_in_vr_traffic_light_no_time_margin_top">11px</dimen>
<dimen name="module_video_window_width_content">400px</dimen>
<dimen name="module_video_window_height_content">300px</dimen>
<dimen name="module_switch_map">108px</dimen>
<dimen name="module_switch_map">279px</dimen>
<dimen name="module_switch_map_height">119px</dimen>
<dimen name="module_switch_margin_left">23px</dimen>
<dimen name="module_switch_text_size">35px</dimen>
<dimen name="module_switch_image">50px</dimen>
</resources>

View File

@@ -69,4 +69,7 @@
<item>提前看看出行路况,试试唤醒小智说,“中关村路况怎么样”</item>
</string-array>
<string name="module_map_model_normal">默认视角</string>
<string name="module_map_model_faster">远距视角</string>
</resources>

View File

@@ -245,8 +245,11 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
R.dimen.module_v2x_event_panel_btn_x
})
val y = resources.getDimensionPixelSize(R.dimen.module_v2x_event_panel_btn_y)
V2XServiceManager.getMogoEntranceButtonController()
.addBottomLayerView(mV2XEventPanelHistoryCountView, x, y)
if (V2XServiceManager.getMogoEntranceButtonController() != null) {
V2XServiceManager.getMogoEntranceButtonController()
.addBottomLayerView(mV2XEventPanelHistoryCountView, x, y)
}
mV2XEventPanelHistoryCountView?.visibility = if (MogoApisHandler.getInstance().apis.statusManagerApi.isVrMode) {
View.GONE
}else{

View File

@@ -1,44 +1,52 @@
{
"current_lane_id": "1903",
"current_lane_id": "010",
"current_lane_num": -2,
"most_lane_num": -3,
"most_speed": 8.0,
"road_id": "400139",
"sn": "F803EB2046PZD00149",
"locus_list": [
{
"lat": 39.974323417486,
"lon": 116.411520335961
},
{
"lat": 39.974407914698,
"lon": 116.411515520661
},
{
"lat": 39.974658553869,
"lon": 116.411505432781
},
{
"lat": 39.974881303401,
"lon": 116.411499467848
}
],
"gd_locus_list": [
{
"lat": 39.975728,
"lon": 116.41777
"lat": 39.976285,
"lon": 116.417649
},
{
"lat": 39.975813,
"lon": 116.417765
"lat": 39.976341,
"lon": 116.417642
},
{
"lat": 39.976064,
"lon": 116.417755
"lat": 39.97637,
"lon": 116.417639
},
{
"lat": 39.976286,
"lon": 116.417749
"lat": 39.976397,
"lon": 116.417638
},
{
"lat": 39.976428,
"lon": 116.417637
}
]
],
"locus_list": [
{
"lat": 39.974879535063,
"lon": 116.411399349271
},
{
"lat": 39.974936309753,
"lon": 116.411392282881
},
{
"lat": 39.974965397592,
"lon": 116.411389554398
},
{
"lat": 39.974992457492,
"lon": 116.411388118996
},
{
"lat": 39.975023263289,
"lon": 116.41138715302
}
],
"most_lane_num": -1,
"most_speed": 9.0,
"road_id": "400140",
"sn": "F803EB2046PZD00207"
}