Android 在ListView中单击项目时出现看似奇怪的非法状态异常。可能的异步任务问题
正如标题所说,我得到了经典的“您需要调用Android 在ListView中单击项目时出现看似奇怪的非法状态异常。可能的异步任务问题,android,android-listview,android-asynctask,illegalstateexception,Android,Android Listview,Android Asynctask,Illegalstateexception,正如标题所说,我得到了经典的“您需要调用notifyDataSetChanged()”异常。但是,我在单击ListView项目时得到了这个结果。这可能就像忘记一个notifyDataSetChanged()一样简单,但我已经看了这么长时间的代码,多看几眼可能会有所帮助。这是一个简单的照片流应用程序,它从URL提取JSON数据,将其放入自定义对象,将其放入ArrayList,然后在ListView中显示带有名称的照片缩略图。单击该项目应将其带到照片活动。注意,我还没有为最近的选项卡实现OnItem
notifyDataSetChanged()
”异常。但是,我在单击ListView项目时得到了这个结果。这可能就像忘记一个notifyDataSetChanged()
一样简单,但我已经看了这么长时间的代码,多看几眼可能会有所帮助。这是一个简单的照片流应用程序,它从URL提取JSON数据,将其放入自定义对象,将其放入ArrayList,然后在ListView中显示带有名称的照片缩略图。单击该项目应将其带到照片活动。注意,我还没有为最近的选项卡实现OnItemClickListener()
,我会在查看到一个正在工作的选项卡时实现
更新:经过更多的测试,问题得到了更好的解决。当应用程序启动时,将弹出“进度”对话框,并按预期销毁。如果此时单击ListView项,则会得到如上所述的行为但是,如果我切换到“最近”选项卡,然后切换回,然后单击,它就会工作。如果我重新选择“浏览次数最多”选项卡,它也会起作用。可能异步任务尚未完成?如果没有,我如何更改代码,以便在后台线程完成之前用户无法与列表交互?再次感谢
更新2:尝试使用.get(长时间,时间单位.ms)
以确保异步任务
完成,但第一次更新的行为仍然存在。很明显,ListView并没有像异常所暗示的那样进行更新。考虑到我更新适配器的频率,不确定这是如何发生的
更新4:添加了一些日志。清理了我的主要活动,希望你们也能更容易阅读。尝试将我的ArrayAdapter扩展到BaseAdapter,但没有成功。:/与第一次更新中的行为相同
更新5:在此期间,我已经转移到其他事情上,但现在我又回到这个话题上。尝试解决一个不同的错误,当您更改选项卡时,数据不会更改。我注意到,在每个AsyncTaskmyAsync.get()
之前清除ArrayList将清空屏幕,即使Async应该重新填充ArrayList并用项目重新填充列表视图。似乎异步更新一次,然后再也不会更新,即使再次调用myAsync.get()
MainActivity (private nested AsyncTasks not included. Will be provided below)
public class MainActivity extends ActionBarActivity
{
final String MOST_VIEWED_URL = "http://photostream.iastate.edu/api/photo?key=14a53634bbcf67893ab7&order=views_desc";
final String MOST_RECENT_URL = "http://photostream.iastate.edu/api/photo?key=14a53634bbcf67893ab7&order=date_desc";
final StringAsync syncStringViews = new StringAsync(null);
final PhotoAsync syncImageViews = new PhotoAsync(null);
final StringAsync syncStringRecent = new StringAsync(null);
final PhotoAsync syncImageRecent = new PhotoAsync(null);
boolean isOnMostViewed = true;
public static ArrayList<PhotoItem> photos = new ArrayList<PhotoItem>(20);
boolean started = false;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
android.app.ActionBar actionBar = getActionBar();
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
}
@Override
protected void onStart()
{
super.onStart();
final PhotoArrayAdapter photoListAdapterRecent = new PhotoArrayAdapter(MainActivity.this, photos);
final PhotoArrayAdapter photoListAdapterViewed = new PhotoArrayAdapter(MainActivity.this, photos);
syncStringViews.setAdapter(photoListAdapterViewed);
syncImageViews.setAdapter(photoListAdapterViewed);
syncStringRecent.setAdapter(photoListAdapterRecent);
syncImageRecent.setAdapter(photoListAdapterRecent);
photoListAdapterViewed.setNotifyOnChange(true);
photoListAdapterRecent.setNotifyOnChange(true);
if(!syncStringViews.hasExecuted)
{
syncStringViews.execute(MOST_VIEWED_URL);
syncStringViews.hasExecuted = true;
}
if(!syncImageViews.hasExecuted)
{
syncImageViews.hasExecuted = true;
syncImageViews.execute(photos);
}
if(!syncStringRecent.hasExecuted)
{
syncStringRecent.hasExecuted = true;
syncStringRecent.execute(MOST_RECENT_URL);
}
if(!syncImageRecent.hasExecuted)
{
syncImageRecent.hasExecuted = true;
syncImageRecent.execute(photos);
}
android.app.ActionBar actionBar = getActionBar();
android.app.ActionBar.Tab tabOne = actionBar.newTab();
android.app.ActionBar.Tab tabTwo = actionBar.newTab();
tabOne.setText("Most Viewed");
tabTwo.setText("Most Recent");
tabOne.setTabListener(new TabListener()
{
@Override
public void onTabSelected(android.app.ActionBar.Tab tab, android.app.FragmentTransaction ft)
{
setContentView(R.layout.most_viewed);
final ListView viewedList = (ListView) findViewById(R.id.list_viewed);
viewedList.setAdapter(photoListAdapterViewed);
isOnMostViewed = true;
try
{
syncStringViews.get(5000, TimeUnit.MILLISECONDS);
syncImageViews.get(5000, TimeUnit.MILLISECONDS);
photoListAdapterViewed.notifyDataSetChanged();
photoListAdapterRecent.notifyDataSetChanged();
viewedList.requestLayout();
}
catch (InterruptedException e)
{
e.printStackTrace();
}
catch (ExecutionException e)
{
e.printStackTrace();
} catch (TimeoutException e)
{
e.printStackTrace();
}
//NOTE: THIS IS WHERE I SET UP MY ONCLICKLISTENER
viewedList.setOnItemClickListener(new OnItemClickListener()
{
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
Intent intent = new Intent(MainActivity.this, PhotoActivity.class);
intent.putExtra("id", photos.get(position).getId());
photoListAdapterViewed.notifyDataSetChanged();
photoListAdapterRecent.notifyDataSetChanged();
viewedList.requestLayout();
startActivity(intent);
}
});
}
@Override
public void onTabUnselected(android.app.ActionBar.Tab tab, android.app.FragmentTransaction ft)
{
photoListAdapterViewed.notifyDataSetChanged();
photoListAdapterRecent.notifyDataSetChanged();
}
@Override
public void onTabReselected(android.app.ActionBar.Tab tab, android.app.FragmentTransaction ft)
{
setContentView(R.layout.most_viewed);
final ListView viewedList = (ListView) findViewById(R.id.list_viewed);
viewedList.setAdapter(photoListAdapterViewed);
isOnMostViewed = true;
try
{
syncStringViews.get(5000, TimeUnit.MILLISECONDS);
syncImageViews.get(5000, TimeUnit.MILLISECONDS);
photoListAdapterViewed.notifyDataSetChanged();
photoListAdapterRecent.notifyDataSetChanged();
viewedList.requestLayout();
}
catch (InterruptedException e)
{
e.printStackTrace();
}
catch (ExecutionException e)
{
e.printStackTrace();
} catch (TimeoutException e) {
e.printStackTrace();
}
viewedList.setOnItemClickListener(new OnItemClickListener()
{
@Override
public void onItemClick(AdapterView<?> parent,
View view, int position, long id)
{
Intent intent = new Intent(MainActivity.this, PhotoActivity.class);
intent.putExtra("id", photos.get(position).getId());
photoListAdapterViewed.notifyDataSetChanged();
photoListAdapterRecent.notifyDataSetChanged();
viewedList.requestLayout();
startActivity(intent);
}
});
}
});
tabTwo.setTabListener(new TabListener() {
@Override
public void onTabSelected(android.app.ActionBar.Tab tab, android.app.FragmentTransaction ft)
{
setContentView(R.layout.most_recent);
ListView recentList = (ListView) findViewById(R.id.list_recent);
recentList.setAdapter(photoListAdapterRecent);
isOnMostViewed = false;
try {
syncStringRecent.get(5000, TimeUnit.MILLISECONDS);
syncImageRecent.get(5000, TimeUnit.MILLISECONDS);
photoListAdapterViewed.notifyDataSetChanged();
photoListAdapterRecent.notifyDataSetChanged();
recentList.requestLayout();
} catch (InterruptedException e) {
e.printStackTrace();
} catch (ExecutionException e) {
e.printStackTrace();
} catch (TimeoutException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
@Override
public void onTabUnselected(android.app.ActionBar.Tab tab, android.app.FragmentTransaction ft)
{
photoListAdapterViewed.notifyDataSetChanged();
photoListAdapterRecent.notifyDataSetChanged();
}
@Override
public void onTabReselected(android.app.ActionBar.Tab tab, android.app.FragmentTransaction ft)
{
setContentView(R.layout.most_recent);
ListView recentList = (ListView) findViewById(R.id.list_recent);
recentList.setAdapter(photoListAdapterRecent);
isOnMostViewed=false;
try {
syncStringRecent.get(5000, TimeUnit.MILLISECONDS);
syncImageRecent.get(5000, TimeUnit.MILLISECONDS);
photoListAdapterViewed.notifyDataSetChanged();
photoListAdapterRecent.notifyDataSetChanged();
recentList.requestLayout();
} catch (InterruptedException e) {
e.printStackTrace();
} catch (ExecutionException e) {
e.printStackTrace();
} catch (TimeoutException e) {
e.printStackTrace();
}
}
});
photoListAdapterViewed.notifyDataSetChanged();
photoListAdapterRecent.notifyDataSetChanged();
if (!started)
{
actionBar.addTab(tabOne);
actionBar.addTab(tabTwo);
started = true;
}
if(isOnMostViewed)
{
try
{
syncStringViews.get(5000, TimeUnit.MILLISECONDS);
syncImageViews.get(5000, TimeUnit.MILLISECONDS);
photoListAdapterViewed.notifyDataSetChanged();
photoListAdapterRecent.notifyDataSetChanged();
}
catch (InterruptedException e)
{
e.printStackTrace();
}
catch (ExecutionException e)
{
e.printStackTrace();
} catch (TimeoutException e) {
e.printStackTrace();
}
}
else if(!isOnMostViewed)
{
try {
syncStringRecent.get(5000, TimeUnit.MILLISECONDS);
syncImageRecent.get(5000, TimeUnit.MILLISECONDS);
photoListAdapterViewed.notifyDataSetChanged();
photoListAdapterRecent.notifyDataSetChanged();
} catch (InterruptedException e) {
e.printStackTrace();
} catch (ExecutionException e) {
e.printStackTrace();
} catch (TimeoutException e) {
e.printStackTrace();
}
}
}
我的问题源于组织不善。首先,我尝试在我的两个MVC中共享模型,这是一个坏主意。一个问题(这里没有说明,因为它不是我最直接的bug)是ListView的内容在最近查看和最近查看之间不会改变。添加一个单独的ArrayList,这样每个类型都有自己的列表就解决了这个问题。为了解决我原来的问题,我合并了StringAsync和PhotoAsync,但创建了一个单独的AsyncTask,这样我就可以有一个用于查看次数最多的照片,一个用于最近的照片。在这样做之后,为了使组织的改变工作,改变了其他逻辑,我的应用程序神奇地工作了。很好。为什么要调用PhotolistAdapterWebed.notifyDataSetChanged();在你的click listener中两次?你为什么要叫它呢?除非我的数据真的发生了变化,比如当我在列表中删除/添加一个项目时,我尝试了一个“核选项”,但有一个例外,所以我一直在到处调用notifyDataSetChanged(),只是想根除这个问题。你能显示你的列表适配器吗?@Mikel adapter added。这听起来可能很愚蠢,但如果你能,尝试更改适配器以从基本适配器扩展。我以前遇到过数组适配器提供错误大小的数据数组的问题。。。试试看,这并不难,也不太费时。它为我解决了一个类似的问题。。。
private class StringAsync extends AsyncTask<String, Integer, ArrayList<PhotoItem>>
{
public boolean hasExecuted = false;
ProgressDialog progressDialog;
PhotoArrayAdapter currentAdapter;
public StringAsync(PhotoArrayAdapter temp)
{
super();
currentAdapter = temp;
}
@Override
protected void onPreExecute()
{
progressDialog = ProgressDialog.show(MainActivity.this, "Loading Data","Getting photo details.", true);
//do initialization of required objects objects here
};
@Override
protected ArrayList<PhotoItem> doInBackground(String...urls)
{
ArrayList<PhotoItem> resultList = new ArrayList<PhotoItem>();
String result = "";
InputStream is = null;
// HTTP
try {
HttpClient httpclient = new DefaultHttpClient(); // for port 80 requests!
HttpPost httppost = new HttpPost(urls[0]);
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
is = entity.getContent();
} catch(Exception e) {
}
// Read response to string
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(is,"utf-8"),8);
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) {
sb.append(line + "\n");
}
is.close();
result = sb.toString();
} catch(Exception e) {
}
JSONArray array = new JSONArray();
try {
array = new JSONArray(result);
} catch (JSONException e1) {
e1.printStackTrace();
}
for (int i = 0; i < array.length(); i++)
{
try {
JSONObject image = array.getJSONObject(i);
PhotoItem newItem = new PhotoItem(image.getString("title"), image.getInt("id"), image.getInt("views"), image.getString("description"), image.getString("image_small"), image.getString("image_medium"));
resultList.add(newItem);
} catch (JSONException e) {
e.printStackTrace();
}
}
return resultList;
}
@Override
protected void onPostExecute(ArrayList<PhotoItem> result)
{
super.onPostExecute(result);
int i = 0;
for(i = 0; i < result.size(); i++)
{
MainActivity.photos.add(i, result.get(i));
}
if (MainActivity.photos.size() > result.size())
{
for (i = result.size() - 1; i < MainActivity.photos.size(); i++)
{
MainActivity.photos.remove(i);
}
}
currentAdapter.notifyDataSetChanged();
progressDialog.dismiss();
}
public void setAdapter(PhotoArrayAdapter temp)
{
currentAdapter = temp;
}
}
private class PhotoAsync extends AsyncTask<ArrayList<PhotoItem>, Integer, ArrayList<Bitmap>>
{
public boolean hasExecuted = false;
ProgressDialog progressDialog;
PhotoArrayAdapter currentAdapter;
public PhotoAsync(PhotoArrayAdapter temp)
{
super();
currentAdapter = temp;
}
@Override
protected void onPreExecute()
{
progressDialog = ProgressDialog.show(MainActivity.this, "Loading Data","Getting photo details.", true);
//do initialization of required objects objects here
};
@Override
protected ArrayList<Bitmap> doInBackground(ArrayList<PhotoItem>...idArg)
{
ArrayList<Bitmap> result = new ArrayList<Bitmap>();
for(int i = 0; i < idArg[0].size(); i++)
{
result.add(getBitmapFromURL(idArg[0].get(i).getThumbURL()));
result.add(getBitmapFromURL(idArg[0].get(i).getFullURL()));
}
return result;
}
@Override
protected synchronized void onPostExecute(ArrayList<Bitmap> result)
{
super.onPostExecute(result);
int position = 0;
for(int i = 0; i < result.size(); i++)
{
MainActivity.photos.get(position).setThumbImageBM(result.get(i));
if ((i + 1) != result.size()) i++;
MainActivity.photos.get(position).setFullImageBM(result.get(i));
if ((position + 1) != MainActivity.photos.size()) position++;
}
currentAdapter.notifyDataSetChanged();
progressDialog.dismiss();
}
private Bitmap getBitmapFromURL(String src)
{
try {
java.net.URL url = new java.net.URL(src);
HttpURLConnection connection = (HttpURLConnection) url
.openConnection();
connection.setDoInput(true);
connection.connect();
InputStream input = connection.getInputStream();
BitmapFactory.Options option = new BitmapFactory.Options();
option.inSampleSize = 8;
Bitmap myBitmap = BitmapFactory.decodeStream(input);
return myBitmap;
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
public void setAdapter(PhotoArrayAdapter temp)
{
currentAdapter = temp;
}
}
}
public class PhotoActivity extends ActionBarActivity
{
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_photo);
Intent intent = getIntent();
int id = intent.getIntExtra("id", 0);
Bitmap thisImage = null;
String name = "";
for(int i = 0; i < MainActivity.photos.size(); i++)
{
if(MainActivity.photos.get(i).getId() == id)
{
thisImage = MainActivity.photos.get(i).getLargeImage();
name = MainActivity.photos.get(i).getName();
}
}
this.setTitle(name);
ImageView image = (ImageView) findViewById(R.id.photo_activity_image_view);
image.setImageBitmap(thisImage);
}
}
public class PhotoArrayAdapter extends ArrayAdapter<PhotoItem>
{
private final Context myContext;
private final ArrayList<PhotoItem> myImages;
public PhotoArrayAdapter(Context context, ArrayList<PhotoItem> photos)
{
super(context,R.layout.photo_list_item_layout);
myContext = context;
myImages = photos;
}
@Override
public View getView(int position, View convertView, ViewGroup parent)
{
View v = convertView;
if (v == null)
{
LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = inflater.inflate(R.layout.photo_list_item_layout, null);
}
ImageView thumb = (ImageView) v.findViewById(R.id.image);
TextView name = (TextView) v.findViewById(R.id.title);
thumb.setImageBitmap(myImages.get(position).getThumbImage());
name.setText(myImages.get(position).getName());
return v;
}
@Override
public int getCount()
{
return myImages.size();
}
}
04-24 16:37:33.397: E/InputEventReceiver(24541): Exception dispatching input event.
04-24 16:37:33.397: E/MessageQueue-JNI(24541): Exception in MessageQueue callback: handleReceiveCallback
04-24 16:37:33.407: E/MessageQueue-JNI(24541): java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. Make sure your adapter calls notifyDataSetChanged() when its content changes. [in ListView(2131034175, class android.widget.ListView) with Adapter(class edu.iastate.its.webdev.training.photostream.PhotoArrayAdapter)]
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.widget.ListView.layoutChildren(ListView.java:1555)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.widget.AbsListView.onTouchUp(AbsListView.java:3617)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.widget.AbsListView.onTouchEvent(AbsListView.java:3429)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.View.dispatchTouchEvent(View.java:7706)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2210)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1945)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2068)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1515)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.app.Activity.dispatchTouchEvent(Activity.java:2458)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.support.v7.app.ActionBarActivityDelegateICS$WindowCallbackWrapper.dispatchTouchEvent(ActionBarActivityDelegateICS.java:268)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2016)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.View.dispatchPointerEvent(View.java:7886)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:3954)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3833)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3399)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3449)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3418)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3525)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3426)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3582)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3399)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3449)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3418)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3426)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3399)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5602)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5582)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5553)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5682)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.os.MessageQueue.nativePollOnce(Native Method)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.os.MessageQueue.next(MessageQueue.java:138)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.os.Looper.loop(Looper.java:123)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at android.app.ActivityThread.main(ActivityThread.java:5017)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at java.lang.reflect.Method.invokeNative(Native Method)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at java.lang.reflect.Method.invoke(Method.java:515)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
04-24 16:37:33.407: E/MessageQueue-JNI(24541): at dalvik.system.NativeStart.main(Native Method)
04-24 16:37:33.407: D/AndroidRuntime(24541): Shutting down VM