Clear calling identity before accessing DeviceConfig

Creating an AutomaticOnOffKeepalive object is an internal design
in the AutomaticOnOffKeepaliveTracker which should not require
callers' permission. Reading DeviceConfig will check if the
calling uid and calling package name are the same. Clear calling
identity to align the calling uid and package.

All these accesses require performing this action so move it into
the Dependencies.

Bug: 279381469
Test: atest FrameworksNetTests CtsHostsideNetworkTests
(cherry picked from https://android-review.googlesource.com/q/commit:afda1a5579eabb8d8a02aead932e4d436cc934df)
Merged-In: Icb4721ce8ca9c8fc7e9118b4e46300147be4e08e
Change-Id: Icb4721ce8ca9c8fc7e9118b4e46300147be4e08e
1 file changed