This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
====================== | |
Proton: 1688329964 GE-Proton8-6 | |
SteamGameId: 2108330 | |
Command: ['/mnt/ssd/SteamLibrary/steamapps/common/F1 23/F1_23.exe'] | |
Options: {'forcelgadd'} | |
depot: 0.20230509.49493 | |
pressure-vessel: 0.20230509.0 scout | |
scripts: 0.20230509.0 | |
sniper: 0.20230509.49493 sniper 0.20230509.49493 | |
Kernel: Linux 6.4.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 11 Jul 2023 05:13:39 +0000 x86_64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Computer Information: | |
Manufacturer: ASUSTeK COMPUTER INC. | |
Model: TUF GAMING Z690-PLUS WIFI D4 | |
Form Factor: Desktop | |
No Touch Input Detected | |
Processor Information: | |
CPU Vendor: GenuineIntel | |
CPU Brand: 12th Gen Intel(R) Core(TM) i7-12700K | |
CPU Family: 0x6 | |
CPU Model: 0x97 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainRepo( | |
val provideOkHttp: () -> OkHttpClient, | |
val provideGson: () -> Gson | |
) { | |
fun fetchSomething() { | |
thread { | |
val okHttp = provideOkHttp() | |
val gson = provideGson() | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@InstallIn(SingletonComponent::class) | |
@Module | |
object NetworkModule { | |
@Singleton | |
fun provideOkHttp(): OkHttpClient { | |
// verify not main thread | |
assert(Looper.getMainLooper() != Looper.myLooper()) | |
return OkHttpClient.Builder().build() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@InstallIn(SingletonComponent::class) | |
@Module | |
object NetworkModule { | |
@Singleton | |
fun provideOkHttp(): OkHttpClient { | |
// verify not main thread | |
assert(Looper.getMainLooper() != Looper.myLooper()) | |
return OkHttpClient.Builder().build() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationInitializer @Inject constructor( | |
private val provideOkHttp: Provider<OkHttpClient>, | |
private val provideGson: Provider<Gson> | |
) { | |
fun initTracking() { | |
thread { | |
val okhttp = provideOkHttp.get() | |
val gson = provideGson.get() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package javax.inject; | |
public interface Provider<T> { | |
T get(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@InstallIn(SingletonComponent::class) | |
@Module | |
object NetworkModule { | |
@Singleton | |
fun provideOkHttp(): OkHttpClient { | |
return OkHttpClient.Builder().build() | |
} | |
@Singleton |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationInitializer @Inject constructor( | |
private val okHttpClient: OkHttpClient, | |
private val gson: Gson | |
) { | |
fun initTracking() { | |
thread { | |
// init async | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyApplication : Application() { | |
lateinit var componentManager: ApplicationComponentManager | |
@Inject | |
lateinit var appInit: ApplicationInitializer | |
override fun onCreate() { | |
super.onCreate() | |
val component = DaggerApplicationComponentManager | |
.applicationModule(ApplicationModule(this)) |
NewerOlder