summaryrefslogtreecommitdiff
path: root/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-06-19 11:28:54 -0700
committerYorke Lee <yorkelee@google.com>2014-06-19 13:00:19 -0700
commit9b8cc3fa7ea04358624466162fe3ca942673963d (patch)
treec327d2f3bbcb1121290b557e965b39c938b8c5aa /src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java
parentda9fe01f539ca50251003d5c783aec434be23d3c (diff)
Follow new PinnedPositions API changes (1/2)
Bug: 15593967 Change-Id: I3e0a495bc83b8d69a453b463f8f2559ef543031d
Diffstat (limited to 'src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java')
-rw-r--r--src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java6
1 files changed, 3 insertions, 3 deletions
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) {