Change the condition for showing "no connection"
The "no connection" should be shown in no data cell connection. Bug: 193273081 Test: atest passed - SubscriptionsPreferenceControllerTest.java - ProviderModelSliceHelperTest.java - ProviderModelSliceTest.java - NetworkProviderWorkerTest.java Change-Id: Ied8a34d13d4bfc81e9136e05ba41cbb4233c9ad8
This commit is contained in:
@@ -24,6 +24,8 @@ import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.telephony.AccessNetworkConstants;
|
||||
import android.telephony.NetworkRegistrationInfo;
|
||||
import android.telephony.ServiceState;
|
||||
import android.telephony.SignalStrength;
|
||||
import android.telephony.SubscriptionInfo;
|
||||
@@ -107,7 +109,12 @@ public class ProviderModelSliceHelper {
|
||||
* @return whether the ServiceState's data state is in-service.
|
||||
*/
|
||||
public boolean isDataStateInService() {
|
||||
return mTelephonyManager.getDataState() == mTelephonyManager.DATA_CONNECTED;
|
||||
final ServiceState serviceState = mTelephonyManager.getServiceState();
|
||||
NetworkRegistrationInfo regInfo =
|
||||
(serviceState == null) ? null : serviceState.getNetworkRegistrationInfo(
|
||||
NetworkRegistrationInfo.DOMAIN_PS,
|
||||
AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
|
||||
return (regInfo == null) ? false : regInfo.isRegistered();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user