FileDocCategorySizeDatePackage
StatusHints.javaAPI DocAndroid 5.1 API4512Thu Mar 12 22:22:42 GMT 2015android.telecom

StatusHints

public final class StatusHints extends Object implements android.os.Parcelable
Contains status label and icon displayed in the in-call UI.
hide

Fields Summary
private final android.content.ComponentName
mPackageName
private final CharSequence
mLabel
private final int
mIconResId
private final android.os.Bundle
mExtras
public static final Creator
CREATOR
Constructors Summary
public StatusHints(android.content.ComponentName packageName, CharSequence label, int iconResId, android.os.Bundle extras)

        mPackageName = packageName;
        mLabel = label;
        mIconResId = iconResId;
        mExtras = extras;
    
private StatusHints(android.os.Parcel in)


       
        mPackageName = in.readParcelable(getClass().getClassLoader());
        mLabel = in.readCharSequence();
        mIconResId = in.readInt();
        mExtras = in.readParcelable(getClass().getClassLoader());
    
Methods Summary
public intdescribeContents()

        return 0;
    
public booleanequals(java.lang.Object other)

        if (other != null && other instanceof StatusHints) {
            StatusHints otherHints = (StatusHints) other;
            return Objects.equals(otherHints.getPackageName(), getPackageName()) &&
                    Objects.equals(otherHints.getLabel(), getLabel()) &&
                    otherHints.getIconResId() == getIconResId() &&
                    Objects.equals(otherHints.getExtras(), getExtras());
        }
        return false;
    
public android.os.BundlegetExtras()

return
Extra data used to display status.

        return mExtras;
    
private android.graphics.drawable.DrawablegetIcon(android.content.Context context, int resId)

        Context packageContext;
        try {
            packageContext = context.createPackageContext(mPackageName.getPackageName(), 0);
        } catch (PackageManager.NameNotFoundException e) {
            Log.e(this, e, "Cannot find package %s", mPackageName.getPackageName());
            return null;
        }
        try {
            return packageContext.getDrawable(resId);
        } catch (MissingResourceException e) {
            Log.e(this, e, "Cannot find icon %d in package %s",
                    resId, mPackageName.getPackageName());
            return null;
        }
    
public android.graphics.drawable.DrawablegetIcon(android.content.Context context)

return
An icon displayed in the in-call UI.

        return getIcon(context, mIconResId);
    
public intgetIconResId()
The icon resource ID for the icon to show.

return
A resource ID.

        return mIconResId;
    
public java.lang.CharSequencegetLabel()

return
The label displayed in the in-call UI.

        return mLabel;
    
public android.content.ComponentNamegetPackageName()

return
A package used to load the icon.

        return mPackageName;
    
public inthashCode()

        return Objects.hashCode(mPackageName) + Objects.hashCode(mLabel) + mIconResId +
                Objects.hashCode(mExtras);
    
public voidwriteToParcel(android.os.Parcel out, int flags)

        out.writeParcelable(mPackageName, flags);
        out.writeCharSequence(mLabel);
        out.writeInt(mIconResId);
        out.writeParcelable(mExtras, 0);