@@ -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<>();
|
||||
|
||||
Reference in New Issue
Block a user