Search in sources :

Example 1 with SpnOverride

use of com.android.systemui.du.carrierlabel.SpnOverride in project android_frameworks_base by DirtyUnicorns.

the class CarrierLabel method getOperatorName.

private String getOperatorName() {
    String operatorName = getContext().getString(R.string.quick_settings_wifi_no_network);
    TelephonyManager telephonyManager = (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE);
    if (isCN) {
        String operator = telephonyManager.getNetworkOperator();
        if (TextUtils.isEmpty(operator)) {
            operator = telephonyManager.getSimOperator();
        }
        SpnOverride mSpnOverride = new SpnOverride();
        operatorName = mSpnOverride.getSpn(operator);
    } else {
        operatorName = telephonyManager.getNetworkOperatorName();
    }
    if (TextUtils.isEmpty(operatorName)) {
        operatorName = telephonyManager.getSimOperatorName();
    }
    return operatorName;
}
Also used : TelephonyManager(android.telephony.TelephonyManager) SpnOverride(com.android.systemui.du.carrierlabel.SpnOverride)

Aggregations

TelephonyManager (android.telephony.TelephonyManager)1 SpnOverride (com.android.systemui.du.carrierlabel.SpnOverride)1