public FetchNotificationsResult a( FetchNotificationsParams paramFetchNotificationsParams, ApiResponse paramApiResponse) { paramApiResponse.g(); FqlResultHelper localFqlResultHelper = new FqlResultHelper(paramApiResponse.c()); JsonNode localJsonNode1 = localFqlResultHelper.a("notifications"); JsonNode localJsonNode2 = localFqlResultHelper.a("profiles"); ImmutableList.Builder localBuilder = ImmutableList.e(); Iterator localIterator1 = localJsonNode1.iterator(); while (localIterator1.hasNext()) { JsonNode localJsonNode4 = (JsonNode) localIterator1.next(); localBuilder.b( FacebookNotification.a(FBJsonFactory.a.createJsonParser(localJsonNode4.toString()))); } ImmutableMap.Builder localBuilder1 = ImmutableMap.k(); Iterator localIterator2 = localJsonNode2.iterator(); while (localIterator2.hasNext()) { JsonNode localJsonNode3 = (JsonNode) localIterator2.next(); FacebookProfile localFacebookProfile = FacebookProfile.a(FBJsonFactory.a.createJsonParser(localJsonNode3.toString())); localBuilder1.b(Long.valueOf(localFacebookProfile.mId), localFacebookProfile); } return new FetchNotificationsResult( DataFreshnessResult.FROM_SERVER, localBuilder.b(), localBuilder1.b(), System.currentTimeMillis()); }
public ImmutableList<Message> a( MessagesCollection paramMessagesCollection, List<Message> paramList) { if (paramList.isEmpty()) ; ImmutableList.Builder localBuilder; for (ImmutableList localImmutableList = ImmutableList.d(); ; localImmutableList = localBuilder.b()) { return localImmutableList; HashSet localHashSet = Sets.a(); Iterator localIterator1 = paramList.iterator(); while (localIterator1.hasNext()) localHashSet.add(((Message) localIterator1.next()).t()); Iterator localIterator2 = paramMessagesCollection.b().iterator(); while (localIterator2.hasNext()) { Message localMessage2 = (Message) localIterator2.next(); if ((!localMessage2.u()) || (!localHashSet.contains(localMessage2.t()))) continue; BLog.a(a, "Deduped message %s", new Object[] {localMessage2}); localHashSet.remove(localMessage2.t()); } localBuilder = ImmutableList.e(); Iterator localIterator3 = paramList.iterator(); while (localIterator3.hasNext()) { Message localMessage1 = (Message) localIterator3.next(); if (!localHashSet.contains(localMessage1.t())) continue; localBuilder.b(localMessage1); } } }
ImmutableList<Long> a(FetchMmsSmsMessagesParams paramFetchMmsSmsMessagesParams) { ImmutableList.Builder localBuilder = ImmutableList.e(); SqlQueryBuilder.Expression localExpression; if (paramFetchMmsSmsMessagesParams.c() != null) localExpression = SqlQueryBuilder.d("date", Long.toString(paramFetchMmsSmsMessagesParams.c().longValue())); Cursor localCursor; while (true) { SqlQueryBuilder.Expression[] arrayOfExpression = new SqlQueryBuilder.Expression[3]; arrayOfExpression[0] = SqlQueryBuilder.a("thread_id", Long.toString(paramFetchMmsSmsMessagesParams.a())); arrayOfExpression[1] = SqlQueryBuilder.a("type IN (1, 2, 5)"); arrayOfExpression[2] = localExpression; SqlQueryBuilder.AndExpression localAndExpression = SqlQueryBuilder.a(arrayOfExpression); localCursor = this.b.getContentResolver().query(Telephony.Sms.a, MmsSmsProjections.a, localAndExpression.a(), localAndExpression.b(), "date DESC LIMIT " + (1 + paramFetchMmsSmsMessagesParams.b())); try { int i = localCursor.getColumnIndex("_id"); if (!localCursor.moveToNext()) break; localBuilder.b(Long.valueOf(localCursor.getLong(i))); } finally { localCursor.close(); } } localCursor.close(); return localBuilder.b(); }
private ImmutableList<FetchMmsSmsThreadSummaryResult> b(String paramString) { ImmutableList.Builder localBuilder = ImmutableList.e(); Cursor localCursor = this.b.getContentResolver().query(Telephony.Sms.a, MmsSmsProjections.b, paramString, null, "date DESC"); while (true) { String str3; try { int i = localCursor.getColumnIndex("thread_id"); int j = localCursor.getColumnIndex("_id"); int k = localCursor.getColumnIndex("date"); int m = localCursor.getColumnIndex("subject"); int n = localCursor.getColumnIndex("body"); int i1 = localCursor.getColumnIndex("address"); int i2 = localCursor.getColumnIndex("type"); int i3 = localCursor.getColumnIndex("read"); if (!localCursor.moveToNext()) break; long l1 = localCursor.getLong(i); long l2 = localCursor.getLong(j); long l3 = localCursor.getLong(k); String str1 = localCursor.getString(m); String str2 = localCursor.getString(n); str3 = localCursor.getString(i1); int i4 = localCursor.getInt(i2); int i5 = localCursor.getInt(i3); if ((i4 == 2) || (i4 == 6) || (i4 == 4)) { localObject2 = this.c.a(); if (i5 != 0) break label299; bool = true; localBuilder.b(new FetchMmsSmsThreadSummaryResult(l1, l2, l3, bool, str1, str2, (ParticipantInfo)localObject2)); continue; } } finally { localCursor.close(); } User localUser = this.c.a(str3); ParticipantInfo localParticipantInfo = this.c.a(localUser); Object localObject2 = localParticipantInfo; continue; label299: boolean bool = false; } localCursor.close(); return (ImmutableList<FetchMmsSmsThreadSummaryResult>)localBuilder.b(); }
ImmutableList<Message> b(List<Long> paramList) { if (paramList.isEmpty()); ImmutableList.Builder localBuilder; for (ImmutableList localImmutableList = ImmutableList.d(); ; localImmutableList = localBuilder.b()) { return localImmutableList; localBuilder = ImmutableList.e(); String str = "_id IN " + SqlUtil.a(paramList); Cursor localCursor = this.b.getContentResolver().query(Telephony.Sms.a, MmsSmsProjections.c, str, null, "date DESC"); try { if (localCursor.moveToNext()) localBuilder.b(a(localCursor)); } finally { localCursor.close(); } } }