Rename getAllNetworkStateSnapshot which should be pluralized

Address API review feedback, ConnectivityManager#getAllNetworkStateSnapshot
should be pluralized so rename the method to getAllNetworkStateSnapshots

(cherry picked from ag/14221105)
Bug: 183972554
Test: make, FrameworksNetTests
      FrameworksServicesTests
Merged-In: Ic18d17d05984fa2466c962c7843c0ef7183ce77c
Change-Id: Ic18d17d05984fa2466c962c7843c0ef7183ce77c
This commit is contained in:
Aaron Huang 2021-04-17 13:46:25 +08:00
commit ee78b1fbbf

View file

@ -2171,7 +2171,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
PermissionUtils.enforceNetworkStackPermission(mContext);
final ArrayList<NetworkState> result = new ArrayList<>();
for (NetworkStateSnapshot snapshot : getAllNetworkStateSnapshot()) {
for (NetworkStateSnapshot snapshot : getAllNetworkStateSnapshots()) {
// NetworkStateSnapshot doesn't contain NetworkInfo, so need to fetch it from the
// NetworkAgentInfo.
final NetworkAgentInfo nai = getNetworkAgentInfoForNetwork(snapshot.network);
@ -2186,7 +2186,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
@Override
@NonNull
public List<NetworkStateSnapshot> getAllNetworkStateSnapshot() {
public List<NetworkStateSnapshot> getAllNetworkStateSnapshots() {
// This contains IMSI details, so make sure the caller is privileged.
PermissionUtils.enforceNetworkStackPermission(mContext);