コード例 #1
0
ファイル: Search.java プロジェクト: zst123/p201-packages
 private boolean parseResult(EasEmailSyncParser parser, ArrayList<ContentProviderOperation> ops)
     throws IOException {
   // Get an email sync parser for our incoming message data
   boolean res = false;
   Message msg = new Message();
   while (nextTag(Tags.SEARCH_RESULT) != END) {
     if (tag == Tags.SYNC_CLASS) {
       getValue();
     } else if (tag == Tags.SYNC_COLLECTION_ID) {
       getValue();
     } else if (tag == Tags.SEARCH_LONG_ID) {
       msg.mProtocolSearchInfo = getValue();
     } else if (tag == Tags.SEARCH_PROPERTIES) {
       msg.mAccountKey = mService.mAccount.mId;
       msg.mMailboxKey = mService.mMailbox.mId;
       msg.mFlagLoaded = Message.FLAG_LOADED_COMPLETE;
       parser.pushTag(tag);
       parser.addData(msg, tag);
       if (msg.mHtml != null) {
         msg.mHtml = TextUtilities.highlightTermsInHtml(msg.mHtml, mQuery);
       }
       msg.addSaveOps(ops);
     } else {
       skipTag();
     }
   }
   return res;
 }