There are two parts in hasRestrictedNetworkPermission method. One is carryover package check and one is uid permission check. Seperate carryover package check part to another method to be clearer the usage of hasRestrictedNetworkPermission method. Bug: 132784544 Test: atest FrameworksNetTests Change-Id: Iab0609fcaa52acb0dfcb31ca957f22bfe8d62392