Merge changes I64009362,I8ebb617c into pi-dev

* changes:
  Do not throw RuntimeException from stopScan().
  Address the API review comments.