am 12b5e504: Merge "Fix NPE in Transport.applyBatch" into lmp-mr1-dev

automerge: 59e96ee

* commit '59e96ee423f4fc810f29451144143a581a8cd99a':
  Fix NPE in Transport.applyBatch
This commit is contained in:
Jay Shrauner
2014-12-16 01:45:09 +00:00
committed by android-build-merger

View File

@@ -286,10 +286,12 @@ public abstract class ContentProvider implements ComponentCallbacks2 {
final String original = setCallingPackage(callingPkg);
try {
ContentProviderResult[] results = ContentProvider.this.applyBatch(operations);
for (int i = 0; i < results.length ; i++) {
if (userIds[i] != UserHandle.USER_CURRENT) {
// Adding the userId to the uri.
results[i] = new ContentProviderResult(results[i], userIds[i]);
if (results != null) {
for (int i = 0; i < results.length ; i++) {
if (userIds[i] != UserHandle.USER_CURRENT) {
// Adding the userId to the uri.
results[i] = new ContentProviderResult(results[i], userIds[i]);
}
}
}
return results;