introduced a new function for masking for uiTron dependency injection (#87)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user