diff options
Diffstat (limited to 'java/com/android/dialer/speeddial/AddFavoriteActivity.java')
-rw-r--r-- | java/com/android/dialer/speeddial/AddFavoriteActivity.java | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/java/com/android/dialer/speeddial/AddFavoriteActivity.java b/java/com/android/dialer/speeddial/AddFavoriteActivity.java index 93cd536df..eea6e840e 100644 --- a/java/com/android/dialer/speeddial/AddFavoriteActivity.java +++ b/java/com/android/dialer/speeddial/AddFavoriteActivity.java @@ -31,8 +31,6 @@ import com.android.dialer.common.Assert; import com.android.dialer.common.concurrent.DialerExecutorComponent; import com.android.dialer.contactsfragment.ContactsFragment; import com.android.dialer.contactsfragment.ContactsFragment.OnContactSelectedListener; -import com.android.dialer.speeddial.room.SpeedDialDatabaseComponent; -import com.android.dialer.speeddial.room.SpeedDialEntry; /** * Activity for selecting a single contact and adding it to favorites. @@ -95,19 +93,13 @@ public class AddFavoriteActivity extends AppCompatActivity implements OnContactS @WorkerThread private int markContactStarred(long contactId) { - // Insert into SpeedDialEntry database - SpeedDialDatabaseComponent.get(getApplicationContext()) - .speedDialDatabase() - .getSpeedDialEntryDao() - .insert(SpeedDialEntry.newSpeedDialEntry(contactId)); - - // Insert into Cp2 + // TODO(calderwoodra): For now, we will just mark contacts as starred. This means that contacts + // will only be able to exist once in favorites until we implement multiple contact avenues. ContentValues contentValues = new ContentValues(); contentValues.put(Contacts.STARRED, 1); String where = Contacts._ID + " = ?"; String[] selectionArgs = new String[] {Long.toString(contactId)}; - return getContentResolver().update(Contacts.CONTENT_URI, contentValues, where, selectionArgs); } |