Merge branch 'qa' into dev_custom_map
This commit is contained in:
@@ -39,7 +39,7 @@ MOGO_SERVICE_API_VERSION=1.2.1.9
|
||||
MOGO_CONNECTION_VERSION=1.2.1.9
|
||||
MOGO_MODULE_APPS_VERSION=1.2.1.9
|
||||
MOGO_MODULE_NAVI_VERSION=1.2.1.9
|
||||
MOGO_MODULE_SHARE_VERSION=1.2.1.9
|
||||
MOGO_MODULE_SHARE_VERSION=1.2.1.18
|
||||
MOGO_MODULE_COMMON_VERSION=1.2.1.9
|
||||
MOGO_MODULE_MAIN_VERSION=1.2.1.9
|
||||
MOGO_MODULE_MAP_VERSION=1.2.1.9
|
||||
@@ -60,11 +60,11 @@ MOGO_MODULE_MAIN_INDEPENDENT_VERSION = 1.2.1.9
|
||||
|
||||
## 工程外部模块
|
||||
# 探路
|
||||
MOGO_MODULE_TANLU_VERSION=1.2.1.5
|
||||
MOGO_MODULE_TANLU_VERSION=1.2.1.9
|
||||
# 车聊聊
|
||||
CARCHATTING_VERSION=1.1.9
|
||||
CARCHATTING_VERSION=1.2.0
|
||||
# 车聊聊接口
|
||||
CARCHATTINGPROVIDER_VERSION=1.1.9
|
||||
CARCHATTINGPROVIDER_VERSION=1.2.0
|
||||
# 视频引导
|
||||
MOGO_MODULE_GUIDESHOW_VERSION=1.0.2-SNAPSHOT
|
||||
# 视频引导接口
|
||||
@@ -72,13 +72,13 @@ MOGO_MODULE_GUIDESHOW_PROVIDER_VERSION=1.0.2-SNAPSHOT
|
||||
# 在线车辆F
|
||||
MOGO_MODULE_ONLINECAR_VERSION=1.0.3.2
|
||||
# v2x
|
||||
MOGO_MODULE_V2X_VERSION=1.1.36
|
||||
MOGO_MODULE_V2X_VERSION=1.1.49
|
||||
# 推送
|
||||
MOGO_MODULE_PUSH_VERSION=1.0.1
|
||||
# 广告资源位
|
||||
MOGO_MODULE_AD_CARD_VERSION=1.0.1
|
||||
# 探路上报和分享模块
|
||||
TANLULIB_VERSION=1.2.1.7
|
||||
TANLULIB_VERSION=1.2.1.9
|
||||
|
||||
|
||||
# Boost分包
|
||||
|
||||
@@ -6,7 +6,9 @@ import android.content.pm.PackageInfo;
|
||||
|
||||
import com.mogo.module.apps.model.AppEnum;
|
||||
import com.mogo.module.apps.model.AppEnumHelper;
|
||||
import com.mogo.module.common.utils.CarSeries;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -26,9 +28,16 @@ public class AppFilterImpl implements AppFilter {
|
||||
|
||||
public AppFilterImpl( Context context ) {
|
||||
mContext = context;
|
||||
final String[] values = context.getResources().getStringArray( R.array.module_apps_array_filter_packages );
|
||||
if ( values != null ) {
|
||||
mFilterPackages = Arrays.asList( values );
|
||||
if ( CarSeries.getSeries() != CarSeries.CAR_SERIES_F80X ) {
|
||||
final String[] values = context.getResources().getStringArray( R.array.module_apps_array_filter_packages );
|
||||
if ( values != null ) {
|
||||
mFilterPackages = new ArrayList( Arrays.asList( values ) );
|
||||
}
|
||||
} else {
|
||||
final String[] values = context.getResources().getStringArray( R.array.module_apps_array_filter_packages_f );
|
||||
if ( values != null ) {
|
||||
mFilterPackages = new ArrayList( Arrays.asList( values ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,6 +80,11 @@ public class AppsPresenter extends Presenter< AppsView > {
|
||||
|
||||
Logger.d( TAG, "apps: %s", appInfoList );
|
||||
final Map< Integer, List< AppInfo > > result = addOthersEntrances( appInfoList );
|
||||
try {
|
||||
filterSamePackage( result );
|
||||
} catch ( Exception e ) {
|
||||
Logger.e( TAG, e, "error." );
|
||||
}
|
||||
UiThreadHandler.post( () -> {
|
||||
if ( mView != null ) {
|
||||
mView.renderApps( result );
|
||||
@@ -143,7 +148,7 @@ public class AppsPresenter extends Presenter< AppsView > {
|
||||
}
|
||||
}
|
||||
}
|
||||
// growthCapacity( result );
|
||||
// growthCapacity( result )
|
||||
// // 添加介绍入口
|
||||
// result.get( result.size() - 1 ).add( new AppInfo( GuideShowLauncher.APP_INFO_NAME_GUIDE_SHOW, getContext().getPackageName(), null, 0, null, R.drawable.module_apps_ic_guide_show ) );
|
||||
if ( DebugConfig.isDebug() ) {
|
||||
@@ -154,6 +159,30 @@ public class AppsPresenter extends Presenter< AppsView > {
|
||||
return result;
|
||||
}
|
||||
|
||||
private void filterSamePackage( Map< Integer, List< AppInfo > > appInfoMap ) {
|
||||
if ( appInfoMap == null || appInfoMap.isEmpty() ) {
|
||||
return;
|
||||
}
|
||||
for ( Map.Entry< Integer, List< AppInfo > > integerListEntry : appInfoMap.entrySet() ) {
|
||||
if ( integerListEntry == null ) {
|
||||
continue;
|
||||
}
|
||||
List< AppInfo > oldList = integerListEntry.getValue();
|
||||
if ( oldList == null
|
||||
|| oldList.size() > AppsConst.TOTAL_SIZE_EACH_PAGE ) {
|
||||
return;
|
||||
}
|
||||
List< AppInfo > appInfos = new ArrayList<>();
|
||||
for ( AppInfo appInfo : oldList ) {
|
||||
if ( appInfos.contains( appInfo ) ) {
|
||||
continue;
|
||||
}
|
||||
appInfos.add( appInfo );
|
||||
}
|
||||
integerListEntry.setValue( appInfos );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 扩容
|
||||
*
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package com.mogo.module.apps.model;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -29,7 +32,7 @@ public class AppInfo {
|
||||
}
|
||||
|
||||
public AppInfo( String mName, String mPackageName, String mVersionName, int mVersionCode, Drawable mIcon, int mIconResId ) {
|
||||
this(mName, mPackageName, mVersionName, mVersionCode, mIcon, mIconResId, 0);
|
||||
this( mName, mPackageName, mVersionName, mVersionCode, mIcon, mIconResId, 0 );
|
||||
}
|
||||
|
||||
public int getIconResId() {
|
||||
@@ -60,6 +63,19 @@ public class AppInfo {
|
||||
return mTrackType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals( Object o ) {
|
||||
if ( this == o ) return true;
|
||||
if ( o == null || getClass() != o.getClass() ) return false;
|
||||
AppInfo appInfo = ( AppInfo ) o;
|
||||
return TextUtils.equals( mPackageName, appInfo.mPackageName );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash( mPackageName );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AppInfo{" +
|
||||
|
||||
@@ -56,6 +56,7 @@ public class AppsModel {
|
||||
if ( mPagedApps != null ) {
|
||||
mPagedApps.clear();
|
||||
}
|
||||
mPagedApps = null;
|
||||
mContext = null;
|
||||
mAppFilter = null;
|
||||
sInstance = null;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<string name="module_apps_str_no_app">APP 未安装</string>
|
||||
<string name="module_apps_str_no_guide_show">新手引导服务未加载</string>
|
||||
<string name="module_apps_str_guide_warning">为了您的安全,导航中不可播放视频</string>
|
||||
<string-array name="module_apps_array_filter_packages">
|
||||
<string-array name="module_apps_array_filter_packages_f">
|
||||
<item>com.mogo.launcher</item>
|
||||
<item>com.mogo.launcher.app</item>
|
||||
<item>com.zhidao.launcher</item>
|
||||
@@ -13,7 +13,23 @@
|
||||
<item>com.android.browser</item>
|
||||
<item>com.android.providers.downloads.ui</item>
|
||||
<item>com.zhidao.guide.lock</item>
|
||||
<item>com.android.calculator2</item>
|
||||
<item>com.nwd.guidebookskin</item>
|
||||
<item>com.iflytek.inputmethod.pad</item>
|
||||
<item>com.nwd.tools.reboot</item>
|
||||
<item>com.android.car.setting</item>
|
||||
</string-array>
|
||||
<string-array name="module_apps_array_filter_packages">
|
||||
<item>com.mogo.launcher</item>
|
||||
<item>com.mogo.launcher.app</item>
|
||||
<item>com.zhidao.launcher</item>
|
||||
<item>com.nwd.android.toolsmanager</item>
|
||||
<item>com.nwd.filemanager</item>
|
||||
<item>com.zhidao.autopilot</item>
|
||||
<item>com.android.browser</item>
|
||||
<item>com.android.settings</item>
|
||||
<item>com.android.providers.downloads.ui</item>
|
||||
<item>com.zhidao.guide.lock</item>
|
||||
<item>com.android.calculator2</item>
|
||||
<item>com.nwd.guidebookskin</item>
|
||||
<item>com.iflytek.inputmethod.pad</item>
|
||||
|
||||
@@ -22,7 +22,7 @@ public class MapCenterPointStrategy {
|
||||
|
||||
public static final MapCenterPoint DEFAULT = new MapCenterPoint( 0.677734D, 0.5733333D );
|
||||
|
||||
static {
|
||||
public static void init() {
|
||||
// 普通场景,使用高德内部值
|
||||
{
|
||||
Map< Integer, MapCenterPoint > common = new HashMap<>();
|
||||
|
||||
@@ -135,16 +135,18 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
|
||||
EventDispatchCenter.getInstance().setMapLoadedCallback( () -> {
|
||||
Logger.d( TAG, "map loaded." + Thread.currentThread().getName() );
|
||||
|
||||
// 右移地图中心点
|
||||
mMogoMapUIController = mMogoMapService.getMapUIController();
|
||||
MapCenterPointStrategy.init();
|
||||
MapCenterPointStrategy.setMapCenterPointByScene( mMogoMapUIController, Scene.AIMLESS );
|
||||
|
||||
// 加载地图,触发地图加载完毕回调,在初始化其他卡片模块,保证卡片模块可以正确获取地图相关服务。
|
||||
addModule();
|
||||
loadContainerModules();
|
||||
MogoModulesManager.getInstance().loadModules();
|
||||
mPresenter.delayOperations();
|
||||
|
||||
// 右移地图中心点
|
||||
mMogoMapUIController = mMogoMapService.getMapUIController();
|
||||
MapCenterPointStrategy.setMapCenterPointByScene( mMogoMapUIController, Scene.AIMLESS );
|
||||
|
||||
// 启动一些基本的服务:定位等
|
||||
startBaseService();
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ object AddressManager {
|
||||
fun init(context: Context) {
|
||||
|
||||
poiDao = AppDataBase.getDatabase(context).poiDao()
|
||||
WorkThreadHandler.getInstance().post {
|
||||
WorkThreadHandler.getInstance().postDelayed({
|
||||
try {
|
||||
var zdCompany = SearchApisHolder.getPersonalInfoManager().company
|
||||
companyAddress = EntityConvertUtils.zd2Mogo(zdCompany, DataConstants.TYPE_COMPANY_ADDRESS)
|
||||
@@ -53,7 +53,7 @@ object AddressManager {
|
||||
} catch (e: Exception) {
|
||||
Logger.d(TAG, Log.getStackTraceString(e))
|
||||
}
|
||||
}
|
||||
}, 1000)
|
||||
|
||||
SearchApisHolder.getPersonalInfoManager().addListener(object : PersonalInfoManager.InfoListener {
|
||||
override fun onCompanyChanged(company: ZDPoi?) {
|
||||
|
||||
@@ -703,6 +703,11 @@ public class MogoServices implements IMogoMapListener,
|
||||
CarIconDisplayStrategy.getInstance().changeCarIconStatus( isTrue );
|
||||
notifySeekHelpingStatusChanged( isTrue );
|
||||
break;
|
||||
case ACC_STATUS:
|
||||
if ( isTrue ) {
|
||||
mADASController.showADAS();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="@dimen/module_service_marker_bubble_icon_width"
|
||||
android:layout_height="@dimen/module_service_marker_bubble_icon_height"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="@dimen/module_service_marker_bubble_icon_marginBottom"
|
||||
tools:src="@drawable/icon_map_marker_road_block_up" />
|
||||
tools:src="@drawable/icon_map_marker_road_block_up2" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="@dimen/module_service_marker_bubble_icon_width"
|
||||
android:layout_height="@dimen/module_service_marker_bubble_icon_height"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:visibility="invisible"
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<dimen name="module_service_marker_dot_marginTop">8dp</dimen>
|
||||
<dimen name="module_service_marker_bubble_width">100px</dimen>
|
||||
<dimen name="module_service_marker_bubble_height">117px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_width">50px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_height">50px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_width">60px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_height">60px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_marginBottom">8px</dimen>
|
||||
|
||||
<!-- 导航查看全程显示范围-->
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<dimen name="module_service_marker_dot_marginTop">4dp</dimen>
|
||||
<dimen name="module_service_marker_bubble_width">56px</dimen>
|
||||
<dimen name="module_service_marker_bubble_height">65px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_width">27px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_height">27px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_width">35px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_height">35px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_marginBottom">4px</dimen>
|
||||
|
||||
<dimen name="module_service_marker_bounds_leftMargin">550px</dimen>
|
||||
|
||||
@@ -295,7 +295,7 @@ public class ShareControl implements IMogoShareManager, IMogoIntentListener, IMo
|
||||
private void trackVoiceWithType(String type){
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("type",type);
|
||||
properties.put("from","2");
|
||||
properties.put("from","1");
|
||||
AnalyticsUtils.track("v2x_share_type",properties);
|
||||
}
|
||||
|
||||
|
||||
@@ -144,6 +144,7 @@ public class LaucherShareDialog extends BaseFloatDialog implements View.OnClickL
|
||||
// 事故
|
||||
Logger.d(TAG,"点击事故");
|
||||
sendShareReceiver(ShareConstants.TYPE_ACCIDENT);
|
||||
trackWithType(ShareConstants.TYPE_ACCIDENT);
|
||||
dismiss();
|
||||
} else if (id == R.id.tvConstruction) {
|
||||
// 道路施工
|
||||
@@ -155,6 +156,7 @@ public class LaucherShareDialog extends BaseFloatDialog implements View.OnClickL
|
||||
// 实时路况
|
||||
Logger.d(TAG,"点击实时路况");
|
||||
sendShareReceiver(ShareConstants.TYPE_REAL_TIME_TRAFFIC);
|
||||
trackWithType(ShareConstants.TYPE_REAL_TIME_TRAFFIC);
|
||||
dismiss();
|
||||
} else if (id == R.id.tvStagnantWater) {
|
||||
// 道路积水
|
||||
|
||||
Reference in New Issue
Block a user