summaryrefslogtreecommitdiff
path: root/tests/src/com
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-09-26 01:19:25 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-09-26 01:19:25 +0000
commit286a3fc0790ef6b1066226d11bc21790368c984b (patch)
treeb37685cb122e408af3d74a3c06c9c96197852c18 /tests/src/com
parent7cd780e78aa052aad584bfc323becc4ed2f0719e (diff)
parentc843bc787b2de729f97e5deb0176b541d1884e8c (diff)
Merge "Add custom call type affordance to TestActivity." into ub-contactsdialer-a-dev
Diffstat (limited to 'tests/src/com')
-rw-r--r--tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java b/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java
index 1cfdc2833..aa2d2653b 100644
--- a/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java
+++ b/tests/src/com/android/dialer/tests/calllog/FillCallLogTestActivity.java
@@ -42,6 +42,7 @@ import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
import android.text.format.DateFormat;
import android.util.Log;
+import android.view.MotionEvent;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
@@ -80,6 +81,8 @@ public class FillCallLogTestActivity extends Activity {
private RadioButton mCallTypeMissed;
private RadioButton mCallTypeOutgoing;
private RadioButton mCallTypeVoicemail;
+ private RadioButton mCallTypeCustom;
+ private EditText mCustomCallTypeTextView;
private CheckBox mCallTypeVideo;
private RadioButton mPresentationAllowed;
private RadioButton mPresentationRestricted;
@@ -134,6 +137,8 @@ public class FillCallLogTestActivity extends Activity {
mCallTypeMissed = (RadioButton) findViewById(R.id.call_type_missed);
mCallTypeOutgoing = (RadioButton) findViewById(R.id.call_type_outgoing);
mCallTypeVoicemail = (RadioButton) findViewById(R.id.call_type_voicemail);
+ mCallTypeCustom = (RadioButton) findViewById(R.id.call_type_custom);
+ mCustomCallTypeTextView = (EditText) findViewById(R.id.call_type_custom_text);
mCallTypeVideo = (CheckBox) findViewById(R.id.call_type_video);
mPresentationAllowed = (RadioButton) findViewById(R.id.presentation_allowed);
mPresentationPayphone = (RadioButton) findViewById(R.id.presentation_payphone);
@@ -146,6 +151,14 @@ public class FillCallLogTestActivity extends Activity {
mAccount0 = (RadioButton) findViewById(R.id.account0);
mAccount1 = (RadioButton) findViewById(R.id.account1);
+ mCustomCallTypeTextView.setOnTouchListener(new View.OnTouchListener() {
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ mCallTypeCustom.toggle();
+ return false;
+ }
+ });
+
// Use the current time as the default values for the picker
final Calendar c = Calendar.getInstance();
mCallTimeHour = c.get(Calendar.HOUR_OF_DAY);
@@ -386,6 +399,8 @@ public class FillCallLogTestActivity extends Activity {
return Calls.OUTGOING_TYPE;
} else if (mCallTypeVoicemail.isChecked()) {
return Calls.VOICEMAIL_TYPE;
+ } else if (mCallTypeCustom.isChecked()) {
+ return Integer.parseInt(mCustomCallTypeTextView.getText().toString());
} else {
return Calls.MISSED_TYPE;
}