Loading core/java/android/provider/Contacts.java +2 −12 Original line number Diff line number Diff line Loading @@ -438,21 +438,11 @@ public class Contacts { public static final String PRIMARY_ORGANIZATION_ID = "primary_organization"; /** * Mark a person as having been contacted. * * @param resolver the ContentResolver to use * @param personId the person who was contacted * @deprecated see {@link android.provider.ContactsContract} * This API is no longer supported as of O. */ @Deprecated public static void markAsContacted(ContentResolver resolver, long personId) { Uri uri = ContentUris.withAppendedId(CONTENT_URI, personId); uri = Uri.withAppendedPath(uri, "update_contact_time"); ContentValues values = new ContentValues(); // There is a trigger in place that will update TIMES_CONTACTED when // LAST_TIME_CONTACTED is modified. values.put(LAST_TIME_CONTACTED, System.currentTimeMillis()); resolver.update(uri, values, null, null); // No longer supported. } /** Loading core/java/android/provider/ContactsContract.java +44 −4 Original line number Diff line number Diff line Loading @@ -19,8 +19,6 @@ package android.provider; import android.accounts.Account; import android.annotation.SystemApi; import android.app.Activity; import android.app.admin.DevicePolicyManager; import android.content.ActivityNotFoundException; import android.content.ContentProviderClient; import android.content.ContentProviderOperation; import android.content.ContentResolver; Loading @@ -44,7 +42,6 @@ import android.text.TextUtils; import android.util.DisplayMetrics; import android.util.Pair; import android.view.View; import android.widget.Toast; import java.io.ByteArrayInputStream; import java.io.IOException; Loading Loading @@ -117,6 +114,12 @@ public final class ContactsContract { /** A content:// style uri to the authority for the contacts provider */ public static final Uri AUTHORITY_URI = Uri.parse("content://" + AUTHORITY); /** * Prefix for column names that are not visible to client apps. * @hide */ public static final String HIDDEN_COLUMN_PREFIX = "x_"; /** * An optional URI parameter for insert, update, or delete queries * that allows the caller Loading Loading @@ -869,6 +872,25 @@ public final class ContactsContract { */ public static final String LAST_TIME_CONTACTED = "last_time_contacted"; /** @hide Raw value. */ public static final String RAW_TIMES_CONTACTED = HIDDEN_COLUMN_PREFIX + TIMES_CONTACTED; /** @hide Raw value. */ public static final String RAW_LAST_TIME_CONTACTED = HIDDEN_COLUMN_PREFIX + LAST_TIME_CONTACTED; /** * @hide * Low res version. Same as {@link #TIMES_CONTACTED} but use it in CP2 for clarification. */ public static final String LR_TIMES_CONTACTED = TIMES_CONTACTED; /** * @hide * Low res version. Same as {@link #TIMES_CONTACTED} but use it in CP2 for clarification. */ public static final String LR_LAST_TIME_CONTACTED = LAST_TIME_CONTACTED; /** * Is the contact starred? * <P>Type: INTEGER (boolean)</P> Loading Loading @@ -1675,7 +1697,7 @@ public final class ContactsContract { Uri uri = ContentUris.withAppendedId(CONTENT_URI, contactId); ContentValues values = new ContentValues(); // TIMES_CONTACTED will be incremented when LAST_TIME_CONTACTED is modified. values.put(LAST_TIME_CONTACTED, System.currentTimeMillis()); values.put(LR_LAST_TIME_CONTACTED, System.currentTimeMillis()); resolver.update(uri, values, null, null); } Loading Loading @@ -4230,6 +4252,24 @@ public final class ContactsContract { /** The number of times the referenced {@link Data} has been used. */ public static final String TIMES_USED = "times_used"; /** @hide Raw value. */ public static final String RAW_LAST_TIME_USED = HIDDEN_COLUMN_PREFIX + LAST_TIME_USED; /** @hide Raw value. */ public static final String RAW_TIMES_USED = HIDDEN_COLUMN_PREFIX + TIMES_USED; /** * @hide * Low res version. Same as {@link #LAST_TIME_USED} but use it in CP2 for clarification. */ public static final String LR_LAST_TIME_USED = LAST_TIME_USED; /** * @hide * Low res version. Same as {@link #TIMES_USED} but use it in CP2 for clarification. */ public static final String LR_TIMES_USED = TIMES_USED; } /** Loading Loading
core/java/android/provider/Contacts.java +2 −12 Original line number Diff line number Diff line Loading @@ -438,21 +438,11 @@ public class Contacts { public static final String PRIMARY_ORGANIZATION_ID = "primary_organization"; /** * Mark a person as having been contacted. * * @param resolver the ContentResolver to use * @param personId the person who was contacted * @deprecated see {@link android.provider.ContactsContract} * This API is no longer supported as of O. */ @Deprecated public static void markAsContacted(ContentResolver resolver, long personId) { Uri uri = ContentUris.withAppendedId(CONTENT_URI, personId); uri = Uri.withAppendedPath(uri, "update_contact_time"); ContentValues values = new ContentValues(); // There is a trigger in place that will update TIMES_CONTACTED when // LAST_TIME_CONTACTED is modified. values.put(LAST_TIME_CONTACTED, System.currentTimeMillis()); resolver.update(uri, values, null, null); // No longer supported. } /** Loading
core/java/android/provider/ContactsContract.java +44 −4 Original line number Diff line number Diff line Loading @@ -19,8 +19,6 @@ package android.provider; import android.accounts.Account; import android.annotation.SystemApi; import android.app.Activity; import android.app.admin.DevicePolicyManager; import android.content.ActivityNotFoundException; import android.content.ContentProviderClient; import android.content.ContentProviderOperation; import android.content.ContentResolver; Loading @@ -44,7 +42,6 @@ import android.text.TextUtils; import android.util.DisplayMetrics; import android.util.Pair; import android.view.View; import android.widget.Toast; import java.io.ByteArrayInputStream; import java.io.IOException; Loading Loading @@ -117,6 +114,12 @@ public final class ContactsContract { /** A content:// style uri to the authority for the contacts provider */ public static final Uri AUTHORITY_URI = Uri.parse("content://" + AUTHORITY); /** * Prefix for column names that are not visible to client apps. * @hide */ public static final String HIDDEN_COLUMN_PREFIX = "x_"; /** * An optional URI parameter for insert, update, or delete queries * that allows the caller Loading Loading @@ -869,6 +872,25 @@ public final class ContactsContract { */ public static final String LAST_TIME_CONTACTED = "last_time_contacted"; /** @hide Raw value. */ public static final String RAW_TIMES_CONTACTED = HIDDEN_COLUMN_PREFIX + TIMES_CONTACTED; /** @hide Raw value. */ public static final String RAW_LAST_TIME_CONTACTED = HIDDEN_COLUMN_PREFIX + LAST_TIME_CONTACTED; /** * @hide * Low res version. Same as {@link #TIMES_CONTACTED} but use it in CP2 for clarification. */ public static final String LR_TIMES_CONTACTED = TIMES_CONTACTED; /** * @hide * Low res version. Same as {@link #TIMES_CONTACTED} but use it in CP2 for clarification. */ public static final String LR_LAST_TIME_CONTACTED = LAST_TIME_CONTACTED; /** * Is the contact starred? * <P>Type: INTEGER (boolean)</P> Loading Loading @@ -1675,7 +1697,7 @@ public final class ContactsContract { Uri uri = ContentUris.withAppendedId(CONTENT_URI, contactId); ContentValues values = new ContentValues(); // TIMES_CONTACTED will be incremented when LAST_TIME_CONTACTED is modified. values.put(LAST_TIME_CONTACTED, System.currentTimeMillis()); values.put(LR_LAST_TIME_CONTACTED, System.currentTimeMillis()); resolver.update(uri, values, null, null); } Loading Loading @@ -4230,6 +4252,24 @@ public final class ContactsContract { /** The number of times the referenced {@link Data} has been used. */ public static final String TIMES_USED = "times_used"; /** @hide Raw value. */ public static final String RAW_LAST_TIME_USED = HIDDEN_COLUMN_PREFIX + LAST_TIME_USED; /** @hide Raw value. */ public static final String RAW_TIMES_USED = HIDDEN_COLUMN_PREFIX + TIMES_USED; /** * @hide * Low res version. Same as {@link #LAST_TIME_USED} but use it in CP2 for clarification. */ public static final String LR_LAST_TIME_USED = LAST_TIME_USED; /** * @hide * Low res version. Same as {@link #TIMES_USED} but use it in CP2 for clarification. */ public static final String LR_TIMES_USED = TIMES_USED; } /** Loading