Modify the TelecomLoaderService to provide LocalServices to Telecom

We need access to the DeviceIdleController, which is not currently
accessible via the PowerWhitelistManager due to restrictions with
components in the same SYSTEM process accessing public APIs (see
context#enforceCallingPermission).

To get around this, we need to wrap services only available as
LocalServices using Binder to pass these services to the Telecom
code. This is all in-process (no IPC allowed), so there should be
little to no impact.

Bug: 160724034
Test: miss call and verify `adb shell cmd deviceidle tempwhitelist` contains
default dialer.
Test: atest TelecomUnitTests; atest CtsTelecomTestCases

Change-Id: I6275b550d19743e576b93f5fcd2bd3aa9ea4e1a8
5 files changed