Merge "Fix two problems in the ExecuteBinary function." am: e0561210b2 am: b16d968e54

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1677048

Change-Id: Ia06cfe69ef224be2cbe3abf32df3f83622481861