Merge remote-tracking branch 'origin/qa_1.1.9' into qa_1.1.9
This commit is contained in:
@@ -513,7 +513,20 @@ public class AnimRes {
|
||||
0
|
||||
};
|
||||
|
||||
// 背景
|
||||
public static final int sBkgRes[] = {
|
||||
R.drawable.ic_common_bkg,
|
||||
R.drawable.ic_common_bkg,
|
||||
R.drawable.ic_common_bkg,
|
||||
R.drawable.ic_common_bkg,
|
||||
R.drawable.ic_common_bkg,
|
||||
R.drawable.ic_runningg_bkg,
|
||||
R.drawable.ic_common_bkg,
|
||||
R.drawable.ic_common_bkg
|
||||
};
|
||||
|
||||
public static final int sKeyPointOfNavigation = 16;
|
||||
public static final int sCommonBkgRes = R.drawable.ic_common_bkg;
|
||||
|
||||
public static int sRes[] = sAll[0];
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public class AnimWrapper implements Anim {
|
||||
public AnimWrapper( ImageView target, ImageView bkg ) {
|
||||
if ( CarSeries.isF8xxSeries() ) {
|
||||
bkg.setVisibility( View.VISIBLE );
|
||||
mDelegate = new OthersAnim( target );
|
||||
mDelegate = new OthersAnim( target, bkg );
|
||||
} else {
|
||||
mDelegate = new KitkatAnim( target );
|
||||
}
|
||||
|
||||
@@ -13,13 +13,16 @@ import android.widget.ImageView;
|
||||
*/
|
||||
public class OthersAnim implements Anim {
|
||||
|
||||
private ImageView mBkg;
|
||||
private int mStartIndex = 0;
|
||||
|
||||
private final static int MSG_LOOP = 3003;
|
||||
public static final int MSG_CHANGE = 3004;
|
||||
public static final long INTERVAL = 50L;
|
||||
public static final long FRAME_INTERVAL = 50L;
|
||||
private boolean mStarted = false;
|
||||
|
||||
public static final long ANIM_INTERVAL = 30 * 1_000L;
|
||||
|
||||
private ImageView mImageView;
|
||||
|
||||
private int mEmojiIndex = 0;
|
||||
@@ -39,7 +42,7 @@ public class OthersAnim implements Anim {
|
||||
mStartIndex = mKeyPoint;
|
||||
}
|
||||
mImageView.setImageResource( AnimRes.sRes[mStartIndex++ % AnimRes.sRes.length] );
|
||||
mHandler.sendEmptyMessageDelayed( MSG_LOOP, INTERVAL );
|
||||
mHandler.sendEmptyMessageDelayed( MSG_LOOP, FRAME_INTERVAL );
|
||||
}
|
||||
break;
|
||||
case MSG_CHANGE:
|
||||
@@ -49,11 +52,12 @@ public class OthersAnim implements Anim {
|
||||
mEmojiIndex++;
|
||||
AnimRes.sRes = AnimRes.sAll[mEmojiIndex % AnimRes.sAll.length];
|
||||
mKeyPoint = AnimRes.sKeyPoint[mEmojiIndex % AnimRes.sKeyPoint.length];
|
||||
mBkg.setImageResource( AnimRes.sBkgRes[mEmojiIndex % AnimRes.sBkgRes.length] );
|
||||
mStartIndex = 0;
|
||||
if ( start ) {
|
||||
start();
|
||||
}
|
||||
mHandler.sendEmptyMessageDelayed( MSG_CHANGE, 60 * 1_000L );
|
||||
mHandler.sendEmptyMessageDelayed( MSG_CHANGE, ANIM_INTERVAL );
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -62,10 +66,12 @@ public class OthersAnim implements Anim {
|
||||
|
||||
private AnimRes.EmojiType mLastType;
|
||||
|
||||
public OthersAnim( ImageView imageView ) {
|
||||
public OthersAnim( ImageView imageView, ImageView bkg ) {
|
||||
this.mImageView = imageView;
|
||||
mBkg = bkg;
|
||||
mLastType = AnimRes.EmojiType.Others;
|
||||
AnimRes.sRes = AnimRes.sAll[mEmojiIndex];
|
||||
mBkg.setImageResource( AnimRes.sCommonBkgRes );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -75,7 +81,7 @@ public class OthersAnim implements Anim {
|
||||
}
|
||||
mStarted = true;
|
||||
mHandler.sendEmptyMessage( MSG_LOOP );
|
||||
mHandler.sendEmptyMessageDelayed( MSG_CHANGE, 30 * 1_000L );
|
||||
mHandler.sendEmptyMessageDelayed( MSG_CHANGE, ANIM_INTERVAL );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -96,14 +102,16 @@ public class OthersAnim implements Anim {
|
||||
mStartIndex = 0;
|
||||
mKeyPoint = AnimRes.sKeyPointOfNavigation;
|
||||
AnimRes.sRes = AnimRes.sNavigation;
|
||||
mBkg.setImageResource( AnimRes.sCommonBkgRes );
|
||||
break;
|
||||
case Music:
|
||||
mStartIndex = 0;
|
||||
mKeyPoint = 0;
|
||||
AnimRes.sRes = AnimRes.sMusic;
|
||||
mBkg.setImageResource( AnimRes.sCommonBkgRes );
|
||||
break;
|
||||
case Others:
|
||||
mHandler.sendEmptyMessageDelayed( MSG_CHANGE, 0 * 1_000L );
|
||||
mHandler.sendEmptyMessage( MSG_CHANGE );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -113,5 +121,6 @@ public class OthersAnim implements Anim {
|
||||
stop();
|
||||
mHandler = null;
|
||||
mImageView = null;
|
||||
mBkg = null;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
@@ -686,6 +686,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
mCameraLiveNoticeHelper.release();
|
||||
super.onDestroyView();
|
||||
isClickShare = false;
|
||||
TopViewAnimHelper.getInstance().removeAllView();
|
||||
@@ -694,7 +695,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
TopViewNoLinkageAnimHelper.getInstance().clear();
|
||||
NoMapTopViewShaderHelper.getInstance().release();
|
||||
EntranceViewHolder.getInstance().release();
|
||||
mCameraLiveNoticeHelper.release();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -62,6 +62,7 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
||||
public void release() {
|
||||
MogoApisHandler.getInstance().getApis().getWebSocketManagerApi(mContext).unregisterOnWebSocketMessageListener(this);
|
||||
mCloudRoadData = null;
|
||||
mContext = null;
|
||||
}
|
||||
|
||||
public void enterVrMode() {
|
||||
|
||||
@@ -169,11 +169,13 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter > implements
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
MapBroadCastHelper.getInstance( getContext() ).release();
|
||||
if ( mMogoMapView != null ) {
|
||||
mMogoMapView.onDestroy();
|
||||
mMogoMapView = null;
|
||||
mMogoMap = null;
|
||||
}
|
||||
MapBroadCastHelper.getInstance( getContext() ).release();
|
||||
destroy();
|
||||
super.onDestroyView();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,4 +91,9 @@ public class MapFragmentProvider implements IMogoModuleProvider {
|
||||
public String getAppName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
mMapFragment = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.provider.Settings;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
@@ -39,6 +40,7 @@ import com.mogo.module.v2x.scenario.impl.V2XScenarioManager;
|
||||
import com.mogo.module.v2x.scenario.scene.livecar.V2XVoiceCallLiveBiz;
|
||||
import com.mogo.module.v2x.scenario.scene.park.V2XIllegalParkWindow;
|
||||
import com.mogo.module.v2x.utils.FatigueDrivingUtils;
|
||||
import com.mogo.module.v2x.utils.TimeConstants;
|
||||
import com.mogo.module.v2x.utils.TimeUtils;
|
||||
import com.mogo.module.v2x.utils.TrackUtils;
|
||||
import com.mogo.module.v2x.utils.V2XUtils;
|
||||
@@ -321,6 +323,7 @@ public class V2XModuleProvider implements
|
||||
// 记录开机时间
|
||||
FatigueDrivingUtils.refreshAccOnTime();
|
||||
initCarForHelpStatus();
|
||||
|
||||
} else {
|
||||
// 记录关机时间
|
||||
SharedPrefsMgr.getInstance(V2XUtils.getApp())
|
||||
@@ -379,6 +382,7 @@ public class V2XModuleProvider implements
|
||||
public void onMapLoaded() {
|
||||
//初始化获得自车求助状态
|
||||
initCarForHelpStatus();
|
||||
V2XServiceManager.getV2XRefreshModel().queryRoadData(Utils.getSn());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -52,6 +52,7 @@ import io.reactivex.functions.Function;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
|
||||
import static com.mogo.module.v2x.V2XServiceManager.getContext;
|
||||
|
||||
|
||||
@@ -676,6 +677,11 @@ public class V2XRefreshModel {
|
||||
|
||||
|
||||
public void queryRoadData(String sn) {
|
||||
Logger.d("V2XRefreshModel:", "sn:" + sn);
|
||||
if (!V2XServiceManager.getMoGoStatusManager().isMainPageOnResume()) {
|
||||
Logger.d("V2XRefreshModel:", "主页没有显示");
|
||||
return;
|
||||
}
|
||||
if (mV2XApiService != null) {
|
||||
Map<String, Object> map = new ParamsProvider.Builder(mContext).build();
|
||||
map.put("sn", sn);
|
||||
@@ -691,8 +697,10 @@ public class V2XRefreshModel {
|
||||
|| v2XRoadDataRes.getResult() == null
|
||||
|| v2XRoadDataRes.getResult().getTopPoint() == null
|
||||
|| v2XRoadDataRes.getResult().getTopPoint().isEmpty()) {
|
||||
Logger.d("V2XRefreshModel:", "接口没有数据");
|
||||
return;
|
||||
}
|
||||
Logger.d("V2XRefreshModel:", v2XRoadDataRes.getResult().getTopPoint().toString());
|
||||
MogoLocation mogoLocation = new MogoLocation();
|
||||
mogoLocation.setLongitude(v2XRoadDataRes.getResult().getTopPoint().get(0));
|
||||
mogoLocation.setLatitude(v2XRoadDataRes.getResult().getTopPoint().get(1));
|
||||
@@ -700,20 +708,28 @@ public class V2XRefreshModel {
|
||||
@Override
|
||||
public void onRegeocodeSearched(MogoRegeocodeResult regeocodeResult) {
|
||||
if (regeocodeResult == null || regeocodeResult.getRegeocodeAddress() == null) {
|
||||
Logger.d("V2XRefreshModel:", "返回地址为空");
|
||||
return;
|
||||
}
|
||||
Logger.d("V2XRefreshModel:", regeocodeResult.getRegeocodeAddress().toString());
|
||||
try {
|
||||
String province = regeocodeResult.getRegeocodeAddress().getProvince();
|
||||
String city = regeocodeResult.getRegeocodeAddress().getCity();
|
||||
v2XRoadDataRes.getResult().setFormatAddress(regeocodeResult.getRegeocodeAddress().getFormatAddress().replaceAll(province, "").replaceAll(city, ""));
|
||||
sendBroadcast(v2XRoadDataRes);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.d("V2XRefreshModel:", "异常:" + e);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
super.onError(e);
|
||||
Logger.d("V2XRefreshModel:", "接口异常:" + e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -280,7 +280,8 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
|
||||
mBtnTriggerTrafficSearch.setOnClickListener(v -> V2XServiceManager.getIMogoTrafficUploadProvider().verifyCurrentTrafficStatus());
|
||||
|
||||
mBtnTriggerRecommendRouteEvent.setOnClickListener(view -> {
|
||||
V2XServiceManager.getV2XRefreshModel().queryRoadData("ZD802C1938L10797");
|
||||
// V2XServiceManager.getV2XRefreshModel().queryRoadData("ZD802C1938L10797");
|
||||
V2XServiceManager.getV2XRefreshModel().queryRoadData("ZD802B1932L00622");
|
||||
});
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user