SPFTrigger getTrigger ( long triggerId , String appPackageName ) { String where = Contract . _ID + " = ? AND " + Contract . COLUMN_APP_IDENTIFIER + " = ?" ; String [ ] whereArgs = { Long . toString ( triggerId ) , appPackageName } ; Cursor c = getReadableDatabase ( ) . query ( Contract . TABLE_NAME , null , where , whereArgs , null , null , null ) ; if ( ! c . moveToFirst ( ) ) { return null ; } SPFTrigger t = triggerFromCursor ( c ) ; c . close ( ) ; return t ; }
Return the trigger with the specified id .