mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Issue 250: Provided a choice of creating a new contact or merging with an existing one.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1768 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
6a334eccf4
commit
e7b14f7443
|
@ -10,6 +10,7 @@
|
|||
<li>Added support for many more locales for web search and product search.</li>
|
||||
<li>Added Hebrew translation.</li>
|
||||
<li>Fixed support for the Motorola Xoom tablet.</li>
|
||||
<li>Provided a choice of creating a new contact or merging with an existing one.</li>
|
||||
<li>Other minor fixes.</li>
|
||||
</ul>
|
||||
<p><b>New in version 3.53:</b></p>
|
||||
|
|
|
@ -238,20 +238,12 @@ public abstract class ResultHandler {
|
|||
}
|
||||
}
|
||||
|
||||
private static long lastSecondOfDay(long time) {
|
||||
Calendar timeInDay = Calendar.getInstance();
|
||||
timeInDay.setTimeInMillis(time);
|
||||
timeInDay.set(Calendar.HOUR_OF_DAY, timeInDay.getActualMaximum(Calendar.HOUR_OF_DAY));
|
||||
timeInDay.set(Calendar.MINUTE, timeInDay.getActualMaximum(Calendar.MINUTE));
|
||||
timeInDay.set(Calendar.SECOND, timeInDay.getActualMaximum(Calendar.SECOND));
|
||||
return timeInDay.getTimeInMillis();
|
||||
}
|
||||
|
||||
final void addContact(String[] names, String[] phoneNumbers, String[] emails, String note,
|
||||
String address, String org, String title) {
|
||||
|
||||
// Only use the first name in the array, if present.
|
||||
Intent intent = new Intent(Contacts.Intents.Insert.ACTION, Contacts.People.CONTENT_URI);
|
||||
Intent intent = new Intent(Intent.ACTION_INSERT_OR_EDIT, Contacts.CONTENT_URI);
|
||||
intent.setType(Contacts.People.CONTENT_ITEM_TYPE);
|
||||
putExtra(intent, Contacts.Intents.Insert.NAME, names != null ? names[0] : null);
|
||||
|
||||
int phoneCount = Math.min((phoneNumbers != null) ? phoneNumbers.length : 0,
|
||||
|
|
Loading…
Reference in a new issue