Committed by
GitHub
Remove unneeded nullable annotations (#581)
* Remove unneeded nullable annotations * spotless
正在显示
2 个修改的文件
包含
2 行增加
和
10 行删除
| 1 | /* | 1 | /* |
| 2 | - * Copyright 2023-2024 LiveKit, Inc. | 2 | + * Copyright 2023-2025 LiveKit, Inc. |
| 3 | * | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. | 5 | * you may not use this file except in compliance with the License. |
| @@ -21,7 +21,6 @@ import android.javax.sdp.SdpFactory | @@ -21,7 +21,6 @@ import android.javax.sdp.SdpFactory | ||
| 21 | import android.media.AudioAttributes | 21 | import android.media.AudioAttributes |
| 22 | import android.media.MediaRecorder | 22 | import android.media.MediaRecorder |
| 23 | import android.os.Build | 23 | import android.os.Build |
| 24 | -import androidx.annotation.Nullable | ||
| 25 | import dagger.Module | 24 | import dagger.Module |
| 26 | import dagger.Provides | 25 | import dagger.Provides |
| 27 | import io.livekit.android.LiveKit | 26 | import io.livekit.android.LiveKit |
| @@ -148,10 +147,8 @@ internal object RTCModule { | @@ -148,10 +147,8 @@ internal object RTCModule { | ||
| 148 | @JvmSuppressWildcards | 147 | @JvmSuppressWildcards |
| 149 | fun audioModule( | 148 | fun audioModule( |
| 150 | @Named(InjectionNames.OVERRIDE_AUDIO_DEVICE_MODULE) | 149 | @Named(InjectionNames.OVERRIDE_AUDIO_DEVICE_MODULE) |
| 151 | - @Nullable | ||
| 152 | audioDeviceModuleOverride: AudioDeviceModule?, | 150 | audioDeviceModuleOverride: AudioDeviceModule?, |
| 153 | @Named(InjectionNames.OVERRIDE_JAVA_AUDIO_DEVICE_MODULE_CUSTOMIZER) | 151 | @Named(InjectionNames.OVERRIDE_JAVA_AUDIO_DEVICE_MODULE_CUSTOMIZER) |
| 154 | - @Nullable | ||
| 155 | moduleCustomizer: ((builder: JavaAudioDeviceModule.Builder) -> Unit)?, | 152 | moduleCustomizer: ((builder: JavaAudioDeviceModule.Builder) -> Unit)?, |
| 156 | audioOutputAttributes: AudioAttributes, | 153 | audioOutputAttributes: AudioAttributes, |
| 157 | appContext: Context, | 154 | appContext: Context, |
| @@ -250,7 +247,6 @@ internal object RTCModule { | @@ -250,7 +247,6 @@ internal object RTCModule { | ||
| 250 | @Singleton | 247 | @Singleton |
| 251 | fun eglBase( | 248 | fun eglBase( |
| 252 | @Named(InjectionNames.OVERRIDE_EGL_BASE) | 249 | @Named(InjectionNames.OVERRIDE_EGL_BASE) |
| 253 | - @Nullable | ||
| 254 | eglBaseOverride: EglBase?, | 250 | eglBaseOverride: EglBase?, |
| 255 | memoryManager: CloseableManager, | 251 | memoryManager: CloseableManager, |
| 256 | ): EglBase { | 252 | ): EglBase { |
| @@ -271,7 +267,6 @@ internal object RTCModule { | @@ -271,7 +267,6 @@ internal object RTCModule { | ||
| 271 | videoHwAccel: Boolean, | 267 | videoHwAccel: Boolean, |
| 272 | eglContext: EglBase.Context, | 268 | eglContext: EglBase.Context, |
| 273 | @Named(InjectionNames.OVERRIDE_VIDEO_ENCODER_FACTORY) | 269 | @Named(InjectionNames.OVERRIDE_VIDEO_ENCODER_FACTORY) |
| 274 | - @Nullable | ||
| 275 | videoEncoderFactoryOverride: VideoEncoderFactory?, | 270 | videoEncoderFactoryOverride: VideoEncoderFactory?, |
| 276 | ): VideoEncoderFactory { | 271 | ): VideoEncoderFactory { |
| 277 | return videoEncoderFactoryOverride ?: if (videoHwAccel) { | 272 | return videoEncoderFactoryOverride ?: if (videoHwAccel) { |
| @@ -316,7 +311,6 @@ internal object RTCModule { | @@ -316,7 +311,6 @@ internal object RTCModule { | ||
| 316 | videoHwAccel: Boolean, | 311 | videoHwAccel: Boolean, |
| 317 | eglContext: EglBase.Context, | 312 | eglContext: EglBase.Context, |
| 318 | @Named(InjectionNames.OVERRIDE_VIDEO_DECODER_FACTORY) | 313 | @Named(InjectionNames.OVERRIDE_VIDEO_DECODER_FACTORY) |
| 319 | - @Nullable | ||
| 320 | videoDecoderFactoryOverride: VideoDecoderFactory?, | 314 | videoDecoderFactoryOverride: VideoDecoderFactory?, |
| 321 | ): VideoDecoderFactory { | 315 | ): VideoDecoderFactory { |
| 322 | return videoDecoderFactoryOverride ?: if (videoHwAccel) { | 316 | return videoDecoderFactoryOverride ?: if (videoHwAccel) { |
| 1 | /* | 1 | /* |
| 2 | - * Copyright 2023-2024 LiveKit, Inc. | 2 | + * Copyright 2023-2025 LiveKit, Inc. |
| 3 | * | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. | 5 | * you may not use this file except in compliance with the License. |
| @@ -18,7 +18,6 @@ package io.livekit.android.dagger | @@ -18,7 +18,6 @@ package io.livekit.android.dagger | ||
| 18 | 18 | ||
| 19 | import android.content.Context | 19 | import android.content.Context |
| 20 | import android.net.ConnectivityManager | 20 | import android.net.ConnectivityManager |
| 21 | -import androidx.annotation.Nullable | ||
| 22 | import dagger.Module | 21 | import dagger.Module |
| 23 | import dagger.Provides | 22 | import dagger.Provides |
| 24 | import dagger.Reusable | 23 | import dagger.Reusable |
| @@ -42,7 +41,6 @@ internal object WebModule { | @@ -42,7 +41,6 @@ internal object WebModule { | ||
| 42 | @Singleton | 41 | @Singleton |
| 43 | fun okHttpClient( | 42 | fun okHttpClient( |
| 44 | @Named(InjectionNames.OVERRIDE_OKHTTP) | 43 | @Named(InjectionNames.OVERRIDE_OKHTTP) |
| 45 | - @Nullable | ||
| 46 | okHttpClientOverride: OkHttpClient?, | 44 | okHttpClientOverride: OkHttpClient?, |
| 47 | ): OkHttpClient { | 45 | ): OkHttpClient { |
| 48 | return okHttpClientOverride ?: OkHttpClient() | 46 | return okHttpClientOverride ?: OkHttpClient() |
-
请 注册 或 登录 后发表评论