Merge remote-tracking branch 'origin/qa_1.1.5_2' into qa_1.1.5_2

This commit is contained in:
tongchenfei
2020-09-11 17:28:35 +08:00
6 changed files with 32 additions and 19 deletions

View File

@@ -522,7 +522,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
if ( checkAMapView() ) {
MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
MyLocationStyle style = getMyLocationStyle();
if ( style == null ) {
style = new MyLocationStyle();
}
@@ -544,7 +544,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
if ( checkAMapView() ) {
MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
MyLocationStyle style = getMyLocationStyle();
if ( style == null ) {
style = new MyLocationStyle();
}
@@ -557,7 +557,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
public void initMyLocation() {
if ( checkAMapView() ) {
mMapView.getMap().setMyLocationEnabled( true );
MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
MyLocationStyle style = getMyLocationStyle();
style.myLocationType( MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER );
style.interval( 1000 );
style.anchor( 0.5F, 0.5F );
@@ -864,7 +864,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
if ( mMapView.getMap() == null ) {
return;
}
MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
MyLocationStyle style = getMyLocationStyle();
if ( mCarCursorOption.getCarCursorBmp() != null && !mCarCursorOption.getCarCursorBmp().isRecycled() ) {
style.myLocationIcon( BitmapDescriptorFactory.fromBitmap( mCarCursorOption.getCarCursorBmp() ) );
} else {
@@ -877,6 +877,20 @@ public class AMapNaviViewWrapper implements IMogoMapView,
mMapView.getMap().setMyLocationStyle( style );
}
private MyLocationStyle getMyLocationStyle() {
MyLocationStyle style = null;
try {
style = mMapView.getMap().getMyLocationStyle();
} catch ( Exception e ) {
style = new MyLocationStyle();
} finally {
if ( style == null ) {
style = new MyLocationStyle();
}
return style;
}
}
@Override
public MapCameraPosition getMapCameraPosition() {
if ( checkAMapView() ) {

View File

@@ -465,10 +465,16 @@ public class AMapViewWrapper implements IMogoMapView,
}
private MyLocationStyle getMyLocationStyle() {
MyLocationStyle style = null;
try {
return mMapView.getMap().getMyLocationStyle();
style = mMapView.getMap().getMyLocationStyle();
} catch ( Exception e ) {
return new MyLocationStyle();
style = new MyLocationStyle();
} finally {
if ( style == null ) {
style = new MyLocationStyle();
}
return style;
}
}
@@ -790,7 +796,7 @@ public class AMapViewWrapper implements IMogoMapView,
if ( mMapView.getMap() == null ) {
return;
}
MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
MyLocationStyle style = getMyLocationStyle();
if ( mCarCursorOption.getCarCursorBmp() != null && !mCarCursorOption.getCarCursorBmp().isRecycled() ) {
style.myLocationIcon( BitmapDescriptorFactory.fromBitmap( mCarCursorOption.getCarCursorBmp() ) );
} else {

View File

@@ -82,8 +82,8 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
mMogoMarkerOptions = null;
}
if ( mMarker != null ) {
mMarker.remove();
mMarker.setObject( null );
mMarker.remove();
mMarker = null;
}
if ( mMovingPointOverlay != null ) {

View File

@@ -46,9 +46,6 @@ public class MainIndependentActivity extends MainActivity {
@Override
protected void onResume() {
super.onResume();
if ( mCoverUpLayout.getVisibility() != View.VISIBLE ) {
mServiceApis.getAdasControllerApi().setUseAlgorithm( true );
}
if( Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){
fixInMultiWindowMode();
}
@@ -65,7 +62,6 @@ public class MainIndependentActivity extends MainActivity {
@Override
protected void onPause() {
super.onPause();
mServiceApis.getAdasControllerApi().setUseAlgorithm( true );
}
@Override

View File

@@ -31,9 +31,7 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:gravity="left"
android:paddingRight="@dimen/dp_24"
android:paddingLeft="@dimen/dp_24"
android:paddingRight="@dimen/dp_28"
android:text="100"
android:textColor="#FFFFFF"
android:textSize="@dimen/dp_34" />
@@ -54,9 +52,8 @@
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_toLeftOf="@id/road_case_useless"
android:gravity="center"
android:paddingRight="@dimen/dp_24"
android:paddingLeft="@dimen/dp_24"
android:gravity="left"
android:paddingRight="@dimen/dp_28"
android:text="100"
android:textColor="#FFFFFF"
android:textSize="@dimen/dp_34" />

View File

@@ -56,7 +56,7 @@
<dimen name="module_v2x_surrounding_item_bottom_left_textsize">20px</dimen>
<dimen name="module_v2x_surrounding_item_bottom_right_textsize">16px</dimen>
<dimen name="module_v2x_des_index_width">17px</dimen>
<dimen name="module_v2x_des_index_height">15.4px</dimen>
<dimen name="module_v2x_des_index_height">14px</dimen>
<dimen name="module_v2x_panel_width">82px</dimen>
<dimen name="module_v2x_panel_icon_cor">16px</dimen>
<dimen name="share_empty_icon_width">117px</dimen>