Merge "Make sure on non-dds phone, try MMS data connection when PS is not attached."
am: e7418497c4
Change-Id: I6b9ed84226e7de7cf95082d8c55e91eff32e1e75
This commit is contained in:
@@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
package android.telephony;
|
package android.telephony;
|
||||||
|
|
||||||
|
import static android.telephony.TelephonyManager.NETWORK_TYPE_BITMASK_UNKNOWN;
|
||||||
|
|
||||||
import android.annotation.IntDef;
|
import android.annotation.IntDef;
|
||||||
import android.annotation.NonNull;
|
import android.annotation.NonNull;
|
||||||
import android.annotation.Nullable;
|
import android.annotation.Nullable;
|
||||||
@@ -1605,6 +1607,12 @@ public class ServiceState implements Parcelable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public static int networkTypeToAccessNetworkType(@TelephonyManager.NetworkType
|
||||||
|
int networkType) {
|
||||||
|
return rilRadioTechnologyToAccessNetworkType(networkTypeToRilRadioTechnology(networkType));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get current data network type.
|
* Get current data network type.
|
||||||
*
|
*
|
||||||
@@ -1730,6 +1738,36 @@ public class ServiceState implements Parcelable {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Returns whether the bearerBitmask includes a networkType that matches the accessNetworkType.
|
||||||
|
*
|
||||||
|
* The NetworkType refers to NetworkType in TelephonyManager. For example
|
||||||
|
* {@link TelephonyManager#NETWORK_TYPE_GPRS}.
|
||||||
|
*
|
||||||
|
* The accessNetworkType refers to {@link AccessNetworkType}.
|
||||||
|
*
|
||||||
|
* @hide
|
||||||
|
* */
|
||||||
|
public static boolean networkBitmaskHasAccessNetworkType(
|
||||||
|
@TelephonyManager.NetworkTypeBitMask int networkBitmask, int accessNetworkType) {
|
||||||
|
if (networkBitmask == NETWORK_TYPE_BITMASK_UNKNOWN) return true;
|
||||||
|
if (accessNetworkType == AccessNetworkType.UNKNOWN) return false;
|
||||||
|
|
||||||
|
int networkType = 1;
|
||||||
|
while (networkBitmask != 0) {
|
||||||
|
if ((networkBitmask & 1) != 0) {
|
||||||
|
if (networkTypeToAccessNetworkType(networkType) == accessNetworkType) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
networkBitmask = networkBitmask >> 1;
|
||||||
|
networkType++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
public static int getBitmaskForTech(int radioTech) {
|
public static int getBitmaskForTech(int radioTech) {
|
||||||
if (radioTech >= 1) {
|
if (radioTech >= 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user