opt
This commit is contained in:
@@ -164,7 +164,7 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
}
|
||||
if ( mMarker != null ) {
|
||||
mMarker.setMarkerOptions( options );
|
||||
setObject( opt.getObject() );
|
||||
setObject( opt.getObject() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,4 +331,11 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
mMarker.setAnimation( animationScale );
|
||||
mMarker.startAnimation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setClickable( boolean clickable ) {
|
||||
if ( mMarker != null ) {
|
||||
mMarker.setClickable( clickable );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,4 +246,10 @@ public interface IMogoMarker {
|
||||
int duration,
|
||||
Interpolator interpolator );
|
||||
|
||||
/**
|
||||
* 是否是否可点击
|
||||
*
|
||||
* @param clickable
|
||||
*/
|
||||
void setClickable( boolean clickable );
|
||||
}
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
package com.mogo.map.marker;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.location.Location;
|
||||
import android.view.View;
|
||||
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.location.MogoLocation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Observable;
|
||||
|
||||
@@ -62,6 +66,30 @@ public class MogoMarkerOptions extends Observable {
|
||||
|
||||
private Object mObject;
|
||||
|
||||
public MogoMarkerOptions position( MogoLatLng latLng ){
|
||||
if ( latLng != null ) {
|
||||
latitude( latLng.lat );
|
||||
longitude( latLng.lon );
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public MogoMarkerOptions position( MogoLocation location ){
|
||||
if ( location != null ) {
|
||||
latitude( location.getLatitude() );
|
||||
longitude( location.getLongitude() );
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public MogoMarkerOptions position( Location location ){
|
||||
if ( location != null ) {
|
||||
latitude( location.getLatitude() );
|
||||
longitude( location.getLongitude() );
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public MogoMarkerOptions latitude( double latitude ) {
|
||||
this.latitude = latitude;
|
||||
return this;
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.module.service;
|
||||
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
@@ -9,10 +10,8 @@ import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.Process;
|
||||
import android.os.Trace;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -566,7 +565,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
mLastAutoRefreshLocation = point;
|
||||
notifyRefreshData( mLastAutoRefreshLocation, getQueryRadius(), mAutoRefreshCallback );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -754,12 +752,14 @@ public class MogoServices implements IMogoMapListener,
|
||||
try {
|
||||
JSONObject jsonObject = new JSONObject( data );
|
||||
String card = jsonObject.getString( "card" );
|
||||
if ( TextUtils.equals( "多媒体", card ) ) {
|
||||
if ( TextUtils.equals( "多媒体卡片", card ) ) {
|
||||
switchCard2( ServiceConst.CARD_TYPE_SHARE_MUSIC );
|
||||
} else if ( TextUtils.equals( "探路", card ) ) {
|
||||
} else if ( TextUtils.equals( "探路卡片", card ) ) {
|
||||
switchCard2( ServiceConst.CARD_TYPE_ROAD_CONDITION );
|
||||
} else if ( TextUtils.equals( "在线车辆", card ) ) {
|
||||
} else if ( TextUtils.equals( "在线车辆卡片", card ) ) {
|
||||
switchCard2( ServiceConst.CARD_TYPE_USER_DATA );
|
||||
} else if ( TextUtils.equals( "新鲜事卡片", card ) ) {
|
||||
switchCard2( ServiceConst.CARD_TYPE_NOVELTY );
|
||||
}
|
||||
} catch ( JSONException e ) {
|
||||
e.printStackTrace();
|
||||
@@ -795,7 +795,7 @@ public class MogoServices implements IMogoMapListener,
|
||||
* @param card
|
||||
*/
|
||||
private void switchCard2( String card ) {
|
||||
if ( isBackground( mContext ) ) {
|
||||
if ( isApplicationBroughtToBackground( mContext ) ) {
|
||||
mLauncher.backToLauncher( mContext );
|
||||
UiThreadHandler.postDelayed( () -> {
|
||||
if ( mStatusManager.isADASShow() ) {
|
||||
@@ -812,16 +812,13 @@ public class MogoServices implements IMogoMapListener,
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isBackground( Context context ) {
|
||||
ActivityManager activityManager = ( ActivityManager ) context.getSystemService( Context.ACTIVITY_SERVICE );
|
||||
List< ActivityManager.RunningAppProcessInfo > appProcesses = activityManager.getRunningAppProcesses();
|
||||
for ( ActivityManager.RunningAppProcessInfo appProcess : appProcesses ) {
|
||||
if ( appProcess.processName.equals( context.getPackageName() ) ) {
|
||||
if ( appProcess.importance == ActivityManager.RunningAppProcessInfo.IMPORTANCE_BACKGROUND ) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
private boolean isApplicationBroughtToBackground( final Context context ) {
|
||||
ActivityManager am = ( ActivityManager ) context.getSystemService( Context.ACTIVITY_SERVICE );
|
||||
List< ActivityManager.RunningTaskInfo > tasks = am.getRunningTasks( 1 );
|
||||
if ( !tasks.isEmpty() ) {
|
||||
ComponentName topActivity = tasks.get( 0 ).topActivity;
|
||||
if ( !topActivity.getPackageName().equals( context.getPackageName() ) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -128,7 +128,7 @@ public class ServiceConst {
|
||||
};
|
||||
|
||||
/**
|
||||
* 查看多媒体卡片、探路卡片
|
||||
* 查看多媒体卡片、探路卡片、在线车辆、首页、新鲜事
|
||||
*/
|
||||
public static final String COMMAND_SWITCH_CARD = "com.zhidao.desk.switchCard";
|
||||
|
||||
|
||||
@@ -26,9 +26,12 @@ public interface IMogoStatusManager extends IProvider {
|
||||
|
||||
/**
|
||||
* v2x UI 是否在展示
|
||||
* <p>
|
||||
* Deprecated, use {@link #isADASShow()} instead.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isV2XShow();
|
||||
|
||||
/**
|
||||
@@ -62,12 +65,14 @@ public interface IMogoStatusManager extends IProvider {
|
||||
|
||||
/**
|
||||
* APP 列表是否显示
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isAppListUIShow();
|
||||
|
||||
/**
|
||||
* 主页是否显示
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isMainPageOnResume();
|
||||
@@ -90,10 +95,14 @@ public interface IMogoStatusManager extends IProvider {
|
||||
|
||||
/**
|
||||
* 设置 V2X UI 状态
|
||||
* <p>
|
||||
* <p>
|
||||
* Deprecated, use {@link #setADASUIShow} instead.
|
||||
*
|
||||
* @param tag 业务类型
|
||||
* @param show true - 显示 false - 隐藏
|
||||
*/
|
||||
@Deprecated
|
||||
void setV2XUIShow( String tag, boolean show );
|
||||
|
||||
/**
|
||||
@@ -128,6 +137,7 @@ public interface IMogoStatusManager extends IProvider {
|
||||
|
||||
/**
|
||||
* app 列表是否显示
|
||||
*
|
||||
* @param tag
|
||||
* @param isShow
|
||||
*/
|
||||
@@ -135,10 +145,11 @@ public interface IMogoStatusManager extends IProvider {
|
||||
|
||||
/**
|
||||
* 主页 resume 状态
|
||||
*
|
||||
* @param tag
|
||||
* @param resume
|
||||
*/
|
||||
void setMainPageResumeStatus(String tag, boolean resume);
|
||||
void setMainPageResumeStatus( String tag, boolean resume );
|
||||
|
||||
/**
|
||||
* 注册监听
|
||||
|
||||
@@ -20,7 +20,10 @@ public enum StatusDescriptor {
|
||||
|
||||
/**
|
||||
* v2x UI
|
||||
* <p>
|
||||
* Deprecated, use {@link #ADAS_UI} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
V2X_UI,
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,11 +7,10 @@
|
||||
./gradlew :foudations:mogo-connection:clean :foudations:mogo-connection:uploadArchives
|
||||
./gradlew :libraries:map-amap:clean :libraries:map-amap:uploadArchives
|
||||
./gradlew :libraries:mogo-map:clean :libraries:mogo-map:uploadArchives
|
||||
./gradlew :modules:mogo-module-apps:clean :modules:mogo-module-apps:uploadArchives
|
||||
./gradlew :services:mogo-service:clean :services:mogo-service:uploadArchives
|
||||
./gradlew :modules:mogo-module-common:clean :modules:mogo-module-common:uploadArchives
|
||||
./gradlew :modules:mogo-module-map:clean :modules:mogo-module-map:uploadArchives
|
||||
|
||||
./gradlew :modules:mogo-module-apps:clean :modules:mogo-module-apps:uploadArchives
|
||||
./gradlew :modules:mogo-module-service:clean :modules:mogo-module-service:uploadArchives
|
||||
./gradlew :modules:mogo-module-share:clean :modules:mogo-module-share:uploadArchives
|
||||
./gradlew :modules:mogo-module-extensions:clean :modules:mogo-module-extensions:uploadArchives
|
||||
|
||||
Reference in New Issue
Block a user