Skip to content

Commit

Permalink
update 对外显示名
Browse files Browse the repository at this point in the history
  • Loading branch information
gallonyin committed Aug 26, 2023
1 parent 746d791 commit e76f704
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ object WeworkGetImpl {
val newFirstTv = AccessibilityUtil.findOneByClazz(getRoot(), Views.TextView)
val nickname = newFirstTv?.text?.toString()
if (nickname != null) {
LogUtils.d("找到我的昵称")
log("找到我的昵称")
var corp: String? = null
val info = StringBuilder()
Expand Down Expand Up @@ -518,6 +519,14 @@ object WeworkGetImpl {
*/
private fun getRealName(nickname: String) {
if (AccessibilityExtraUtil.loadingPage("SettingMineInfoActivity")) {
val external = AccessibilityUtil.findOnceByText(getRoot(), "对外信息", "对外显示")
val tvExternal = AccessibilityUtil.findAllOnceByClazz(external?.parent, Views.TextView).firstOrNull { it.text != null && it.text.toString().contains("") }
val split = tvExternal?.text?.toString()?.split("")
if (split != null) {
val externalName = split[0]
LogUtils.d("对外显示名: $externalName")
log("对外显示名: $externalName")
}
if (AccessibilityUtil.findTextAndClick(getRoot(), "姓名", exact = true)) {
val realNameFlag = AccessibilityUtil.findOneByText(getRoot(), "实名认证", exact = true)
if (realNameFlag != null) {
Expand Down

0 comments on commit e76f704

Please sign in to comment.