Automated import from //branches/master/...@140582,140582
diff --git a/core/java/android/content/ContentProvider.java b/core/java/android/content/ContentProvider.java
index 25544de..5cc5730 100644
--- a/core/java/android/content/ContentProvider.java
+++ b/core/java/android/content/ContentProvider.java
@@ -172,7 +172,8 @@
public ISyncAdapter getSyncAdapter() {
checkWritePermission(null);
- return ContentProvider.this.getSyncAdapter().getISyncAdapter();
+ SyncAdapter sa = ContentProvider.this.getSyncAdapter();
+ return sa != null ? sa.getISyncAdapter() : null;
}
private void checkReadPermission(Uri uri) {