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

This commit is contained in:
董宏宇
2020-11-23 18:02:35 +08:00
33 changed files with 407 additions and 74 deletions

View File

@@ -355,8 +355,6 @@ dependencies {
implementation rootProject.ext.dependencies.modulesearch
implementation rootProject.ext.dependencies.mogomoduleguide
implementation rootProject.ext.dependencies.mogomoduleauth
implementation rootProject.ext.dependencies.modulemedia
implementation rootProject.ext.dependencies.moduleservice
implementation rootProject.ext.dependencies.modulesplash
implementation rootProject.ext.dependencies.mogoservice
implementation rootProject.ext.dependencies.moduleV2x
@@ -371,7 +369,6 @@ dependencies {
implementation project(':modules:mogo-module-common')
implementation project(':modules:mogo-module-search')
implementation project(':modules:mogo-module-authorize')
implementation project(':modules:mogo-module-media')
implementation project(':modules:mogo-module-service')
implementation project(':modules:mogo-module-splash')
implementation project(':modules:mogo-module-service')
@@ -394,6 +391,7 @@ dependencies {
apply from: "./functions/widgets.gradle"
apply from: "./functions/tts.gradle"
apply from: "./functions/backwidget.gradle"
apply from: "./functions/mediaui.gradle"
// implementation group: "com.tencent.matrix", name: "matrix-android-lib", version: '0.6.6', changing: true
// implementation group: "com.tencent.matrix", name: "matrix-android-commons", version: '0.6.6', changing: true

View File

@@ -1,4 +1,4 @@
// 辅助驾驶占位模块,目前部分车机不上辅助驾驶功能,使用该模块能力代替
// 返回桌面悬浮按钮
project.dependencies {
if (Boolean.valueOf(RELEASE)) {

View File

@@ -0,0 +1,9 @@
// 音乐播放模块
project.dependencies {
if (Boolean.valueOf(RELEASE)) {
launcherImplementation rootProject.ext.dependencies.modulemedia
} else {
launcherImplementation project(':modules:mogo-module-media')
}
}

View File

@@ -2,10 +2,8 @@
project.dependencies {
if (Boolean.valueOf(RELEASE)) {
independentImplementation rootProject.ext.dependencies.mogomodulewidgets
implementation rootProject.ext.dependencies.mogomodulewidgets
} else {
independentImplementation project(':modules:mogo-module-widgets')
implementation project(':modules:mogo-module-widgets')
}
}

View File

@@ -18,7 +18,6 @@ import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.MogoModule;
import com.mogo.module.common.MogoModulePaths;
import com.mogo.module.main.service.MogoMainService;
import com.mogo.module.media.MediaConstants;
import com.mogo.module.push.base.PushUIConstants;
import com.mogo.module.service.ServiceConst;
import com.mogo.module.share.constant.ShareConstants;
@@ -68,7 +67,7 @@ public class MogoApplication extends AbsMogoApplication {
if ( DebugConfig.isLauncher() ) {
MogoModulePaths.addModule( new MogoModule( MogoServicePaths.PATH_BACK, MogoServicePaths.PATH_BACK ) );
MogoModulePaths.addModule( new MogoModule( MediaConstants.TAG, MediaConstants.MODULE_TYPE ) );
MogoModulePaths.addModule( new MogoModule( MogoModulePaths.PATH_MEDIA, MogoModulePaths.PATH_MEDIA ) );
}
MogoModulePaths.addModule( new MogoModule( ServiceConst.PATH_TTS_CONFIG, ServiceConst.PATH_TTS_CONFIG ) );

View File

@@ -2,20 +2,18 @@ ext {
time = ""
kotlin_version = "1.3.71"
android = [
// applicationId : "com.mogo.launcher",
// zhidadoApplicationId: "com.zhidao.launcher",
launcherApplicationId : "com.mogo.launcher",
independentApplicationId : "com.mogo.launcher.app",
fLauncherApplicationId : "com.mogo.launcher.f",
bydautoIndependentApplicationId: "com.mogo.launcher.app.bydauto",
fLauncherAmapApiValue : "aa2c8a0547378ead2f9a37762d9dd179",
bydautoIndependentApiValue : "b1e1d527b02a493913c50985827c943a",
commonLauncherAmapApiValue : "a36b9f7b086fa3951bb35338a5a06dd3",
commonIndependentAmapApiValue : "1c3fbc5f5e183619ffb1e7bc01e6751f",
compileSdkVersion : 28,
buildToolsVersion : "29.0.2",
minSdkVersion : 19,
targetSdkVersion : 22,
launcherApplicationId : "com.mogo.launcher",
independentApplicationId : "com.mogo.launcher.app",
fLauncherApplicationId : "com.mogo.launcher.f",
bydautoIndependentApplicationId: "com.mogo.launcher.app.bydauto",
fLauncherAmapApiValue : "aa2c8a0547378ead2f9a37762d9dd179",
bydautoIndependentApiValue : "b1e1d527b02a493913c50985827c943a",
commonLauncherAmapApiValue : "a36b9f7b086fa3951bb35338a5a06dd3",
commonIndependentAmapApiValue : "1c3fbc5f5e183619ffb1e7bc01e6751f",
compileSdkVersion : 28,
buildToolsVersion : "29.0.2",
minSdkVersion : 19,
targetSdkVersion : 22,
]
dependencies = [
// androidx
@@ -135,7 +133,7 @@ targetSdkVersion : 22,
jetbrainsannotationsjava5 : "org.jetbrains:annotations-java5:15.0",
// 统一登录
accountsdk : "com.zhidao.accountservice:account-sdk:1.0.14",
accountsdk : "com.zhidao.accountservice:account-sdk:1.0.17",
// crash
crashSdk : "com.zhidaoauto.crash.log:library:1.0.5",
kotlinstdlibjdk7 : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlin_version}",

View File

@@ -32,7 +32,7 @@ dependencies {
// 上报位置
implementation 'com.zhidao.locupload:loc-upload-sdk:1.1.7'
// 长链
implementation 'com.zhidao.socket:built-in-socket:1.0.15'
implementation 'com.zhidao.socket:built-in-socket:1.0.17'
// passport
implementation 'com.zhidao.tcloginsdk:tclogin:1.1.3'

View File

@@ -21,8 +21,8 @@ import com.zhidao.ptech.connsvr.protocol.MogoConnsvr;
import com.zhidao.socket.Callback;
import com.zhidao.socket.CallbackManager;
import com.zhidao.socket.Environment;
import com.zhidao.socket.SocketClient;
import com.zhidao.socket.SocketConfig;
import com.zhidao.socket.SocketMessageDispatcher;
import com.zhidao.socket.utils.RequestUtil;
import java.util.ArrayList;
@@ -92,7 +92,7 @@ class SocketManager implements IMogoSocketManager, Callback {
.setOpenAnalytics( true )
.setSn( Utils.getSn() )
.setDebug( DebugConfig.isDebug() );
SocketMessageDispatcher.getInstance().start( context );
SocketClient.getInstance().start( context );
}
private Environment getEnvironment() {

View File

@@ -6,6 +6,7 @@ import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.tts.base.IMogoTTS;
import com.mogo.tts.base.MogoTTSConstants;
import com.mogo.tts.base.PreemptType;
import com.mogo.utils.logger.Logger;
/**
* @author congtaowang
@@ -15,6 +16,8 @@ import com.mogo.tts.base.PreemptType;
*/
public class AIAssist {
private static final String TAG = "AIAssist";
private static volatile AIAssist sInstance;
private IMogoTTS mTTS;
@@ -32,7 +35,11 @@ public class AIAssist {
public synchronized void release() {
if ( mTTS != null ) {
mTTS.release();
try {
mTTS.release();
} catch ( Exception e ) {
Logger.e( TAG, e, "release" );
}
}
sInstance = null;
}

View File

@@ -1,11 +1,13 @@
package com.mogo.map.impl.amap;
import android.content.Context;
import android.view.ViewGroup;
import com.amap.api.maps.MapView;
import com.amap.api.navi.AMapNaviView;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.map.IMogoMapView;
import com.mogo.utils.logger.Logger;
public
/**
@@ -16,6 +18,8 @@ public
*/
class AMapViewHandler {
private static final String TAG = "AMapViewHandler";
private static IMogoMapView sMapView;
public static void createMapView( Context context ) {
@@ -24,6 +28,7 @@ class AMapViewHandler {
} else {
sMapView = new AMapNaviViewWrapper( new AMapNaviView( context ) );
}
Logger.d( TAG, "初始化地图实例" );
}
public static IMogoMapView getMapView() {

View File

@@ -11,6 +11,7 @@ import androidx.annotation.Nullable;
import com.mogo.module.common.map.CustomNaviInterrupter;
import com.mogo.module.main.MainActivity;
import com.mogo.utils.TipToast;
import com.mogo.utils.UiThreadHandler;
/**
* 针对独立应用形式,做单独定制

View File

@@ -37,8 +37,7 @@ public class AnimRes {
R.drawable.mogo_tts_icon_00008,
R.drawable.mogo_tts_icon_00009,
R.drawable.mogo_tts_icon_00010,
R.drawable.mogo_tts_icon_00011
}, {
R.drawable.mogo_tts_icon_00011,
R.drawable.mogo_tts_icon_00012,
R.drawable.mogo_tts_icon_00013,
R.drawable.mogo_tts_icon_00014,
@@ -50,8 +49,7 @@ public class AnimRes {
R.drawable.mogo_tts_icon_00020,
R.drawable.mogo_tts_icon_00021,
R.drawable.mogo_tts_icon_00022,
R.drawable.mogo_tts_icon_00023
}, {
R.drawable.mogo_tts_icon_00023,
R.drawable.mogo_tts_icon_00024,
R.drawable.mogo_tts_icon_00025,
R.drawable.mogo_tts_icon_00026,
@@ -63,8 +61,7 @@ public class AnimRes {
R.drawable.mogo_tts_icon_00032,
R.drawable.mogo_tts_icon_00033,
R.drawable.mogo_tts_icon_00034,
R.drawable.mogo_tts_icon_00035
}, {
R.drawable.mogo_tts_icon_00035,
R.drawable.mogo_tts_icon_00036,
R.drawable.mogo_tts_icon_00037,
R.drawable.mogo_tts_icon_00038,
@@ -76,8 +73,7 @@ public class AnimRes {
R.drawable.mogo_tts_icon_00044,
R.drawable.mogo_tts_icon_00045,
R.drawable.mogo_tts_icon_00046,
R.drawable.mogo_tts_icon_00047
}, {
R.drawable.mogo_tts_icon_00047,
R.drawable.mogo_tts_icon_00048,
R.drawable.mogo_tts_icon_00049,
R.drawable.mogo_tts_icon_00050,
@@ -89,8 +85,7 @@ public class AnimRes {
R.drawable.mogo_tts_icon_00056,
R.drawable.mogo_tts_icon_00057,
R.drawable.mogo_tts_icon_00058,
R.drawable.mogo_tts_icon_00059
}, {
R.drawable.mogo_tts_icon_00059,
R.drawable.mogo_tts_icon_00060,
R.drawable.mogo_tts_icon_00061,
R.drawable.mogo_tts_icon_00062,

View File

@@ -70,7 +70,7 @@ public class OthersAnim implements Anim {
}
mStarted = true;
mHandler.sendEmptyMessage( MSG_LOOP );
mHandler.sendEmptyMessageDelayed( MSG_CHANGE, 60 * 1_000L );
// mHandler.sendEmptyMessageDelayed( MSG_CHANGE, 60 * 1_000L );
}
@Override

View File

@@ -36,6 +36,11 @@ public class MogoModulePaths {
*/
public static final String PATH_ENTRANCE = "/extension/entrance";
/**
* 音乐播放入口
*/
public static final String PATH_MEDIA = "/media/ui";
/**
* 添加卡片模块
*

View File

@@ -258,17 +258,18 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
mStatusManager.setDisplayOverview(TAG, false);
UiThreadHandler.removeCallbacks(mLockCarRunnable);
}
if ( mIsLock ) {
if ( mMApUIController.getCurrentUiMode() == EnumMapUI.CarUp_2D ) {
mMApUIController.changeMapMode( EnumMapUI.NorthUP_2D );
} else if( mMApUIController.getCurrentUiMode() == EnumMapUI.NorthUP_2D ){
mMApUIController.changeMapMode( EnumMapUI.CarUp_2D );
}
} else {
if ( !mApis.getRefreshStrategyControllerApi().restartAutoRefreshAtTime( 0 ) ) {
mStatusManager.setUserInteractionStatus(TAG, true, false);
mMApUIController.recoverLockMode();
}
// if ( mIsLock ) {
// if ( mMApUIController.getCurrentUiMode() == EnumMapUI.CarUp_2D ) {
// mMApUIController.changeMapMode( EnumMapUI.NorthUP_2D );
// } else if( mMApUIController.getCurrentUiMode() == EnumMapUI.NorthUP_2D ){
// mMApUIController.changeMapMode( EnumMapUI.CarUp_2D );
// }
// } else {
//
// }
if ( !mApis.getRefreshStrategyControllerApi().restartAutoRefreshAtTime( 0 ) ) {
mStatusManager.setUserInteractionStatus(TAG, true, false);
mMApUIController.recoverLockMode();
}
}
} );
@@ -753,16 +754,15 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
} else {
mExitNavi.setText(R.string.module_ext_str_continue_navi);
}
if ( isLock ) {
if ( mMApUIController.getCurrentUiMode() == EnumMapUI.CarUp_2D ) {
mMove2CurrentLocation.setImageResource( R.drawable.icon_north_up );
} else {
mMove2CurrentLocation.setImageResource( R.drawable.icon_car_up );
}
} else {
mMove2CurrentLocation.setImageResource( R.drawable.module_map_ic_move2_current_location );
}
// if ( isLock ) {
// if ( mMApUIController.getCurrentUiMode() == EnumMapUI.CarUp_2D ) {
// mMove2CurrentLocation.setImageResource( R.drawable.icon_north_up );
// } else {
// mMove2CurrentLocation.setImageResource( R.drawable.icon_car_up );
// }
// } else {
// mMove2CurrentLocation.setImageResource( R.drawable.module_map_ic_move2_current_location );
// }
}
private void traceData(String from) {
@@ -986,11 +986,11 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
mCameraMode.setSelected(ui == EnumMapUI.NorthUP_2D);
mCameraMode.setText(getString(ui == EnumMapUI.NorthUP_2D ? R.string.mode_car_up : R.string.mode_north_up));
if ( ui == EnumMapUI.CarUp_2D ) {
mMove2CurrentLocation.setImageResource( R.drawable.icon_north_up );
} else if( ui == EnumMapUI.NorthUP_2D ){
mMove2CurrentLocation.setImageResource( R.drawable.icon_car_up );
}
// if ( ui == EnumMapUI.CarUp_2D ) {
// mMove2CurrentLocation.setImageResource( R.drawable.icon_north_up );
// } else if( ui == EnumMapUI.NorthUP_2D ){
// mMove2CurrentLocation.setImageResource( R.drawable.icon_car_up );
// }
}
private static int SEEK_HELP_NOTICE_NUM_MSG_TYPE = 401015;

View File

@@ -3,11 +3,13 @@ package com.mogo.module.main;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.view.LayoutInflaterCompat;
import com.mogo.commons.context.ContextHolderUtil;
import com.mogo.commons.debug.DebugConfig;
@@ -30,6 +32,7 @@ import com.mogo.service.fragmentmanager.IMogoFragmentManager;
import com.mogo.service.module.IMogoModuleProvider;
import com.mogo.service.statusmanager.IMogoStatusManager;
import com.mogo.skin.support.SkinMode;
import com.mogo.utils.UiThreadHandler;
import com.mogo.utils.logger.Logger;
import com.zhidao.adasconfig.api.AdasConfigApiController;
import com.zhidao.adasconfig.common.log.LoggerController;
@@ -370,5 +373,6 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
SchemeIntent.getInstance().clear();
FloatingViewHandler.clear();
mServiceApis.getShareManager().releaseContext();
mServiceApis.getSkinSupportInstallerApi().onDestroy();
}
}

View File

@@ -12,6 +12,7 @@ import com.mogo.map.IMogoUiSettings;
import com.mogo.map.MogoMapView;
import com.mogo.map.uicontroller.EnumMapUI;
import com.mogo.map.uicontroller.IMogoMapUIController;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.map.MyLocationUtil;
import com.mogo.service.MogoServicePaths;
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
@@ -135,6 +136,10 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter > implements
uiSettings.setZoomGesturesEnabled( true );
mMogoMap.getUIController().changeMapMode( EnumMapUI.NorthUP_2D );
}
final EnumMapUI mapUI = MogoApisHandler.getInstance().getApis().getAdasControllerApi().getCurrentSkinMode();
getUIController().changeMapMode( mapUI );
}
}

View File

@@ -294,9 +294,6 @@ public class MapPresenter extends Presenter< MapView > implements
mCustomVoiceCommandHandler = new MapControlCommandHandler();
mCustomVoiceCommandHandler.setCallback( this );
mRegisterCenter.registerADASControlStatusChangedListener( TAG, this );
final EnumMapUI mapUI = mApis.getAdasControllerApi().getCurrentSkinMode();
mMogoMapService.getMapUIController().changeMapMode( mapUI );
}
private void initBroadcast() {

View File

@@ -67,6 +67,8 @@ class LauncherCardRefresher {
public static final int MSG_REFRESH_ADVERTISEMENT = 2022;
// 加载网络配置数据
public static final int MSG_LOAD_NET_CONFIG = 2023;
// 加载网络配置数据2
public static final int MSG_LOAD_NET_CONFIG2 = 2026;
// 默认播报
public static final int MSG_START_LOOP_DEFAULT_CARD = 2024;
// 等待网络
@@ -129,6 +131,9 @@ class LauncherCardRefresher {
case MSG_LOAD_NET_CONFIG:
loadNetworkConfigStrategy();
break;
case MSG_LOAD_NET_CONFIG2:
requestTtsStrategyConfig();
break;
case MSG_REFRESH_DEFAULT_CARD:
renderDefaultLauncherCardConfig( false );
mRefreshStrategy = mRefreshStrategy.getNext();
@@ -181,6 +186,7 @@ class LauncherCardRefresher {
.getSingletonLocationClient( mContext )
.getLastKnowLocation() != null ) {
mHandler.sendEmptyMessageDelayed( MSG_LOAD_NET_CONFIG, 0L );
mHandler.sendEmptyMessageDelayed( MSG_LOAD_NET_CONFIG2, 2 * ONE_MINUTE );
} else {
mHandler.sendEmptyMessageDelayed( MSG_WAIT_NETWORK, 10 * ONE_SECOND );
}
@@ -206,6 +212,7 @@ class LauncherCardRefresher {
mHandler.removeMessages( MSG_START_LOOP_DEFAULT_CARD );
mHandler.removeMessages( MSG_REFRESH_ADVERTISEMENT );
mHandler.removeMessages( MSG_LOAD_NET_CONFIG );
mHandler.removeMessages( MSG_LOAD_NET_CONFIG2 );
mHandler.removeMessages( MSG_WAIT_NETWORK );
Logger.d( TAG, "stop" );
}
@@ -329,7 +336,6 @@ class LauncherCardRefresher {
*/
private void loadNetworkConfigStrategy() {
loadAdvertisementConfig();
requestTtsStrategyConfig();
}
/**
@@ -397,6 +403,8 @@ class LauncherCardRefresher {
.addType( LauncherCardRefreshType.ExplorerWay.getVal() )
.addType( LauncherCardRefreshType.Weather.getVal() )
.sn( Utils.getSn() )
.cityCode( location.getCityCode() )
.cityName( location.getCityName() )
.location( new MogoLatLng( location.getLatitude(), location.getLongitude() ) );
final Map< String, Object > query = new ParamsProvider.Builder( mContext )
.append( "data", GsonUtil.jsonFromObject( body ) )

View File

@@ -425,7 +425,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
mogoMarker = drawMapMarker( markerShowEntity, ServiceConst.MARKER_Z_INDEX_HIGH );
}
} catch ( Exception e ) {
e.printStackTrace();
}
}
}

View File

@@ -20,6 +20,18 @@ class TtsConfigBody implements Parcelable {
private MogoLatLng location;
private List< String > dataType;
private String sn;
private String cityCode;
private String cityName;
public TtsConfigBody cityCode( String cityCode ) {
this.cityCode = cityCode;
return this;
}
public TtsConfigBody cityName( String cityName ) {
this.cityName = cityName;
return this;
}
public TtsConfigBody addType( String type ) {
if ( dataType == null ) {
@@ -40,6 +52,9 @@ class TtsConfigBody implements Parcelable {
}
public TtsConfigBody() {
}
@Override
public int describeContents() {
return 0;
@@ -50,15 +65,16 @@ class TtsConfigBody implements Parcelable {
dest.writeParcelable( this.location, flags );
dest.writeStringList( this.dataType );
dest.writeString( this.sn );
}
public TtsConfigBody() {
dest.writeString( this.cityCode );
dest.writeString( this.cityName );
}
protected TtsConfigBody( Parcel in ) {
this.location = in.readParcelable( MogoLatLng.class.getClassLoader() );
this.dataType = in.createStringArrayList();
this.sn = in.readString();
this.cityCode = in.readString();
this.cityName = in.readString();
}
public static final Creator< TtsConfigBody > CREATOR = new Creator< TtsConfigBody >() {

View File

@@ -257,7 +257,6 @@ public class MogoServiceApis implements IMogoServiceApis {
SingletonsHolder.registerApi( clazz, newInst );
Logger.d( TAG, "keep IProvider instance to SingletonHolder: path = %s", path );
} catch ( Exception e ) {
Logger.e( TAG, e, "error." );
}
return newInst;
}

View File

@@ -0,0 +1,122 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="module_media_music_state_location">872px</dimen>
<dimen name="module_media_music_state_location_x">1067px</dimen>
<!-- lcc start-->
<dimen name="module_media_back_width">660px</dimen>
<dimen name="module_media_back_height">660px</dimen>
<dimen name="module_media_back_radius">20px</dimen>
<dimen name="module_media_share_full_screen_back_top">23px</dimen>
<dimen name="module_media_share_share_icon_width">67.5px</dimen>
<dimen name="module_media_share_full_screen_width">67.5px</dimen>
<dimen name="module_media_share_full_screen_height">67.5px</dimen>
<dimen name="module_media_share_full_screen_pading">10px</dimen>
<dimen name="module_media_share_full_screen_margin_left_right">23px</dimen>
<dimen name="module_media_share_back_top">116px</dimen>
<dimen name="module_media_share_user_back_margin_left_right">30px</dimen>
<dimen name="module_media_share_user_back_margin_height">145px</dimen>
<dimen name="module_media_share_user_back_radius">20px</dimen>
<dimen name="module_media_share_user_head_image_left">30px</dimen>
<dimen name="module_media_share_user_head_image_width">90px</dimen>
<dimen name="module_media_share_user_head_image_height">90px</dimen>
<dimen name="module_media_share_user_name_back_margin_left">21px</dimen>
<dimen name="module_media_share_user_name_back_margin_right">24px</dimen>
<dimen name="module_media_share_user_from_size">23px</dimen>
<dimen name="module_media_share_user_name_size">26px</dimen>
<dimen name="module_media_share_user_of_share_size">30px</dimen>
<dimen name="module_media_share_user_like_back_margin_right">16px</dimen>
<dimen name="module_media_share_user_like_width">68px</dimen>
<dimen name="module_media_share_user_like_height">68px</dimen>
<dimen name="module_media_share_user_like_size">23px</dimen>
<dimen name="module_media_share_media_back_top">35px</dimen>
<dimen name="module_media_share_media_back_margin_left">56px</dimen>
<dimen name="module_media_share_media_back_margin_right">56px</dimen>
<dimen name="module_media_share_media_back_height">126px</dimen>
<dimen name="module_media_share_media_image_radius">3px</dimen>
<dimen name="module_media_share_media_image_height">116px</dimen>
<dimen name="module_media_share_media_image_width">116px</dimen>
<dimen name="module_media_share_media_name_back_left">22px</dimen>
<dimen name="module_media_share_media_song_name_size">37.5px</dimen>
<dimen name="module_media_share_media_singer_name_size">28px</dimen>
<!-- lcc end-->
<!-- lidongxiu start-->
<dimen name="module_media_share_fragment_width">790px</dimen>
<dimen name="module_media_share_fragment_height">525px</dimen>
<dimen name="module_media_share_fragment_title_padding_top">55px</dimen>
<dimen name="module_media_share_fragment_title_padding_left">61px</dimen>
<dimen name="module_media_share_fragment_bg_radius">20px</dimen>
<dimen name="module_media_share_fragment_title_img_size">136px</dimen>
<dimen name="module_media_share_fragment_title_img_right">20px</dimen>
<dimen name="module_media_share_fragment_title_height">136px</dimen>
<dimen name="module_media_share_fragment_title_padding">34px</dimen>
<dimen name="module_media_share_fragment_title_scroll_tv1_size">40px</dimen>
<dimen name="module_media_share_fragment_title_scroll_tv2_size">30px</dimen>
<dimen name="module_media_share_fragment_center_text_size">34px</dimen>
<dimen name="module_media_share_fragment_btn_size">40px</dimen>
<dimen name="module_media_share_fragment_center_margin_top">60px</dimen>
<dimen name="module_media_share_fragment_center_margin_bottom">96px</dimen>
<dimen name="module_media_share_fragment_btn_height">130px</dimen>
<dimen name="module_media_share_fragment_tv2_margin_top">4px</dimen>
<dimen name="module_media_share_fragment_img_radius">6px</dimen>
<dimen name="module_media_pop_window_width">600px</dimen>
<dimen name="module_media_pop_window_height">140px</dimen>
<dimen name="module_media_pop_window_inner_height">112px</dimen>
<dimen name="module_media_pop_window_inner_padding">30px</dimen>
<dimen name="module_media_pop_window_anim_img_size">80px</dimen>
<dimen name="module_media_pop_window_text_width">230px</dimen>
<dimen name="module_media_pop_window_text_margin">14px</dimen>
<dimen name="module_media_pop_window_text_top_size">35px</dimen>
<dimen name="module_media_pop_window_text_bottom_size">24px</dimen>
<dimen name="module_media_pop_window_control_img_size">56px</dimen>
<dimen name="module_media_pop_window_control_margin_right">40px</dimen>
<dimen name="module_media_pop_window_progress_height">8px</dimen>
<dimen name="module_media_pop_window_radius">16px</dimen>
<dimen name="module_media_pop_window_radius_margin">16px</dimen>
<dimen name="module_media_toast_share_width">500px</dimen>
<dimen name="module_media_toast_share_height">350px</dimen>
<dimen name="module_media_toast_share_bg_radius">20px</dimen>
<dimen name="module_media_toast_share_img_size">120px</dimen>
<dimen name="module_media_toast_share_text_size">36px</dimen>
<dimen name="module_media_toast_share_margin_top">20px</dimen>
<dimen name="module_media_card_width">660px</dimen>
<dimen name="module_media_card_height">660px</dimen>
<dimen name="module_media_card_radius">20px</dimen>
<dimen name="module_media_card_radius_blur">22px</dimen>
<dimen name="module_media_card_share_full_margin_top">22px</dimen>
<dimen name="module_media_card_no_share_anim_width">348px</dimen>
<dimen name="module_media_card_no_share_anim_height">348px</dimen>
<dimen name="module_media_card_no_share_anim_img_width">226px</dimen>
<dimen name="module_media_card_no_share_anim_img_height">226px</dimen>
<dimen name="module_media_card_no_share_music_top_title_size">36px</dimen>
<dimen name="module_media_card_no_share_music_bottom_title_size">28px</dimen>
<dimen name="module_media_card_no_share_music_top_title_margin">4px</dimen>
<dimen name="module_media_card_no_share_music_bottom_title_margin">2px</dimen>
<dimen name="module_media_card_progress_height">11px</dimen>
<dimen name="module_media_card_progress_time_text_size">22px</dimen>
<dimen name="module_media_card_progress_time_text_margin_left">21px</dimen>
<dimen name="module_media_card_progress_time_text_margin_right">4px</dimen>
<dimen name="module_media_card_progress_time_text_margin_bottom">6px</dimen>
<dimen name="module_media_card_control_icon_margin_bottom">2px</dimen>
<dimen name="module_media_card_control_icon_left_padding">15px</dimen>
<dimen name="module_media_card_control_icon_size">78px</dimen>
<dimen name="module_media_card_control_play_icon_size">107px</dimen>
<dimen name="module_media_card_control_play_icon_margin">53px</dimen>
<dimen name="module_media_card_progress_margin">2px</dimen>
<dimen name="module_media_card_no_share_title_margin">64px</dimen>
<dimen name="module_media_card_progress_bg_drawable_width">6px</dimen>
<dimen name="module_media_card_progress_bg_drawable_height">12px</dimen>
<dimen name="module_media_card_progress_pop_bg_drawable_width">6px</dimen>
<dimen name="module_media_card_progress_pop_bg_drawable_height">8px</dimen>
<dimen name="module_media_card_share_user_text_width_max">180px</dimen>
<dimen name="module_media_draw_rect_map_bottom">60px</dimen>
<dimen name="module_media_draw_rect_map_left">750px</dimen>
<dimen name="module_media_draw_rect_map_right">120px</dimen>
<dimen name="module_media_draw_rect_map_top">270px</dimen>
<dimen name="module_media_window_corner">30px</dimen>
</resources>

View File

@@ -0,0 +1,122 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="module_media_music_state_location">467px</dimen>
<dimen name="module_media_music_state_location_x">573px</dimen>
<!-- lcc start-->
<dimen name="module_media_back_width">352px</dimen>
<dimen name="module_media_back_height">352px</dimen>
<dimen name="module_media_back_radius">10.67px</dimen>
<dimen name="module_media_share_full_screen_back_top">12px</dimen>
<dimen name="module_media_share_share_icon_width">36px</dimen>
<dimen name="module_media_share_full_screen_width">36px</dimen>
<dimen name="module_media_share_full_screen_height">36px</dimen>
<dimen name="module_media_share_full_screen_pading">5px</dimen>
<dimen name="module_media_share_full_screen_margin_left_right">12px</dimen>
<dimen name="module_media_share_back_top">62px</dimen>
<dimen name="module_media_share_user_back_margin_left_right">16px</dimen>
<dimen name="module_media_share_user_back_margin_height">78px</dimen>
<dimen name="module_media_share_user_back_radius">10.6px</dimen>
<dimen name="module_media_share_user_head_image_left">16px</dimen>
<dimen name="module_media_share_user_head_image_width">48px</dimen>
<dimen name="module_media_share_user_head_image_height">48px</dimen>
<dimen name="module_media_share_user_name_back_margin_left">11px</dimen>
<dimen name="module_media_share_user_name_back_margin_right">12px</dimen>
<dimen name="module_media_share_user_from_size">12px</dimen>
<dimen name="module_media_share_user_name_size">14px</dimen>
<dimen name="module_media_share_user_of_share_size">16px</dimen>
<dimen name="module_media_share_user_like_back_margin_right">8px</dimen>
<dimen name="module_media_share_user_like_width">36px</dimen>
<dimen name="module_media_share_user_like_height">36px</dimen>
<dimen name="module_media_share_user_like_size">12px</dimen>
<dimen name="module_media_share_media_back_top">18px</dimen>
<dimen name="module_media_share_media_back_margin_left">30px</dimen>
<dimen name="module_media_share_media_back_margin_right">30px</dimen>
<dimen name="module_media_share_media_back_height">67.2px</dimen>
<dimen name="module_media_share_media_image_radius">3px</dimen>
<dimen name="module_media_share_media_image_height">62px</dimen>
<dimen name="module_media_share_media_image_width">62px</dimen>
<dimen name="module_media_share_media_name_back_left">12px</dimen>
<dimen name="module_media_share_media_song_name_size">20px</dimen>
<dimen name="module_media_share_media_singer_name_size">15px</dimen>
<!-- lcc end-->
<!-- lidongxiu start-->
<dimen name="module_media_share_fragment_width">421px</dimen>
<dimen name="module_media_share_fragment_height">280px</dimen>
<dimen name="module_media_share_fragment_title_padding_top">28px</dimen>
<dimen name="module_media_share_fragment_title_padding_left">32.5px</dimen>
<dimen name="module_media_share_fragment_bg_radius">11.5px</dimen>
<dimen name="module_media_share_fragment_title_img_size">72.5px</dimen>
<dimen name="module_media_share_fragment_title_img_right">10.7px</dimen>
<dimen name="module_media_share_fragment_title_height">72.5px</dimen>
<dimen name="module_media_share_fragment_title_padding">10px</dimen>
<dimen name="module_media_share_fragment_title_scroll_tv1_size">22px</dimen>
<dimen name="module_media_share_fragment_title_scroll_tv2_size">16px</dimen>
<dimen name="module_media_share_fragment_center_text_size">18px</dimen>
<dimen name="module_media_share_fragment_btn_size">22px</dimen>
<dimen name="module_media_share_fragment_center_margin_top">32px</dimen>
<dimen name="module_media_share_fragment_center_margin_bottom">51px</dimen>
<dimen name="module_media_share_fragment_btn_height">68px</dimen>
<dimen name="module_media_share_fragment_tv2_margin_top">2px</dimen>
<dimen name="module_media_share_fragment_img_radius">3.2px</dimen>
<dimen name="module_media_pop_window_width">338px</dimen>
<dimen name="module_media_pop_window_height">82px</dimen>
<dimen name="module_media_pop_window_inner_height">60px</dimen>
<dimen name="module_media_pop_window_inner_padding">18px</dimen>
<dimen name="module_media_pop_window_anim_img_size">44px</dimen>
<dimen name="module_media_pop_window_text_width">123px</dimen>
<dimen name="module_media_pop_window_text_margin">10px</dimen>
<dimen name="module_media_pop_window_text_top_size">18px</dimen>
<dimen name="module_media_pop_window_text_bottom_size">14px</dimen>
<dimen name="module_media_pop_window_control_img_size">30px</dimen>
<dimen name="module_media_pop_window_control_margin_right">21px</dimen>
<dimen name="module_media_pop_window_progress_height">4px</dimen>
<dimen name="module_media_pop_window_radius">8px</dimen>
<dimen name="module_media_pop_window_radius_margin">7px</dimen>
<dimen name="module_media_toast_share_width">267px</dimen>
<dimen name="module_media_toast_share_height">187px</dimen>
<dimen name="module_media_toast_share_bg_radius">10px</dimen>
<dimen name="module_media_toast_share_img_size">64px</dimen>
<dimen name="module_media_toast_share_text_size">18px</dimen>
<dimen name="module_media_toast_share_margin_top">11px</dimen>
<dimen name="module_media_card_width">352px</dimen>
<dimen name="module_media_card_height">352px</dimen>
<dimen name="module_media_card_radius">10.5px</dimen>
<dimen name="module_media_card_radius_blur">11px</dimen>
<dimen name="module_media_card_share_full_margin_top">11.5px</dimen>
<dimen name="module_media_card_no_share_anim_width">175px</dimen>
<dimen name="module_media_card_no_share_anim_height">175px</dimen>
<dimen name="module_media_card_no_share_anim_img_width">114px</dimen>
<dimen name="module_media_card_no_share_anim_img_height">114px</dimen>
<dimen name="module_media_card_no_share_music_top_title_size">20px</dimen>
<dimen name="module_media_card_no_share_music_bottom_title_size">15px</dimen>
<dimen name="module_media_card_no_share_music_top_title_margin">4px</dimen>
<dimen name="module_media_card_no_share_music_bottom_title_margin">2px</dimen>
<dimen name="module_media_card_progress_height">6px</dimen>
<dimen name="module_media_card_progress_time_text_size">12px</dimen>
<dimen name="module_media_card_progress_time_text_margin_left">11px</dimen>
<dimen name="module_media_card_progress_time_text_margin_bottom">4px</dimen>
<dimen name="module_media_card_control_icon_margin_bottom">1px</dimen>
<dimen name="module_media_card_control_icon_left_padding">8px</dimen>
<dimen name="module_media_card_control_icon_size">44px</dimen>
<dimen name="module_media_card_control_play_icon_size">62px</dimen>
<dimen name="module_media_card_control_play_icon_margin">28px</dimen>
<dimen name="module_media_card_progress_margin">1px</dimen>
<dimen name="module_media_card_no_share_title_margin">35px</dimen>
<dimen name="module_media_card_progress_bg_drawable_width">3.2px</dimen>
<dimen name="module_media_card_progress_bg_drawable_height">6.4px</dimen>
<dimen name="module_media_card_progress_pop_bg_drawable_width">3px</dimen>
<dimen name="module_media_card_progress_pop_bg_drawable_height">4px</dimen>
<dimen name="module_media_card_share_user_text_width_max">96px</dimen>
<dimen name="module_media_draw_rect_map_bottom">32px</dimen>
<dimen name="module_media_draw_rect_map_left">400px</dimen>
<dimen name="module_media_draw_rect_map_right">80px</dimen>
<dimen name="module_media_draw_rect_map_top">150px</dimen>
<dimen name="module_media_window_corner">16px</dimen>
</resources>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="module_widgets_app_bkg_corner">4px</dimen>
</resources>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="module_widgets_app_bkg_corner">4px</dimen>
</resources>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="module_widgets_app_bkg_corner">8px</dimen>
</resources>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="module_widgets_app_bkg_corner">8px</dimen>
</resources>

View File

@@ -11,6 +11,7 @@ import androidx.appcompat.app.AppCompatDelegate;
import androidx.appcompat.app.SkinAppCompatDelegateImpl;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.skin.support.IMogoSkinSupportInstaller;
import com.mogo.skin.support.SkinMode;
import com.mogo.skin.support.SkinSupportInstallerConstants;
@@ -75,4 +76,9 @@ class SkinSupportInstaller implements IMogoSkinSupportInstaller {
public void init( Context context ) {
}
@Override
public void onDestroy() {
SkinCompatManager.destroy();
}
}

View File

@@ -51,4 +51,9 @@ class SkinSupportInstaller implements IMogoSkinSupportInstaller {
public void init( Context context ) {
}
@Override
public void onDestroy() {
}
}

View File

@@ -26,4 +26,6 @@ interface IMogoSkinSupportInstaller extends IProvider {
AppCompatDelegate getSkinAppCompatDelegate( AppCompatActivity activity, AppCompatDelegate superDelegate, AppCompatCallback callback );
void onCompensateActivityCreated( Activity activity, Bundle savedInstanceState );
void onDestroy();
}

View File

@@ -152,6 +152,15 @@ public class SkinCompatManager extends SkinObservable {
return sInstance;
}
public static void destroy(){
sInstance.onDestroy();
sInstance = null;
}
public void onDestroy(){
SkinActivityLifecycle.destroy((Application)mAppContext);
}
/**
* 初始化换肤框架监听Activity生命周期. 通过该方法初始化应用中Activity无需继承{@link skin.support.app.SkinCompatActivity}.
*

View File

@@ -5,6 +5,7 @@ import android.app.Application;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import java.lang.ref.WeakReference;
@@ -13,12 +14,12 @@ import java.util.WeakHashMap;
import skin.support.SkinCompatManager;
import skin.support.annotation.Skinable;
import skin.support.content.res.SkinCompatResources;
import skin.support.content.res.SkinCompatThemeUtils;
import skin.support.observe.SkinObservable;
import skin.support.observe.SkinObserver;
import skin.support.utils.Slog;
import skin.support.view.LayoutInflaterCompat;
import skin.support.widget.SkinCompatSupportable;
import skin.support.content.res.SkinCompatThemeUtils;
import static skin.support.widget.SkinCompatHelper.INVALID_ID;
import static skin.support.widget.SkinCompatHelper.checkResourceId;
@@ -52,6 +53,7 @@ public class SkinActivityLifecycle implements Application.ActivityLifecycleCallb
@Override
public void onActivityCreated( Activity activity, Bundle savedInstanceState ) {
Log.d( "onCreated", "----onCreated2" );
onCompensateActivityCreated( activity, savedInstanceState );
}
@@ -201,4 +203,10 @@ public class SkinActivityLifecycle implements Application.ActivityLifecycleCallb
mMarkNeedUpdate = false;
}
}
public static void destroy(Application application){
application.unregisterActivityLifecycleCallbacks( sInstance );
sInstance = null;
}
}