From 30c8387f8d446b23d96bc2a99679324e9a21418f Mon Sep 17 00:00:00 2001 From: Ihab Awad Date: Mon, 3 Mar 2014 14:12:57 -0800 Subject: Update dialpad to new look and feel. DO NOT MERGE. http://b/13189041 Change-Id: I26b306300e11fd6830d40b51a705c472c89925f4 (cherry picked from commit a389ad358b723ce1725662c79bfc175ddc2e558c) --- InCallUI/src/com/android/incallui/InCallActivity.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'InCallUI/src/com/android/incallui/InCallActivity.java') diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java index 08a8f12d0..e99fc997e 100644 --- a/InCallUI/src/com/android/incallui/InCallActivity.java +++ b/InCallUI/src/com/android/incallui/InCallActivity.java @@ -21,6 +21,7 @@ import com.android.services.telephony.common.Call.State; import android.app.Activity; import android.app.AlertDialog; +import android.app.FragmentTransaction; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.content.DialogInterface.OnCancelListener; @@ -308,6 +309,10 @@ public class InCallActivity extends Activity { InCallPresenter.getInstance().getProximitySensor().onConfigurationChanged(config); } + public CallButtonFragment getCallButtonFragment() { + return mCallButtonFragment; + } + private void internalResolveIntent(Intent intent) { final String action = intent.getAction(); @@ -365,7 +370,7 @@ public class InCallActivity extends Activity { if (mDialpadFragment == null) { mDialpadFragment = (DialpadFragment) getFragmentManager() .findFragmentById(R.id.dialpadFragment); - mDialpadFragment.getView().setVisibility(View.INVISIBLE); + getFragmentManager().beginTransaction().hide(mDialpadFragment).commit(); } if (mConferenceManagerFragment == null) { @@ -398,13 +403,15 @@ public class InCallActivity extends Activity { } public void displayDialpad(boolean showDialpad) { + final FragmentTransaction ft = getFragmentManager().beginTransaction(); if (showDialpad) { - mDialpadFragment.setVisible(true); - mCallCardFragment.setVisible(false); + ft.setCustomAnimations(R.anim.slide_in, 0); + ft.show(mDialpadFragment); } else { - mDialpadFragment.setVisible(false); - mCallCardFragment.setVisible(true); + ft.setCustomAnimations(0, R.anim.slide_out); + ft.hide(mDialpadFragment); } + ft.commit(); InCallPresenter.getInstance().getProximitySensor().onDialpadVisible(showDialpad); } -- cgit v1.2.3 From ef169940c2ae0d59bfcb884ebea1e4401034d367 Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Mon, 10 Mar 2014 12:16:58 -0700 Subject: DO NOT MERGE Fix IllegalStateException in InCallUI InCallActivity.displayDialpad can possibly be called after onSaveInstanceState, so we need to use commitAllowingStateLoss instead of commit. Bug: 13396054 Change-Id: If2f61b16d97db159bebb5ddb5d1feecb87765386 (cherry picked from commit ea648d1e33c5dd12d01f22620e3556cc31002763) --- InCallUI/src/com/android/incallui/InCallActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'InCallUI/src/com/android/incallui/InCallActivity.java') diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java index e99fc997e..fa6cc2dc6 100644 --- a/InCallUI/src/com/android/incallui/InCallActivity.java +++ b/InCallUI/src/com/android/incallui/InCallActivity.java @@ -411,7 +411,7 @@ public class InCallActivity extends Activity { ft.setCustomAnimations(0, R.anim.slide_out); ft.hide(mDialpadFragment); } - ft.commit(); + ft.commitAllowingStateLoss(); InCallPresenter.getInstance().getProximitySensor().onDialpadVisible(showDialpad); } -- cgit v1.2.3 From c1023e5563082fe7793dbce4dadfb0e060c1daa2 Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Mon, 24 Mar 2014 12:18:11 -0700 Subject: DO NOT MERGE Fix for in-call dialpad not sliding full length of screen Bug: 13189041 Change-Id: I5b5ceda11d1d5b89141255f867deb8688c95f5d4 --- InCallUI/src/com/android/incallui/InCallActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'InCallUI/src/com/android/incallui/InCallActivity.java') diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java index fa6cc2dc6..c34d85470 100644 --- a/InCallUI/src/com/android/incallui/InCallActivity.java +++ b/InCallUI/src/com/android/incallui/InCallActivity.java @@ -405,10 +405,10 @@ public class InCallActivity extends Activity { public void displayDialpad(boolean showDialpad) { final FragmentTransaction ft = getFragmentManager().beginTransaction(); if (showDialpad) { - ft.setCustomAnimations(R.anim.slide_in, 0); + ft.setCustomAnimations(R.anim.incall_dialpad_slide_in, 0); ft.show(mDialpadFragment); } else { - ft.setCustomAnimations(0, R.anim.slide_out); + ft.setCustomAnimations(0, R.anim.incall_dialpad_slide_out); ft.hide(mDialpadFragment); } ft.commitAllowingStateLoss(); -- cgit v1.2.3