gpt4 book ai didi

android - 禁用 Google 密码管理器列出 Android 中保存的密码?

转载 作者:行者123 更新时间:2023-11-29 22:47:41 25 4
gpt4 key购买 nike

我无法执行我的 android espresso 单元测试,它失败了:

// (kotlin syntax)
closeSoftKeyboard()
onView(withId(R.id.et_login_mobile_number)).perform(TypeTextAction(invalidMobileNo))
closeSoftKeyboard()

androidx.test.espresso.InjectEventSecurityException: java.lang.SecurityException: Injecting to another application requires INJECT_EVENTS permission.

我终于了解到:任何意外的动画出现在正在进行自动化测试的 UI 上都可能会中断该过程。

所以我怀疑这是由于 Google 密码管理器 提示保存的密码列表不断弹出,它可能是导致中断的原因。

enter image description here

我现在正在寻找的是:从建议保存的密码中关闭 GOOGLE 密码管理器的方法

我只找到了

Manage offers to save passwords

而且没有办法关闭/禁用它


enter image description here


在我最终从 Google 密码管理器中删除了所有保存的密码后,现在它出现了建议自动填充文本(请比较两个屏幕截图)

我已经包含如下属性,它仍然不会阻止自动填充到 Android 8 及更高版本的设备。

android:inputType="number|textNoSuggestions|textFilter"

enter image description here


最佳答案

根据这个Answer ,

android:importantForAutofill="no"

用于阻止Android 8 及更高版本的默认自动填充Google 密码管理器

关于android - 禁用 Google 密码管理器列出 Android 中保存的密码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58180576/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com