Example usage for android.telephony TelephonyManager getLine1AlphaTag

List of usage examples for android.telephony TelephonyManager getLine1AlphaTag

Introduction

In this page you can find the example usage for android.telephony TelephonyManager getLine1AlphaTag.

Prototype

@TestApi
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public String getLine1AlphaTag() 

Source Link

Document

Returns the alphabetic identifier associated with the line 1 number.

Usage

From source file:com.android.bluetooth.map.BluetoothMapContent.java

private void setFilterInfo(FilterInfo fi) {
    TelephonyManager tm = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE);
    if (tm != null) {
        fi.phoneType = tm.getPhoneType();
        fi.phoneNum = tm.getLine1Number();
        fi.phoneAlphaTag = tm.getLine1AlphaTag();
        if (D)//from   www  .  j  av  a 2s. c  om
            Log.d(TAG, "phone type = " + fi.phoneType + " phone num = " + fi.phoneNum + " phone alpha tag = "
                    + fi.phoneAlphaTag);
    }
}