Fix CS external dependencies on SystemUI
- Use formal API getSystemService to get ConnectivityManager. - Use formal API PackageManager#hasSystemFeature( PackageManager#FEATURE_TELEPHONY) to know whether device supports telephony. - Use formal API TelephonyManager#isDataCapable() to know whether device has mobile ability. - Replace NetworkCapabilities#equalsTransportTypes with comparing two NetworkCapabilities' transport types directly. - Replace ConnectivityManager#INET_CONDITION_ACTION by listening onCapabilitiesChanged() network callback. Bug: 183068713 Test: atest SystemUITests Change-Id: I4a53223f36ea09a062a9ddea668a9d0662f0dbbc
Loading
Please register or sign in to comment