bugfix: npe
This commit is contained in:
@@ -9,9 +9,6 @@ import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.utils.CarSeries;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.module.IMogoModuleProvider;
|
||||
import com.mogo.service.module.ModuleType;
|
||||
|
||||
@@ -24,8 +21,6 @@ import com.mogo.service.module.ModuleType;
|
||||
@Route( path = BackToLauncherConst.MODULE_PATH )
|
||||
public class BackToLauncherModuleProvider implements IMogoModuleProvider {
|
||||
|
||||
private IMogoServiceApis mServiceApis;
|
||||
|
||||
private static final String TAG = "BackToLauncherModuleProvider";
|
||||
|
||||
@Override
|
||||
@@ -65,7 +60,5 @@ public class BackToLauncherModuleProvider implements IMogoModuleProvider {
|
||||
break;
|
||||
}
|
||||
}
|
||||
mServiceApis = MogoApisHandler.getInstance().getApis();
|
||||
BackToMainHomeManager.init( mServiceApis );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.view.Gravity;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.wm.WindowManagerView;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -13,18 +14,12 @@ public class BackToMainHomeManager {
|
||||
|
||||
private static final String TAG = "BackToMainHomeManager";
|
||||
|
||||
private static IMogoServiceApis mApis;
|
||||
|
||||
public static void init( IMogoServiceApis apis ) {
|
||||
mApis = apis;
|
||||
}
|
||||
|
||||
public static void backToLauncher() {
|
||||
|
||||
Intent intent2 = new Intent();
|
||||
// 是否发自系统消息
|
||||
intent2.putExtra( "isHomeKeyDown", false );
|
||||
mApis.getIntentManagerApi().invoke( Intent.ACTION_CLOSE_SYSTEM_DIALOGS, intent2 );
|
||||
MogoApisHandler.getInstance().getApis().getIntentManagerApi().invoke( Intent.ACTION_CLOSE_SYSTEM_DIALOGS, intent2 );
|
||||
Logger.d( TAG, "返回桌面" );
|
||||
|
||||
Intent intent = new Intent();
|
||||
|
||||
Reference in New Issue
Block a user