Add null check

Bundle returned from ContentProvider.call() may be null, and content
command shouldn't crash because of that.

Test: manual

Change-Id: I4c7e6c2b607b065699b58e6b9bca20e84cdb19ca
This commit is contained in:
Marco Nelissen
2017-07-24 13:35:29 -07:00
parent 5fd324476e
commit 3eb4baafc0

View File

@@ -535,7 +535,9 @@ public class Content {
@Override
public void onExecute(IContentProvider provider) throws Exception {
Bundle result = provider.call(null, mMethod, mArg, mExtras);
final int size = result.size(); // unpack
if (result != null) {
result.size(); // unpack
}
System.out.println("Result: " + result);
}
}