diff options
author | kaiyiz <kaiyiz@codeaurora.org> | 2015-03-21 09:22:58 +0800 |
---|---|---|
committer | kaiyiz <kaiyiz@codeaurora.org> | 2015-03-21 09:22:59 +0800 |
commit | c0fcf9b4e1c0e503fc84d03ceb3b1d27dffbadfc (patch) | |
tree | 82e6295ae847133a9406c81e0f7c7b0f630a6e57 | |
parent | ee43a088fd06e8b2788380253b5f6591280e6334 (diff) | |
download | android_packages_apps_Dialer-c0fcf9b4e1c0e503fc84d03ceb3b1d27dffbadfc.tar.gz android_packages_apps_Dialer-c0fcf9b4e1c0e503fc84d03ceb3b1d27dffbadfc.tar.bz2 android_packages_apps_Dialer-c0fcf9b4e1c0e503fc84d03ceb3b1d27dffbadfc.zip |
Dialer: Only when the phone state is idle, hide the dialpad chooser
When reenter the DialtactsActivity, because phone state is offhook,
it should show dialpad chooser, but immediately due to sub2's call
state is idle, then the dialpad chooser is hidden.
Only when the phone state is idle, we hide the dialpad chooser.
Change-Id: I9eeecff316a6e658ceb278473550865f249980e1
CRs-Fixed: 809521
-rwxr-xr-x | src/com/android/dialer/dialpad/DialpadFragment.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index f1b22b855..9650a1fd8 100755 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -2056,12 +2056,14 @@ public class DialpadFragment extends AnalyticsFragment PhoneStateListener phoneStateListener = new PhoneStateListener(subId[0]) { @Override public void onCallStateChanged(int state, String incomingNumber) { - if ((state == TelephonyManager.CALL_STATE_IDLE) + if ((getActivity() != null) && + (getTelephonyManager().getCallState() == TelephonyManager.CALL_STATE_IDLE) && isDialpadChooserVisible()) { showDialpadChooser(false); } - if (state == TelephonyManager.CALL_STATE_IDLE - && getActivity() != null) { + if ((getActivity() != null) + && (getTelephonyManager().getCallState() + == TelephonyManager.CALL_STATE_IDLE)) { ((HostInterface) getActivity()).setConferenceDialButtonVisibility(true); } } |