在Android上使用自定义键盘在IInputContextCallback上等待超时 [英] Timed out waiting on IInputContextCallback with custom keyboard on Android

查看:261
本文介绍了在Android上使用自定义键盘在IInputContextCallback上等待超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经开发了适用于Android的自定义键盘,但我们面临着一个奇怪的问题.目前,该问题仅在少数设备上和在我们的登录网站上才会发生...但这会导致我们的键盘挂起很长时间,最终使用户可以选择关闭或继续等待.

We've developed a custom keyboard for Android and we're facing a weird issue. The issue currently only happens on few devices and on our login website... But it causes our keyboard to hang for a very long time eventually giving the user the option to close or continue to wait.

确切地说,我们有一个自定义键盘,该键盘具有一个登录页面(片段Web视图),该输入页面的键输入响应时间较慢.

To be precise we have a custom keyboard which has a login page (fragment webview) that has slow response time for key inputs.

以下是堆栈跟踪的重要部分:

Following stack trace is the important part:

11-17 09:35:07.535 5935-5935/xxx W/InputConnectionWrapper.ICC: Timed out waiting on IInputContextCallback

可以在此处阅读Android源文件:

The Android source file can be read here: https://android.googlesource.com/platform/frameworks/base.git/+/b798689749c64baba81f02e10cf2157c747d6b46/core/java/com/android/internal/view/InputConnectionWrapper.java

但是问题是它正在等待某些我看不到的东西(一个辅助文件):

But the problem is it is waiting on something that I can't see the source for (an aidl file): https://android.googlesource.com/platform/frameworks/base.git/+/android-4.2.2_r1/core/java/com/android/internal/view/IInputContext.aidl

所以我不知道我们在做什么错(其他键盘没有这个问题),我也不知道该如何调试.我尝试从chrome访问网页,也没有从启用了其他键盘的应用中访问任何问题,但是仍然没有问题.

So I have no idea about what we're doing wrong (other keyboards don't have this issue) and I don't really know how I should debug it. I've tryed accessing the webpage from chrome with no issues also from the app with other keyboards enabled and still no issues.

任何有关如何进行的想法都将不胜感激.

Any ideas on how to proceed would be greatly appreciated.

推荐答案

因此,这似乎是Android 7.0引入的错误"(可能与新的Web客户端有关).该错误只是一个与WebView相同的过程中的自定义键盘,将导致输入字段出现问题.解决方案是将活动与WebView(s)放在一个单独的过程中.

So this seems to be a "bug" introduced by Android 7.0 (maybe related to the new web client). The bug simply is a custom keyboard in the same process as WebView will give issues with input fields. The solution is to put the activity with WebView(s) in a seperate process.

清单示例:

    <activity
        android:process=":webactivity"
        android:label="real label"
        android:name="com.something.activity"
        />

这篇关于在Android上使用自定义键盘在IInputContextCallback上等待超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆