Merge "Fix a bug where the wrong profile is queried" am: f83190c218 am: 92d3c13ed8 am: a776c7ca39

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

Change-Id: I5498b7eb2b1b3e4e195ac47d8d3b471496b779b6