Added the high usage hidden APIs back

Added the high usage hidden APIs back for Q or older
apps. Apps built on R SDK should use the new API
getNetworkCountryIso(int).

Test: Build
Bug: 150368215
Merged-In: I1ccfbe269f3d9b91b715c20bd2f200cfb20e2a8c
Change-Id: I1ccfbe269f3d9b91b715c20bd2f200cfb20e2a8c
(cherry picked from commit ff8275e6b9)
This commit is contained in:
Jack Yu
2020-03-04 11:23:39 -08:00
parent 1c9035f578
commit 7a5e98e131

View File

@@ -2756,6 +2756,17 @@ public class TelephonyManager {
}
}
/**
* @hide
* @deprecated Use {@link #getNetworkCountryIso(int)} instead.
*/
@Deprecated
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.Q,
publicAlternatives = "Use {@link #getNetworkCountryIso(int)} instead.")
public String getNetworkCountryIsoForPhone(int phoneId) {
return getNetworkCountryIso(phoneId);
}
/*
* When adding a network type to the list below, make sure to add the correct icon to
* MobileSignalController.mapIconSets() as well as NETWORK_TYPES