summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-10-01 00:55:02 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-10-01 00:55:02 +0000
commitc9efcd83e4327b50652385fb2f8046f878924ec8 (patch)
treeaa89ee219d001b04ac957433b80bb8ddbd1a4593
parent26bcd1ee306d764bb137840c3c8d43e2fc6dc9ad (diff)
parent26e2ae950debe64389564c7c88911adae3bcf47a (diff)
am 26e2ae95: Use TextWatcher to update call type toggle.
* commit '26e2ae950debe64389564c7c88911adae3bcf47a': Use TextWatcher to update call type toggle.
-rw-r--r--tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java18
1 files changed, 15 insertions, 3 deletions
diff --git a/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java b/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java
index aa2d2653b..e499e550d 100644
--- a/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java
+++ b/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java
@@ -40,6 +40,8 @@ import android.provider.VoicemailContract.Voicemails;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
+import android.text.Editable;
+import android.text.TextWatcher;
import android.text.format.DateFormat;
import android.util.Log;
import android.view.MotionEvent;
@@ -151,11 +153,21 @@ public class FillCallLogTestActivity extends Activity {
mAccount0 = (RadioButton) findViewById(R.id.account0);
mAccount1 = (RadioButton) findViewById(R.id.account1);
- mCustomCallTypeTextView.setOnTouchListener(new View.OnTouchListener() {
+ mCustomCallTypeTextView.addTextChangedListener(new TextWatcher() {
@Override
- public boolean onTouch(View v, MotionEvent event) {
+ public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+ // Do nothing.
+ }
+
+ @Override
+ public void onTextChanged(CharSequence s, int start, int before, int count) {
+ // Toggle the custom call type radio button if the text is changed/focused.
mCallTypeCustom.toggle();
- return false;
+ }
+
+ @Override
+ public void afterTextChanged(Editable s) {
+ // Do nothing.
}
});