1. 优化返回桌面控件实现
2. 优化天气控件位置 3. 将模块基本接口的过期方法加上默认实现
This commit is contained in:
@@ -266,7 +266,6 @@ dependencies {
|
||||
exclude group: 'com.mogo.module', module: 'module-share'
|
||||
}
|
||||
implementation rootProject.ext.dependencies.moduletanluapi
|
||||
|
||||
implementation rootProject.ext.dependencies.mogomonitor
|
||||
implementation rootProject.ext.dependencies.mogomodulewidgets
|
||||
} else {
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
package com.mogo.module.back;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-02-26
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class Back2LauncherFragment extends Fragment {
|
||||
|
||||
private static final String TAG = "Back2LauncherFragment";
|
||||
|
||||
@Override
|
||||
public void onCreate( @Nullable Bundle savedInstanceState ) {
|
||||
super.onCreate( savedInstanceState );
|
||||
BackToMainHomeManager.addMainHomeView();
|
||||
Logger.d( TAG, "addMainHomeView" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
BackToMainHomeManager.removeMainHomeView();
|
||||
Logger.d( TAG, "removeMainHomeView" );
|
||||
}
|
||||
}
|
||||
@@ -49,46 +49,11 @@ public class BackToLauncherModuleProvider implements IMogoModuleProvider {
|
||||
return BackToLauncherConst.MODULE_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoModuleLifecycle getCardLifecycle() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoMapListener getMapListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return ModuleType.TYPE_SERVICE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoNaviListener getNaviListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoLocationListener getLocationListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoMarkerClickListener getMarkerClickListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAppPackage() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAppName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init( Context context ) {
|
||||
if ( CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X ) {
|
||||
|
||||
@@ -1,28 +1,20 @@
|
||||
package com.mogo.module.back;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.os.Build;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.module.back.utils.WindowManagerViewHelper;
|
||||
import com.mogo.module.common.wm.WindowManagerView;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.fragmentmanager.IMogoFragmentManager;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.utils.AppUtils;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
public class BackToMainHomeManager {
|
||||
|
||||
private static final String TAG = "BackToMainHomeManager";
|
||||
|
||||
private static View mBackView;
|
||||
|
||||
private static IMogoFragmentManager mFragmentManager;
|
||||
private static IMogoStatusManager mStatusManager;
|
||||
private static IMogoServiceApis mApis;
|
||||
@@ -45,7 +37,7 @@ public class BackToMainHomeManager {
|
||||
return;
|
||||
}
|
||||
|
||||
Intent intent2 = new Intent( );
|
||||
Intent intent2 = new Intent();
|
||||
// 是否发自系统消息
|
||||
intent2.putExtra( "isHomeKeyDown", false );
|
||||
mApis.getIntentManagerApi().invoke( Intent.ACTION_CLOSE_SYSTEM_DIALOGS, intent2 );
|
||||
@@ -58,40 +50,34 @@ public class BackToMainHomeManager {
|
||||
AbsMogoApplication.getApp().startActivity( intent );
|
||||
}
|
||||
|
||||
private static WindowManagerView mWindowManagerView;
|
||||
|
||||
public static void addMainHomeView() {
|
||||
Logger.d( "BackToMainHomeManager", "addMainHomeView" );
|
||||
if ( mBackView != null ) WindowManagerViewHelper.removeView( mBackView );
|
||||
mBackView = LayoutInflater.from( AbsMogoApplication.getApp() ).inflate( R.layout.mogo_module_back_home_back_layout, null );
|
||||
final Context context = mBackView.getContext();
|
||||
if ( context == null || context.getApplicationContext() == null ) {
|
||||
return;
|
||||
|
||||
if ( mWindowManagerView == null ) {
|
||||
mWindowManagerView = new WindowManagerView.Builder( AbsMogoApplication.getApp() )
|
||||
.contentView( R.layout.mogo_module_back_home_back_layout )
|
||||
.position( AbsMogoApplication.getApp().getResources().getDimensionPixelOffset( R.dimen.module_back_main_home_icon_left ),
|
||||
AbsMogoApplication.getApp().getResources().getDimensionPixelOffset( R.dimen.module_back_main_home_icon_top ) )
|
||||
.size( WindowManager.LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.WRAP_CONTENT )
|
||||
.gravity( Gravity.LEFT | Gravity.TOP )
|
||||
.showInWindowManager();
|
||||
mWindowManagerView.attachTouchEvent( view -> {
|
||||
backToLauncher();
|
||||
} );
|
||||
}
|
||||
WindowManager windowManager = ( WindowManager ) context.getApplicationContext().getSystemService( Context.WINDOW_SERVICE );
|
||||
if ( windowManager == null ) {
|
||||
return;
|
||||
try {
|
||||
mWindowManagerView.show();
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
mBackView.setOnClickListener( view -> {
|
||||
backToLauncher();
|
||||
} );
|
||||
WindowManager.LayoutParams params = new WindowManager.LayoutParams();
|
||||
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
params.width = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
params.x = AbsMogoApplication.getApp().getResources().getDimensionPixelOffset( R.dimen.module_back_main_home_icon_left );
|
||||
params.y = AbsMogoApplication.getApp().getResources().getDimensionPixelOffset( R.dimen.module_back_main_home_icon_top );
|
||||
params.gravity = Gravity.LEFT | Gravity.CENTER;
|
||||
if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.O ) {
|
||||
params.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
|
||||
} else {
|
||||
params.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
|
||||
}
|
||||
params.format = PixelFormat.RGBA_8888;
|
||||
params.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
|
||||
windowManager.addView( mBackView, params );
|
||||
WindowManagerViewHelper.attachMovementEvent( mBackView, params );
|
||||
}
|
||||
|
||||
public static void removeMainHomeView() {
|
||||
WindowManagerViewHelper.removeView( mBackView );
|
||||
if ( mWindowManagerView != null ) {
|
||||
mWindowManagerView.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.mogo.module.back.utils;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
|
||||
public class Utils {
|
||||
public static boolean isActivityExits( String packageName, String classStr ) {
|
||||
Intent intent = new Intent();
|
||||
intent.setClassName( packageName, classStr );
|
||||
ResolveInfo resolveInfo = AbsMogoApplication.getApp().getPackageManager().resolveActivity( intent, PackageManager.MATCH_DEFAULT_ONLY );
|
||||
if ( resolveInfo != null ) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,213 +0,0 @@
|
||||
package com.mogo.module.back.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.os.Build;
|
||||
import android.view.Gravity;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-04-30
|
||||
* <p>
|
||||
* 向 window manager 添加 view
|
||||
*/
|
||||
public class WindowManagerViewHelper {
|
||||
|
||||
public static void addView( View view ) {
|
||||
|
||||
final Context context = view.getContext();
|
||||
if ( context == null || context.getApplicationContext() == null ) {
|
||||
return;
|
||||
}
|
||||
WindowManager windowManager = ( WindowManager ) context.getApplicationContext().getSystemService( Context.WINDOW_SERVICE );
|
||||
if ( windowManager == null ) {
|
||||
return;
|
||||
}
|
||||
WindowManager.LayoutParams params = new WindowManager.LayoutParams();
|
||||
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
params.width = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
params.gravity = Gravity.LEFT | Gravity.CENTER;
|
||||
params.type = getFitWindowParamsType();
|
||||
params.format = PixelFormat.RGBA_8888;
|
||||
params.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
|
||||
windowManager.addView( view, params );
|
||||
|
||||
attachMovementEvent( view, params );
|
||||
}
|
||||
|
||||
private static int getFitWindowParamsType() {
|
||||
int type;
|
||||
if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1 ) {
|
||||
// Need request permission.
|
||||
type = WindowManager.LayoutParams.TYPE_PHONE;
|
||||
} else if ( Build.MODEL.equalsIgnoreCase( "MI 5" ) ) {
|
||||
// MI 5 phone not display crawler dot in android 7.0
|
||||
type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
|
||||
} else {
|
||||
// It's will be dismissed automatically 3s after showing in Android 25.
|
||||
type = WindowManager.LayoutParams.TYPE_TOAST;
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
public static void removeView( View view ) {
|
||||
if ( view == null || view.getContext() == null || view.getContext().getApplicationContext() == null ) {
|
||||
return;
|
||||
}
|
||||
WindowManager windowManager = ( WindowManager ) view.getContext().getApplicationContext().getSystemService( Context.WINDOW_SERVICE );
|
||||
if ( windowManager == null ) {
|
||||
return;
|
||||
}
|
||||
windowManager.removeViewImmediate( view );
|
||||
DispatchTouchEventWrapper.getInstance().release();
|
||||
|
||||
}
|
||||
|
||||
public static void attachMovementEvent( View view, WindowManager.LayoutParams params ) {
|
||||
if ( view == null ) {
|
||||
return;
|
||||
}
|
||||
view.setOnTouchListener( ( v, event ) -> {
|
||||
DispatchTouchEventWrapper.getInstance()
|
||||
.attach( view, params )
|
||||
.handle( event );
|
||||
return false;
|
||||
} );
|
||||
}
|
||||
|
||||
static class DispatchTouchEventWrapper {
|
||||
|
||||
private WindowViewHandler mWindowViewHandler;
|
||||
|
||||
int mActionDownX = -1;
|
||||
int mActionDownY = -1;
|
||||
|
||||
/**
|
||||
* Flag whether move after touch down.
|
||||
*/
|
||||
boolean mMoveFlag = false;
|
||||
|
||||
private static volatile DispatchTouchEventWrapper INST;
|
||||
|
||||
private DispatchTouchEventWrapper() {
|
||||
}
|
||||
|
||||
public static DispatchTouchEventWrapper getInstance() {
|
||||
if ( INST == null ) {
|
||||
synchronized ( DispatchTouchEventWrapper.class ) {
|
||||
if ( INST == null ) {
|
||||
INST = new DispatchTouchEventWrapper();
|
||||
}
|
||||
}
|
||||
}
|
||||
return INST;
|
||||
}
|
||||
|
||||
public DispatchTouchEventWrapper attach( View windowView, WindowManager.LayoutParams params ) {
|
||||
if ( mWindowViewHandler == null || mWindowViewHandler.getWindowView() != windowView ) {
|
||||
mWindowViewHandler = new WindowViewHandler.DefaultHandler( windowView, params );
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean handle( MotionEvent event ) {
|
||||
switch ( event.getAction() & MotionEvent.ACTION_MASK ) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
if ( onActionDown( event ) ) {
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
if ( onActionMove( event ) ) {
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case MotionEvent.ACTION_UP:
|
||||
if ( onActionUp( event ) ) {
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean onActionDown( MotionEvent event ) {
|
||||
mActionDownX = ( ( int ) event.getRawX() );
|
||||
mActionDownY = ( ( int ) event.getRawY() );
|
||||
if ( mWindowViewHandler != null ) {
|
||||
mWindowViewHandler.recordNewPosition();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean onActionMove( MotionEvent event ) {
|
||||
|
||||
if ( Math.abs( event.getRawX() - mActionDownX ) >= 20
|
||||
|| Math.abs( event.getRawY() - mActionDownY ) >= 20 ) {
|
||||
mMoveFlag = true;
|
||||
}
|
||||
|
||||
if ( isLastDownValueLegal() ) {
|
||||
moveWindowView( event );
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean onActionUp( MotionEvent event ) {
|
||||
if ( isClickEventLike() ) {
|
||||
if ( mWindowViewHandler != null ) {
|
||||
mWindowViewHandler.performClickLike();
|
||||
}
|
||||
} else {
|
||||
if ( mWindowViewHandler != null ) {
|
||||
mWindowViewHandler.moveToEdge();
|
||||
mWindowViewHandler.recordNewPosition();
|
||||
}
|
||||
}
|
||||
mMoveFlag = false;
|
||||
clearLastDownAxisValue();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void clearLastDownAxisValue() {
|
||||
mActionDownX = mActionDownY = -1;
|
||||
}
|
||||
|
||||
private boolean isLastDownValueLegal() {
|
||||
return mActionDownX != -1 && mActionDownY != -1;
|
||||
}
|
||||
|
||||
private void moveWindowView( MotionEvent event ) {
|
||||
if ( mWindowViewHandler != null ) {
|
||||
mWindowViewHandler.move( event, mActionDownX, mActionDownY );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Simulate click event just like set {@link View.OnClickListener}
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private boolean isClickEventLike() {
|
||||
System.out.println( mMoveFlag );
|
||||
return isLastDownValueLegal() && !mMoveFlag;
|
||||
}
|
||||
|
||||
public void release() {
|
||||
if ( mWindowViewHandler != null ) {
|
||||
mWindowViewHandler.release();
|
||||
}
|
||||
mWindowViewHandler = null;
|
||||
mActionDownX = -1;
|
||||
mActionDownY = -1;
|
||||
mMoveFlag = false;
|
||||
INST = null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
package com.mogo.module.back.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.utils.WindowUtils;
|
||||
|
||||
|
||||
/**
|
||||
* Created by congtaowang on 2017/6/20.
|
||||
*/
|
||||
|
||||
public interface WindowViewHandler {
|
||||
|
||||
View getWindowView();
|
||||
|
||||
void recordNewPosition();
|
||||
|
||||
void move(MotionEvent event, int downX, int downY);
|
||||
|
||||
void release();
|
||||
|
||||
void moveToEdge();
|
||||
|
||||
void performClickLike();
|
||||
|
||||
class DefaultHandler implements WindowViewHandler {
|
||||
|
||||
protected View mWindowView;
|
||||
|
||||
protected int mWindowViewLeft = -1;
|
||||
protected int mWindowViewTop = -1;
|
||||
|
||||
private WindowManager.LayoutParams mParams;
|
||||
|
||||
public DefaultHandler( View windowView, WindowManager.LayoutParams params ) {
|
||||
this.mWindowView = windowView;
|
||||
mParams = params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getWindowView() {
|
||||
return mWindowView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void recordNewPosition() {
|
||||
mWindowViewLeft = mParams.x;
|
||||
mWindowViewTop = mParams.y;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void move( MotionEvent event, int downX, int downY ) {
|
||||
move( ( ( int ) ( event.getRawX() - downX ) ),
|
||||
( ( int ) ( event.getRawY() - downY ) ) );
|
||||
}
|
||||
|
||||
private void move( int distanceX, int distanceY ) {
|
||||
if ( mWindowView == null ) {
|
||||
return;
|
||||
}
|
||||
mParams.x = mWindowViewLeft + distanceX;
|
||||
mParams.y = mWindowViewTop + distanceY;
|
||||
WindowManager wm = ( ( WindowManager ) mWindowView.getContext().getSystemService( Context.WINDOW_SERVICE ) );
|
||||
|
||||
if ( wm == null ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( mWindowView instanceof WindowViewUIController ) {
|
||||
if ( mParams.x > WindowUtils.getScreenWidth( AbsMogoApplication.getApp() ) / 2 ) {
|
||||
( ( WindowViewUIController ) mWindowView ).rightMode();
|
||||
} else {
|
||||
( ( WindowViewUIController ) mWindowView ).leftMode();
|
||||
}
|
||||
}
|
||||
|
||||
wm.updateViewLayout( mWindowView, alignLayoutParamsBoundary( mParams ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void moveToEdge() {
|
||||
if ( mWindowView == null ) {
|
||||
return;
|
||||
}
|
||||
WindowManager wm = ( ( WindowManager ) mWindowView.getContext().getSystemService( Context.WINDOW_SERVICE ) );
|
||||
|
||||
if ( mParams.x > WindowUtils.getScreenWidth( AbsMogoApplication.getApp() ) / 2 ) {
|
||||
mParams.x = WindowUtils.getScreenWidth( AbsMogoApplication.getApp() ) - mWindowView.getMeasuredWidth();
|
||||
} else {
|
||||
mParams.x = 0;
|
||||
}
|
||||
|
||||
wm.updateViewLayout( mWindowView, alignLayoutParamsBoundary( mParams ) );
|
||||
}
|
||||
|
||||
protected WindowManager.LayoutParams alignLayoutParamsBoundary( WindowManager.LayoutParams params ) {
|
||||
return params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void performClickLike() {
|
||||
if ( mWindowView instanceof WindowViewUIController ) {
|
||||
( ( WindowViewUIController ) mWindowView ).performClickLike();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void release() {
|
||||
mWindowView = null;
|
||||
mWindowViewLeft = -1;
|
||||
mWindowViewTop = -1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.mogo.module.back.utils;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-05-12
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public interface WindowViewUIController {
|
||||
|
||||
void leftMode();
|
||||
|
||||
void rightMode();
|
||||
|
||||
void performClickLike();
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="module_back_main_home_icon_size">140px</dimen>
|
||||
<dimen name="module_back_main_home_icon_left">0px</dimen>
|
||||
<dimen name="module_back_main_home_icon_top">190px</dimen>
|
||||
<dimen name="module_back_main_home_icon_left">30px</dimen>
|
||||
<dimen name="module_back_main_home_icon_top">230px</dimen>
|
||||
|
||||
</resources>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="module_back_main_home_icon_size">80px</dimen>
|
||||
<dimen name="module_back_main_home_icon_left">0px</dimen>
|
||||
<dimen name="module_back_main_home_icon_top">100px</dimen>
|
||||
<dimen name="module_back_main_home_icon_left">16px</dimen>
|
||||
<dimen name="module_back_main_home_icon_top">140px</dimen>
|
||||
|
||||
</resources>
|
||||
@@ -12,6 +12,7 @@
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/module_ext_weather_container_paddingLeft"
|
||||
android:paddingEnd="@dimen/module_ext_weather_container_paddingRight"
|
||||
android:layout_marginEnd="@dimen/module_ext_msg_marginRight"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintRight_toLeftOf="@+id/module_ext_id_msg"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
@@ -51,7 +51,10 @@ public interface IMogoModuleProvider extends IProvider {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IMogoModuleLifecycle getCardLifecycle();
|
||||
@Deprecated
|
||||
default IMogoModuleLifecycle getCardLifecycle() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 地图监听对象
|
||||
@@ -60,7 +63,9 @@ public interface IMogoModuleProvider extends IProvider {
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
IMogoMapListener getMapListener();
|
||||
default IMogoMapListener getMapListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是哪种类型的提供者
|
||||
@@ -78,7 +83,9 @@ public interface IMogoModuleProvider extends IProvider {
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
IMogoNaviListener getNaviListener();
|
||||
default IMogoNaviListener getNaviListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 定位变化监听:此接口接受地图定位信息
|
||||
@@ -87,7 +94,9 @@ public interface IMogoModuleProvider extends IProvider {
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
IMogoLocationListener getLocationListener();
|
||||
default IMogoLocationListener getLocationListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* marker 点击回调
|
||||
@@ -96,19 +105,27 @@ public interface IMogoModuleProvider extends IProvider {
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
IMogoMarkerClickListener getMarkerClickListener();
|
||||
default IMogoMarkerClickListener getMarkerClickListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取模块对应 app 的包名
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getAppPackage();
|
||||
@Deprecated
|
||||
default String getAppPackage() {
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取对应模块 app 名称
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getAppName();
|
||||
@Deprecated
|
||||
default String getAppName() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user