Android7.0指纹界面点击了解详情 报错问题

测试反馈一个问题,录入指纹后,点击了解详情 会出现停止运行。怎么解决

抓取log信息后发现 ,出现了空指针异常 help_url_fingerprint 这个没有赋值


    

手头上刚好有8.1带指纹的机器,发现8.1的没有问题,对比代码之后 ,问题得以解决 ,8.1已经针对uri为空的情况做了处理

M: ALPS02884741 If uri is empty

public static CharSequence linkify(CharSequence rawText, String uri, EnforcedAdmin admin) {
            SpannableString msg = new SpannableString(rawText);
            Annotation[] spans = msg.getSpans(0, msg.length(), Annotation.class);
            /// M: ALPS02884741 If uri is empty
            if (TextUtils.isEmpty(uri)) {
                CharSequence ret = rawText;
                for (Annotation annotation : spans) {
                    int start = msg.getSpanStart(annotation);
                    int end = msg.getSpanEnd(annotation);
                    ret = TextUtils.concat(ret.subSequence(0, (start > ret.length() ? ret.length()
                            : start)), msg.subSequence(end, msg.length()));
                }
                return ret;
            } else {
                SpannableStringBuilder builder = new SpannableStringBuilder(msg);
                for (Annotation annotation : spans) {
                    final String key = annotation.getValue();
                    int start = msg.getSpanStart(annotation);
                    int end = msg.getSpanEnd(annotation);
                    LearnMoreSpan link = null;
                    if (ANNOTATION_URL.equals(key)) {
                        link = new LearnMoreSpan(uri);
                    } else if (ANNOTATION_ADMIN_DETAILS.equals(key)) {
                        link = new LearnMoreSpan(admin);
                    }
                    if (link != null) {
                        builder.setSpan(link, start, end, msg.getSpanFlags(link));
                    }
                }
                return builder;
            }
        }

 

你可能感兴趣的:(Android7.0)