Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26ba1249 authored by Robert Greenwalt's avatar Robert Greenwalt Committed by Android (Google) Code Review
Browse files

Merge "Add some network/phone type constants."

parents 9195f75d 962a990a
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -315,6 +315,17 @@ public class MobileDataStateTracker implements NetworkStateTracker {
        case TelephonyManager.NETWORK_TYPE_EVDO_B:
            networkTypeStr = "evdo";
            break;
        case TelephonyManager.NETWORK_TYPE_IDEN:
            networkTypeStr = "iden";
            break;
        case TelephonyManager.NETWORK_TYPE_LTE:
            networkTypeStr = "lte";
            break;
        case TelephonyManager.NETWORK_TYPE_EHRPD:
            networkTypeStr = "ehrpd";
            break;
        default:
            Log.e(TAG, "unknown network type: " + tm.getNetworkType());
        }
        return "net.tcp.buffersize." + networkTypeStr;
    }
+6 −3
Original line number Diff line number Diff line
@@ -654,11 +654,14 @@ public abstract class BatteryStats implements Parcelable {
    public static final int DATA_CONNECTION_HSPA = 10;
    public static final int DATA_CONNECTION_IDEN = 11;
    public static final int DATA_CONNECTION_EVDO_B = 12;
    public static final int DATA_CONNECTION_OTHER = 13;
    public static final int DATA_CONNECTION_LTE = 13;
    public static final int DATA_CONNECTION_EHRPD = 14;
    public static final int DATA_CONNECTION_OTHER = 15;

    static final String[] DATA_CONNECTION_NAMES = {
        "none", "gprs", "edge", "umts", "cdma", "evdo_0", "evdo_A",
        "1xrtt", "hsdpa", "hsupa", "hspa", "iden", "evdo_b", "other"
        "1xrtt", "hsdpa", "hsupa", "hspa", "iden", "evdo_b", "lte",
        "ehrpd", "other"
    };
    
    public static final int NUM_DATA_CONNECTION_TYPES = DATA_CONNECTION_OTHER+1;
+6 −0
Original line number Diff line number Diff line
@@ -1786,6 +1786,12 @@ public final class BatteryStatsImpl extends BatteryStats {
                case TelephonyManager.NETWORK_TYPE_EVDO_B:
                    bin = DATA_CONNECTION_EVDO_B;
                    break;
                case TelephonyManager.NETWORK_TYPE_LTE:
                    bin = DATA_CONNECTION_LTE;
                    break;
                case TelephonyManager.NETWORK_TYPE_EHRPD:
                    bin = DATA_CONNECTION_EHRPD;
                    break;
                default:
                    bin = DATA_CONNECTION_OTHER;
                    break;
+1 −0
Original line number Diff line number Diff line
@@ -750,6 +750,7 @@ public class StatusBarPolicy {
        case TelephonyManager.NETWORK_TYPE_EVDO_B:
            mDataIconList = sDataNetType_3g[mInetCondition];
            break;
        // TODO - add support for NETWORK_TYPE_LTE and NETWORK_TYPE_EHRPD
        default:
            mDataIconList = sDataNetType_g[mInetCondition];
        break;
+1 −1
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ public class NeighboringCellInfo implements Parcelable
                location = "0" + location;
            }
        }

        // TODO - handle LTE and eHRPD (or find they can't be supported)
        try {// set LAC/CID or PSC based on radioType
            switch (radioType) {
            case NETWORK_TYPE_GPRS:
Loading