Skip to content

Commit

Permalink
ISSUE-656: fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
OvsyannikovMaksim committed Aug 16, 2024
1 parent 06fdd20 commit 8a79a7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package com.kaspersky.kaspresso.params

data class SystemDialogsSafetyParams(
val shouldIgnoreKeyboard: Boolean,
val shouldIgnorePermissionController: Boolean
val shouldIgnorePermissionDialogs: Boolean
) {
companion object {
fun default() = SystemDialogsSafetyParams(
shouldIgnoreKeyboard = false,
shouldIgnorePermissionController = false
shouldIgnorePermissionDialogs = false
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ class SystemDialogSafetyProviderImpl(
*/
private fun isAndroidSystemDetected(): Boolean {
with(uiDevice) {
var isSystemDialogVisible = if (systemDialogsSafetyParams.shouldIgnorePermissionController) {
SystemDialogSafetyPattern.values().filter { it != SystemDialogSafetyPattern.PERMISSION_API30 }.any { isVisible(By.pkg(it.pattern).clazz(FrameLayout::class.java)) }
var isSystemDialogVisible = if (systemDialogsSafetyParams.shouldIgnorePermissionDialogs) {
SystemDialogSafetyPattern.values().filter { it != SystemDialogSafetyPattern.PERMISSION_API30 && it != SystemDialogSafetyPattern.PERMISSION_API23}
.any { isVisible(By.pkg(it.pattern).clazz(FrameLayout::class.java)) }
} else {
SystemDialogSafetyPattern.values().any { isVisible(By.pkg(it.pattern).clazz(FrameLayout::class.java)) }
}
Expand Down

0 comments on commit 8a79a7e

Please sign in to comment.