Add a test for launching the call-log
Change-Id: Id660a0a574c34e406dc2d8e2351a7423dccd1575
diff --git a/tests/res/values/donottranslate_strings.xml b/tests/res/values/donottranslate_strings.xml
index e7649ca..7530ce7 100644
--- a/tests/res/values/donottranslate_strings.xml
+++ b/tests/res/values/donottranslate_strings.xml
@@ -91,6 +91,7 @@
<item>CALL BUTTON</item>
<item>DIAL tel</item>
<item>VIEW tel</item>
+ <item>VIEW calls (call-log after a phone call)</item>
</string-array>
<string name="pinnedHeaderList">Pinned Headers</string>
diff --git a/tests/src/com/android/contacts/tests/allintents/AllIntentsActivity.java b/tests/src/com/android/contacts/tests/allintents/AllIntentsActivity.java
index 9d7f926..3683a80 100644
--- a/tests/src/com/android/contacts/tests/allintents/AllIntentsActivity.java
+++ b/tests/src/com/android/contacts/tests/allintents/AllIntentsActivity.java
@@ -131,6 +131,7 @@
private static final int CALL_BUTTON = 62;
private static final int DIAL_tel = 63;
private static final int VIEW_tel = 64;
+ private static final int VIEW_calllog = 65;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -542,6 +543,12 @@
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("tel:555-123-4567")));
break;
}
+ case VIEW_calllog: {
+ final Intent intent = new Intent(Intent.ACTION_VIEW, null);
+ intent.setType("vnd.android.cursor.dir/calls");
+ startActivity(intent);
+ break;
+ }
default: {
Toast.makeText(this, "Sorry, we forgot to write this...", Toast.LENGTH_LONG).show();
}