Example usage for android.telecom PhoneAccount getLabel

List of usage examples for android.telecom PhoneAccount getLabel

Introduction

In this page you can find the example usage for android.telecom PhoneAccount getLabel.

Prototype

public CharSequence getLabel() 

Source Link

Document

A short label describing a PhoneAccount .

Usage

From source file:Main.java

/**
 * Extract account label from PhoneAccount object.
 *///from ww w  .j  av a2s .c o m
public static String getAccountLabel(Context context, PhoneAccountHandle accountHandle) {
    PhoneAccount account = getAccountOrNull(context, accountHandle);
    if (account != null && account.getLabel() != null) {
        return account.getLabel().toString();
    }
    return null;
}