访问行如下:
int type = blackWhiteCursor.getInt(blackWhiteCursor.getColumnIndex(Filters.TYPE));
出现log信息:
05-06 10:10:06.865: ERROR/AndroidRuntime(4061): Caused by: android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 1
05-06 10:10:06.865: ERROR/AndroidRuntime(4061): at android.database.AbstractCursor.checkPosition(AbstractCursor.java:580)
05-06 10:10:06.865: ERROR/AndroidRuntime(4061): at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:214)
05-06 10:10:06.865: ERROR/AndroidRuntime(4061): at android.database.AbstractWindowedCursor.getInt(AbstractWindowedCursor.java:84)
05-06 10:10:06.865: ERROR/AndroidRuntime(4061): at android.database.CursorWrapper.getInt(CursorWrapper.java:123)
05-06 10:10:06.865: ERROR/AndroidRuntime(4061): at cn.flyfot.filter.callfilter.RuleService.blockCommonModehandler(RuleService.java:293)
05-06 10:10:06.865: ERROR/AndroidRuntime(4061): at cn.flyfot.filter.callfilter.RuleService.blockingHandler(RuleService.java:574)
05-06 10:10:06.865: ERROR/AndroidRuntime(4061): at cn.flyfot.filter.callfilter.PhoneStateListenerReceiver.blockingHandler(PhoneStateListenerReceiver.java:172)
05-06 10:10:06.865: ERROR/AndroidRuntime(4061): at cn.flyfot.filter.callfilter.PhoneStateListenerReceiver.doReceiver(PhoneStateListenerReceiver.java:57)
05-06 10:10:06.865: ERROR/AndroidRuntime(4061): at cn.flyfot.filter.callfilter.PhoneStateListenerReceiver.onReceive(PhoneStateListenerReceiver.java:39)
05-06 10:10:06.865: ERROR/AndroidRuntime(4061): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2810)
解决问题:
出现以上错误是由于没有移动游标或是没有查询到需要的数据而移动了游标强制获取某一行数据而导致的,注意查询条件和右边移动。
分享到:
相关推荐
GPEs, to be used for debugging systems with a large number of ACPI interrupts. Implemented support for the "DMAR" ACPI table (DMA Redirection Table) in both the ACPICA headers and the disassembler. ...
b) Since each user requires 1Mbps when transmitting, if two or fewer users transmit simultaneously, a maximum of 2Mbps will be required. Since the available bandwidth of the shared link is 2Mbps, ...
- Support for S7-200 with CP 243-1 was added. Solved problems: - Passing of invalid OPC Item IDs caused a memory leak of the driver's global memory. After the global memory was exhausted, the ...
Overview Package Class Tree Deprecated Index Help PREV NEXT FRAMES NO FRAMES A B C D E F G H I J L P R S U V -------------------------------------------------------------------------------- A ...
For a process to access 3 GB of address space, the executable image must have been linked with the /LARGEADDRESSAWARE flag or modified using Imagecfg.exe. It should be pointed out that SQL Server was ...
Chart .NET: Stacked Column + 3D throws an Index was out of range exception when series have a different number of data points The accumulation distribution formula is incorrect; if open and close are ...
Writing simple programs should require only a few lines of code and a minimal understanding of the en-vironment. On the other hand, more advanced features and functions should be available to those ...
bug occurred in rare cases when switching from a sprite collection to another with the same named sprite in it, and the second sprite collection index was larger than the number of sprites in the ...
* Setting MTSDataModule.AutoComplete to False in the IDE is overridden and set back to True at run time (Quality Central 4716).* Calls to ApplyUpdates(-1) on a TMTSDataModule do not work properly ...
- `sample_size_with_requested_compression_setting(KB)`:请求压缩设置后样本的估计大小。 从结果集中我们可以清晰地看到使用行压缩能够带来的空间节省情况,例如,在这个例子中,使用行压缩后可以节省大约194040...
* Simple implementation of the {@link OnPageChangeListener} interface with * stub implementations of each method. Extend this if you do not intend to * override every method of {@link ...