将所有模块支持Kotlin,解决ARout加载异常问题

Signed-off-by: 董宏宇 <martindhy@gmail.com>
This commit is contained in:
董宏宇
2021-10-21 18:28:01 +08:00
parent 05d917d805
commit 483b7c694d
42 changed files with 416 additions and 300 deletions

View File

@@ -6,12 +6,10 @@ import android.net.Uri;
import android.text.TextUtils;
import android.util.Log;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.service.IMogoServiceApis;
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
import com.mogo.service.statusmanager.StatusDescriptor;
import com.mogo.utils.CommonUtils;
import com.mogo.utils.TipToast;
import com.mogo.utils.UiThreadHandler;
import com.mogo.utils.logger.Logger;
@@ -112,7 +110,7 @@ public class SchemeIntent implements IMogoStatusChangedListener {
delay = 5_000L;
}
mNextIntent = new IntentWrapper(intent, delay);
if ( mApis.getLauncherApi() != null ) {
if (mApis.getLauncherApi() != null) {
mApis.getLauncherApi().backToLauncher(mContext);
}
return;
@@ -151,11 +149,8 @@ public class SchemeIntent implements IMogoStatusChangedListener {
if (TextUtils.isEmpty(type)) {
return;
}
Log.d("语音打开事件面板type",type);
Log.d("语音打开事件面板type", type);
switch (type) {
case TYPE_NAVI:
handleNaviIntent(target);
break;
case TYPE_LAUNCH:
handleLaunchIntent(target);
break;
@@ -191,27 +186,6 @@ public class SchemeIntent implements IMogoStatusChangedListener {
target.getQueryParameter("keywords"));
}
private void handleNaviIntent(Uri naviUri) {
if (mApis == null) {
return;
}
String lon = naviUri.getQueryParameter("lon");
String lat = naviUri.getQueryParameter("lat");
try {
double dlon = Double.valueOf(lon);
double dlat = Double.valueOf(lat);
if (mApis.getMapServiceApi().getNavi(mContext).isNaviing()) {
mApis.getMapServiceApi().getNavi(mContext).naviTo(new MogoLatLng(dlat, dlon));
} else {
mApis.getSearchManagerApi().calculatePath(new MogoLatLng(dlat, dlon));
}
} catch (Exception e) {
TipToast.shortTip("目的地异常,不能导航");
Logger.e(TAG, e, "error.");
}
}
private void handleLaunchIntent(Uri uri) {
String type = uri.getQueryParameter("channelType");
Map<String, Object> properties = new HashMap<>();