rc
This commit is contained in:
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -4,7 +4,7 @@
|
||||
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
|
||||
<groovy codeStyle="LEGACY" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -73,7 +73,7 @@ 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.47
|
||||
# 推送
|
||||
MOGO_MODULE_PUSH_VERSION=1.0.1
|
||||
# 广告资源位
|
||||
|
||||
@@ -6,6 +6,7 @@ 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.Arrays;
|
||||
import java.util.HashMap;
|
||||
@@ -29,6 +30,9 @@ public class AppFilterImpl implements AppFilter {
|
||||
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 ) {
|
||||
mFilterPackages.add( "com.android.settings" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
<item>com.android.browser</item>
|
||||
<item>com.android.providers.downloads.ui</item>
|
||||
<item>com.zhidao.guide.lock</item>
|
||||
<item>com.android.settings</item>
|
||||
<item>com.android.calculator2</item>
|
||||
<item>com.nwd.guidebookskin</item>
|
||||
<item>com.iflytek.inputmethod.pad</item>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -315,7 +315,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