Merge "Refactoring and mocking to make sure unit test doesn't call the real service" am: 68bf2c52e5 am: 96b0148cc4 am: bc401f523d

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

Change-Id: I92c9fc5f4dcfc0a7f80db78b885945a1021eab20