diff options
44 files changed, 249 insertions, 248 deletions
diff --git a/res/drawable-hdpi/ic_call_end_white_24dp.png b/res/drawable-hdpi/ic_call_end_white_24dp.png Binary files differnew file mode 100644 index 00000000..757d339c --- /dev/null +++ b/res/drawable-hdpi/ic_call_end_white_24dp.png diff --git a/res/drawable-hdpi/ic_call_split_white_24dp.png b/res/drawable-hdpi/ic_call_split_white_24dp.png Binary files differnew file mode 100644 index 00000000..4e3dbf55 --- /dev/null +++ b/res/drawable-hdpi/ic_call_split_white_24dp.png diff --git a/res/drawable-hdpi/ic_in_call_phone_hangup.png b/res/drawable-hdpi/ic_in_call_phone_hangup.png Binary files differdeleted file mode 100644 index d6f26f22..00000000 --- a/res/drawable-hdpi/ic_in_call_phone_hangup.png +++ /dev/null diff --git a/res/drawable-hdpi/ic_split_holo_dark.png b/res/drawable-hdpi/ic_split_holo_dark.png Binary files differdeleted file mode 100644 index 5b10cf94..00000000 --- a/res/drawable-hdpi/ic_split_holo_dark.png +++ /dev/null diff --git a/res/drawable-hdpi/img_conference.png b/res/drawable-hdpi/img_conference.png Binary files differnew file mode 100644 index 00000000..3d9f683a --- /dev/null +++ b/res/drawable-hdpi/img_conference.png diff --git a/res/drawable-hdpi/picture_conference.png b/res/drawable-hdpi/picture_conference.png Binary files differdeleted file mode 100644 index 93743e62..00000000 --- a/res/drawable-hdpi/picture_conference.png +++ /dev/null diff --git a/res/drawable-ldrtl-hdpi/picture_conference.png b/res/drawable-ldrtl-hdpi/picture_conference.png Binary files differdeleted file mode 100644 index ca250fdc..00000000 --- a/res/drawable-ldrtl-hdpi/picture_conference.png +++ /dev/null diff --git a/res/drawable-ldrtl-mdpi/picture_conference.png b/res/drawable-ldrtl-mdpi/picture_conference.png Binary files differdeleted file mode 100644 index 2876d0f6..00000000 --- a/res/drawable-ldrtl-mdpi/picture_conference.png +++ /dev/null diff --git a/res/drawable-ldrtl-xhdpi/picture_conference.png b/res/drawable-ldrtl-xhdpi/picture_conference.png Binary files differdeleted file mode 100644 index 50b4e357..00000000 --- a/res/drawable-ldrtl-xhdpi/picture_conference.png +++ /dev/null diff --git a/res/drawable-mdpi/ic_call_end_white_24dp.png b/res/drawable-mdpi/ic_call_end_white_24dp.png Binary files differnew file mode 100644 index 00000000..17eb4824 --- /dev/null +++ b/res/drawable-mdpi/ic_call_end_white_24dp.png diff --git a/res/drawable-mdpi/ic_call_split_white_24dp.png b/res/drawable-mdpi/ic_call_split_white_24dp.png Binary files differnew file mode 100644 index 00000000..cb7ee1f3 --- /dev/null +++ b/res/drawable-mdpi/ic_call_split_white_24dp.png diff --git a/res/drawable-mdpi/ic_in_call_phone_hangup.png b/res/drawable-mdpi/ic_in_call_phone_hangup.png Binary files differdeleted file mode 100644 index 1dfad3b8..00000000 --- a/res/drawable-mdpi/ic_in_call_phone_hangup.png +++ /dev/null diff --git a/res/drawable-mdpi/ic_split_holo_dark.png b/res/drawable-mdpi/ic_split_holo_dark.png Binary files differdeleted file mode 100644 index 3980acbb..00000000 --- a/res/drawable-mdpi/ic_split_holo_dark.png +++ /dev/null diff --git a/res/drawable-mdpi/img_conference.png b/res/drawable-mdpi/img_conference.png Binary files differnew file mode 100644 index 00000000..0694dbd5 --- /dev/null +++ b/res/drawable-mdpi/img_conference.png diff --git a/res/drawable-mdpi/picture_conference.png b/res/drawable-mdpi/picture_conference.png Binary files differdeleted file mode 100644 index 8f7ecd57..00000000 --- a/res/drawable-mdpi/picture_conference.png +++ /dev/null diff --git a/res/drawable-xhdpi/ic_call_end_white_24dp.png b/res/drawable-xhdpi/ic_call_end_white_24dp.png Binary files differnew file mode 100644 index 00000000..b00d82ed --- /dev/null +++ b/res/drawable-xhdpi/ic_call_end_white_24dp.png diff --git a/res/drawable-xhdpi/ic_call_split_white_24dp.png b/res/drawable-xhdpi/ic_call_split_white_24dp.png Binary files differnew file mode 100644 index 00000000..218cb121 --- /dev/null +++ b/res/drawable-xhdpi/ic_call_split_white_24dp.png diff --git a/res/drawable-xhdpi/ic_in_call_phone_hangup.png b/res/drawable-xhdpi/ic_in_call_phone_hangup.png Binary files differdeleted file mode 100644 index 1d1bfebf..00000000 --- a/res/drawable-xhdpi/ic_in_call_phone_hangup.png +++ /dev/null diff --git a/res/drawable-xhdpi/ic_split_holo_dark.png b/res/drawable-xhdpi/ic_split_holo_dark.png Binary files differdeleted file mode 100644 index db558e49..00000000 --- a/res/drawable-xhdpi/ic_split_holo_dark.png +++ /dev/null diff --git a/res/drawable-xhdpi/img_conference.png b/res/drawable-xhdpi/img_conference.png Binary files differnew file mode 100644 index 00000000..b0dbcc2d --- /dev/null +++ b/res/drawable-xhdpi/img_conference.png diff --git a/res/drawable-xhdpi/picture_conference.png b/res/drawable-xhdpi/picture_conference.png Binary files differdeleted file mode 100644 index 1906b9b7..00000000 --- a/res/drawable-xhdpi/picture_conference.png +++ /dev/null diff --git a/res/drawable-xxhdpi/ic_call_end_white_24dp.png b/res/drawable-xxhdpi/ic_call_end_white_24dp.png Binary files differnew file mode 100644 index 00000000..aeabe4a8 --- /dev/null +++ b/res/drawable-xxhdpi/ic_call_end_white_24dp.png diff --git a/res/drawable-xxhdpi/ic_call_split_white_24dp.png b/res/drawable-xxhdpi/ic_call_split_white_24dp.png Binary files differnew file mode 100644 index 00000000..5ea57771 --- /dev/null +++ b/res/drawable-xxhdpi/ic_call_split_white_24dp.png diff --git a/res/drawable-xxhdpi/ic_in_call_phone_hangup.png b/res/drawable-xxhdpi/ic_in_call_phone_hangup.png Binary files differdeleted file mode 100644 index 67d8ad26..00000000 --- a/res/drawable-xxhdpi/ic_in_call_phone_hangup.png +++ /dev/null diff --git a/res/drawable-xxhdpi/ic_split_holo_dark.png b/res/drawable-xxhdpi/ic_split_holo_dark.png Binary files differdeleted file mode 100644 index 16b6ac08..00000000 --- a/res/drawable-xxhdpi/ic_split_holo_dark.png +++ /dev/null diff --git a/res/drawable-xxhdpi/img_conference.png b/res/drawable-xxhdpi/img_conference.png Binary files differnew file mode 100644 index 00000000..a8dba5ed --- /dev/null +++ b/res/drawable-xxhdpi/img_conference.png diff --git a/res/drawable-xxhdpi/picture_conference.png b/res/drawable-xxhdpi/picture_conference.png Binary files differdeleted file mode 100644 index e3dd6865..00000000 --- a/res/drawable-xxhdpi/picture_conference.png +++ /dev/null diff --git a/res/drawable-xxxhdpi/ic_call_end_white_24dp.png b/res/drawable-xxxhdpi/ic_call_end_white_24dp.png Binary files differnew file mode 100644 index 00000000..a6e8a7bc --- /dev/null +++ b/res/drawable-xxxhdpi/ic_call_end_white_24dp.png diff --git a/res/drawable-xxxhdpi/ic_call_split_white_24dp.png b/res/drawable-xxxhdpi/ic_call_split_white_24dp.png Binary files differnew file mode 100644 index 00000000..600cec8e --- /dev/null +++ b/res/drawable-xxxhdpi/ic_call_split_white_24dp.png diff --git a/res/layout/call_card_content.xml b/res/layout/call_card_content.xml index 6d0ee880..28eb1e23 100644 --- a/res/layout/call_card_content.xml +++ b/res/layout/call_card_content.xml @@ -102,7 +102,8 @@ <include layout="@layout/manage_conference_call_button" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_alignTop="@id/photo" /> + android:layout_alignTop="@id/photo" + android:elevation="@dimen/secondary_call_elevation" /> <!-- Placeholder for the dialpad which is replaced with the dialpad fragment when shown. --> <FrameLayout @@ -111,7 +112,8 @@ android:layout_gravity="bottom|center_horizontal" android:layout_alignParentBottom="true" android:layout_width="match_parent" - android:layout_height="match_parent" /> + android:layout_height="match_parent" + android:elevation="@dimen/dialpad_elevation" /> <fragment android:name="com.android.incallui.AnswerFragment" android:id="@+id/answerFragment" diff --git a/res/layout/caller_in_conference.xml b/res/layout/caller_in_conference.xml index 924bc630..0d15eb10 100644 --- a/res/layout/caller_in_conference.xml +++ b/res/layout/caller_in_conference.xml @@ -19,44 +19,39 @@ android:layout_width="match_parent" android:layout_height="64dp" android:orientation="horizontal" - android:gravity="center_vertical"> + android:gravity="center_vertical" + android:paddingStart="16dp" + android:paddingEnd="8dp"> <!-- Caller information --> <LinearLayout - android:id="@+id/conferenceCallerSeparate" android:layout_width="0dp" android:layout_weight="1" android:layout_height="match_parent" - android:background="?android:attr/selectableItemBackground" - android:paddingStart="16dp" android:orientation="horizontal" android:gravity="center_vertical"> - <!-- "Separate" (i.e. "go private") button for this caller --> - <ImageView - android:src="@drawable/ic_split_holo_dark" - android:layout_width="46dp" - android:layout_height="46dp" - android:scaleType="center" - android:contentDescription="@string/goPrivate"/> + <ImageView android:id="@+id/callerPhoto" + android:layout_width="@dimen/contact_browser_list_item_photo_size" + android:layout_height="@dimen/contact_browser_list_item_photo_size" /> <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingStart="8dp" - android:gravity="center_vertical" - android:orientation="vertical"> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:orientation="vertical" + android:layout_marginStart="16dp" + android:paddingBottom="2dp"> <!-- Name or number of this caller --> - <TextView - android:id="@+id/conferenceCallerName" - android:textAppearance="?android:attr/textAppearanceLarge" - android:textSize="18sp" - android:singleLine="true" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:layout_marginEnd="2dp" - /> + <TextView android:id="@+id/conferenceCallerName" + android:textAppearance="?android:attr/textAppearanceLarge" + android:textSize="16sp" + android:textColor="@color/conference_call_manager_caller_name_text_color" + android:singleLine="true" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_marginEnd="2dp" /> <!-- Number of this caller if name is supplied above --> <LinearLayout @@ -72,7 +67,7 @@ android:layout_height="wrap_content" android:textSize="14sp" android:ellipsize="marquee" - android:textColor="@color/manage_conference_secondary_text_color" + android:textColor="@color/conference_call_manager_secondary_text_color" android:singleLine="true" android:layout_marginEnd="8dp" /> @@ -82,7 +77,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="12sp" - android:textColor="@color/manage_conference_secondary_text_color" + android:textColor="@color/conference_call_manager_secondary_text_color" android:ellipsize="marquee" android:singleLine="true" android:textAllCaps="true" @@ -91,17 +86,29 @@ </LinearLayout> <!-- End of caller number --> </LinearLayout> <!-- End of caller information --> + </LinearLayout> - <!-- "End" button for this caller which should look like the - "end call" button in the main in-call UI screen --> + <!-- "Separate" (i.e. "go private") button for this caller --> + <ImageView android:id="@+id/conferenceCallerSeparate" + android:src="@drawable/ic_call_split_white_24dp" + android:layout_width="@dimen/conference_call_manager_button_dimension" + android:layout_height="@dimen/conference_call_manager_button_dimension" + android:scaleType="center" + android:contentDescription="@string/goPrivate" + android:tint="@color/conference_call_manager_icon_color" + android:background="?android:attr/selectableItemBackgroundBorderless" /> + + <!-- "Disconnect" button which terminates the connection with this caller. --> <ImageButton - android:id="@+id/conferenceCallerDisconnect" - android:layout_width="80dp" - android:layout_height="match_parent" - android:src="@drawable/ic_in_call_phone_hangup" - android:background="@drawable/end_call_background" - android:scaleType="center" - android:contentDescription="@string/onscreenEndCallText" /> + android:id="@+id/conferenceCallerDisconnect" + android:layout_width="@dimen/conference_call_manager_button_dimension" + android:layout_height="@dimen/conference_call_manager_button_dimension" + android:layout_marginStart="8dp" + android:src="@drawable/ic_call_end_white_24dp" + android:scaleType="center" + android:contentDescription="@string/onscreenEndCallText" + android:tint="@color/conference_call_manager_icon_color" + android:background="?android:attr/selectableItemBackgroundBorderless" /> </LinearLayout> <!-- End of single list element --> diff --git a/res/layout/conference_manager_fragment.xml b/res/layout/conference_manager_fragment.xml index a8fda2c2..c6c1af9d 100644 --- a/res/layout/conference_manager_fragment.xml +++ b/res/layout/conference_manager_fragment.xml @@ -17,85 +17,27 @@ <!-- The "Manage conference" UI. This panel is displayed (instead of the inCallPanel) when the user clicks the "Manage conference" button while on a conference call. --> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/manageConferencePanel" - android:background="#FF000000" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:visibility="gone" - > - <!-- This original header (with timer) is currently not being used, - but may be of use in the future. --> - <!-- Header, including chronometer and List divider --> - <Chronometer - android:id="@+id/manageConferencePanelHeader" - android:textAppearance="?android:attr/textAppearanceLarge" - android:textSize="24sp" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center_horizontal" - android:layout_alignParentTop="true" - android:layout_marginTop="5dip" - android:layout_marginBottom="5dip" - android:visibility="gone"/> - - <ImageView - android:id="@+id/manageConferencePanelDivider" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:src="@android:drawable/divider_horizontal_dark" - android:scaleType="fitXY" - android:layout_below="@id/manageConferencePanelHeader" - android:visibility="gone"/> - <!-- End of the original header --> - - <!-- Header which looks like ActionBar. --> - <FrameLayout - android:id="@+id/manageConferenceHeader" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="@drawable/ab_transparent_dark_holo"> - - <LinearLayout - android:id="@+id/manage_done" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="?android:attr/selectableItemBackground" - android:clickable="true" - android:orientation="horizontal"> - - <ImageView - android:src="?android:attr/homeAsUpIndicator" - android:layout_gravity="center_vertical|left" - android:layout_width="wrap_content" - android:layout_height="wrap_content" /> - - <TextView - android:layout_width="match_parent" - android:layout_height="?android:attr/actionBarSize" - style="@android:style/TextAppearance.Holo.Widget.ActionBar.Title" - android:gravity="center_vertical" - android:text="@string/manageConferenceLabel"/> - </LinearLayout> - - </FrameLayout> <!-- End of header --> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/manageConferencePanel" + android:background="@color/conference_call_manager_background_color" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:paddingTop="@dimen/conference_call_manager_padding_top" + android:visibility="gone"> <!-- The scrollview wrapper for the list of callers on the conference call (in case the list gets too long). --> <ScrollView android:id="@+id/conferenceList" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_below="@id/manageConferenceHeader"> + android:layout_height="wrap_content"> <!-- The actual list of callers; this embedded LinearLayout required since scrollview only supports a single child. --> <LinearLayout android:orientation="vertical" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:showDividers="middle|end" - android:divider="?android:attr/listDivider"> + android:layout_height="wrap_content"> <!-- A conference can have at most MAX_CALLERS_IN_CONFERENCE (= 5) callers, so just define all those UI elements here. --> @@ -129,4 +71,4 @@ </ScrollView> <!-- End of scrolling list wrapper for the linear layout --> -</RelativeLayout> +</FrameLayout> diff --git a/res/layout/manage_conference_call_button.xml b/res/layout/manage_conference_call_button.xml index d8ddf218..375f8882 100644 --- a/res/layout/manage_conference_call_button.xml +++ b/res/layout/manage_conference_call_button.xml @@ -16,32 +16,39 @@ --> <!-- This button is used only on GSM devices, during a conference call. --> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/manage_conference_call_button" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal" - android:paddingStart="@dimen/call_banner_side_padding" - android:paddingEnd="@dimen/secondary_call_banner_right_padding" - android:paddingTop="@dimen/call_banner_secondary_call_top_bottom_padding" - android:paddingBottom="@dimen/call_banner_secondary_call_top_bottom_padding" android:background="@color/incall_banner_secondary_background_color"> - <!-- The entire LinearLayout here is clickable, so we ignore ImageButton clicks. --> - <ImageView android:id="@+id/manageConferenceButtonImage" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@drawable/ic_group_white_24dp" - android:tint="@color/incall_banner_secondary_text_color" - android:contentDescription="@string/onscreenManageConferenceText" /> - - <TextView android:id="@+id/manageConferenceButtonLabel" + <!-- This LinearLayout nested immediately in a FrameLayout is necessary to apply both a + background color and ripple to the button. --> + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingStart="24dp" - android:gravity="center_vertical" - android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="@color/incall_banner_secondary_text_color" - android:text="@string/onscreenManageConferenceText" /> + android:paddingStart="@dimen/call_banner_side_padding" + android:paddingEnd="@dimen/secondary_call_banner_right_padding" + android:paddingTop="@dimen/call_banner_secondary_call_top_bottom_padding" + android:paddingBottom="@dimen/call_banner_secondary_call_top_bottom_padding" + android:background="?android:attr/selectableItemBackground"> + + <ImageView android:id="@+id/manageConferenceButtonImage" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/ic_group_white_24dp" + android:tint="@color/incall_banner_secondary_text_color" + android:contentDescription="@string/onscreenManageConferenceText" /> + + <TextView android:id="@+id/manageConferenceButtonLabel" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingStart="24dp" + android:gravity="center_vertical" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textColor="@color/incall_banner_secondary_text_color" + android:text="@string/onscreenManageConferenceText" /> + + </LinearLayout> -</LinearLayout> +</FrameLayout> diff --git a/res/layout/secondary_call_info.xml b/res/layout/secondary_call_info.xml index 237559d4..8106dff0 100644 --- a/res/layout/secondary_call_info.xml +++ b/res/layout/secondary_call_info.xml @@ -16,64 +16,73 @@ <!-- XML resource file for secondary call info, which will be used by CallCard. --> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/secondary_call_info" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" - android:orientation="horizontal" - android:paddingStart="@dimen/call_banner_side_padding" - android:paddingEnd="@dimen/secondary_call_banner_right_padding" - android:paddingTop="@dimen/call_banner_secondary_call_top_bottom_padding" - android:paddingBottom="@dimen/call_banner_secondary_call_top_bottom_padding" android:background="@color/incall_banner_secondary_background_color" android:elevation="@dimen/secondary_call_elevation"> + <!-- This LinearLayout nested immediately in a FrameLayout is necessary to apply both a + background color and ripple to the button. --> <LinearLayout - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="vertical"> - <!-- Name (or the phone number, if we don't have a name to display). --> - <TextView android:id="@+id/secondaryCallName" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="@color/incall_banner_secondary_text_color" - android:ellipsize="marquee" - android:singleLine="true"/> - <!-- Provider, e.g. AT&T, that a call is associated with --> - <LinearLayout android:id="@+id/secondary_call_provider_info" - android:layout_width="match_parent" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="horizontal" + android:paddingStart="@dimen/call_banner_side_padding" + android:paddingEnd="@dimen/secondary_call_banner_right_padding" + android:paddingTop="@dimen/call_banner_secondary_call_top_bottom_padding" + android:paddingBottom="@dimen/call_banner_secondary_call_top_bottom_padding" + android:background="?android:attr/selectableItemBackground"> + + <LinearLayout + android:layout_width="0dp" android:layout_height="wrap_content" - android:orientation="horizontal" - android:visibility="gone" > - <ImageView android:id="@+id/secondaryCallProviderIcon" - android:layout_width="@dimen/call_provider_small_icon_size" - android:layout_height="@dimen/call_provider_small_icon_size" - android:layout_marginRight="2dp" - android:baselineAlignBottom="true" - android:scaleType="centerInside" /> - <TextView android:id="@+id/secondaryCallProviderLabel" + android:layout_weight="1" + android:orientation="vertical"> + <!-- Name (or the phone number, if we don't have a name to display). --> + <TextView android:id="@+id/secondaryCallName" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/onHold" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@color/incall_banner_secondary_text_color" + android:ellipsize="marquee" android:singleLine="true"/> + <!-- Provider, e.g. AT&T, that a call is associated with --> + <LinearLayout android:id="@+id/secondary_call_provider_info" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:visibility="gone" > + <ImageView android:id="@+id/secondaryCallProviderIcon" + android:layout_width="@dimen/call_provider_small_icon_size" + android:layout_height="@dimen/call_provider_small_icon_size" + android:layout_marginRight="2dp" + android:baselineAlignBottom="true" + android:scaleType="centerInside" /> + <TextView android:id="@+id/secondaryCallProviderLabel" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/onHold" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textColor="@color/incall_banner_secondary_text_color" + android:singleLine="true"/> + </LinearLayout> </LinearLayout> - </LinearLayout> - <!-- Call status of the background call, usually the string "On hold". --> - <TextView android:id="@+id/secondaryCallStatus" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:paddingEnd="@dimen/call_banner_side_padding" - android:text="@string/onHold" - android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="@color/incall_banner_secondary_text_color" - android:textAlignment="textEnd" - android:singleLine="true" /> + <!-- Call status of the background call, usually the string "On hold". --> + <TextView android:id="@+id/secondaryCallStatus" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:paddingEnd="@dimen/call_banner_side_padding" + android:text="@string/onHold" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textColor="@color/incall_banner_secondary_text_color" + android:textAlignment="textEnd" + android:singleLine="true" /> + + </LinearLayout> -</LinearLayout> +</FrameLayout> diff --git a/res/values/colors.xml b/res/values/colors.xml index 3060339a..e2aac3a7 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -29,11 +29,17 @@ <color name="incall_banner_secondary_background_color">#f5f5f5</color> <color name="incall_banner_secondary_text_color">#808080</color> + <color name="incall_action_bar_background_color">@color/incall_background_color</color> + <color name="incall_action_bar_text_color">@color/incall_call_banner_text_color</color> + <!-- Put on top of each photo, implying 80% darker than usual. --> <color name="on_hold_dim_effect">#cc000000</color> + <color name="conference_call_manager_background_color">#f8f8f8</color> + <color name="conference_call_manager_caller_name_text_color">#4d4d4d</color> + <color name="conference_call_manager_icon_color">#999999</color> <!-- Used with some smaller texts in manage conference screen. --> - <color name="manage_conference_secondary_text_color">#888888</color> + <color name="conference_call_manager_secondary_text_color">#999999</color> <color name="end_call_touch_feedback_tint">#dddddd</color> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 8648c8c1..55f0c3e1 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -21,6 +21,7 @@ <!-- Height of the "call banner" overlay on top of the upper part of the call info area. --> <dimen name="call_banner_height">122dp</dimen> + <dimen name="incall_action_bar_elevation">3dp</dimen> <!-- Margin between the bottom of the "call card" photo and the top of the in-call button cluster. --> @@ -50,8 +51,9 @@ <!-- Height and width of the in-call buttons. --> <dimen name="in_call_button_dimension">48dp</dimen> - <dimen name="primary_call_elevation">4dp</dimen> - <dimen name="secondary_call_elevation">4dp</dimen> + <dimen name="primary_call_elevation">5dp</dimen> + <dimen name="dialpad_elevation">2dp</dimen> + <dimen name="secondary_call_elevation">1dp</dimen> <dimen name="floating_action_bar_vertical_offset">-24dp</dimen> @@ -109,4 +111,6 @@ <dimen name="end_call_floating_action_button_diameter">72dp</dimen> <dimen name="end_call_floating_action_button_small_diameter">56dp</dimen> + <dimen name="conference_call_manager_padding_top">64dp</dimen> + <dimen name="conference_call_manager_button_dimension">46dp</dimen> </resources> diff --git a/res/values/styles.xml b/res/values/styles.xml index f49cee91..17edfafc 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -92,21 +92,27 @@ <!-- Theme for the InCallActivity activity. Should have a transparent background for the circular reveal animation for a new outgoing call to work correctly. We don't just use - Theme.Black.NoTitleBar directly, since we want any popups or dialogs - from the InCallActivity to have the correct holo style. --> + Theme.Black.NoTitleBar directly, since we want any popups or dialogs from the + InCallActivity to have the correct Material style. --> <style name="Theme.InCallScreen" parent="@android:style/Theme.Material.Light"> <item name="android:windowAnimationStyle">@style/InCallAnimationStyle</item> <item name="android:windowIsTranslucent">true</item> <item name="android:windowBackground">@android:color/transparent</item> <item name="android:windowContentOverlay">@null</item> - <item name="android:windowNoTitle">true</item> <item name="dialpad_key_button_touch_tint">@color/incall_dialpad_touch_tint</item> <item name="android:textColorPrimary">@color/incall_call_banner_text_color</item> <item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item> <item name="android:popupMenuStyle">@style/InCallPopupMenuStyle</item> + <item name="android:actionBarStyle">@style/InCallActionBarStyle</item> </style> <style name="InCallPopupMenuStyle" parent="@android:style/Theme.Material.Light"> <item name="android:textColorPrimary">@color/popup_menu_color</item> </style> + + <style name="InCallActionBarStyle" parent="@android:style/Widget.Material.Light.ActionBar"> + <item name="android:background">@color/incall_action_bar_background_color</item> + <item name="android:textColor">@color/incall_action_bar_text_color</item> + </style> + </resources> diff --git a/src/com/android/incallui/CallCardFragment.java b/src/com/android/incallui/CallCardFragment.java index 600689c8..bff48b44 100644 --- a/src/com/android/incallui/CallCardFragment.java +++ b/src/com/android/incallui/CallCardFragment.java @@ -617,7 +617,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr private Drawable getConferencePhoto(boolean isGeneric) { Log.v(this, "isGenericPhoto: " + isGeneric); - final int resId = isGeneric ? R.drawable.picture_dialing : R.drawable.picture_conference; + final int resId = isGeneric ? R.drawable.picture_dialing : R.drawable.img_conference; return getView().getResources().getDrawable(resId); } @@ -694,6 +694,9 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr case Call.State.DISCONNECTED: callStateLabel = getCallFailedString(disconnectCause); break; + case Call.State.CONFERENCED: + callStateLabel = context.getString(R.string.card_title_conf_call); + break; default: Log.wtf(this, "updateCallStateWidgets: unexpected call: " + state); } diff --git a/src/com/android/incallui/ConferenceManagerFragment.java b/src/com/android/incallui/ConferenceManagerFragment.java index 75ff1769..f45d294a 100644 --- a/src/com/android/incallui/ConferenceManagerFragment.java +++ b/src/com/android/incallui/ConferenceManagerFragment.java @@ -16,14 +16,20 @@ package com.android.incallui; +import android.app.ActionBar; +import android.graphics.drawable.Drawable; +import android.net.Uri; import android.os.Bundle; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import android.widget.Chronometer; +import android.widget.ImageView; import android.widget.TextView; +import com.android.contacts.common.ContactPhotoManager; +import com.android.contacts.common.ContactPhotoManager.DefaultImageRequest; + /** * Fragment for call control buttons */ @@ -32,9 +38,9 @@ public class ConferenceManagerFragment ConferenceManagerPresenter.ConferenceManagerUi> implements ConferenceManagerPresenter.ConferenceManagerUi { - private View mButtonManageConferenceDone; private ViewGroup[] mConferenceCallList; - private Chronometer mConferenceTime; + private int mActionBarElevation; + private ContactPhotoManager mContactPhotoManager; @Override ConferenceManagerPresenter createPresenter() { @@ -58,27 +64,19 @@ public class ConferenceManagerFragment final View parent = inflater.inflate(R.layout.conference_manager_fragment, container, false); - // set up the Conference Call chronometer - mConferenceTime = (Chronometer) parent.findViewById(R.id.manageConferencePanelHeader); - mConferenceTime.setFormat(getActivity().getString(R.string.caller_manage_header)); - // Create list of conference call widgets mConferenceCallList = new ViewGroup[getPresenter().getMaxCallersInConference()]; - final int[] viewGroupIdList = { R.id.caller0, R.id.caller1, R.id.caller2, R.id.caller3, R.id.caller4 }; for (int i = 0; i < getPresenter().getMaxCallersInConference(); i++) { - mConferenceCallList[i] = - (ViewGroup) parent.findViewById(viewGroupIdList[i]); + mConferenceCallList[i] = (ViewGroup) parent.findViewById(viewGroupIdList[i]); } - mButtonManageConferenceDone = parent.findViewById(R.id.manage_done); - mButtonManageConferenceDone.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - getPresenter().manageConferenceDoneClicked(); - } - }); + mContactPhotoManager = + ContactPhotoManager.getInstance(getActivity().getApplicationContext()); + + mActionBarElevation = + (int) getResources().getDimension(R.dimen.incall_action_bar_elevation); return parent; } @@ -90,13 +88,22 @@ public class ConferenceManagerFragment @Override public void setVisible(boolean on) { + ActionBar actionBar = getActivity().getActionBar(); + if (on) { + actionBar.setTitle(R.string.manageConferenceLabel); + actionBar.setElevation(mActionBarElevation); + actionBar.setHideOffset(0); + actionBar.show(); + final CallList calls = CallList.getInstance(); getPresenter().init(getActivity(), calls); getView().setVisibility(View.VISIBLE); - } else { getView().setVisibility(View.GONE); + + actionBar.setElevation(0); + actionBar.setHideOffset(actionBar.getHeight()); } } @@ -120,8 +127,10 @@ public class ConferenceManagerFragment */ @Override public final void displayCallerInfoForConferenceRow(int rowId, String callerName, - String callerNumber, String callerNumberType) { + String callerNumber, String callerNumberType, String lookupKey, Uri photoUri) { + final ImageView photoView = (ImageView) mConferenceCallList[rowId].findViewById( + R.id.callerPhoto); final TextView nameTextView = (TextView) mConferenceCallList[rowId].findViewById( R.id.conferenceCallerName); final TextView numberTextView = (TextView) mConferenceCallList[rowId].findViewById( @@ -129,6 +138,10 @@ public class ConferenceManagerFragment final TextView numberTypeTextView = (TextView) mConferenceCallList[rowId].findViewById( R.id.conferenceCallerNumberType); + DefaultImageRequest imageRequest = (photoUri != null) ? null : + new DefaultImageRequest(callerName, lookupKey, true /* isCircularPhoto */); + mContactPhotoManager.loadDirectoryPhoto(photoView, photoUri, false, true, imageRequest); + // set the caller name nameTextView.setText(callerName); @@ -148,50 +161,28 @@ public class ConferenceManagerFragment public final void setupEndButtonForRow(final int rowId) { View endButton = mConferenceCallList[rowId].findViewById(R.id.conferenceCallerDisconnect); endButton.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - getPresenter().endConferenceConnection(rowId); - } + @Override + public void onClick(View v) { + getPresenter().endConferenceConnection(rowId); + } }); } @Override - public final void setCanSeparateButtonForRow(final int rowId, boolean canSeparate) { - final View separateButton = mConferenceCallList[rowId].findViewById( - R.id.conferenceCallerSeparate); + public final void setupSeparateButtonForRow(final int rowId, boolean canSeparate) { + final View separateButton = + mConferenceCallList[rowId].findViewById(R.id.conferenceCallerSeparate); if (canSeparate) { - final View.OnClickListener separateThisConnection = new View.OnClickListener() { - @Override - public void onClick(View v) { - getPresenter().separateConferenceConnection(rowId); - } - }; - separateButton.setOnClickListener(separateThisConnection); + separateButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + getPresenter().separateConferenceConnection(rowId); + } + }); separateButton.setVisibility(View.VISIBLE); } else { separateButton.setVisibility(View.INVISIBLE); } } - - /** - * Starts the "conference time" chronometer. - */ - @Override - public void startConferenceTime(long base) { - if (mConferenceTime != null) { - mConferenceTime.setBase(base); - mConferenceTime.start(); - } - } - - /** - * Stops the "conference time" chronometer. - */ - @Override - public void stopConferenceTime() { - if (mConferenceTime != null) { - mConferenceTime.stop(); - } - } }
\ No newline at end of file diff --git a/src/com/android/incallui/ConferenceManagerPresenter.java b/src/com/android/incallui/ConferenceManagerPresenter.java index 2b5e8eb9..f40415cc 100644 --- a/src/com/android/incallui/ConferenceManagerPresenter.java +++ b/src/com/android/incallui/ConferenceManagerPresenter.java @@ -17,6 +17,9 @@ package com.android.incallui; import android.content.Context; +import android.graphics.drawable.Drawable; +import android.net.Uri; +import android.text.TextUtils; import com.android.incallui.ContactInfoCache.ContactCacheEntry; import com.android.incallui.InCallPresenter.InCallState; @@ -128,25 +131,28 @@ public class ConferenceManagerPresenter // Activate this row of the Manage conference panel: getUi().setRowVisible(i, true); - final String name = contactCacheEntry.name; - final String number = contactCacheEntry.number; + String name = contactCacheEntry.name; + String number = contactCacheEntry.number; + + if (TextUtils.isEmpty(name)) { + name = number; + number = null; + } if (canSeparate) { - getUi().setCanSeparateButtonForRow(i, canSeparate); + getUi().setupSeparateButtonForRow(i, canSeparate); } // display the CallerInfo. getUi().setupEndButtonForRow(i); - getUi().displayCallerInfoForConferenceRow(i, name, number, contactCacheEntry.label); + + getUi().displayCallerInfoForConferenceRow(i, name, number, contactCacheEntry.label, + contactCacheEntry.lookupKey, contactCacheEntry.displayPhotoUri); } else { // Disable this row of the Manage conference panel: getUi().setRowVisible(i, false); } } - public void manageConferenceDoneClicked() { - getUi().setVisible(false); - } - public int getMaxCallersInConference() { return MAX_CALLERS_IN_CONFERENCE; } @@ -168,10 +174,8 @@ public class ConferenceManagerPresenter boolean isFragmentVisible(); void setRowVisible(int rowId, boolean on); void displayCallerInfoForConferenceRow(int rowId, String callerName, String callerNumber, - String callerNumberType); - void setCanSeparateButtonForRow(int rowId, boolean canSeparate); + String callerNumberType, String lookupKey, Uri photoUri); + void setupSeparateButtonForRow(int rowId, boolean canSeparate); void setupEndButtonForRow(int rowId); - void startConferenceTime(long base); - void stopConferenceTime(); } } diff --git a/src/com/android/incallui/ContactInfoCache.java b/src/com/android/incallui/ContactInfoCache.java index ccf5b794..488e55bf 100644 --- a/src/com/android/incallui/ContactInfoCache.java +++ b/src/com/android/incallui/ContactInfoCache.java @@ -328,6 +328,8 @@ public class ContactInfoCache implements ContactsAsyncHelper.OnImageLoadComplete } cce.photo = photo; + cce.lookupKey = info.lookupKeyOrNull; + return cce; } @@ -503,6 +505,7 @@ public class ContactInfoCache implements ContactsAsyncHelper.OnImageLoadComplete /** Either a display photo or a thumbnail URI. */ public Uri displayPhotoUri; public Uri lookupUri; // Sent to NotificationMananger + public String lookupKey; @Override public String toString() { diff --git a/src/com/android/incallui/DialpadFragment.java b/src/com/android/incallui/DialpadFragment.java index e15f1bcc..6cb5d1f8 100644 --- a/src/com/android/incallui/DialpadFragment.java +++ b/src/com/android/incallui/DialpadFragment.java @@ -46,8 +46,6 @@ public class DialpadFragment extends BaseFragment<DialpadPresenter, DialpadPrese implements DialpadPresenter.DialpadUi, View.OnTouchListener, View.OnKeyListener, View.OnHoverListener, View.OnClickListener { - private static final float DIALPAD_SLIDE_FRACTION = 1.0f; - private static final int ACCESSIBILITY_DTMF_STOP_DELAY_MILLIS = 50; /** diff --git a/src/com/android/incallui/InCallActivity.java b/src/com/android/incallui/InCallActivity.java index f0920336..95cc0d7d 100644 --- a/src/com/android/incallui/InCallActivity.java +++ b/src/com/android/incallui/InCallActivity.java @@ -16,6 +16,7 @@ package com.android.incallui; +import android.app.ActionBar; import android.app.Activity; import android.app.AlertDialog; import android.app.FragmentManager; @@ -29,6 +30,7 @@ import android.graphics.Point; import android.os.Bundle; import android.telephony.DisconnectCause; import android.text.TextUtils; +import android.view.MenuItem; import android.view.ViewTreeObserver; import android.view.animation.Animation; import android.view.animation.AnimationUtils; @@ -110,7 +112,14 @@ public class InCallActivity extends Activity { getWindow().addFlags(flags); - requestWindowFeature(Window.FEATURE_NO_TITLE); + // Setup action bar for the conference call manager. + requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY); + ActionBar actionBar = getActionBar(); + if (actionBar != null) { + actionBar.setDisplayHomeAsUpEnabled(true); + actionBar.setDisplayShowTitleEnabled(true); + actionBar.hide(); + } // TODO(klp): Do we need to add this back when prox sensor is not available? // lp.inputFeatures |= WindowManager.LayoutParams.INPUT_FEATURE_DISABLE_USER_ACTIVITY; @@ -317,6 +326,16 @@ public class InCallActivity extends Activity { } @Override + public boolean onOptionsItemSelected(MenuItem item) { + final int itemId = item.getItemId(); + if (itemId == android.R.id.home) { + onBackPressed(); + return true; + } + return super.onOptionsItemSelected(item); + } + + @Override public boolean onKeyUp(int keyCode, KeyEvent event) { // push input to the dialer. if (mDialpadFragment != null && (mDialpadFragment.isVisible()) && diff --git a/src/com/android/incallui/StatusBarNotifier.java b/src/com/android/incallui/StatusBarNotifier.java index 637ac16e..20cc695c 100644 --- a/src/com/android/incallui/StatusBarNotifier.java +++ b/src/com/android/incallui/StatusBarNotifier.java @@ -406,7 +406,7 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener { Bitmap largeIcon = null; if (isConference) { largeIcon = BitmapFactory.decodeResource(mContext.getResources(), - R.drawable.picture_conference); + R.drawable.img_conference); } if (contactInfo.photo != null && (contactInfo.photo instanceof BitmapDrawable)) { largeIcon = ((BitmapDrawable) contactInfo.photo).getBitmap(); |