mirror of
https://github.com/bitwarden/android.git
synced 2024-11-25 02:46:00 +03:00
Replace one-off exclusion rules with @OmitFromCoverage (#1001)
This commit is contained in:
parent
ad31994ab7
commit
7432068565
8 changed files with 14 additions and 8 deletions
|
@ -199,14 +199,6 @@ koverReport {
|
|||
"*.*ComposableSingletons*",
|
||||
// Generated classes related to interfaces with default values
|
||||
"*.*DefaultImpls*",
|
||||
// OS-level components
|
||||
"com.x8bit.bitwarden.BitwardenApplication",
|
||||
"com.x8bit.bitwarden.MainActivity*",
|
||||
"com.x8bit.bitwarden.WebAuthCallbackActivity*",
|
||||
"com.x8bit.bitwarden.data.autofill.BitwardenAutofillService*",
|
||||
"com.x8bit.bitwarden.data.push.BitwardenFirebaseMessagingService*",
|
||||
// Empty Composables
|
||||
"com.x8bit.bitwarden.ui.platform.feature.splash.SplashScreenKt",
|
||||
// Databases
|
||||
"*.database.*Database*",
|
||||
"*.dao.*Dao*",
|
||||
|
|
|
@ -5,6 +5,7 @@ import androidx.activity.viewModels
|
|||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.x8bit.bitwarden.data.autofill.manager.AutofillCompletionManager
|
||||
import com.x8bit.bitwarden.data.platform.annotation.OmitFromCoverage
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import kotlinx.coroutines.flow.launchIn
|
||||
import kotlinx.coroutines.flow.onEach
|
||||
|
@ -15,6 +16,7 @@ import javax.inject.Inject
|
|||
* selected and it requires TOTP authentication. Due to the constraints of the autofill framework,
|
||||
* we also have to re-fulfill the autofill for the views that are being filled.
|
||||
*/
|
||||
@OmitFromCoverage
|
||||
@AndroidEntryPoint
|
||||
class AutofillTotpCopyActivity : AppCompatActivity() {
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.x8bit.bitwarden
|
|||
|
||||
import android.app.Application
|
||||
import com.x8bit.bitwarden.data.auth.manager.AuthRequestNotificationManager
|
||||
import com.x8bit.bitwarden.data.platform.annotation.OmitFromCoverage
|
||||
import com.x8bit.bitwarden.data.platform.manager.CrashLogsManager
|
||||
import com.x8bit.bitwarden.data.platform.manager.NetworkConfigManager
|
||||
import dagger.hilt.android.HiltAndroidApp
|
||||
|
@ -10,6 +11,7 @@ import javax.inject.Inject
|
|||
/**
|
||||
* Custom application class.
|
||||
*/
|
||||
@OmitFromCoverage
|
||||
@HiltAndroidApp
|
||||
class BitwardenApplication : Application() {
|
||||
// Inject classes here that must be triggered on startup but are not otherwise consumed by
|
||||
|
|
|
@ -14,6 +14,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
|||
import androidx.lifecycle.lifecycleScope
|
||||
import com.x8bit.bitwarden.data.autofill.manager.AutofillActivityManager
|
||||
import com.x8bit.bitwarden.data.autofill.manager.AutofillCompletionManager
|
||||
import com.x8bit.bitwarden.data.platform.annotation.OmitFromCoverage
|
||||
import com.x8bit.bitwarden.data.platform.repository.SettingsRepository
|
||||
import com.x8bit.bitwarden.ui.platform.feature.rootnav.RootNavScreen
|
||||
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
|
||||
|
@ -25,6 +26,7 @@ import javax.inject.Inject
|
|||
/**
|
||||
* Primary entry point for the application.
|
||||
*/
|
||||
@OmitFromCoverage
|
||||
@AndroidEntryPoint
|
||||
class MainActivity : AppCompatActivity() {
|
||||
|
||||
|
|
|
@ -4,12 +4,14 @@ import android.content.Intent
|
|||
import android.os.Bundle
|
||||
import androidx.activity.viewModels
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.x8bit.bitwarden.data.platform.annotation.OmitFromCoverage
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
||||
/**
|
||||
* An activity to receive callbacks from Custom Chrome tabs or other web-auth related flows such
|
||||
* the current state of the task holding the [MainActivity] can remain undisturbed.
|
||||
*/
|
||||
@OmitFromCoverage
|
||||
@AndroidEntryPoint
|
||||
class WebAuthCallbackActivity : AppCompatActivity() {
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import android.service.autofill.SaveCallback
|
|||
import android.service.autofill.SaveRequest
|
||||
import com.x8bit.bitwarden.data.autofill.model.AutofillAppInfo
|
||||
import com.x8bit.bitwarden.data.autofill.processor.AutofillProcessor
|
||||
import com.x8bit.bitwarden.data.platform.annotation.OmitFromCoverage
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import javax.inject.Inject
|
||||
|
||||
|
@ -16,6 +17,7 @@ import javax.inject.Inject
|
|||
* The [AutofillService] implementation for the app. This fulfills autofill requests from other
|
||||
* applications.
|
||||
*/
|
||||
@OmitFromCoverage
|
||||
@AndroidEntryPoint
|
||||
class BitwardenAutofillService : AutofillService() {
|
||||
|
||||
|
|
|
@ -4,10 +4,12 @@ import androidx.compose.foundation.layout.Box
|
|||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import com.x8bit.bitwarden.data.platform.annotation.OmitFromCoverage
|
||||
|
||||
/**
|
||||
* Splash screen with empty composable content so that the Activity window background is shown.
|
||||
*/
|
||||
@OmitFromCoverage
|
||||
@Composable
|
||||
fun SplashScreen() {
|
||||
Box(modifier = Modifier.fillMaxSize())
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.x8bit.bitwarden.data.push
|
|||
|
||||
import com.google.firebase.messaging.FirebaseMessagingService
|
||||
import com.google.firebase.messaging.RemoteMessage
|
||||
import com.x8bit.bitwarden.data.platform.annotation.OmitFromCoverage
|
||||
import com.x8bit.bitwarden.data.platform.manager.PushManager
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import javax.inject.Inject
|
||||
|
@ -9,6 +10,7 @@ import javax.inject.Inject
|
|||
/**
|
||||
* Handles setup and receiving of push notifications.
|
||||
*/
|
||||
@OmitFromCoverage
|
||||
@AndroidEntryPoint
|
||||
class BitwardenFirebaseMessagingService : FirebaseMessagingService() {
|
||||
@Inject
|
||||
|
|
Loading…
Reference in a new issue