共 18 篇文章 |
|
阅476 转0 评0 公众公开 12-08-22 15:38 |
阅38 转0 评0 公众公开 12-08-06 10:18 |
图一:HandlerThread/Looper/MessageQueue实例关系。它保留着对Looper实例的引用,不过这里还看不到HandlerThread、Looper和MessageQueue如何实例化,这要到二、HandlerThread/Looper/MessageQueue实例化之后才能看清如何实现的。从应用者角度看,Looper和MessageQueue是消息处理的内部机制,可以不关注它的实现细节(唯一要知道的,Handler实... 阅68 转0 评0 公众公开 12-04-20 14:03 |
@Override public void handleMessage(Message msg) { if (msg.what == MSG_WHAT) { Bundle bundle = msg.getData();每个主线程默认有一个 Looper,也就是说在主线程中,下面代码是等效的: MyHandler mHandler = new MyHandler(getMainLooper()); MyHandler mHandler = new MyHandler();但是子线程需要手动获取如:MyHand... 阅678 转5 评0 公众公开 12-04-13 16:45 |
2、第二个是,当type为vnd.android.cursor.dir/vnd.google.note(保存便笺记录的目录) 时,可以查看可用的便笺(action为android.app.action.VIEW),或者让用户选择一个便笺并返回给调用者(action为 android.app.action.PICK)。第一个功能是,当数据类型为 vnd.android.cursor.item/vnd.google.note时,允许用户查看和修改一个便签(action... 阅58 转1 评0 公众公开 12-03-15 18:20 |
【转】android intent和intent action大全【转】android intent和intent action大全1.Intent的用法:(1)用Action跳转1、使用Action跳转,如果有一个程序的AndroidManifest.xml中的某一个 Activity的IntentFilter段中 定义了包含了相同的Action那么这个Intent就与这个目标Action匹配。2.浏览网页 Uri uri = Uri.parse("http://www.google.c... 阅93 转1 评0 公众公开 12-02-17 09:50 |
pid = Zygote.forkAndSpecialize(parsedArgs.uid, parsedArgs.gid, parsedArgs.gids, parsedArgs.debugFlags, rlimits);As we know, parent process and child process will execute the code simultaneously after fork operation, therefore, the parent process will get the real pid of child process and call handleParentProc method, ... 阅253 转1 评0 公众公开 12-02-16 20:09 |
[z]android IPC通信中的UID和PID识别。具体它们保存的是IPC发送方的PID和UID还是当前进程的IPD和UID,视情况而定。1. process B在被process A IPC调用时, process B需知道process A的UID和PID,来检查process A的访问权限,此时mCallingUid和mCallingPid保存的是process A的UID和PID。process B的方法调用了同进程中的service的接口前,c... 阅167 转0 评0 公众公开 12-02-16 20:09 |
<manifest xmlns:android="http://schemas.android.com/apk/res/android"package com.android.testapp;<instrumentation android:targetPackage="com.android.testapp" android:name="android.test.InstrumentationTestRunner" android:label="Test Unit Tests"></instrumentation>adb... 阅145 转4 评0 公众公开 12-02-14 14:44 |
frameworks/base/services/java/com/android/server/am/ActivityManagerService.java中 //intent.addCategory(Intent.CATEGORY_HOME); 改成intent.addCategory(Intent.CATEGORY_HOME_FIRST); //lixinso: //if (r.intent.hasCategory(Intent.CATEGORY_HOME)) { 改成if (r.intent.hasCategory(Intent.CATEGORY_HOME_FIRST)) { //lixi... 阅1284 转4 评0 公众公开 12-02-13 18:35 |