Extend insert/update/delete to provide extras.
A few releases ago we added ContentResolver.QUERY_ARG_* constants
to query() as a new best-practice that will help wean us off raw
SQL arguments. (For example, a provider could add their own
custom arguments like QUERY_ARG_INCLUDE_PENDING to cause the query
to reveal pending items that would otherwise be hidden.) This
change expands update() and delete() to accept those arguments.
This change also expand insert() to accept extras too, as part of
preparing to support an upcoming MediaProvider feature that will let
apps place new media "adjacent" to an existing media item. (Sending
that adjacent item through extras is cleaner than trying to send it
through escaped query parameters.)
Bug: 131643582
Test: atest CtsContentTestCases
Change-Id: I9567a0e8ea09d85fdafe28fea7ff0e3dd6edb58e
diff --git a/bridge/src/com/android/layoutlib/bridge/android/BridgeContentProvider.java b/bridge/src/com/android/layoutlib/bridge/android/BridgeContentProvider.java
index 41d9479..57a1738 100644
--- a/bridge/src/com/android/layoutlib/bridge/android/BridgeContentProvider.java
+++ b/bridge/src/com/android/layoutlib/bridge/android/BridgeContentProvider.java
@@ -63,8 +63,8 @@
}
@Override
- public int delete(String callingPackage, String callingFeatureId, Uri arg0, String arg1,
- String[] arg2) throws RemoteException {
+ public int delete(String callingPackage, String callingFeatureId, Uri arg0, Bundle arg1)
+ throws RemoteException {
// TODO Auto-generated method stub
return 0;
}
@@ -76,8 +76,8 @@
}
@Override
- public Uri insert(String callingPackage, String callingFeatureId, Uri arg0, ContentValues arg1)
- throws RemoteException {
+ public Uri insert(String callingPackage, String callingFeatureId, Uri arg0, ContentValues arg1,
+ Bundle arg2) throws RemoteException {
// TODO Auto-generated method stub
return null;
}
@@ -107,7 +107,7 @@
@Override
public int update(String callingPackage, String callingFeatureId, Uri arg0, ContentValues arg1,
- String arg2, String[] arg3) throws RemoteException {
+ Bundle arg2) throws RemoteException {
// TODO Auto-generated method stub
return 0;
}