opt
This commit is contained in:
@@ -787,13 +787,9 @@ public class MogoServices implements IMogoMapListener,
|
||||
mStatusManager.setVoiceUIShow( TAG, true );
|
||||
}
|
||||
} else if ( ServiceConst.COMMAND_NEXT.equals( command ) ) {
|
||||
if ( mStatusManager.isMainPageOnResume() ) {
|
||||
mActionManager.invoke( MapMarkerManager.getInstance().getCurrentModuleName(), MogoAction.Next );
|
||||
}
|
||||
onActionDown( MogoAction.Next );
|
||||
} else if ( ServiceConst.COMMAND_PREVIOUS.equals( command ) ) {
|
||||
if ( mStatusManager.isMainPageOnResume() ) {
|
||||
mActionManager.invoke( MapMarkerManager.getInstance().getCurrentModuleName(), MogoAction.Prev );
|
||||
}
|
||||
onActionDown( MogoAction.Prev );
|
||||
} else if ( ServiceConst.COMMAND_SWITCH_CARD.equals( command ) ) {
|
||||
IntentHandlerFactory.getInstance().handle( mContext, command, intent );
|
||||
} else if ( MogoReceiver.ACTION_ADAS_STATUS.equals( command ) ) {
|
||||
@@ -884,9 +880,9 @@ public class MogoServices implements IMogoMapListener,
|
||||
@Override
|
||||
public void onCmdSelected( String cmd ) {
|
||||
if ( TextUtils.equals( ServiceConst.CMD_UN_WAKE_PREV, cmd ) ) {
|
||||
mActionManager.invoke( MapMarkerManager.getInstance().getCurrentModuleName(), MogoAction.Prev );
|
||||
onActionDown( MogoAction.Prev );
|
||||
} else if ( TextUtils.equals( ServiceConst.CMD_UN_WAKE_NEXT, cmd ) ) {
|
||||
mActionManager.invoke( MapMarkerManager.getInstance().getCurrentModuleName(), MogoAction.Next );
|
||||
onActionDown( MogoAction.Next );
|
||||
} else if ( TextUtils.equals( ServiceConst.CMD_UN_WAKEUP_MY_LOCATION, cmd ) ) {
|
||||
if ( mStatusManager.isMainPageOnResume() ) {
|
||||
mUiController.recoverLockMode();
|
||||
@@ -896,6 +892,19 @@ public class MogoServices implements IMogoMapListener,
|
||||
}
|
||||
}
|
||||
|
||||
private void onActionDown(MogoAction action){
|
||||
if ( !mStatusManager.isMainPageOnResume() ) {
|
||||
return;
|
||||
}
|
||||
if ( mStatusManager.isADASShow() ) {
|
||||
// 分发到V2X
|
||||
mActionManager.invoke( "V2X_UI", action );
|
||||
} else {
|
||||
String biz = MapMarkerManager.getInstance().getCurrentModuleName();
|
||||
mActionManager.invoke( biz, action );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCmdAction( String speakText ) {
|
||||
|
||||
|
||||
@@ -144,16 +144,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
if (!result) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 数据统计代码
|
||||
final Map<String, Object> properties = new HashMap<>();
|
||||
properties.put( "poitype", mLastCheckMarker.getOwner() );
|
||||
MarkerShowEntity showEntity = (MarkerShowEntity) mLastCheckMarker.getObject();
|
||||
Object bindObj = showEntity.getBindObj();
|
||||
if (bindObj instanceof MarkerNoveltyInfo) {
|
||||
properties.put( "contenttype", ((MarkerNoveltyInfo) bindObj).getPoiType() );
|
||||
}
|
||||
MarkerServiceHandler.getMogoAnalytics().track("Launcher_Icon_Click", properties);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -609,11 +599,10 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
fillPoiTypeTrackBody(array, ModuleNames.CARD_TYPE_USER_DATA, size);
|
||||
size = exploreWayList == null ? 0 : exploreWayList.size();
|
||||
fillPoiTypeTrackBody(array, ModuleNames.CARD_TYPE_ROAD_CONDITION, size);
|
||||
size = shareMusicList == null ? 0 : shareMusicList.size();
|
||||
fillPoiTypeTrackBody(array, ModuleNames.CARD_TYPE_SHARE_MUSIC, size);
|
||||
|
||||
size = noveltyInfoList == null ? 0 : noveltyInfoList.size();
|
||||
JSONObject novelty = fillPoiTypeTrackBody(array, ModuleNames.CARD_TYPE_NOVELTY, size);
|
||||
if (noveltyInfoList != null) {
|
||||
JSONObject novelty = fillPoiTypeTrackBody(array, ModuleNames.CARD_TYPE_NOVELTY, size);
|
||||
Map<String, Integer> counter = new HashMap<>( );
|
||||
for (MarkerNoveltyInfo markerNoveltyInfo : noveltyInfoList) {
|
||||
if (markerNoveltyInfo == null) {
|
||||
@@ -641,6 +630,36 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
}
|
||||
}
|
||||
|
||||
size = shareMusicList == null ? 0 : shareMusicList.size();
|
||||
JSONObject shareMusic = fillPoiTypeTrackBody(array, ModuleNames.CARD_TYPE_SHARE_MUSIC, size);
|
||||
if (shareMusicList != null) {
|
||||
Map<String, Integer> counter = new HashMap<>( );
|
||||
for (MarkerShareMusic markerShareMusic : shareMusicList) {
|
||||
if (markerShareMusic == null) {
|
||||
continue;
|
||||
}
|
||||
String childType = markerShareMusic.getShareType()+"";
|
||||
if ( !counter.containsKey( childType ) ) {
|
||||
counter.put( childType, 0 );
|
||||
}
|
||||
int s = counter.get( childType ).intValue();
|
||||
counter.put( childType, s+1 );
|
||||
}
|
||||
if ( !counter.isEmpty() ) {
|
||||
JSONArray shareMusicJsonArray = new JSONArray();
|
||||
for ( Map.Entry< String, Integer > entry : counter.entrySet() ) {
|
||||
fillPoiChildTypeTrackBody(shareMusicJsonArray, entry.getKey(), entry.getValue());
|
||||
}
|
||||
if ( shareMusicJsonArray.length() > 0 ) {
|
||||
try {
|
||||
shareMusic.put( "content", shareMusicJsonArray );
|
||||
} catch ( JSONException e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
if (array.length() == 0) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user