Skip to content

Commit 7ebbfd0

Browse files
author
Makoto Onuki
committed
Introduce new URI to clear data usage information
We were going to piggyback existing DataUsageFeedback.FEEDBACK_URI, but decided to introduce a new URI for this. Bug 5475575 Change-Id: I6d467e5342f551142f047aa1b0b3503c5bf9b7fd
1 parent 22bf2a6 commit 7ebbfd0

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

api/current.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16944,6 +16944,7 @@ package android.provider {
1694416944

1694516945
public static final class ContactsContract.DataUsageFeedback {
1694616946
ctor public ContactsContract.DataUsageFeedback();
16947+
field public static final android.net.Uri DELETE_USAGE_URI;
1694716948
field public static final android.net.Uri FEEDBACK_URI;
1694816949
field public static final java.lang.String USAGE_TYPE = "type";
1694916950
field public static final java.lang.String USAGE_TYPE_CALL = "call";

core/java/android/provider/ContactsContract.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7500,7 +7500,7 @@ private ProviderStatus() {
75007500
* <p>
75017501
* Applications can also clear all usage information with:
75027502
* <pre>
7503-
* boolean successful = resolver.delete(DataUsageFeedback.FEEDBACK_URI, null, null) > 0;
7503+
* boolean successful = resolver.delete(DataUsageFeedback.DELETE_USAGE_URI, null, null) > 0;
75047504
* </pre>
75057505
* </p>
75067506
*/
@@ -7513,6 +7513,14 @@ public static final class DataUsageFeedback {
75137513
public static final Uri FEEDBACK_URI =
75147514
Uri.withAppendedPath(Data.CONTENT_URI, "usagefeedback");
75157515

7516+
/**
7517+
* The content:// style URI for deleting all usage information.
7518+
* Must be used with {@link ContentResolver#delete(Uri, String, String[])}.
7519+
* The {@code where} and {@code selectionArgs} parameters are ignored.
7520+
*/
7521+
public static final Uri DELETE_USAGE_URI =
7522+
Uri.withAppendedPath(Contacts.CONTENT_URI, "delete_usage");
7523+
75167524
/**
75177525
* <p>
75187526
* Name for query parameter specifying the type of data usage.

0 commit comments

Comments
 (0)