diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2015-02-10 23:26:32 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-02-10 23:26:32 -0800 |
| commit | 8c8f3198b771561da3e9071ab5a89a6c9548b6da (patch) | |
| tree | c06aa9f7cb0c3ce7291207a58cfcd7fa8ede5a6a | |
| parent | 77bc21f9fe7c26481723fda83fc2b6136bc1b86f (diff) | |
| parent | fc7b5c2a9dc14f47ba9763e819bc5575f4630fb5 (diff) | |
| download | android_packages_apps_InCallUI-8c8f3198b771561da3e9071ab5a89a6c9548b6da.tar.gz android_packages_apps_InCallUI-8c8f3198b771561da3e9071ab5a89a6c9548b6da.tar.bz2 android_packages_apps_InCallUI-8c8f3198b771561da3e9071ab5a89a6c9548b6da.zip | |
Merge "Fix Call duration time display issue When RCS enhance screen enabled."
| -rw-r--r-- | res/layout/primary_call_info.xml | 3 | ||||
| -rw-r--r-- | res/layout/rcs_primary_call_info.xml | 49 | ||||
| -rw-r--r-- | src/com/android/incallui/CallCardFragment.java | 21 |
3 files changed, 42 insertions, 31 deletions
diff --git a/res/layout/primary_call_info.xml b/res/layout/primary_call_info.xml index 219b64f8..a5fdb9d9 100644 --- a/res/layout/primary_call_info.xml +++ b/res/layout/primary_call_info.xml @@ -89,6 +89,7 @@ android:textAppearance="?android:attr/textAppearanceLarge" android:textSize="@dimen/call_name_text_size" android:singleLine="true" + android:layout_alignParentLeft="true" ex:resizing_text_min_size="@dimen/call_name_text_min_size" /> <LinearLayout @@ -96,7 +97,7 @@ android:layout_width="30dp" android:layout_height="30dp" android:layout_alignParentRight="true" - android:layout_centerInParent="true" + android:layout_centerInParent="true" android:gravity="center" > <TextView diff --git a/res/layout/rcs_primary_call_info.xml b/res/layout/rcs_primary_call_info.xml index ed188488..ffaf1965 100644 --- a/res/layout/rcs_primary_call_info.xml +++ b/res/layout/rcs_primary_call_info.xml @@ -116,17 +116,19 @@ android:orientation="horizontal" > <!-- Name (or the phone number, if we don't have a name to display). --> - <com.android.phone.common.widget.ResizingTextTextView android:id="@+id/name" - xmlns:ex="http://schemas.android.com/apk/res-auto" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="-5dp" - android:fontFamily="sans-serif-light" - android:layout_toLeftOf="@+id/sendMessage" - android:textAppearance="?android:attr/textAppearanceMedium" - android:textSize="@dimen/call_name_text_size" - android:singleLine="true" - ex:resizing_text_min_size="@dimen/call_name_text_min_size" /> + <com.android.phone.common.widget.ResizingTextTextView + android:id="@+id/name" + xmlns:ex="http://schemas.android.com/apk/res-auto" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:fontFamily="sans-serif-light" + android:layout_toLeftOf="@+id/sendMessage" + android:layout_alignParentLeft="true" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textSize="@dimen/call_name_text_size" + android:singleLine="true" + android:ellipsize="end" + ex:resizing_text_min_size="@dimen/call_name_text_min_size" /> <LinearLayout android:id="@+id/sendMessage" @@ -184,22 +186,21 @@ android:textColor="@color/incall_call_banner_subtext_color" android:textSize="@dimen/call_label_text_size" /> </LinearLayout> + <!-- Elapsed time indication for a call in progress. --> + + <TextView + android:id="@+id/elapsedTime" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:singleLine="true" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textColor="@color/incall_call_banner_subtext_color" + android:textSize="@dimen/call_label_text_size" + android:visibility="gone" /> </LinearLayout> </LinearLayout> - <!-- Elapsed time indication for a call in progress. --> - - <TextView - android:id="@+id/elapsedTime" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:singleLine="true" - android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="@color/incall_call_banner_subtext_color" - android:textSize="@dimen/call_label_text_size" - android:visibility="gone" /> </LinearLayout> - <!-- Call type indication: a special label and/or branding for certain kinds of calls (like "SIP call" for a SIP call.) diff --git a/src/com/android/incallui/CallCardFragment.java b/src/com/android/incallui/CallCardFragment.java index 4c18a112..db10a0d7 100644 --- a/src/com/android/incallui/CallCardFragment.java +++ b/src/com/android/incallui/CallCardFragment.java @@ -171,7 +171,9 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr // for RCS private RcsRichScreen mRcsRichScreen = null; private boolean misEhanceScreenApkInstalled = false; + private boolean mIsRcsServiceInstalled = false; private static final String ENHANCE_SCREEN_APK_NAME = "com.cmdm.rcs"; + private static final String LOG_TAG = "RCS_UI"; //RCS end private static final int DEFAULT_VIEW_OFFSET_Y = 0; @@ -212,6 +214,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr mInCallActivity = (InCallActivity)getActivity(); misEhanceScreenApkInstalled = isEnhanceScreenInstalled(); + mIsRcsServiceInstalled = RcsApiManager.isRcsServiceInstalled(); if (mInCallActivity.isCallRecording()) { recorderHandler.sendEmptyMessage(MESSAGE_TIMER); } @@ -267,16 +270,16 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr mInCallMessageLabel = (TextView) view.findViewById(R.id.connectionServiceMessage); mProgressSpinner = view.findViewById(R.id.progressSpinner); - if(isRcsAvailable()){ + if (isRcsAvailable()) { TextView rcsmissdnAddress = (TextView)view.findViewById(R.id.missdnaddress); TextView rcsgreeting = (TextView)view.findViewById(R.id.greeting); SurfaceView rcssurface = (SurfaceView)view.findViewById(R.id.surface); ImageView rcsPhoto = (ImageView) view.findViewById(R.id.rcs_photo); GifMovieView rcsGifMovieView = (GifMovieView) view.findViewById(R.id.incallgifview); mRcsRichScreen = new RcsRichScreen(getActivity(), - rcsPhoto,rcsgreeting,rcsmissdnAddress,rcsGifMovieView,rcssurface); + rcsPhoto, rcsgreeting, rcsmissdnAddress, rcsGifMovieView, rcssurface); } - if (RcsApiManager.isRcsServiceInstalled()) { + if (mIsRcsServiceInstalled) { mSendMessageView = view.findViewById(R.id.sendMessage); mSendMessageView.setOnClickListener(new OnClickListener() { public void onClick(View v) { @@ -364,8 +367,11 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr } private void updateUnReadSmsCount() { + if (!mIsRcsServiceInstalled) { + return; + } int unRead = getPresenter().getUnReadMessageCount(mInCallActivity); - Log.d("RCS_UI", "CallCardFragment: updateUnReadMessageCount(" + unRead + ")"); + Log.d(LOG_TAG, "CallCardFragment: updateUnReadMessageCount(" + unRead + ")"); setUnReadMessageCount(unRead); } @@ -501,6 +507,9 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr } public void setUnReadMessageCount(int count) { + if (null == mUnreadMessageCount) { + return; + } if (count > 0) { mUnreadMessageCount.setBackgroundResource(R.drawable.rcs_incall_message_count); mUnreadMessageCount.setText(String.valueOf(count)); @@ -662,7 +671,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr return; } // update Rcs RichScreen by call state - if(isRcsAvailable()){ + if (isRcsAvailable()) { mRcsRichScreen.updateRichScreenByCallState(state,videoState); } @@ -1077,7 +1086,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr updateFabPosition(); } }); - if (RcsApiManager.isRcsServiceInstalled()) { + if (mIsRcsServiceInstalled) { updateUnReadSmsCount(); } misEhanceScreenApkInstalled = isEnhanceScreenInstalled(); |
