增加离线地图下载流程
This commit is contained in:
@@ -54,7 +54,8 @@ class GlobalModule {
|
||||
}
|
||||
}.apply {
|
||||
level = if (Constant.DEBUG) {
|
||||
HttpLoggingInterceptor.Level.BODY
|
||||
//坑 !!!! 下载文件时打印log 内存不足
|
||||
HttpLoggingInterceptor.Level.HEADERS
|
||||
} else {
|
||||
HttpLoggingInterceptor.Level.NONE
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.navinfo.omqs.hilt
|
||||
|
||||
import android.content.Context
|
||||
import com.navinfo.collect.library.map.NIMapController
|
||||
import com.navinfo.omqs.http.RetrofitNetworkServiceAPI
|
||||
import com.navinfo.omqs.http.offlinemapdownload.OfflineMapDownloadManager
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
@@ -26,8 +27,10 @@ class MainActivityModule {
|
||||
*/
|
||||
@ActivityRetainedScoped
|
||||
@Provides
|
||||
fun providesOfflineMapDownloadManager(@ActivityContext context: Context): OfflineMapDownloadManager =
|
||||
OfflineMapDownloadManager(context)
|
||||
fun providesOfflineMapDownloadManager(
|
||||
networkServiceAPI: RetrofitNetworkServiceAPI
|
||||
): OfflineMapDownloadManager =
|
||||
OfflineMapDownloadManager( networkServiceAPI)
|
||||
|
||||
/**
|
||||
* 实验失败,这样创建,viewmodel不会在activity销毁的时候同时销毁
|
||||
@@ -35,7 +38,6 @@ class MainActivityModule {
|
||||
// @ActivityRetainedScoped
|
||||
// @Provides
|
||||
// fun providesMainViewModel(mapController: NIMapController): MainViewModel {
|
||||
// Log.e("jingo", "MainViewModel 被创建")
|
||||
// return MainViewModel(mapController)
|
||||
// }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user