diff options
author | Eric Erfanian <erfanian@google.com> | 2017-05-05 15:23:13 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-05-05 15:23:13 +0000 |
commit | 300a8683b9c28424fb0f0c571a0abe128c461f69 (patch) | |
tree | 3a325b0effac02fbd228b8ddf2f96589e5df72cd /java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java | |
parent | d67f1627521b174f12e0c247f154c7c93c5e408e (diff) | |
parent | 10b34a5ebf12e97ecba0caf3c8e30b476b038a96 (diff) |
Update Dialer to V10 RC16
am: 10b34a5ebf
Change-Id: Iea3e96ccdeaf1fa796ceca702cace82ca20f298c
Diffstat (limited to 'java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java')
-rw-r--r-- | java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java b/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java index bfc2e5f20..9b295dbb7 100644 --- a/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java +++ b/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java @@ -27,7 +27,6 @@ import android.provider.VoicemailContract; import android.provider.VoicemailContract.Voicemails; import android.support.annotation.NonNull; import android.telecom.PhoneAccountHandle; -import android.text.TextUtils; import com.android.dialer.common.Assert; import com.android.voicemail.impl.Voicemail; import java.util.ArrayList; @@ -54,12 +53,6 @@ public class VoicemailsQueryHelper { Voicemails.DIRTY + "=1 AND " + Voicemails.DELETED + "!=1 AND " + Voicemails.IS_READ + "=1"; static final String DELETED_SELECTION = Voicemails.DELETED + "=1"; static final String ARCHIVED_SELECTION = Voicemails.ARCHIVED + "=0"; - private static final String PHONE_ACCOUNT_HANDLE_SELECTION = - "(" - + Voicemails.PHONE_ACCOUNT_COMPONENT_NAME - + "=? AND " - + Voicemails.PHONE_ACCOUNT_ID - + "=?)"; private Context mContext; private ContentResolver mContentResolver; @@ -101,23 +94,14 @@ public class VoicemailsQueryHelper { /** * Utility method to make queries to the voicemail database. * + * <p>TODO(b/36588206) add PhoneAccountHandle filtering back + * * @param selection A filter declaring which rows to return. {@code null} returns all rows. * @return A list of voicemails according to the selection statement. */ private List<Voicemail> getLocalVoicemails( - @NonNull PhoneAccountHandle phoneAccountHandle, String selection) { - - String[] selectionArgs = - new String[] { - phoneAccountHandle.getComponentName().flattenToString(), phoneAccountHandle.getId() - }; - if (TextUtils.isEmpty(selection)) { - selection = PHONE_ACCOUNT_HANDLE_SELECTION; - } else { - selection = PHONE_ACCOUNT_HANDLE_SELECTION + " AND (" + selection + ")"; - } - - Cursor cursor = mContentResolver.query(mSourceUri, PROJECTION, selection, selectionArgs, null); + @NonNull PhoneAccountHandle unusedPhoneAccountHandle, String selection) { + Cursor cursor = mContentResolver.query(mSourceUri, PROJECTION, selection, null, null); if (cursor == null) { return null; } |