diff options
Diffstat (limited to 'core/java/android')
-rw-r--r-- | core/java/android/content/ContentProvider.java | 6 | ||||
-rw-r--r-- | core/java/android/content/ContentResolver.java | 4 | ||||
-rw-r--r-- | core/java/android/content/IContentProvider.java | 4 |
3 files changed, 10 insertions, 4 deletions
diff --git a/core/java/android/content/ContentProvider.java b/core/java/android/content/ContentProvider.java index 0cff4c0..393cf8e 100644 --- a/core/java/android/content/ContentProvider.java +++ b/core/java/android/content/ContentProvider.java @@ -19,6 +19,7 @@ package android.content; import static android.content.pm.PackageManager.PERMISSION_GRANTED; import static android.Manifest.permission.INTERACT_ACROSS_USERS; +import android.annotation.Nullable; import android.app.AppOpsManager; import android.content.pm.PathPermission; import android.content.pm.ProviderInfo; @@ -364,7 +365,8 @@ public abstract class ContentProvider implements ComponentCallbacks2 { } @Override - public Bundle call(String callingPkg, String method, String arg, Bundle extras) { + public Bundle call( + String callingPkg, String method, @Nullable String arg, @Nullable Bundle extras) { final String original = setCallingPackage(callingPkg); try { return ContentProvider.this.call(method, arg, extras); @@ -1742,7 +1744,7 @@ public abstract class ContentProvider implements ComponentCallbacks2 { * @return provider-defined return value. May be {@code null}, which is also * the default for providers which don't implement any call methods. */ - public Bundle call(String method, String arg, Bundle extras) { + public Bundle call(String method, @Nullable String arg, @Nullable Bundle extras) { return null; } diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java index a09fee9..17a8eb7 100644 --- a/core/java/android/content/ContentResolver.java +++ b/core/java/android/content/ContentResolver.java @@ -17,6 +17,7 @@ package android.content; import android.accounts.Account; +import android.annotation.Nullable; import android.app.ActivityManagerNative; import android.app.ActivityThread; import android.app.AppGlobals; @@ -1357,7 +1358,8 @@ public abstract class ContentResolver { * @throws NullPointerException if uri or method is null * @throws IllegalArgumentException if uri is not known */ - public final Bundle call(Uri uri, String method, String arg, Bundle extras) { + public final Bundle call( + Uri uri, String method, @Nullable String arg, @Nullable Bundle extras) { if (uri == null) { throw new NullPointerException("uri == null"); } diff --git a/core/java/android/content/IContentProvider.java b/core/java/android/content/IContentProvider.java index f858406..4afe38b 100644 --- a/core/java/android/content/IContentProvider.java +++ b/core/java/android/content/IContentProvider.java @@ -16,6 +16,7 @@ package android.content; +import android.annotation.Nullable; import android.content.res.AssetFileDescriptor; import android.database.Cursor; import android.net.Uri; @@ -56,7 +57,8 @@ public interface IContentProvider extends IInterface { public ContentProviderResult[] applyBatch(String callingPkg, ArrayList<ContentProviderOperation> operations) throws RemoteException, OperationApplicationException; - public Bundle call(String callingPkg, String method, String arg, Bundle extras) + public Bundle call( + String callingPkg, String method, @Nullable String arg, @Nullable Bundle extras) throws RemoteException; public ICancellationSignal createCancellationSignal() throws RemoteException; |