diff --git a/.idea/misc.xml b/.idea/misc.xml
index 0c2e948c39..0043c8a75c 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -13,6 +13,7 @@
diff --git a/core/function-impl/mogo-core-function-smp/src/main/java/com/mogo/eagle/core/function/smp/SmallMapDirectionView.java b/core/function-impl/mogo-core-function-smp/src/main/java/com/mogo/eagle/core/function/smp/SmallMapDirectionView.java
index dd6cb6f74f..256efe4caf 100644
--- a/core/function-impl/mogo-core-function-smp/src/main/java/com/mogo/eagle/core/function/smp/SmallMapDirectionView.java
+++ b/core/function-impl/mogo-core-function-smp/src/main/java/com/mogo/eagle/core/function/smp/SmallMapDirectionView.java
@@ -27,7 +27,7 @@ import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.function.smp.animation.DirectionRotateAnimation;
import com.mogo.eagle.core.function.smp.utils.MapAssetStyleUtils;
import com.mogo.eagle.core.function.smp.view.ISmallMapDirectionView;
-import com.mogo.eagle.core.view.RoundLayout;
+import com.mogo.eagle.core.widget.RoundLayout;
import com.mogo.map.navi.IMogoCarLocationChangedListener2;
import com.mogo.module.common.MogoApisHandler;
diff --git a/core/function-impl/mogo-core-function-smp/src/main/res/layout/module_small_map_view.xml b/core/function-impl/mogo-core-function-smp/src/main/res/layout/module_small_map_view.xml
index fdf0e6dddc..90d5f94e31 100644
--- a/core/function-impl/mogo-core-function-smp/src/main/res/layout/module_small_map_view.xml
+++ b/core/function-impl/mogo-core-function-smp/src/main/res/layout/module_small_map_view.xml
@@ -12,7 +12,7 @@
android:layout_centerInParent="true"
android:background="@drawable/module_small_map_view_border" />
- -->
-
+
+
+
+ "不支持该视频。"
+ 此文件不支持播放
+
+
\ No newline at end of file
diff --git a/core/mogo-core-res/src/main/function-common-res/values/styles.xml b/core/mogo-core-res/src/main/function-common-res/values/styles.xml
index e727caa8e8..af232939d1 100644
--- a/core/mogo-core-res/src/main/function-common-res/values/styles.xml
+++ b/core/mogo-core-res/src/main/function-common-res/values/styles.xml
@@ -5,4 +5,10 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/AnimationView.java b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/AnimationView.java
similarity index 96%
rename from modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/AnimationView.java
rename to core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/AnimationView.java
index 3a247bf092..30acdb6d5c 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/AnimationView.java
+++ b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/AnimationView.java
@@ -1,4 +1,4 @@
-package com.mogo.module.v2x.view;
+package com.mogo.eagle.core.widget;
import android.content.Context;
import android.graphics.Bitmap;
@@ -13,7 +13,8 @@ import android.view.View;
import androidx.annotation.Nullable;
-import com.mogo.module.v2x.utils.ImageUtil;
+
+import com.mogo.eagle.core.utilcode.util.ImageUtils;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
@@ -173,7 +174,7 @@ public class AnimationView extends View implements Handler.Callback {
if (mAnimDataList != null && mAnimDataList.size() > 0) {
mCurAnimPos = 0;
AnimData animData = mAnimDataList.get(mCurAnimPos);
- mCurShowBmp = ImageUtil.getBitmap(getContext(), animData.filePath, mWidth, mHeight);
+ mCurShowBmp = ImageUtils.getBitmap(animData.filePath, mWidth, mHeight);
invalidate();
if (mListener != null) {
mListener.onAnimChange(mCurAnimPos, mCurShowBmp);
@@ -296,7 +297,7 @@ public class AnimationView extends View implements Handler.Callback {
}
public static class AnimData {
- public Object filePath;
+ public String filePath;
}
public static class ProcessAnimThread {
@@ -312,7 +313,7 @@ public class AnimationView extends View implements Handler.Callback {
public ProcessAnimThread(Context context, Handler handler) {
mUiHandler = handler;
- mContext = new WeakReference(context);
+ mContext = new WeakReference<>(context);
init();
}
@@ -333,7 +334,7 @@ public class AnimationView extends View implements Handler.Callback {
switch (msg.what) {
case PROCESS_DATA: {
AnimData animData = (AnimData) msg.obj;
- Bitmap bitmap = ImageUtil.getBitmap(mContext.get(), animData.filePath, mWidth, mHeight);
+ Bitmap bitmap = ImageUtils.getBitmap(animData.filePath, mWidth, mHeight);
if (bitmap != null) {
Message finishMsg = Message.obtain();
finishMsg.what = PROCESS_ANIM_FINISH;
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/widget/CustomCircleImageView.java b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/CustomCircleImageView.java
similarity index 99%
rename from modules/mogo-module-common/src/main/java/com/mogo/module/common/widget/CustomCircleImageView.java
rename to core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/CustomCircleImageView.java
index c743b08a24..a19592a36b 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/widget/CustomCircleImageView.java
+++ b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/CustomCircleImageView.java
@@ -1,4 +1,4 @@
-package com.mogo.module.common.widget;
+package com.mogo.eagle.core.widget;
import android.annotation.SuppressLint;
import android.content.Context;
@@ -23,7 +23,8 @@ import androidx.annotation.ColorInt;
import androidx.annotation.ColorRes;
import androidx.annotation.DrawableRes;
-import com.mogo.module.common.R;
+import com.mogo.eagle.core.function.call.api.R;
+
@SuppressLint("AppCompatCustomView")
public class CustomCircleImageView extends ImageView {
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/GestureTopCloseLayout.java b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/GestureTopCloseLayout.java
similarity index 93%
rename from modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/GestureTopCloseLayout.java
rename to core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/GestureTopCloseLayout.java
index c1b19bcd19..7bd1eb7d26 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/GestureTopCloseLayout.java
+++ b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/GestureTopCloseLayout.java
@@ -1,4 +1,4 @@
-package com.mogo.module.v2x.view;
+package com.mogo.eagle.core.widget;
import android.content.Context;
import android.util.AttributeSet;
@@ -9,8 +9,7 @@ import androidx.annotation.NonNull;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.customview.widget.ViewDragHelper;
-import com.mogo.module.v2x.V2XConst;
-import com.mogo.utils.logger.Logger;
+import com.mogo.eagle.core.utilcode.util.LogUtils;
import org.jetbrains.annotations.NotNull;
@@ -22,6 +21,9 @@ import org.jetbrains.annotations.NotNull;
* version: 1.0
*/
public class GestureTopCloseLayout extends ConstraintLayout {
+
+ private String TAG = "GestureTopCloseLayout";
+
private ViewDragHelper mViewDragHelper;
private ViewCloseListener mViewCloseListener;
@@ -77,7 +79,7 @@ public class GestureTopCloseLayout extends ConstraintLayout {
@Override
public void onViewPositionChanged(@NonNull View changedView, int left, int top, int dx, int dy) {
super.onViewPositionChanged(changedView, left, top, dx, dy);
- Logger.w(V2XConst.MODULE_NAME, "onViewPositionChanged==top=" + top +
+ LogUtils.wTag(TAG, "onViewPositionChanged==top=" + top +
" changedView.getHeight()==" + changedView.getHeight());
if (top < 0) {
mTop = top;
@@ -94,7 +96,7 @@ public class GestureTopCloseLayout extends ConstraintLayout {
//手指释放的时候回调
@Override
public void onViewReleased(View releasedChild, float xvel, float yvel) {
- Logger.w(V2XConst.MODULE_NAME, "onViewReleased==mTop=" + mTop + " getHeight=" + getHeight());
+ LogUtils.wTag(TAG, "onViewReleased==mTop=" + mTop + " getHeight=" + getHeight());
if (mTop < 0) {
mViewDragHelper.settleCapturedViewAt(0, -getHeight());
invalidate();
diff --git a/core/mogo-core-res/src/main/java/com/mogo/eagle/core/view/LiveRoundLayout.java b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/LiveRoundLayout.java
similarity index 98%
rename from core/mogo-core-res/src/main/java/com/mogo/eagle/core/view/LiveRoundLayout.java
rename to core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/LiveRoundLayout.java
index dab80bf240..21bbbae42f 100644
--- a/core/mogo-core-res/src/main/java/com/mogo/eagle/core/view/LiveRoundLayout.java
+++ b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/LiveRoundLayout.java
@@ -1,4 +1,4 @@
-package com.mogo.eagle.core.view;
+package com.mogo.eagle.core.widget;
import android.content.Context;
import android.content.res.TypedArray;
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/RoundConstraintLayout.java b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/RoundConstraintLayout.java
similarity index 96%
rename from modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/RoundConstraintLayout.java
rename to core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/RoundConstraintLayout.java
index 5541ebc128..f36ca34da9 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/RoundConstraintLayout.java
+++ b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/RoundConstraintLayout.java
@@ -1,4 +1,4 @@
-package com.mogo.module.v2x.view;
+package com.mogo.eagle.core.widget;
import android.content.Context;
import android.content.res.TypedArray;
@@ -9,7 +9,8 @@ import android.util.AttributeSet;
import androidx.constraintlayout.widget.ConstraintLayout;
-import com.mogo.module.v2x.R;
+import com.mogo.eagle.core.function.call.api.R;
+
/**
* author : donghongyu
diff --git a/core/mogo-core-res/src/main/java/com/mogo/eagle/core/view/RoundLayout.java b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/RoundLayout.java
similarity index 98%
rename from core/mogo-core-res/src/main/java/com/mogo/eagle/core/view/RoundLayout.java
rename to core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/RoundLayout.java
index 2158c157e5..29862f8239 100644
--- a/core/mogo-core-res/src/main/java/com/mogo/eagle/core/view/RoundLayout.java
+++ b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/RoundLayout.java
@@ -1,4 +1,4 @@
-package com.mogo.eagle.core.view;
+package com.mogo.eagle.core.widget;
import android.content.Context;
import android.content.res.TypedArray;
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/TextureVideoView.java b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/TextureVideoView.java
similarity index 79%
rename from modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/TextureVideoView.java
rename to core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/TextureVideoView.java
index b628bcd25f..8cd615b2fb 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/TextureVideoView.java
+++ b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/TextureVideoView.java
@@ -1,4 +1,4 @@
-package com.mogo.module.v2x.view;
+package com.mogo.eagle.core.widget;
/*
* Copyright (C) 2006 The Android Open Source Project
@@ -33,14 +33,13 @@ import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.MediaController.MediaPlayerControl;
-import com.mogo.module.v2x.R;
-import com.mogo.module.v2x.V2XConst;
-import com.mogo.utils.logger.Logger;
+
+import com.mogo.eagle.core.function.call.api.R;
+import com.mogo.eagle.core.utilcode.util.LogUtils;
import java.io.IOException;
import java.util.Map;
-import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
/**
* Displays a video file. The VideoView class can load images from various
@@ -50,15 +49,25 @@ import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
*/
public class TextureVideoView extends TextureView implements MediaPlayerControl {
private String TAG = "V2XModuleProvider";
+
+ public static final int STATE_ERROR = -1;
+ public static final int STATE_IDLE = 0;
+ public static final int STATE_PREPARING = 1;
+ public static final int STATE_PREPARED = 2;
+ public static final int STATE_PLAYING = 3;
+ public static final int STATE_PAUSED = 4;
+ public static final int STATE_PLAYBACK_COMPLETED = 5;
+ public static final int STATE_SEEKING = 6;
+
// settable by the client
private Uri mUri;
private Map mHeaders;
private int mDuration;
// all possible internal states
- private int mCurrentState = V2XConst.STATE_IDLE;
+ private int mCurrentState = STATE_IDLE;
private int mTargetState = mCurrentState, mTagetStateBackup = mCurrentState;
- private int mPrepareState = V2XConst.STATE_PREPARED;
+ private int mPrepareState = STATE_PREPARED;
// All the stuff we need for playing and showing a video
private Surface mSurface = null;
@@ -113,8 +122,8 @@ public class TextureVideoView extends TextureView implements MediaPlayerControl
setFocusable(true);
setFocusableInTouchMode(true);
requestFocus();
- mCurrentState = V2XConst.STATE_IDLE;
- mTargetState = V2XConst.STATE_IDLE;
+ mCurrentState = STATE_IDLE;
+ mTargetState = STATE_IDLE;
}
public boolean requestAudioFocus() {
@@ -131,9 +140,9 @@ public class TextureVideoView extends TextureView implements MediaPlayerControl
public void setVideoURI(Uri uri, Map headers) {
if (uri == null) {
- Logger.i(MODULE_NAME, "setVideoURI--- uri = null");
+ LogUtils.iTag(TAG, "setVideoURI--- uri = null");
} else {
- Logger.i(MODULE_NAME, "setVideoURI--- uri = " + uri.getPath());
+ LogUtils.iTag(TAG, "setVideoURI--- uri = " + uri.getPath());
}
mUri = uri;
mHeaders = headers;
@@ -149,21 +158,21 @@ public class TextureVideoView extends TextureView implements MediaPlayerControl
mMediaPlayer.stop();
mMediaPlayer.release();
mMediaPlayer = null;
- mTargetState = mCurrentState = V2XConst.STATE_IDLE;
+ mTargetState = mCurrentState = STATE_IDLE;
}
}
@SuppressLint("NewApi")
private void openVideo() {
- Logger.i(MODULE_NAME, "openVideo");
+ LogUtils.iTag(TAG, "openVideo");
if (mUri == null) {
- Logger.i(MODULE_NAME, "mUri == null ");
+ LogUtils.iTag(TAG, "mUri == null ");
}
if (mSurface == null) {
- Logger.i(MODULE_NAME, "mSurface == null ");
+ LogUtils.iTag(TAG, "mSurface == null ");
}
if (mUri == null || mSurface == null || isSuspendFromActivity) {
- Logger.i(MODULE_NAME, "isSuspendFromActivity = " + isSuspendFromActivity);
+ LogUtils.iTag(TAG, "isSuspendFromActivity = " + isSuspendFromActivity);
return;
}
release(false);
@@ -192,7 +201,7 @@ public class TextureVideoView extends TextureView implements MediaPlayerControl
mMediaPlayer.setScreenOnWhilePlaying(true);
mMediaPlayer.setVolume(0, 0);
mMediaPlayer.prepare();
- mPrepareState = mCurrentState = V2XConst.STATE_PREPARING;
+ mPrepareState = mCurrentState = STATE_PREPARING;
} catch (IOException | SecurityException | IllegalStateException | IllegalArgumentException ex) {
ex.printStackTrace();
onError();
@@ -200,7 +209,7 @@ public class TextureVideoView extends TextureView implements MediaPlayerControl
}
private void onError() {
- mTargetState = mCurrentState = V2XConst.STATE_ERROR;
+ mTargetState = mCurrentState = STATE_ERROR;
if (mErrorListener != null)
mErrorListener.onError(mMediaPlayer,
MediaPlayer.MEDIA_ERROR_UNKNOWN, 0);
@@ -211,24 +220,24 @@ public class TextureVideoView extends TextureView implements MediaPlayerControl
mVideoWidth = mp.getVideoWidth();
mVideoHeight = mp.getVideoHeight();
if (mVideoWidth != 0 && mVideoHeight != 0) {
- Logger.d(MODULE_NAME, "OnVideoSizeChangedListener mVideoWidth:" + " mVideoWidth:" + mVideoWidth + " mVideoHeight:" + mVideoHeight);
+ LogUtils.dTag(TAG, "OnVideoSizeChangedListener mVideoWidth:" + " mVideoWidth:" + mVideoWidth + " mVideoHeight:" + mVideoHeight);
}
}
};
MediaPlayer.OnPreparedListener mPreparedListener = new MediaPlayer.OnPreparedListener() {
public void onPrepared(MediaPlayer mp) {
- Logger.i(MODULE_NAME, "MediaPlayer.OnPreparedListener");
- mPrepareState = mCurrentState = V2XConst.STATE_PREPARED;
+ LogUtils.iTag(TAG, "MediaPlayer.OnPreparedListener");
+ mPrepareState = mCurrentState = STATE_PREPARED;
mVideoWidth = mp.getVideoWidth();
mVideoHeight = mp.getVideoHeight();
int seekToPosition = mSeekWhenPrepared;
-// Logger.i(MODULE_NAME, "seekToPosition = " + seekToPosition);
+// LogUtils.iTag(TAG, "seekToPosition = " + seekToPosition);
if (seekToPosition != 0) {
seekTo(seekToPosition);
}
- if (mTargetState == V2XConst.STATE_PLAYING) {
+ if (mTargetState == STATE_PLAYING) {
start();
}
if (mOnPreparedListener != null) {
@@ -244,8 +253,8 @@ public class TextureVideoView extends TextureView implements MediaPlayerControl
private OnCompletionListener mCompletionListener = new OnCompletionListener() {
public void onCompletion(MediaPlayer mp) {
- Logger.i(MODULE_NAME, "MediaPlayer.OnCompletionListener");
- mTargetState = mCurrentState = V2XConst.STATE_PLAYBACK_COMPLETED;
+ LogUtils.iTag(TAG, "MediaPlayer.OnCompletionListener");
+ mTargetState = mCurrentState = STATE_PLAYBACK_COMPLETED;
if (mOnCompletionListener != null) {
mOnCompletionListener.onCompletion(mMediaPlayer);
}
@@ -253,19 +262,19 @@ public class TextureVideoView extends TextureView implements MediaPlayerControl
};
private OnSeekCompleteListener mSeekCompleteListener = mp -> {
- Logger.i(MODULE_NAME, "MediaPlayer.OnSeekCompleteListener");
+ LogUtils.iTag(TAG, "MediaPlayer.OnSeekCompleteListener");
try {
- mCurrentState = mMediaPlayer.isPlaying() ? V2XConst.STATE_PLAYING : V2XConst.STATE_PAUSED;
+ mCurrentState = mMediaPlayer.isPlaying() ? STATE_PLAYING : STATE_PAUSED;
} catch (Exception e) {
- mCurrentState = V2XConst.STATE_PLAYING;
+ mCurrentState = STATE_PLAYING;
e.printStackTrace();
}
};
private OnErrorListener mErrorListener = new OnErrorListener() {
public boolean onError(MediaPlayer mp, int framework_err, int impl_err) {
- Logger.i(MODULE_NAME, "MediaPlayer.onError");
- mTargetState = mPrepareState = mCurrentState = V2XConst.STATE_ERROR;
+ LogUtils.iTag(TAG, "MediaPlayer.onError");
+ mTargetState = mPrepareState = mCurrentState = STATE_ERROR;
if (mOnErrorListener != null) {
mOnErrorListener.onError(mMediaPlayer, framework_err,
impl_err);
@@ -279,7 +288,7 @@ public class TextureVideoView extends TextureView implements MediaPlayerControl
@Override
public boolean onInfo(MediaPlayer mp, int what, int extra) {
- Logger.i(MODULE_NAME, "MediaPlayer.OnInfoListener---what = " + what + ";extra = " + extra);
+ LogUtils.iTag(TAG, "MediaPlayer.OnInfoListener---what = " + what + ";extra = " + extra);
int messageId = 0;
if (what == MEDIA_INFO_VIDEO_NOT_SUPPORTED) {
messageId = R.string.VideoView_info_text_video_not_supported;
@@ -298,7 +307,7 @@ public class TextureVideoView extends TextureView implements MediaPlayerControl
private MediaPlayer.OnBufferingUpdateListener mBufferingUpdateListener = new MediaPlayer.OnBufferingUpdateListener() {
public void onBufferingUpdate(MediaPlayer mp, int percent) {
- Logger.i(MODULE_NAME, "MediaPlayer.OnBufferingUpdateListener");
+ LogUtils.iTag(TAG, "MediaPlayer.OnBufferingUpdateListener");
mCurrentBufferPercentage = percent;
}
};
@@ -341,15 +350,15 @@ public class TextureVideoView extends TextureView implements MediaPlayerControl
SurfaceTextureListener mSurfaceTextureListener = new SurfaceTextureListener() {
@Override
public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
- Logger.i(MODULE_NAME, "onSurfaceTextureAvailable");
+ LogUtils.iTag(TAG, "onSurfaceTextureAvailable");
mSurface = new Surface(surface);
openVideo();
}
@Override
public void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height) {
- Logger.d(MODULE_NAME, "onSurfaceTextureSizeChanged mVideoWidth:" + " mVideoWidth:" + mVideoWidth + " mVideoHeight:" + mVideoHeight);
- boolean isValidState = (mTargetState == V2XConst.STATE_PLAYING);
+ LogUtils.dTag(TAG, "onSurfaceTextureSizeChanged mVideoWidth:" + " mVideoWidth:" + mVideoWidth + " mVideoHeight:" + mVideoHeight);
+ boolean isValidState = (mTargetState == STATE_PLAYING);
boolean hasValidSize = (mVideoWidth == width && mVideoHeight == height);
if (mMediaPlayer != null && isValidState && hasValidSize) {
if (mSeekWhenPrepared != 0) {
@@ -366,7 +375,7 @@ public class TextureVideoView extends TextureView implements MediaPlayerControl
@Override
public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
- Logger.i(MODULE_NAME, "onSurfaceTextureDestroyed");
+ LogUtils.iTag(TAG, "onSurfaceTextureDestroyed");
mSurface = null;
release(false);
return false;
@@ -382,11 +391,11 @@ public class TextureVideoView extends TextureView implements MediaPlayerControl
* release the media player in any state
*/
private void release(boolean cleartargetstate) {
- Logger.i(MODULE_NAME, "release ---cleartargetstate=" + cleartargetstate);
- mCurrentState = V2XConst.STATE_IDLE;
+ LogUtils.iTag(TAG, "release ---cleartargetstate=" + cleartargetstate);
+ mCurrentState = STATE_IDLE;
if (cleartargetstate) {
- mTargetState = V2XConst.STATE_IDLE;
+ mTargetState = STATE_IDLE;
new Thread(new Runnable() {
@Override
@@ -429,40 +438,40 @@ public class TextureVideoView extends TextureView implements MediaPlayerControl
}
public boolean isPrepared() {
- return mPrepareState == V2XConst.STATE_PREPARED
+ return mPrepareState == STATE_PREPARED
|| isSuspendFromActivity;
}
public void start() {
- Logger.i(MODULE_NAME, "TextureVideoView---start");
+ LogUtils.iTag(TAG, "TextureVideoView---start");
if (isFocusLoss) {
- mTagetStateBackup = V2XConst.STATE_PLAYING;
+ mTagetStateBackup = STATE_PLAYING;
return;
}
- //Logger.i(MODULE_NAME, "mCurrentState = " + mCurrentState);
+ //LogUtils.iTag(TAG, "mCurrentState = " + mCurrentState);
if (isInPlaybackState()) {
- Logger.i(MODULE_NAME, "MediaPlayer.start");
+ LogUtils.iTag(TAG, "MediaPlayer.start");
mMediaPlayer.start();
- mCurrentState = V2XConst.STATE_PLAYING;
+ mCurrentState = STATE_PLAYING;
}
- mTargetState = V2XConst.STATE_PLAYING;
+ mTargetState = STATE_PLAYING;
}
public void pause() {
- Logger.i(MODULE_NAME, "TextureVideoView---pause");
- Logger.i(MODULE_NAME, "mCurrentState = " + mCurrentState);
+ LogUtils.iTag(TAG, "TextureVideoView---pause");
+ LogUtils.iTag(TAG, "mCurrentState = " + mCurrentState);
if (isInPlaybackState()) {
if (mMediaPlayer.isPlaying()) {
- Logger.i(MODULE_NAME, " MediaPlayer.pause");
+ LogUtils.iTag(TAG, " MediaPlayer.pause");
mMediaPlayer.pause();
- mCurrentState = V2XConst.STATE_PAUSED;
+ mCurrentState = STATE_PAUSED;
}
}
- mTagetStateBackup = mTargetState = V2XConst.STATE_PAUSED;
+ mTagetStateBackup = mTargetState = STATE_PAUSED;
}
public void suspend() {
- Logger.i(MODULE_NAME, "TextureVideoView---suspend");
+ LogUtils.iTag(TAG, "TextureVideoView---suspend");
if (!isSuspendFromActivity) {
isSuspendFromActivity = true;
if (mMediaPlayer != null) {
@@ -475,20 +484,20 @@ public class TextureVideoView extends TextureView implements MediaPlayerControl
}
public void resume() {
- Logger.i(MODULE_NAME, "TextureVideoView---resume");
+ LogUtils.iTag(TAG, "TextureVideoView---resume");
isSuspendFromActivity = false;
openVideo();
seekTo(progressWhileSuspend);
- if (mTagetStateBackup == V2XConst.STATE_IDLE)
+ if (mTagetStateBackup == STATE_IDLE)
mTagetStateBackup = mTargetState;
- Logger.i(MODULE_NAME, "isFocusLoss = " + isFocusLoss);
- Logger.i(MODULE_NAME, "isInPlaybackState() = " + isInPlaybackState());
+ LogUtils.iTag(TAG, "isFocusLoss = " + isFocusLoss);
+ LogUtils.iTag(TAG, "isInPlaybackState() = " + isInPlaybackState());
if (isFocusLoss) {
if (isInPlaybackState()) {
if (mMediaPlayer.isPlaying()) {
mMediaPlayer.pause();
- mCurrentState = V2XConst.STATE_PAUSED;
+ mCurrentState = STATE_PAUSED;
}
}
}
@@ -515,12 +524,12 @@ public class TextureVideoView extends TextureView implements MediaPlayerControl
}
public void seekTo(int msec) {
- Logger.i(MODULE_NAME, "TextureVideoView---seekTo---msec = " + msec);
- if (isInPlaybackState() && mCurrentState != V2XConst.STATE_SEEKING
+ LogUtils.iTag(TAG, "TextureVideoView---seekTo---msec = " + msec);
+ if (isInPlaybackState() && mCurrentState != STATE_SEEKING
&& msec > 0 && msec < getDuration()) {
- mCurrentState = V2XConst.STATE_SEEKING;
+ mCurrentState = STATE_SEEKING;
- Logger.i(MODULE_NAME, "MediaPlayer.seekTo(msec) = " + msec);
+ LogUtils.iTag(TAG, "MediaPlayer.seekTo(msec) = " + msec);
mMediaPlayer.seekTo(msec);
mSeekWhenPrepared = 0;
} else {
@@ -541,8 +550,8 @@ public class TextureVideoView extends TextureView implements MediaPlayerControl
}
private boolean isInPlaybackState() {
- return (mMediaPlayer != null && mCurrentState != V2XConst.STATE_ERROR
- && mCurrentState != V2XConst.STATE_IDLE && mCurrentState != V2XConst.STATE_PREPARING);
+ return (mMediaPlayer != null && mCurrentState != STATE_ERROR
+ && mCurrentState != STATE_IDLE && mCurrentState != STATE_PREPARING);
}
@Override
@@ -575,7 +584,7 @@ public class TextureVideoView extends TextureView implements MediaPlayerControl
}
public boolean isPause() {
- return mTargetState == V2XConst.STATE_PAUSED;
+ return mTargetState == STATE_PAUSED;
}
@Override
@@ -584,7 +593,7 @@ public class TextureVideoView extends TextureView implements MediaPlayerControl
}
public int getCurrentState() {
- Logger.i(MODULE_NAME, "mCurrentState == " + mCurrentState);
+ LogUtils.iTag(TAG, "mCurrentState == " + mCurrentState);
return mCurrentState;
}
}
diff --git a/modules/mogo-module-common/src/main/res/values/attr.xml b/modules/mogo-module-common/src/main/res/values/attr.xml
index 073636bd02..e4b5b4510d 100644
--- a/modules/mogo-module-common/src/main/res/values/attr.xml
+++ b/modules/mogo-module-common/src/main/res/values/attr.xml
@@ -7,12 +7,7 @@
-
-
-
-
-
-
+
diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/CameraLiveGSYVideoView.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/CameraLiveGSYVideoView.java
index 0e3b808d58..65201a8d4e 100644
--- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/CameraLiveGSYVideoView.java
+++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/live/CameraLiveGSYVideoView.java
@@ -13,7 +13,7 @@ import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.content.ContextCompat;
-import com.mogo.eagle.core.view.LiveRoundLayout;
+import com.mogo.eagle.core.widget.LiveRoundLayout;
import com.mogo.module.extensions.R;
import com.mogo.utils.logger.Logger;
import com.tencent.rtmp.ITXLivePlayListener;
diff --git a/modules/mogo-module-extensions/src/main/res/layout/camera_view_video_layout_normal.xml b/modules/mogo-module-extensions/src/main/res/layout/camera_view_video_layout_normal.xml
index 9e213c7753..c73e0db0f8 100644
--- a/modules/mogo-module-extensions/src/main/res/layout/camera_view_video_layout_normal.xml
+++ b/modules/mogo-module-extensions/src/main/res/layout/camera_view_video_layout_normal.xml
@@ -1,5 +1,5 @@
-
-
+
diff --git a/modules/mogo-module-service/build.gradle b/modules/mogo-module-service/build.gradle
index eea585b4bb..fafcb54ea5 100644
--- a/modules/mogo-module-service/build.gradle
+++ b/modules/mogo-module-service/build.gradle
@@ -60,6 +60,7 @@ dependencies {
implementation project(':modules:mogo-module-common')
implementation project(':core:mogo-core-data')
+ implementation project(':core:mogo-core-res')
}
}
diff --git a/modules/mogo-module-service/src/main/res/layout/module_services_online_car_panel_item.xml b/modules/mogo-module-service/src/main/res/layout/module_services_online_car_panel_item.xml
index 13915be41a..1e91684d50 100644
--- a/modules/mogo-module-service/src/main/res/layout/module_services_online_car_panel_item.xml
+++ b/modules/mogo-module-service/src/main/res/layout/module_services_online_car_panel_item.xml
@@ -10,7 +10,7 @@
android:paddingStart="@dimen/module_services_panel_item_start"
android:paddingBottom="@dimen/module_services_panel_item_padding">
- 0f) {
- canvas.clipPath(roundPath);
- }
- super.draw(canvas);
- }
-
-}
-
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/V2XCarLiveVideoView.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/V2XCarLiveVideoView.java
index 9db24bde03..82427c0623 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/V2XCarLiveVideoView.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/V2XCarLiveVideoView.java
@@ -16,6 +16,7 @@ import androidx.core.content.ContextCompat;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.voice.AIAssist;
+import com.mogo.eagle.core.widget.RoundLayout;
import com.mogo.module.common.entity.MarkerCarInfo;
import com.mogo.module.v2x.R;
import com.mogo.module.v2x.V2XServiceManager;
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/V2XCrossRoadVideoView.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/V2XCrossRoadVideoView.java
index 0a6fef8f20..10a50e823e 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/V2XCrossRoadVideoView.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/V2XCrossRoadVideoView.java
@@ -15,6 +15,7 @@ import androidx.core.content.ContextCompat;
import com.mogo.cloud.trafficlive.api.ITrafficIntersectionLiveCallBack;
import com.mogo.cloud.trafficlive.api.MoGoAiCloudTrafficLive;
import com.mogo.commons.voice.AIAssist;
+import com.mogo.eagle.core.widget.RoundLayout;
import com.mogo.map.location.MogoLocation;
import com.mogo.module.common.entity.MarkerCarInfo;
import com.mogo.module.v2x.R;
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/V2XLiveGSYVideoView.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/V2XLiveGSYVideoView.java
index 59c3eebacd..d1259085f3 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/V2XLiveGSYVideoView.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/view/V2XLiveGSYVideoView.java
@@ -16,6 +16,7 @@ import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.content.ContextCompat;
import com.mogo.commons.voice.AIAssist;
+import com.mogo.eagle.core.widget.RoundLayout;
import com.mogo.module.common.entity.MarkerCarInfo;
import com.mogo.module.v2x.R;
import com.mogo.module.v2x.utils.V2XUtils;
diff --git a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail.xml b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail.xml
index 435eb8b454..eb700a4ab8 100644
--- a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail.xml
+++ b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_detail.xml
@@ -9,7 +9,7 @@
android:paddingBottom="@dimen/dp_20"
app:roundLayoutRadius="@dimen/dp_30">
-
-
+
-
-
-
-
+
+
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_see_frontcar_live_video.xml b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_see_frontcar_live_video.xml
index 09a73bd6ff..a9be84977b 100644
--- a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_see_frontcar_live_video.xml
+++ b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_see_frontcar_live_video.xml
@@ -1,5 +1,5 @@
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_see_frontcar_live_video_vr.xml b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_see_frontcar_live_video_vr.xml
index a9340a7bd6..4f15d3ace7 100644
--- a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_see_frontcar_live_video_vr.xml
+++ b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_see_frontcar_live_video_vr.xml
@@ -1,5 +1,5 @@
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/modules/mogo-module-v2x/src/main/res/layout/view_video_layout_normal.xml b/modules/mogo-module-v2x/src/main/res/layout/view_video_layout_normal.xml
index 42614dd5d9..4146ffe8da 100644
--- a/modules/mogo-module-v2x/src/main/res/layout/view_video_layout_normal.xml
+++ b/modules/mogo-module-v2x/src/main/res/layout/view_video_layout_normal.xml
@@ -1,5 +1,5 @@
-
-
+
diff --git a/modules/mogo-module-v2x/src/main/res/layout/view_video_layout_see_live.xml b/modules/mogo-module-v2x/src/main/res/layout/view_video_layout_see_live.xml
index 8c6e2c3547..bfcde64354 100644
--- a/modules/mogo-module-v2x/src/main/res/layout/view_video_layout_see_live.xml
+++ b/modules/mogo-module-v2x/src/main/res/layout/view_video_layout_see_live.xml
@@ -6,7 +6,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
-
@@ -70,6 +70,6 @@
app:layout_constraintTop_toBottomOf="@+id/ivErrorIcon" />
-
+
diff --git a/modules/mogo-module-v2x/src/main/res/layout/window_animation.xml b/modules/mogo-module-v2x/src/main/res/layout/window_animation.xml
index 921c20b656..28bc512ec5 100644
--- a/modules/mogo-module-v2x/src/main/res/layout/window_animation.xml
+++ b/modules/mogo-module-v2x/src/main/res/layout/window_animation.xml
@@ -6,14 +6,14 @@
android:layout_height="match_parent"
android:paddingStart="@dimen/module_main_v2x_animation_width">
-
-
-
+
\ No newline at end of file
diff --git a/modules/mogo-module-v2x/src/main/res/layout/window_road_video_layout.xml b/modules/mogo-module-v2x/src/main/res/layout/window_road_video_layout.xml
index e86b7068cd..98bddcdc78 100644
--- a/modules/mogo-module-v2x/src/main/res/layout/window_road_video_layout.xml
+++ b/modules/mogo-module-v2x/src/main/res/layout/window_road_video_layout.xml
@@ -7,7 +7,7 @@
android:background="@drawable/v2x_alert_window_bg"
android:layout_margin="@dimen/dp_3">
-
@@ -47,6 +47,6 @@
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_20"
android:src="@drawable/module_common_close_selector" />
-
+
diff --git a/modules/mogo-module-v2x/src/main/res/layout/window_road_video_layout_vr.xml b/modules/mogo-module-v2x/src/main/res/layout/window_road_video_layout_vr.xml
index 83891cf1a4..0c7085d84a 100644
--- a/modules/mogo-module-v2x/src/main/res/layout/window_road_video_layout_vr.xml
+++ b/modules/mogo-module-v2x/src/main/res/layout/window_road_video_layout_vr.xml
@@ -8,7 +8,7 @@
android:layout_margin="@dimen/dp_3"
android:background="@drawable/v2x_bg_video_tip_vr">
-
@@ -48,6 +48,6 @@
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_20"
android:src="@drawable/module_common_close_selector_vr" />
-
+
diff --git a/modules/mogo-module-v2x/src/main/res/values/strings.xml b/modules/mogo-module-v2x/src/main/res/values/strings.xml
index 7939eedeac..d66b049f49 100644
--- a/modules/mogo-module-v2x/src/main/res/values/strings.xml
+++ b/modules/mogo-module-v2x/src/main/res/values/strings.xml
@@ -1,7 +1,5 @@
mogo-module-v2x
- "不支持该视频。"
- 此文件不支持播放
车速
已提交
感谢已送达
diff --git a/modules/mogo-module-v2x/src/main/res/values/style.xml b/modules/mogo-module-v2x/src/main/res/values/style.xml
index 0918a68fcb..003c09ed59 100644
--- a/modules/mogo-module-v2x/src/main/res/values/style.xml
+++ b/modules/mogo-module-v2x/src/main/res/values/style.xml
@@ -1,8 +1,5 @@
-
-
-