本文將以
Direct dial
我們將發.activities.ContactSelectionActivity.選擇一個連絡人,就完成了
下面是我打的
-----------
DragController-->onTouchEvent()-->MotionEvent.ACTION_UP, try to do drop()
DragController-->drop()
Workspace-->onDrop()
Workspace-->onDropExternal()
Launcher-->resetAddInfo()
Launcher-->processShortcut()
DragLayer-->clearAnimatedView()
ContactSelectionActivity-->onCreate()--start
ContactSelectionActivity-->onCreate()-->mActionCode : -1
ContactSelectionActivity-->configureListFragment()-->mActionCOde : 120
ContactSelectionActivity-->onCreate()--end
Launcher-->updateRunning()
--------------------------為建立的
PhoneNumberPickerFragment-->onItemClick()-->position : 0, id : 1
PhoneNumberPickerFragment-->pickPhoneNumber()-->uri : content://com.android.contacts/data/1
ShortcutIntentBuilder-->createPhoneNumberShortcutIntent()-->uri : content://com.android.contacts/data/1, shortcutAction : android.intent.action.CALL
ShortcutIntentBuilder-->PhoneNumberLoadingAsyncTask-->loadData()-->mDisplayName :
ShortcutIntentBuilder-->PhoneNumberLoadingAsyncTask-->onPostExecute()
ShortcutIntentBuilder-->createPhoneNumberShortcutIntent()
PhoneNumberPickerFragment-->onShortcutIntentCreated()
ContactSelectionActivity-->PhoneNumberPickerActionListener-->onShortcutIntentCreated()
Launcher-->onActivityResult()-->resultCode == RESULT_OK && mPendingAddInfo.container != ItemInfo.NO_ID
Launcher-->completeAddShortcut()-->container : -100, screen : 2, cellX : 1, cellY : 2
Launcher-->createShortcut()-->start
BubleTextView-->applyFromShortcutInfo()-->info.title :
Launcher-->createShortcut()-->end
Workspace-->createUserFolderIfNecessary()
Workspace-->addToExistingFolderIfNecessary()
LauncherModel-->addItemToDatabase()
Workspace-->addInScreen()
Launcher-->resetAddInfo()
DragLayer-->clearAnimatedView()
Launcher-->exitSpringLoadedDragModeDelayed()-->successfulDrop : true
Launcher-->updateRunning()
Launcher-->showWorkspace()
Launcher-->showWorkspace()-->mState != State.WORKSPACE
Launcher-->updateRunning()
----------------------------
Launcher-->onClick()
Launcher-->startActivitySafely()
OutgoingCallBroadcaster-->onCreate()
OutgoingCallBroadcaster-->processIntent()-->intent=Intent { act=android.intent.action.CALL dat=tel:xxxxxxxxxxxxx flg=0x14800000 cmp=com.android.phone/.OutgoingCallBroadcaster bnds=[120,387][240,543] }
Launcher-->updateRunning()
....................................................................................................
通過上面的
一:聲明startActivityForResultSafely將啟動我們設定的
二:選擇完連絡人後將調用onActivityResult()來真正完成
三:點擊onActivityResult()到的