diff options
author | Andrew Lee <anwlee@google.com> | 2014-09-19 16:43:40 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-09-22 11:10:31 -0700 |
commit | 68501ba893e9f733b260dc18cafdd89efa3d9937 (patch) | |
tree | d94b0e6387f387ebfce60bce94e3f824739bdb5f /InCallUI | |
parent | 4705a0437c017242c9441b6c2686f2adf51933cb (diff) |
Update InCallUI for "generic" conference calls.
+ Use the newer "phone" asset (same as emergency calls).
+ Add xxxhdpi phone asset.
- Remove unused assets.
+ Tint the subscription icon properly in secondary call info.
+ Reorganize listeners in CallCardFragment to be less
redundant, and so FAB is properly positioned above the secondary
call info.
Bug: 17581379
Change-Id: Id4f1c1659ab8c17313cdd0393be51954b5cd449a
Diffstat (limited to 'InCallUI')
23 files changed, 18 insertions, 32 deletions
diff --git a/InCallUI/res/drawable-hdpi/img_emergency.png b/InCallUI/res/drawable-hdpi/img_emergency.png Binary files differdeleted file mode 100644 index 7e5eff48d..000000000 --- a/InCallUI/res/drawable-hdpi/img_emergency.png +++ /dev/null diff --git a/InCallUI/res/drawable-hdpi/img_phone.png b/InCallUI/res/drawable-hdpi/img_phone.png Binary files differnew file mode 100644 index 000000000..748312e6e --- /dev/null +++ b/InCallUI/res/drawable-hdpi/img_phone.png diff --git a/InCallUI/res/drawable-hdpi/picture_dialing.png b/InCallUI/res/drawable-hdpi/picture_dialing.png Binary files differdeleted file mode 100644 index 6311f693b..000000000 --- a/InCallUI/res/drawable-hdpi/picture_dialing.png +++ /dev/null diff --git a/InCallUI/res/drawable-hdpi/picture_unknown.png b/InCallUI/res/drawable-hdpi/picture_unknown.png Binary files differdeleted file mode 100644 index 297480e5f..000000000 --- a/InCallUI/res/drawable-hdpi/picture_unknown.png +++ /dev/null diff --git a/InCallUI/res/drawable-ldrtl-hdpi/picture_unknown.png b/InCallUI/res/drawable-ldrtl-hdpi/picture_unknown.png Binary files differdeleted file mode 100644 index 3b81ff3e7..000000000 --- a/InCallUI/res/drawable-ldrtl-hdpi/picture_unknown.png +++ /dev/null diff --git a/InCallUI/res/drawable-ldrtl-mdpi/picture_unknown.png b/InCallUI/res/drawable-ldrtl-mdpi/picture_unknown.png Binary files differdeleted file mode 100644 index 062faf5f5..000000000 --- a/InCallUI/res/drawable-ldrtl-mdpi/picture_unknown.png +++ /dev/null diff --git a/InCallUI/res/drawable-ldrtl-xhdpi/picture_unknown.png b/InCallUI/res/drawable-ldrtl-xhdpi/picture_unknown.png Binary files differdeleted file mode 100644 index 1f57aa1a1..000000000 --- a/InCallUI/res/drawable-ldrtl-xhdpi/picture_unknown.png +++ /dev/null diff --git a/InCallUI/res/drawable-mdpi/img_emergency.png b/InCallUI/res/drawable-mdpi/img_emergency.png Binary files differdeleted file mode 100644 index 0209eb9d1..000000000 --- a/InCallUI/res/drawable-mdpi/img_emergency.png +++ /dev/null diff --git a/InCallUI/res/drawable-mdpi/img_phone.png b/InCallUI/res/drawable-mdpi/img_phone.png Binary files differnew file mode 100644 index 000000000..41a1d339d --- /dev/null +++ b/InCallUI/res/drawable-mdpi/img_phone.png diff --git a/InCallUI/res/drawable-mdpi/picture_dialing.png b/InCallUI/res/drawable-mdpi/picture_dialing.png Binary files differdeleted file mode 100644 index b81b6037e..000000000 --- a/InCallUI/res/drawable-mdpi/picture_dialing.png +++ /dev/null diff --git a/InCallUI/res/drawable-mdpi/picture_unknown.png b/InCallUI/res/drawable-mdpi/picture_unknown.png Binary files differdeleted file mode 100644 index dd043d41f..000000000 --- a/InCallUI/res/drawable-mdpi/picture_unknown.png +++ /dev/null diff --git a/InCallUI/res/drawable-xhdpi/img_emergency.png b/InCallUI/res/drawable-xhdpi/img_emergency.png Binary files differdeleted file mode 100644 index 5c00d9d55..000000000 --- a/InCallUI/res/drawable-xhdpi/img_emergency.png +++ /dev/null diff --git a/InCallUI/res/drawable-xhdpi/img_phone.png b/InCallUI/res/drawable-xhdpi/img_phone.png Binary files differnew file mode 100644 index 000000000..2e0ceec0f --- /dev/null +++ b/InCallUI/res/drawable-xhdpi/img_phone.png diff --git a/InCallUI/res/drawable-xhdpi/picture_dialing.png b/InCallUI/res/drawable-xhdpi/picture_dialing.png Binary files differdeleted file mode 100644 index 792cd8efe..000000000 --- a/InCallUI/res/drawable-xhdpi/picture_dialing.png +++ /dev/null diff --git a/InCallUI/res/drawable-xhdpi/picture_unknown.png b/InCallUI/res/drawable-xhdpi/picture_unknown.png Binary files differdeleted file mode 100644 index 0525c86c3..000000000 --- a/InCallUI/res/drawable-xhdpi/picture_unknown.png +++ /dev/null diff --git a/InCallUI/res/drawable-xxhdpi/img_emergency.png b/InCallUI/res/drawable-xxhdpi/img_phone.png Binary files differindex 4eaaba509..4eaaba509 100644 --- a/InCallUI/res/drawable-xxhdpi/img_emergency.png +++ b/InCallUI/res/drawable-xxhdpi/img_phone.png diff --git a/InCallUI/res/drawable-xxhdpi/picture_dialing.png b/InCallUI/res/drawable-xxhdpi/picture_dialing.png Binary files differdeleted file mode 100644 index 17d45f55b..000000000 --- a/InCallUI/res/drawable-xxhdpi/picture_dialing.png +++ /dev/null diff --git a/InCallUI/res/drawable-xxhdpi/picture_unknown.png b/InCallUI/res/drawable-xxhdpi/picture_unknown.png Binary files differdeleted file mode 100644 index e6a95fa21..000000000 --- a/InCallUI/res/drawable-xxhdpi/picture_unknown.png +++ /dev/null diff --git a/InCallUI/res/drawable-xxxhdpi/img_emergency.png b/InCallUI/res/drawable-xxxhdpi/img_phone.png Binary files differindex 7cbfbd75e..7cbfbd75e 100644 --- a/InCallUI/res/drawable-xxxhdpi/img_emergency.png +++ b/InCallUI/res/drawable-xxxhdpi/img_phone.png diff --git a/InCallUI/res/drawable-xxxhdpi/picture_unknown.png b/InCallUI/res/drawable-xxxhdpi/picture_unknown.png Binary files differdeleted file mode 100644 index 216574222..000000000 --- a/InCallUI/res/drawable-xxxhdpi/picture_unknown.png +++ /dev/null diff --git a/InCallUI/res/layout/secondary_call_info.xml b/InCallUI/res/layout/secondary_call_info.xml index 772a29bc1..8666c2ae8 100644 --- a/InCallUI/res/layout/secondary_call_info.xml +++ b/InCallUI/res/layout/secondary_call_info.xml @@ -21,7 +21,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" - android:background="@color/incall_banner_secondary_background_color"> + android:background="@color/incall_banner_secondary_background_color" + android:visibility="gone"> <Space android:layout_width="match_parent" android:layout_height="1dp" @@ -73,7 +74,8 @@ android:layout_height="@dimen/call_provider_small_icon_size" android:layout_marginRight="2dp" android:baselineAlignBottom="true" - android:scaleType="centerInside" /> + android:scaleType="centerInside" + android:tint="@color/incall_banner_secondary_text_color" /> <TextView android:id="@+id/secondaryCallProviderLabel" android:layout_width="match_parent" diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java index 7848c4e2c..f984aa836 100644 --- a/InCallUI/src/com/android/incallui/CallCardFragment.java +++ b/InCallUI/src/com/android/incallui/CallCardFragment.java @@ -200,23 +200,12 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr R.dimen.floating_action_button_width); mFloatingActionButtonController = new FloatingActionButtonController(getActivity(), mFloatingActionButtonContainer, mFloatingActionButton); - final ViewGroup parent = (ViewGroup) mPrimaryCallCardContainer.getParent(); - final ViewTreeObserver observer = getView().getViewTreeObserver(); - observer.addOnGlobalLayoutListener(new OnGlobalLayoutListener() { + + mSecondaryCallInfo.setOnClickListener(new View.OnClickListener() { @Override - public void onGlobalLayout() { - final ViewTreeObserver observer = getView().getViewTreeObserver(); - if (!observer.isAlive()) { - return; - } - observer.removeOnGlobalLayoutListener(this); - mFloatingActionButtonController.setScreenWidth(parent.getWidth()); - mFloatingActionButtonController.align( - mIsLandscape ? FloatingActionButtonController.ALIGN_QUARTER_END - : FloatingActionButtonController.ALIGN_MIDDLE, - 0 /* offsetX */, - mFloatingActionButtonVerticalOffset /* offsetY */, - false); + public void onClick(View v) { + getPresenter().secondaryInfoClicked(); + updateFabPosition(); } }); @@ -465,7 +454,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr boolean canManageConference) { if (show != mSecondaryCallInfo.isShown()) { - updateFabPositionOnSecondaryCallInfoLayout(); + updateFabPosition(); } if (show) { @@ -631,13 +620,14 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr private String getConferenceString(boolean canManageConference) { Log.v(this, "canManageConferenceString: " + canManageConference); - final int resId = canManageConference ? R.string.card_title_conf_call : R.string.card_title_in_call; + final int resId = canManageConference + ? R.string.card_title_conf_call : R.string.card_title_in_call; return getView().getResources().getString(resId); } private Drawable getConferencePhoto(boolean canManageConference) { Log.v(this, "canManageConferencePhoto: " + canManageConference); - final int resId = canManageConference ? R.drawable.img_conference : R.drawable.picture_dialing; + final int resId = canManageConference ? R.drawable.img_conference : R.drawable.img_phone; return getView().getResources().getDrawable(resId); } @@ -743,13 +733,6 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr .findViewById(R.id.secondaryCallProviderIcon); } } - mSecondaryCallInfo.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - getPresenter().secondaryInfoClicked(); - updateFabPositionOnSecondaryCallInfoLayout(); - } - }); } public void dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { @@ -908,19 +891,20 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr if (mAnimatorSet != null && mAnimatorSet.isRunning()) { mAnimatorSet.cancel(); } + + updateFabPosition(); } /** * Adds a global layout listener to update the FAB's positioning on the next layout. This allows * us to position the FAB after the secondary call info's height has been calculated. */ - private void updateFabPositionOnSecondaryCallInfoLayout() { + private void updateFabPosition() { mSecondaryCallInfo.getViewTreeObserver().addOnGlobalLayoutListener( new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { - final ViewTreeObserver observer = - mSecondaryCallInfo.getViewTreeObserver(); + final ViewTreeObserver observer = mSecondaryCallInfo.getViewTreeObserver(); if (!observer.isAlive()) { return; } diff --git a/InCallUI/src/com/android/incallui/CallerInfo.java b/InCallUI/src/com/android/incallui/CallerInfo.java index 8e105361a..3eac2f39e 100644 --- a/InCallUI/src/com/android/incallui/CallerInfo.java +++ b/InCallUI/src/com/android/incallui/CallerInfo.java @@ -333,7 +333,7 @@ public class CallerInfo { // should be displayed. /* package */ CallerInfo markAsEmergency(Context context) { phoneNumber = context.getString(R.string.emergency_call_dialog_number_for_display); - photoResource = R.drawable.img_emergency; + photoResource = R.drawable.img_phone; mIsEmergency = true; return this; } |