diff options
Diffstat (limited to 'core/java/android/content/ContentResolver.java')
| -rw-r--r-- | core/java/android/content/ContentResolver.java | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java index 31e1fc824ed2..b134c3796b40 100644 --- a/core/java/android/content/ContentResolver.java +++ b/core/java/android/content/ContentResolver.java @@ -767,7 +767,7 @@ public abstract class ContentResolver implements ContentInterface { public ContentResolver(@Nullable Context context, @Nullable ContentInterface wrapped) { mContext = context != null ? context : ActivityThread.currentApplication(); mPackageName = mContext.getOpPackageName(); - mFeatureId = mContext.getFeatureId(); + mAttributionTag = mContext.getAttributionTag(); mTargetSdkVersion = mContext.getApplicationInfo().targetSdkVersion; mWrapped = wrapped; } @@ -1144,7 +1144,7 @@ public abstract class ContentResolver implements ContentInterface { cancellationSignal.setRemote(remoteCancellationSignal); } try { - qCursor = unstableProvider.query(mPackageName, mFeatureId, uri, projection, + qCursor = unstableProvider.query(mPackageName, mAttributionTag, uri, projection, queryArgs, remoteCancellationSignal); } catch (DeadObjectException e) { // The remote process has died... but we only hold an unstable @@ -1155,7 +1155,7 @@ public abstract class ContentResolver implements ContentInterface { if (stableProvider == null) { return null; } - qCursor = stableProvider.query(mPackageName, mFeatureId, uri, projection, + qCursor = stableProvider.query(mPackageName, mAttributionTag, uri, projection, queryArgs, remoteCancellationSignal); } if (qCursor == null) { @@ -1247,7 +1247,7 @@ public abstract class ContentResolver implements ContentInterface { try { final UriResultListener resultListener = new UriResultListener(); - provider.canonicalizeAsync(mPackageName, mFeatureId, url, + provider.canonicalizeAsync(mPackageName, mAttributionTag, url, new RemoteCallback(resultListener)); resultListener.waitForResult(CONTENT_PROVIDER_TIMEOUT_MILLIS); return resultListener.result; @@ -1294,7 +1294,7 @@ public abstract class ContentResolver implements ContentInterface { } try { - return provider.uncanonicalize(mPackageName, mFeatureId, url); + return provider.uncanonicalize(mPackageName, mAttributionTag, url); } catch (RemoteException e) { // Arbitrary and not worth documenting, as Activity // Manager will kill this process shortly anyway. @@ -1346,7 +1346,7 @@ public abstract class ContentResolver implements ContentInterface { remoteCancellationSignal = provider.createCancellationSignal(); cancellationSignal.setRemote(remoteCancellationSignal); } - return provider.refresh(mPackageName, mFeatureId, url, extras, + return provider.refresh(mPackageName, mAttributionTag, url, extras, remoteCancellationSignal); } catch (RemoteException e) { // Arbitrary and not worth documenting, as Activity @@ -1748,7 +1748,8 @@ public abstract class ContentResolver implements ContentInterface { try { fd = unstableProvider.openAssetFile( - mPackageName, mFeatureId, uri, mode, remoteCancellationSignal); + mPackageName, mAttributionTag, uri, mode, + remoteCancellationSignal); if (fd == null) { // The provider will be released by the finally{} clause return null; @@ -1763,7 +1764,7 @@ public abstract class ContentResolver implements ContentInterface { throw new FileNotFoundException("No content provider: " + uri); } fd = stableProvider.openAssetFile( - mPackageName, mFeatureId, uri, mode, remoteCancellationSignal); + mPackageName, mAttributionTag, uri, mode, remoteCancellationSignal); if (fd == null) { // The provider will be released by the finally{} clause return null; @@ -1914,7 +1915,8 @@ public abstract class ContentResolver implements ContentInterface { try { fd = unstableProvider.openTypedAssetFile( - mPackageName, mFeatureId, uri, mimeType, opts, remoteCancellationSignal); + mPackageName, mAttributionTag, uri, mimeType, opts, + remoteCancellationSignal); if (fd == null) { // The provider will be released by the finally{} clause return null; @@ -1929,7 +1931,8 @@ public abstract class ContentResolver implements ContentInterface { throw new FileNotFoundException("No content provider: " + uri); } fd = stableProvider.openTypedAssetFile( - mPackageName, mFeatureId, uri, mimeType, opts, remoteCancellationSignal); + mPackageName, mAttributionTag, uri, mimeType, opts, + remoteCancellationSignal); if (fd == null) { // The provider will be released by the finally{} clause return null; @@ -2077,7 +2080,7 @@ public abstract class ContentResolver implements ContentInterface { } try { long startTime = SystemClock.uptimeMillis(); - Uri createdRow = provider.insert(mPackageName, mFeatureId, url, values, extras); + Uri createdRow = provider.insert(mPackageName, mAttributionTag, url, values, extras); long durationMillis = SystemClock.uptimeMillis() - startTime; maybeLogUpdateToEventLog(durationMillis, url, "insert", null /* where */); return createdRow; @@ -2158,7 +2161,7 @@ public abstract class ContentResolver implements ContentInterface { } try { long startTime = SystemClock.uptimeMillis(); - int rowsCreated = provider.bulkInsert(mPackageName, mFeatureId, url, values); + int rowsCreated = provider.bulkInsert(mPackageName, mAttributionTag, url, values); long durationMillis = SystemClock.uptimeMillis() - startTime; maybeLogUpdateToEventLog(durationMillis, url, "bulkinsert", null /* where */); return rowsCreated; @@ -2217,7 +2220,7 @@ public abstract class ContentResolver implements ContentInterface { } try { long startTime = SystemClock.uptimeMillis(); - int rowsDeleted = provider.delete(mPackageName, mFeatureId, url, extras); + int rowsDeleted = provider.delete(mPackageName, mAttributionTag, url, extras); long durationMillis = SystemClock.uptimeMillis() - startTime; maybeLogUpdateToEventLog(durationMillis, url, "delete", null); return rowsDeleted; @@ -2284,7 +2287,7 @@ public abstract class ContentResolver implements ContentInterface { } try { long startTime = SystemClock.uptimeMillis(); - int rowsUpdated = provider.update(mPackageName, mFeatureId, uri, values, extras); + int rowsUpdated = provider.update(mPackageName, mAttributionTag, uri, values, extras); long durationMillis = SystemClock.uptimeMillis() - startTime; maybeLogUpdateToEventLog(durationMillis, uri, "update", null); return rowsUpdated; @@ -2333,7 +2336,7 @@ public abstract class ContentResolver implements ContentInterface { throw new IllegalArgumentException("Unknown authority " + authority); } try { - final Bundle res = provider.call(mPackageName, mFeatureId, authority, method, arg, + final Bundle res = provider.call(mPackageName, mAttributionTag, authority, method, arg, extras); Bundle.setDefusable(res, true); return res; @@ -3746,8 +3749,8 @@ public abstract class ContentResolver implements ContentInterface { } /** @hide */ - public @Nullable String getFeatureId() { - return mFeatureId; + public @Nullable String getAttributionTag() { + return mAttributionTag; } @UnsupportedAppUsage @@ -3757,7 +3760,7 @@ public abstract class ContentResolver implements ContentInterface { @UnsupportedAppUsage final String mPackageName; - final @Nullable String mFeatureId; + final @Nullable String mAttributionTag; final int mTargetSdkVersion; final ContentInterface mWrapped; |
