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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user