History log of /packages/apps/Contacts/tests/src/com/android/contacts/tests/QueryService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
953dc0c8c95e0b7c3aabcaacea0b6e88d3174462 02-Dec-2011 Makoto Onuki <omakoto@google.com> Add projection support to QueryService

Change-Id: I5f2bf6f1dc9c1568f7790355e855cd5e5b428ebe
/packages/apps/Contacts/tests/src/com/android/contacts/tests/QueryService.java
654888562d75fe4758cb0500f73aaa11385e6f63 30-Nov-2011 Makoto Onuki <omakoto@google.com> Add phone number format tester to test apk

Usage:
adb shell am startservice -e n '6502530000' \
com.android.contacts.tests/.PhoneNumberTestService

This will output the following on logcat.

I/phonenumber(29086): Input phone number: 6502530000
I/phonenumber(29086): Input country code: null
I/phonenumber(29086): Current country code: US
I/phonenumber(29086): Result for: 6502530000 / US
I/phonenumber(29086): formatNumberToE164(6502530000, US) = +16502530000
I/phonenumber(29086): PhoneNumberUtil.format(parse(6502530000, US), E164) = +16502530000 (valid)
I/phonenumber(29086): PhoneNumberUtil.format(parse(6502530000, US), INTERNATIONAL) = +1 650-253-0000 (valid)
I/phonenumber(29086): PhoneNumberUtil.format(parse(6502530000, US), NATIONAL) = (650) 253-0000 (valid)
I/phonenumber(29086): PhoneNumberUtil.format(parse(6502530000, US), RFC3966) = +1-650-253-0000 (valid)
:
:

Also fixed the copyright header for QueryService.java.

Change-Id: If504a803e0001eeafd5928979caa1510ac989282
/packages/apps/Contacts/tests/src/com/android/contacts/tests/QueryService.java
8e34744e041e3db61aa3544b03594e5b379c946c 30-Nov-2011 Makoto Onuki <omakoto@google.com> Add service to test apk to execute arbitrary query

Use the am command to launch the service.

e.g.
adb shell am startservice -d content://com.android.contacts/directories \
-e s 'accountName is null' -e o '_id' \
com.android.contacts.tests/.QueryService

Result will be dumped on logcat. Example:
contactsquery: URI: content://com.android.contacts/directories
contactsquery: Selection: accountName is null
contactsquery: Result count: 2
contactsquery: authority|accountName|typeResourceId|packageName|_id|shortcutSupport|accountType|displayName|photoSupport|exportSupport
contactsquery: com.android.contacts|*null*|2130968583|com.android.providers.contacts|0|2|*null*|*null*|3|0
contactsquery: com.android.contacts|*null*|2130968584|com.android.providers.contacts|1|2|*null*|*null*|3|0

Change-Id: I0db643519d192f9ca9666026c61acf553a3b8d75
/packages/apps/Contacts/tests/src/com/android/contacts/tests/QueryService.java