From 3a7108ae5fc630730457957629b1115dcc991454 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 25 Aug 2014 12:19:35 -0700 Subject: Restyle conference call manager screen. + Swap out/in new assets for end/split icons in the manager screen, and the splash screen in the InCall screen. - Removed unused conference call manager code, including things like chronometer and the "done" button. + Replaced custom action bar in conferece call manager with standard action bar. + Added contact image (does not open quick contact) in the list of calls in the conference call manager. This is done with a lookup using the contact photo manager, and required adding the lookup key to the ContactCacheEntry. + Handled a missing Call.State case in CallCardFragment for calls with state CONFERENCED which caused crashes. + Misc style changes on conference call manager: colors, sizes, paddings. + Adjusted elevations so dialpad covers manager/secondary buttons. + Added ripple to manager/secondary buttons. Bug: 15862303 Change-Id: Iab9b6421d5a1ea69cd951a459d46c065f9456a8f --- .../res/drawable-hdpi/ic_call_end_white_24dp.png | Bin 0 -> 454 bytes .../res/drawable-hdpi/ic_call_split_white_24dp.png | Bin 0 -> 326 bytes .../res/drawable-hdpi/ic_in_call_phone_hangup.png | Bin 1794 -> 0 bytes InCallUI/res/drawable-hdpi/ic_split_holo_dark.png | Bin 1893 -> 0 bytes InCallUI/res/drawable-hdpi/img_conference.png | Bin 0 -> 7037 bytes InCallUI/res/drawable-hdpi/picture_conference.png | Bin 3522 -> 0 bytes .../res/drawable-ldrtl-hdpi/picture_conference.png | Bin 11787 -> 0 bytes .../res/drawable-ldrtl-mdpi/picture_conference.png | Bin 8623 -> 0 bytes .../drawable-ldrtl-xhdpi/picture_conference.png | Bin 16123 -> 0 bytes .../res/drawable-mdpi/ic_call_end_white_24dp.png | Bin 0 -> 315 bytes .../res/drawable-mdpi/ic_call_split_white_24dp.png | Bin 0 -> 256 bytes .../res/drawable-mdpi/ic_in_call_phone_hangup.png | Bin 1280 -> 0 bytes InCallUI/res/drawable-mdpi/ic_split_holo_dark.png | Bin 1514 -> 0 bytes InCallUI/res/drawable-mdpi/img_conference.png | Bin 0 -> 4629 bytes InCallUI/res/drawable-mdpi/picture_conference.png | Bin 2101 -> 0 bytes .../res/drawable-xhdpi/ic_call_end_white_24dp.png | Bin 0 -> 534 bytes .../drawable-xhdpi/ic_call_split_white_24dp.png | Bin 0 -> 377 bytes .../res/drawable-xhdpi/ic_in_call_phone_hangup.png | Bin 2378 -> 0 bytes InCallUI/res/drawable-xhdpi/ic_split_holo_dark.png | Bin 2839 -> 0 bytes InCallUI/res/drawable-xhdpi/img_conference.png | Bin 0 -> 9517 bytes InCallUI/res/drawable-xhdpi/picture_conference.png | Bin 5309 -> 0 bytes .../res/drawable-xxhdpi/ic_call_end_white_24dp.png | Bin 0 -> 736 bytes .../drawable-xxhdpi/ic_call_split_white_24dp.png | Bin 0 -> 461 bytes .../drawable-xxhdpi/ic_in_call_phone_hangup.png | Bin 2698 -> 0 bytes .../res/drawable-xxhdpi/ic_split_holo_dark.png | Bin 3167 -> 0 bytes InCallUI/res/drawable-xxhdpi/img_conference.png | Bin 0 -> 16306 bytes .../res/drawable-xxhdpi/picture_conference.png | Bin 15299 -> 0 bytes .../drawable-xxxhdpi/ic_call_end_white_24dp.png | Bin 0 -> 929 bytes .../drawable-xxxhdpi/ic_call_split_white_24dp.png | Bin 0 -> 646 bytes InCallUI/res/layout/call_card_content.xml | 6 +- InCallUI/res/layout/caller_in_conference.xml | 79 ++++++++-------- .../res/layout/conference_manager_fragment.xml | 78 +++------------- .../res/layout/manage_conference_call_button.xml | 49 +++++----- InCallUI/res/layout/secondary_call_info.xml | 97 +++++++++++--------- InCallUI/res/values/colors.xml | 8 +- InCallUI/res/values/dimens.xml | 8 +- InCallUI/res/values/styles.xml | 12 ++- .../src/com/android/incallui/CallCardFragment.java | 5 +- .../incallui/ConferenceManagerFragment.java | 99 ++++++++++----------- .../incallui/ConferenceManagerPresenter.java | 28 +++--- .../src/com/android/incallui/ContactInfoCache.java | 3 + .../src/com/android/incallui/DialpadFragment.java | 2 - .../src/com/android/incallui/InCallActivity.java | 21 ++++- .../com/android/incallui/StatusBarNotifier.java | 2 +- 44 files changed, 249 insertions(+), 248 deletions(-) create mode 100644 InCallUI/res/drawable-hdpi/ic_call_end_white_24dp.png create mode 100644 InCallUI/res/drawable-hdpi/ic_call_split_white_24dp.png delete mode 100644 InCallUI/res/drawable-hdpi/ic_in_call_phone_hangup.png delete mode 100644 InCallUI/res/drawable-hdpi/ic_split_holo_dark.png create mode 100644 InCallUI/res/drawable-hdpi/img_conference.png delete mode 100644 InCallUI/res/drawable-hdpi/picture_conference.png delete mode 100644 InCallUI/res/drawable-ldrtl-hdpi/picture_conference.png delete mode 100644 InCallUI/res/drawable-ldrtl-mdpi/picture_conference.png delete mode 100644 InCallUI/res/drawable-ldrtl-xhdpi/picture_conference.png create mode 100644 InCallUI/res/drawable-mdpi/ic_call_end_white_24dp.png create mode 100644 InCallUI/res/drawable-mdpi/ic_call_split_white_24dp.png delete mode 100644 InCallUI/res/drawable-mdpi/ic_in_call_phone_hangup.png delete mode 100644 InCallUI/res/drawable-mdpi/ic_split_holo_dark.png create mode 100644 InCallUI/res/drawable-mdpi/img_conference.png delete mode 100644 InCallUI/res/drawable-mdpi/picture_conference.png create mode 100644 InCallUI/res/drawable-xhdpi/ic_call_end_white_24dp.png create mode 100644 InCallUI/res/drawable-xhdpi/ic_call_split_white_24dp.png delete mode 100644 InCallUI/res/drawable-xhdpi/ic_in_call_phone_hangup.png delete mode 100644 InCallUI/res/drawable-xhdpi/ic_split_holo_dark.png create mode 100644 InCallUI/res/drawable-xhdpi/img_conference.png delete mode 100644 InCallUI/res/drawable-xhdpi/picture_conference.png create mode 100644 InCallUI/res/drawable-xxhdpi/ic_call_end_white_24dp.png create mode 100644 InCallUI/res/drawable-xxhdpi/ic_call_split_white_24dp.png delete mode 100644 InCallUI/res/drawable-xxhdpi/ic_in_call_phone_hangup.png delete mode 100644 InCallUI/res/drawable-xxhdpi/ic_split_holo_dark.png create mode 100644 InCallUI/res/drawable-xxhdpi/img_conference.png delete mode 100644 InCallUI/res/drawable-xxhdpi/picture_conference.png create mode 100644 InCallUI/res/drawable-xxxhdpi/ic_call_end_white_24dp.png create mode 100644 InCallUI/res/drawable-xxxhdpi/ic_call_split_white_24dp.png (limited to 'InCallUI') diff --git a/InCallUI/res/drawable-hdpi/ic_call_end_white_24dp.png b/InCallUI/res/drawable-hdpi/ic_call_end_white_24dp.png new file mode 100644 index 000000000..757d339c4 Binary files /dev/null and b/InCallUI/res/drawable-hdpi/ic_call_end_white_24dp.png differ diff --git a/InCallUI/res/drawable-hdpi/ic_call_split_white_24dp.png b/InCallUI/res/drawable-hdpi/ic_call_split_white_24dp.png new file mode 100644 index 000000000..4e3dbf55d Binary files /dev/null and b/InCallUI/res/drawable-hdpi/ic_call_split_white_24dp.png differ diff --git a/InCallUI/res/drawable-hdpi/ic_in_call_phone_hangup.png b/InCallUI/res/drawable-hdpi/ic_in_call_phone_hangup.png deleted file mode 100644 index d6f26f22c..000000000 Binary files a/InCallUI/res/drawable-hdpi/ic_in_call_phone_hangup.png and /dev/null differ diff --git a/InCallUI/res/drawable-hdpi/ic_split_holo_dark.png b/InCallUI/res/drawable-hdpi/ic_split_holo_dark.png deleted file mode 100644 index 5b10cf948..000000000 Binary files a/InCallUI/res/drawable-hdpi/ic_split_holo_dark.png and /dev/null differ diff --git a/InCallUI/res/drawable-hdpi/img_conference.png b/InCallUI/res/drawable-hdpi/img_conference.png new file mode 100644 index 000000000..3d9f683a5 Binary files /dev/null and b/InCallUI/res/drawable-hdpi/img_conference.png differ diff --git a/InCallUI/res/drawable-hdpi/picture_conference.png b/InCallUI/res/drawable-hdpi/picture_conference.png deleted file mode 100644 index 93743e620..000000000 Binary files a/InCallUI/res/drawable-hdpi/picture_conference.png and /dev/null differ diff --git a/InCallUI/res/drawable-ldrtl-hdpi/picture_conference.png b/InCallUI/res/drawable-ldrtl-hdpi/picture_conference.png deleted file mode 100644 index ca250fdc9..000000000 Binary files a/InCallUI/res/drawable-ldrtl-hdpi/picture_conference.png and /dev/null differ diff --git a/InCallUI/res/drawable-ldrtl-mdpi/picture_conference.png b/InCallUI/res/drawable-ldrtl-mdpi/picture_conference.png deleted file mode 100644 index 2876d0f65..000000000 Binary files a/InCallUI/res/drawable-ldrtl-mdpi/picture_conference.png and /dev/null differ diff --git a/InCallUI/res/drawable-ldrtl-xhdpi/picture_conference.png b/InCallUI/res/drawable-ldrtl-xhdpi/picture_conference.png deleted file mode 100644 index 50b4e3577..000000000 Binary files a/InCallUI/res/drawable-ldrtl-xhdpi/picture_conference.png and /dev/null differ diff --git a/InCallUI/res/drawable-mdpi/ic_call_end_white_24dp.png b/InCallUI/res/drawable-mdpi/ic_call_end_white_24dp.png new file mode 100644 index 000000000..17eb4824e Binary files /dev/null and b/InCallUI/res/drawable-mdpi/ic_call_end_white_24dp.png differ diff --git a/InCallUI/res/drawable-mdpi/ic_call_split_white_24dp.png b/InCallUI/res/drawable-mdpi/ic_call_split_white_24dp.png new file mode 100644 index 000000000..cb7ee1f35 Binary files /dev/null and b/InCallUI/res/drawable-mdpi/ic_call_split_white_24dp.png differ diff --git a/InCallUI/res/drawable-mdpi/ic_in_call_phone_hangup.png b/InCallUI/res/drawable-mdpi/ic_in_call_phone_hangup.png deleted file mode 100644 index 1dfad3b8f..000000000 Binary files a/InCallUI/res/drawable-mdpi/ic_in_call_phone_hangup.png and /dev/null differ diff --git a/InCallUI/res/drawable-mdpi/ic_split_holo_dark.png b/InCallUI/res/drawable-mdpi/ic_split_holo_dark.png deleted file mode 100644 index 3980acbb8..000000000 Binary files a/InCallUI/res/drawable-mdpi/ic_split_holo_dark.png and /dev/null differ diff --git a/InCallUI/res/drawable-mdpi/img_conference.png b/InCallUI/res/drawable-mdpi/img_conference.png new file mode 100644 index 000000000..0694dbd55 Binary files /dev/null and b/InCallUI/res/drawable-mdpi/img_conference.png differ diff --git a/InCallUI/res/drawable-mdpi/picture_conference.png b/InCallUI/res/drawable-mdpi/picture_conference.png deleted file mode 100644 index 8f7ecd572..000000000 Binary files a/InCallUI/res/drawable-mdpi/picture_conference.png and /dev/null differ diff --git a/InCallUI/res/drawable-xhdpi/ic_call_end_white_24dp.png b/InCallUI/res/drawable-xhdpi/ic_call_end_white_24dp.png new file mode 100644 index 000000000..b00d82edd Binary files /dev/null and b/InCallUI/res/drawable-xhdpi/ic_call_end_white_24dp.png differ diff --git a/InCallUI/res/drawable-xhdpi/ic_call_split_white_24dp.png b/InCallUI/res/drawable-xhdpi/ic_call_split_white_24dp.png new file mode 100644 index 000000000..218cb1214 Binary files /dev/null and b/InCallUI/res/drawable-xhdpi/ic_call_split_white_24dp.png differ diff --git a/InCallUI/res/drawable-xhdpi/ic_in_call_phone_hangup.png b/InCallUI/res/drawable-xhdpi/ic_in_call_phone_hangup.png deleted file mode 100644 index 1d1bfebfe..000000000 Binary files a/InCallUI/res/drawable-xhdpi/ic_in_call_phone_hangup.png and /dev/null differ diff --git a/InCallUI/res/drawable-xhdpi/ic_split_holo_dark.png b/InCallUI/res/drawable-xhdpi/ic_split_holo_dark.png deleted file mode 100644 index db558e49a..000000000 Binary files a/InCallUI/res/drawable-xhdpi/ic_split_holo_dark.png and /dev/null differ diff --git a/InCallUI/res/drawable-xhdpi/img_conference.png b/InCallUI/res/drawable-xhdpi/img_conference.png new file mode 100644 index 000000000..b0dbcc2dc Binary files /dev/null and b/InCallUI/res/drawable-xhdpi/img_conference.png differ diff --git a/InCallUI/res/drawable-xhdpi/picture_conference.png b/InCallUI/res/drawable-xhdpi/picture_conference.png deleted file mode 100644 index 1906b9b75..000000000 Binary files a/InCallUI/res/drawable-xhdpi/picture_conference.png and /dev/null differ diff --git a/InCallUI/res/drawable-xxhdpi/ic_call_end_white_24dp.png b/InCallUI/res/drawable-xxhdpi/ic_call_end_white_24dp.png new file mode 100644 index 000000000..aeabe4a81 Binary files /dev/null and b/InCallUI/res/drawable-xxhdpi/ic_call_end_white_24dp.png differ diff --git a/InCallUI/res/drawable-xxhdpi/ic_call_split_white_24dp.png b/InCallUI/res/drawable-xxhdpi/ic_call_split_white_24dp.png new file mode 100644 index 000000000..5ea577716 Binary files /dev/null and b/InCallUI/res/drawable-xxhdpi/ic_call_split_white_24dp.png differ diff --git a/InCallUI/res/drawable-xxhdpi/ic_in_call_phone_hangup.png b/InCallUI/res/drawable-xxhdpi/ic_in_call_phone_hangup.png deleted file mode 100644 index 67d8ad261..000000000 Binary files a/InCallUI/res/drawable-xxhdpi/ic_in_call_phone_hangup.png and /dev/null differ diff --git a/InCallUI/res/drawable-xxhdpi/ic_split_holo_dark.png b/InCallUI/res/drawable-xxhdpi/ic_split_holo_dark.png deleted file mode 100644 index 16b6ac083..000000000 Binary files a/InCallUI/res/drawable-xxhdpi/ic_split_holo_dark.png and /dev/null differ diff --git a/InCallUI/res/drawable-xxhdpi/img_conference.png b/InCallUI/res/drawable-xxhdpi/img_conference.png new file mode 100644 index 000000000..a8dba5ed0 Binary files /dev/null and b/InCallUI/res/drawable-xxhdpi/img_conference.png differ diff --git a/InCallUI/res/drawable-xxhdpi/picture_conference.png b/InCallUI/res/drawable-xxhdpi/picture_conference.png deleted file mode 100644 index e3dd68659..000000000 Binary files a/InCallUI/res/drawable-xxhdpi/picture_conference.png and /dev/null differ diff --git a/InCallUI/res/drawable-xxxhdpi/ic_call_end_white_24dp.png b/InCallUI/res/drawable-xxxhdpi/ic_call_end_white_24dp.png new file mode 100644 index 000000000..a6e8a7bc1 Binary files /dev/null and b/InCallUI/res/drawable-xxxhdpi/ic_call_end_white_24dp.png differ diff --git a/InCallUI/res/drawable-xxxhdpi/ic_call_split_white_24dp.png b/InCallUI/res/drawable-xxxhdpi/ic_call_split_white_24dp.png new file mode 100644 index 000000000..600cec8e6 Binary files /dev/null and b/InCallUI/res/drawable-xxxhdpi/ic_call_split_white_24dp.png differ diff --git a/InCallUI/res/layout/call_card_content.xml b/InCallUI/res/layout/call_card_content.xml index 6d0ee8802..28eb1e23a 100644 --- a/InCallUI/res/layout/call_card_content.xml +++ b/InCallUI/res/layout/call_card_content.xml @@ -102,7 +102,8 @@ + android:layout_alignTop="@id/photo" + android:elevation="@dimen/secondary_call_elevation" /> + android:layout_height="match_parent" + android:elevation="@dimen/dialpad_elevation" /> + android:gravity="center_vertical" + android:paddingStart="16dp" + android:paddingEnd="8dp"> - - + + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:orientation="vertical" + android:layout_marginStart="16dp" + android:paddingBottom="2dp"> - + @@ -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 @@ + - + + + + + 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" /> diff --git a/InCallUI/res/layout/conference_manager_fragment.xml b/InCallUI/res/layout/conference_manager_fragment.xml index a8fda2c25..c6c1af9de 100644 --- a/InCallUI/res/layout/conference_manager_fragment.xml +++ b/InCallUI/res/layout/conference_manager_fragment.xml @@ -17,85 +17,27 @@ - - - - - - - - - - - - - - - - - - - + + android:layout_height="wrap_content"> + android:layout_height="wrap_content"> @@ -129,4 +71,4 @@ - + diff --git a/InCallUI/res/layout/manage_conference_call_button.xml b/InCallUI/res/layout/manage_conference_call_button.xml index d8ddf2189..375f88827 100644 --- a/InCallUI/res/layout/manage_conference_call_button.xml +++ b/InCallUI/res/layout/manage_conference_call_button.xml @@ -16,32 +16,39 @@ --> - - - - - + + 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"> + + + + + + - + diff --git a/InCallUI/res/layout/secondary_call_info.xml b/InCallUI/res/layout/secondary_call_info.xml index 237559d46..8106dff0b 100644 --- a/InCallUI/res/layout/secondary_call_info.xml +++ b/InCallUI/res/layout/secondary_call_info.xml @@ -16,64 +16,73 @@ - + - - - - + + - - + + + + + + + - - - + + + + - + diff --git a/InCallUI/res/values/colors.xml b/InCallUI/res/values/colors.xml index 3060339a0..e2aac3a72 100644 --- a/InCallUI/res/values/colors.xml +++ b/InCallUI/res/values/colors.xml @@ -29,11 +29,17 @@ #f5f5f5 #808080 + @color/incall_background_color + @color/incall_call_banner_text_color + #cc000000 + #f8f8f8 + #4d4d4d + #999999 - #888888 + #999999 #dddddd diff --git a/InCallUI/res/values/dimens.xml b/InCallUI/res/values/dimens.xml index 8648c8c13..55f0c3e13 100644 --- a/InCallUI/res/values/dimens.xml +++ b/InCallUI/res/values/dimens.xml @@ -21,6 +21,7 @@ 122dp + 3dp @@ -50,8 +51,9 @@ 48dp - 4dp - 4dp + 5dp + 2dp + 1dp -24dp @@ -109,4 +111,6 @@ 72dp 56dp + 64dp + 46dp diff --git a/InCallUI/res/values/styles.xml b/InCallUI/res/values/styles.xml index f49cee910..17edfafc5 100644 --- a/InCallUI/res/values/styles.xml +++ b/InCallUI/res/values/styles.xml @@ -92,21 +92,27 @@ + Theme.Black.NoTitleBar directly, since we want any popups or dialogs from the + InCallActivity to have the correct Material style. --> + + + diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java index 600689c84..bff48b448 100644 --- a/InCallUI/src/com/android/incallui/CallCardFragment.java +++ b/InCallUI/src/com/android/incallui/CallCardFragment.java @@ -617,7 +617,7 @@ public class CallCardFragment extends BaseFragment 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/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java b/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java index 2b5e8eb90..f40415ccd 100644 --- a/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java +++ b/InCallUI/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/InCallUI/src/com/android/incallui/ContactInfoCache.java b/InCallUI/src/com/android/incallui/ContactInfoCache.java index ccf5b794b..488e55bfc 100644 --- a/InCallUI/src/com/android/incallui/ContactInfoCache.java +++ b/InCallUI/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/InCallUI/src/com/android/incallui/DialpadFragment.java b/InCallUI/src/com/android/incallui/DialpadFragment.java index e15f1bccb..6cb5d1f8f 100644 --- a/InCallUI/src/com/android/incallui/DialpadFragment.java +++ b/InCallUI/src/com/android/incallui/DialpadFragment.java @@ -46,8 +46,6 @@ public class DialpadFragment extends BaseFragment