Optionally have ConnectivityService kill sockets for frozen apps

To do this we register a UidFrozenStateChangedCallback with
ActivityManager. The callback then queues up work on the Handler thread
to consume the original callback args and kill appropriate sockets.

Test: atest ConnectivityServiceTests
Bug: 277100090
(cherry picked from https://android-review.googlesource.com/q/commit:7c999d8d4cc4cd092d2de52ae98037ca4861e71f)
Merged-In: I93f174811aef726145a18ea90443ddfc1456478e
Change-Id: I93f174811aef726145a18ea90443ddfc1456478e
2 files changed