File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
telecomm/java/android/telecomm Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 2727import android .util .DisplayMetrics ;
2828
2929import java .util .MissingResourceException ;
30+ import java .util .Objects ;
3031
3132/**
3233 * Contains status label and icon displayed in the in-call UI.
@@ -127,4 +128,22 @@ private Drawable getIcon(Context context, int resId) {
127128 return null ;
128129 }
129130 }
131+
132+ @ Override
133+ public boolean equals (Object other ) {
134+ if (other != null && other instanceof StatusHints ) {
135+ StatusHints otherHints = (StatusHints ) other ;
136+ return Objects .equals (otherHints .getComponentName (), getComponentName ()) &&
137+ Objects .equals (otherHints .getLabel (), getLabel ()) &&
138+ otherHints .getIconId () == getIconId () &&
139+ Objects .equals (otherHints .getExtras (), getExtras ());
140+ }
141+ return false ;
142+ }
143+
144+ @ Override
145+ public int hashCode () {
146+ return Objects .hashCode (mComponentName ) + Objects .hashCode (mLabel ) + mIconId +
147+ Objects .hashCode (mExtras );
148+ }
130149}
You can’t perform that action at this time.
0 commit comments