1. 整理依赖

2. 新增launcher1.0卡片刷新参数
This commit is contained in:
wangcongtao
2020-08-21 19:29:12 +08:00
parent 820e323a2e
commit 98445dec50
7 changed files with 26 additions and 28 deletions

View File

@@ -49,6 +49,7 @@ dependencies {
implementation rootProject.ext.dependencies.androidxcardview
kapt rootProject.ext.dependencies.aroutercompiler
implementation rootProject.ext.dependencies.rxandroid
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
if (Boolean.valueOf(RELEASE)) {
@@ -66,7 +67,6 @@ dependencies {
implementation project(':modules:mogo-module-common')
implementation project(':modules:mogo-module-gps-simulator')
}
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'com.zhidaoauto.voice.controller:api:1.0.2'
}

View File

@@ -223,14 +223,16 @@ class LauncherCardRefresher {
if ( response.getResult().getExploreWay() == null || response.getResult().getExploreWay().isEmpty() ) {
return false;
}
speakTTS( String.format( tts, response.getResult().getExploreWay().size(), mRefreshStrategy.getDesc() ) );
notifyLauncherCard( String.format( info, response.getResult().getExploreWay().size(), mRefreshStrategy.getDesc() ) );
int size = response.getResult().getExploreWay().size();
speakTTS( String.format( tts, size, mRefreshStrategy.getDesc() ) );
notifyLauncherCard( String.format( info, size, mRefreshStrategy.getDesc() ), size );
} else {
if ( response.getResult().getOnlineCar() == null || response.getResult().getOnlineCar().isEmpty() ) {
return false;
}
speakTTS( String.format( tts, response.getResult().getOnlineCar().size(), mRefreshStrategy.getDesc() ) );
notifyLauncherCard( String.format( info, response.getResult().getOnlineCar().size(), mRefreshStrategy.getDesc() ) );
int size = response.getResult().getOnlineCar().size();
speakTTS( String.format( tts, size, mRefreshStrategy.getDesc() ) );
notifyLauncherCard( String.format( info, size, mRefreshStrategy.getDesc() ), size );
}
return true;
}
@@ -243,11 +245,12 @@ class LauncherCardRefresher {
AIAssist.getInstance( mContext ).speakTTSVoice( msg );
}
private void notifyLauncherCard( String info ) {
private void notifyLauncherCard( String info, int amount ) {
Intent intent = new Intent( "com.mogo.launcher.v2x" );
intent.putExtra( "v2x_warning_type", 20000 );
intent.putExtra( "v2x_warining_timeout", 20 );
intent.putExtra( "v2x_warining_timeout", 20 * 1000L );
intent.putExtra( "v2x_warning_tts", "" );
intent.putExtra( "v2x_warning_eventCount", amount );
intent.putExtra( "v2x_warning_info", info );
mContext.sendBroadcast( intent );
}

View File

@@ -42,13 +42,9 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.core:core-ktx:1.3.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation rootProject.ext.dependencies.androidxccorektx
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
implementation rootProject.ext.dependencies.androidxrecyclerview
implementation rootProject.ext.dependencies.androidxappcompat
implementation rootProject.ext.dependencies.arouter
annotationProcessor rootProject.ext.dependencies.aroutercompiler