From 9b8cc3fa7ea04358624466162fe3ca942673963d Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Thu, 19 Jun 2014 11:28:54 -0700 Subject: Follow new PinnedPositions API changes (1/2) Bug: 15593967 Change-Id: I3e0a495bc83b8d69a453b463f8f2559ef543031d --- .../android/dialer/interactions/UndemoteOutgoingCallReceiver.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java') diff --git a/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java b/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java index c7e4c5f89..2a686c78d 100644 --- a/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java +++ b/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java @@ -22,6 +22,7 @@ import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.net.Uri; +import android.provider.ContactsContract; import android.provider.ContactsContract.PhoneLookup; import android.provider.ContactsContract.PinnedPositions; import android.text.TextUtils; @@ -55,12 +56,11 @@ public class UndemoteOutgoingCallReceiver extends BroadcastReceiver { } private void undemoteContactWithId(Context context, long id) { - final ContentValues cv = new ContentValues(1); - cv.put(String.valueOf(id), PinnedPositions.UNDEMOTE); // If the contact is not demoted, this will not do anything. Otherwise, it will // restore it to an unpinned position. If it was a frequently called contact, it will // show up once again show up on the favorites screen. - context.getContentResolver().update(PinnedPositions.UPDATE_URI, cv, null, null); + context.getContentResolver().call(ContactsContract.AUTHORITY_URI, + PinnedPositions.UNDEMOTE_METHOD, String.valueOf(id), null); } private long getContactIdFromPhoneNumber(Context context, String number) { -- cgit v1.2.3