Merge remote-tracking branch 'origin/qa_merge_shunyi_vr_map' into qa_merge_shunyi_vr_map

This commit is contained in:
wangcongtao
2021-01-06 14:55:11 +08:00

View File

@@ -65,15 +65,6 @@ public class SmallVisionProvider implements IMogoSmallMapProvider, IMogoStatusCh
Log.d(TAG, "小地图模块初始化……");
mContext = context;
try {
// 替换高德地图的方法,解决因为加入换肤框架导致地图初始化失败
Method srcMethod = lg.class.getDeclaredMethod("a", Context.class, int.class, ViewGroup.class);
Method destMethod = lg2.class.getDeclaredMethod("a", Context.class, int.class, ViewGroup.class);
HookManager.get().hookMethod(srcMethod, destMethod);
} catch (Exception e) {
e.printStackTrace();
}
MogoApisHandler.getInstance()
.getApis()
.getStatusManagerApi()
@@ -148,6 +139,17 @@ public class SmallVisionProvider implements IMogoSmallMapProvider, IMogoStatusCh
*/
private void addSmallMapView() {
Logger.d(TAG, "addSmallMapView");
try {
// 替换高德地图的方法,解决因为加入换肤框架导致地图初始化失败
Method srcMethod = lg.class.getDeclaredMethod("a", Context.class, int.class, ViewGroup.class);
Method destMethod = lg2.class.getDeclaredMethod("a", Context.class, int.class, ViewGroup.class);
HookManager.get().hookMethod(srcMethod, destMethod);
Logger.d(TAG, "hook 高德地图成功");
} catch (Exception e) {
e.printStackTrace();
}
// 初始化小地图控件
if (mSmallMapDirectionView == null) {
mSmallMapDirectionView = new SmallMapDirectionView(mContext);