introduced a new function for masking for uiTron dependency injection (#87)

This commit is contained in:
Sayed Owais Ali
2023-12-26 20:02:50 +05:30
committed by GitHub
parent aae175fe8e
commit a63b842bd5
3 changed files with 21 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ plugins {
id 'kotlin-parcelize'
}
def VERSION_NAME = "1.0.18"
def VERSION_NAME = "1.0.19"
android {
namespace 'com.navi.alfred'

View File

@@ -4,7 +4,11 @@ import android.view.View
import com.navi.alfred.model.MaskingBounds
interface ComposeMaskingRepo {
fun maskSensitiveComposable(id: String, coordinates: MaskingBounds?, currentView: View?)
fun maskSensitiveComposable(id: String, coordinates: MaskingBounds?, rootView: View?)
fun maskSensitiveUiTronComposable(id: String, left: Float?, top: Float?, right: Float?, bottom: Float?, rootView: View?)
fun removeSensitiveComposable(id: String)
fun blurSensitiveScreen(isVisible: Boolean)
}

View File

@@ -25,6 +25,21 @@ class ComposeMaskingRepoImpl : ComposeMaskingRepo {
}
}
override fun maskSensitiveUiTronComposable(
id: String,
left: Float?,
top: Float?,
right: Float?,
bottom: Float?,
rootView: View?
) {
if (left == null || top == null || right == null || bottom == null) {
return
}
val coordinates = MaskingBounds(left, top, right, bottom)
maskSensitiveComposable(id, coordinates, rootView)
}
override fun removeSensitiveComposable(id: String) {
if (AlfredManager.isAlfredRecordingEnabled()) {
if (sensitiveCoordinates.containsKey(id)) {