summaryrefslogtreecommitdiffstats
path: root/tests/res
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2014-06-10 12:09:32 -0700
committerTyler Gunn <tgunn@google.com>2014-06-10 12:09:32 -0700
commitebba68a0da51fa58c93e12df8557b65a2fb37f24 (patch)
tree2af606f013b3c0484e0374a689bd3157ba3d96be /tests/res
parentaa3350fe6fc21945e52f4a1096e68e73757ad2bf (diff)
downloadandroid_packages_apps_Dialer-ebba68a0da51fa58c93e12df8557b65a2fb37f24.tar.gz
android_packages_apps_Dialer-ebba68a0da51fa58c93e12df8557b65a2fb37f24.tar.bz2
android_packages_apps_Dialer-ebba68a0da51fa58c93e12df8557b65a2fb37f24.zip
Adding ability to manually enter a call log entry to dialer test app.
Modified the FillCallLogTestActivity to include the ability to add calls to the call log manually (ie by specifying call date/time, type, etc). This is useful for call log debugging and testing. Change-Id: I4984b78fd38ceef4f18c89635fe61e4cd2c3ce3f
Diffstat (limited to 'tests/res')
-rw-r--r--tests/res/layout/fill_call_log_test.xml132
-rw-r--r--tests/res/values/donottranslate_strings.xml14
2 files changed, 144 insertions, 2 deletions
diff --git a/tests/res/layout/fill_call_log_test.xml b/tests/res/layout/fill_call_log_test.xml
index 704b9c66e..6de9b9119 100644
--- a/tests/res/layout/fill_call_log_test.xml
+++ b/tests/res/layout/fill_call_log_test.xml
@@ -20,7 +20,7 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:gravity="center_horizontal"
+ android:gravity="left"
>
<TextView
android:layout_width="match_parent"
@@ -53,4 +53,134 @@
android:indeterminate="false"
android:visibility="gone"
/>
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/add_custom_entry"
+ />
+ <RadioGroup
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+ <RadioButton
+ android:id="@+id/call_type_incoming"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/call_type_incoming" />
+ <RadioButton
+ android:id="@+id/call_type_missed"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/call_type_missed" />
+ <RadioButton
+ android:id="@+id/call_type_outgoing"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/call_type_outgoing" />
+ </RadioGroup>
+ <LinearLayout
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="left"
+ >
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/call_date"
+ />
+ <TextView
+ android:id="@+id/call_date"
+ android:paddingStart="16dp"
+ android:layout_width="120dp"
+ android:layout_height="wrap_content"
+ />
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/edit"
+ android:onClick="showDatePickerDialog" />
+ </LinearLayout>
+ <LinearLayout
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="left"
+ >
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/call_time"
+ />
+ <TextView
+ android:id="@+id/call_time"
+ android:paddingStart="16dp"
+ android:layout_width="120dp"
+ android:layout_height="wrap_content"
+ />
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/edit"
+ android:onClick="showTimePickerDialog" />
+ </LinearLayout>
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/call_presentation"
+ />
+ <RadioGroup
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+ <RadioButton
+ android:id="@+id/presentation_allowed"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/presentation_allowed"
+ android:textSize="9sp" />
+ <RadioButton
+ android:id="@+id/presentation_restricted"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/presentation_restricted"
+ android:textSize="9sp" />
+ <RadioButton
+ android:id="@+id/presentation_unknown"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/presentation_unknown"
+ android:textSize="9sp" />
+ <RadioButton
+ android:id="@+id/presentation_payphone"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/presentation_payphone"
+ android:textSize="9sp" />
+ </RadioGroup>
+ <LinearLayout
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="left"
+ >
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/number"
+ />
+ <EditText
+ android:id="@+id/phone_number"
+ android:layout_width="180dp"
+ android:layout_height="wrap_content"
+ android:inputType="phone"
+ />
+ </LinearLayout>
+ <Button
+ android:id="@+id/add_custom"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/addToCallLogButton"
+ android:onClick="addManualEntry"
+ />
</LinearLayout>
diff --git a/tests/res/values/donottranslate_strings.xml b/tests/res/values/donottranslate_strings.xml
index ceba5ea96..bdeb3043d 100644
--- a/tests/res/values/donottranslate_strings.xml
+++ b/tests/res/values/donottranslate_strings.xml
@@ -37,5 +37,17 @@
<string name="numberOfCallLogEntries">Number of call log entries to add:</string>
<string name="addedLogEntriesToast">Added %1$d call log entries.</string>
<string name="noLogEntriesToast">No entries in the call log yet. Need at least one record for the template. Or use random numbers.</string>
-
+ <string name="add_custom_entry">Add custom call log entry:</string>
+ <string name="call_type_incoming">Incoming</string>
+ <string name="call_type_missed">Missed</string>
+ <string name="call_type_outgoing">Outgoing</string>
+ <string name="call_date">Call date</string>
+ <string name="call_time">Call time</string>
+ <string name="edit">Edit</string>
+ <string name="number">Number</string>
+ <string name="call_presentation">Presentation</string>
+ <string name="presentation_allowed">Allowed</string>
+ <string name="presentation_restricted">Restricted</string>
+ <string name="presentation_unknown">Unknown</string>
+ <string name="presentation_payphone">Payphone</string>
</resources>