摘要:
在android系统中,键盘按键事件是由SystemServer服务来管理的;然后在以消息的形式分发给应用程序处理。产生键盘按键事件则是有Linux kernel的相关驱动来实现。键盘消息有别于其他类型的消息;需要从Linux kernel drivers产生由上层app来处理。同时按键有着不同的映射值,因此从模块独立性角度各个独立的模块应该拥有不同的键盘映射。这样以来,kernel产生的按键事件必然回经过不同的映射才到app。1、kernel中同按键相关代码Android使用标准的linux输入事件设备(/dev/input/)和驱动按键定义在linux内核include/linux/inp 阅读全文
posted @ 2013-12-21 17:03
Rosepotato
阅读(802)
评论(0)
推荐(0)
摘要:
objcopyobjcopy [options]infile[outfile]Copy the contents of the input object file to another file, optionally changing the file format in the process (but not the endian-ness). Ifoutfileis not specified,objcopycreates a temporary file and renames it toinfilewhen the copy is complete, destroying the 阅读全文
posted @ 2013-12-21 11:16
Rosepotato
阅读(515)
评论(0)
推荐(0)
摘要:
多线程读写SQLite实质上是将数据写入一个文件,通常情况下,在应用的包名下面都能找到xxx.db的文件,拥有root权限的手机,可以通过adb shell,看到data/data/packagename/databases/xxx.db这样的文件。我们可以得知SQLite是文件级别的锁:多个线程可以同时读,但是同时只能有一个线程写。Android提供了SqliteOpenHelper类,加入Java的锁机制以便调用。如果多线程同时读写(这里的指不同的线程用使用的是不同的Helper实例),后面的就会遇到android.database.sqlite.SQLiteException: data 阅读全文
posted @ 2013-12-21 10:41
Rosepotato
阅读(848)
评论(0)
推荐(0)
浙公网安备 33010602011771号