Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e1216c0 authored by kaiyiz's avatar kaiyiz Committed by Xiaojing Zhang
Browse files

Contacts: Add sim indicator in contacts history.

Add sim indicator in contacts history of contact detail.

Change-Id: Ie8e97bcb614f246e2978eccd304de7eb7f28d1ed
parent 9ee70bd0
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@
        android:layout_height="wrap_content"
        android:id="@+id/text"
        android:layout_below="@+id/sub_header"
        android:layout_toEndOf="@+id/icon_text"
        android:layout_toEndOf="@+id/call_account_icon"
        android:layout_toStartOf="@+id/icon_alternate"
        android:textAlignment="viewStart"
        android:textColor="@color/quickcontact_entry_sub_header_text_color" />
@@ -93,6 +93,18 @@
        android:layout_marginTop="@dimen/expanding_entry_card_item_text_icon_margin_top"
        android:layout_marginEnd="@dimen/expanding_entry_card_item_text_icon_margin_right" />

    <ImageView
        android:id="@+id/call_account_icon"
        android:layout_marginTop="@dimen/expanding_entry_card_item_account_icon_margin_top"
        android:layout_marginEnd="@dimen/expanding_entry_card_item_text_icon_margin_right"
        android:layout_toEndOf="@+id/icon_text"
        android:layout_below="@+id/sub_header"
        android:layout_width="@dimen/expanding_entry_card_item_icon_size"
        android:layout_height="@dimen/expanding_entry_card_item_icon_size"
        android:tint="@color/quickcontact_entry_sub_header_text_color"
        android:layout_gravity="center_vertical"
        android:scaleType="centerInside"/>

     <ImageView
         android:id="@+id/icon_alternate"
         android:layout_width="wrap_content"
+2 −0
Original line number Diff line number Diff line
@@ -181,6 +181,8 @@
    <!-- The top margin when the sub header and text views are both gone -->
    <dimen name="expanding_entry_card_item_header_only_margin_bottom">2dp</dimen>
    <dimen name="expanding_entry_card_item_no_icon_margin_top">6dp</dimen>
    <dimen name="expanding_entry_card_item_account_icon_margin_top">5dp</dimen>
    <dimen name="expanding_entry_card_item_icon_size">12dp</dimen>

    <!-- The width the that the tabs occupy in the ActionBar when in landscape mode.
         426dp is the height of a "small" screen. We should leave 240dp for
+9 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.provider.CalendarContract.Attendees;
import android.provider.CalendarContract.Events;
import android.provider.CallLog.Calls;
import android.text.TextUtils;
import android.text.format.Time;
import android.util.Log;
@@ -287,4 +288,12 @@ public class CalendarInteraction implements ContactInteraction {
    public int getIconResourceId() {
        return CALENDAR_ICON_RES;
    }

    public String getAccountComponentName() {
        return null;
    }

    public String getAccountId() {
        return null;
    }
}
+8 −0
Original line number Diff line number Diff line
@@ -178,6 +178,14 @@ public class CallLogInteraction implements ContactInteraction {
        return mValues.getAsInteger(Calls.TYPE);
    }

    public String getAccountComponentName() {
        return mValues.getAsString(Calls.PHONE_ACCOUNT_COMPONENT_NAME);
    }

    public String getAccountId() {
        return mValues.getAsString(Calls.PHONE_ACCOUNT_ID);
    }

    @Override
    public String getContentDescription(Context context) {
        String callDetails = getCallTypeString(context) + ". " + getViewFooter(context) + ". " +
+2 −0
Original line number Diff line number Diff line
@@ -35,4 +35,6 @@ public interface ContactInteraction {
    String getContentDescription(Context context);
    /** The resource id for the icon, if available. May be 0 if one is not available. */
    int getIconResourceId();
    String getAccountComponentName();
    String getAccountId();
}
Loading