summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2013-10-08 17:00:19 -0700
committerSantos Cordon <santoscordon@google.com>2013-10-08 17:12:01 -0700
commit6eef89f3f5030961c14aca59012f9ea38ab93ce5 (patch)
treeb1e10de4ea8920b9bbc8481fd714837628b8a731
parent33f0b26b96814b472030185531d3f4b6a9ce36b8 (diff)
downloadandroid_packages_apps_InCallUI-6eef89f3f5030961c14aca59012f9ea38ab93ce5.tar.gz
android_packages_apps_InCallUI-6eef89f3f5030961c14aca59012f9ea38ab93ce5.tar.bz2
android_packages_apps_InCallUI-6eef89f3f5030961c14aca59012f9ea38ab93ce5.zip
update dialpad state more often.
Noticed while testing proximity sensor that we do not update the dialpad state sufficiently. We have increased the amount of places in the code where the dialpad comes up since we first introduced the proximity code and the callbacks wheren't updated. This manifested in situations where the proximity sensor was off at time when it should have been on. Repro: be in a call, answer a second call (call waiting), bring up dialpad, hangup second call. The dialpad would go away but the prox sensor still thought it was up. This change moves the callback to proximity sensor to the exact place where dialpad is shown/hidden in order to catch all instances. bug:11006867 Change-Id: I7651b4769d035b9bc68d226da3ffb3aea8986e58
-rw-r--r--src/com/android/incallui/CallButtonPresenter.java6
-rw-r--r--src/com/android/incallui/InCallActivity.java2
2 files changed, 2 insertions, 6 deletions
diff --git a/src/com/android/incallui/CallButtonPresenter.java b/src/com/android/incallui/CallButtonPresenter.java
index 36426302..3b1411be 100644
--- a/src/com/android/incallui/CallButtonPresenter.java
+++ b/src/com/android/incallui/CallButtonPresenter.java
@@ -33,7 +33,6 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto
implements InCallStateListener, AudioModeListener, IncomingCallListener {
private Call mCall;
- private ProximitySensor mProximitySensor;
private boolean mAutomaticallyMuted = false;
private boolean mPreviousMuteState = false;
@@ -49,7 +48,6 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto
public void onUiReady(CallButtonUi ui) {
super.onUiReady(ui);
- mProximitySensor = InCallPresenter.getInstance().getProximitySensor();
AudioModeProvider.getInstance().addListener(this);
// register for call state changes last
@@ -64,8 +62,6 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto
InCallPresenter.getInstance().removeListener(this);
AudioModeProvider.getInstance().removeListener(this);
InCallPresenter.getInstance().removeIncomingCallListener(this);
-
- mProximitySensor = null;
}
@Override
@@ -210,8 +206,6 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto
public void showDialpadClicked(boolean checked) {
Log.v(this, "Show dialpad " + String.valueOf(checked));
getUi().displayDialpad(checked);
- mProximitySensor.onDialpadVisible(checked);
-
updateExtraButtonRow();
}
diff --git a/src/com/android/incallui/InCallActivity.java b/src/com/android/incallui/InCallActivity.java
index ac21d52a..58db132a 100644
--- a/src/com/android/incallui/InCallActivity.java
+++ b/src/com/android/incallui/InCallActivity.java
@@ -389,6 +389,8 @@ public class InCallActivity extends Activity {
mDialpadFragment.setVisible(false);
mCallCardFragment.setVisible(true);
}
+
+ InCallPresenter.getInstance().getProximitySensor().onDialpadVisible(showDialpad);
}
public boolean isDialpadVisible() {