Merge "Read permission state before scanning packages." into sc-qpr1-dev am: ed6134befc

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

Change-Id: I889805c63b301acaec4d2df179b39de018b3c070