mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-20 23:56:20 +08:00
Bringing the contacts up to date
This commit is contained in:
parent
67a0b838ff
commit
20aed7efe6
@ -10,6 +10,7 @@ import android.net.Uri;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteException;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class ContactManager {
|
||||
|
||||
public class ContactTriplet
|
||||
@ -162,20 +163,20 @@ public class ContactManager {
|
||||
if (all)
|
||||
mView.loadUrl("javascript:navigator.ContactManager.droidAddContact('" + name + "','" + phoneNumber + "','" + email +"')");
|
||||
else
|
||||
mView.loadUrl("javascript:navigator.AddressBook.droidFoundContact('" + name + "','" + phoneNumber + "','" + email +"')");
|
||||
mView.loadUrl("javascript:navigator.Contacts.droidFoundContact('" + name + "','" + phoneNumber + "','" + email +"')");
|
||||
|
||||
} while (cur.moveToNext());
|
||||
if (all)
|
||||
mView.loadUrl("javascript:navigator.ContactManager.droidDone()");
|
||||
else
|
||||
mView.loadUrl("javascript:navigator.AddressBook.droidDoneContacts();");
|
||||
mView.loadUrl("javascript:navigator.Contacts.droidDoneContacts();");
|
||||
}
|
||||
else
|
||||
{
|
||||
if(all)
|
||||
mView.loadUrl("javascript:navigator.ContactManager.fail()");
|
||||
else
|
||||
mView.loadUrl("javascript:navigator.AddressBook.fail('None found!')");
|
||||
mView.loadUrl("javascript:navigator.Contacts.fail('None found!')");
|
||||
}
|
||||
}
|
||||
|
||||
@ -198,10 +199,10 @@ public class ContactManager {
|
||||
if(data != null)
|
||||
{
|
||||
data.email = email;
|
||||
mView.loadUrl("javascript:navigator.AddressBook.droidFoundContact('" + data.name + "','" + data.phone + "','" + data.email +"')");
|
||||
mView.loadUrl("javascript:navigator.Contacts.droidFoundContact('" + data.name + "','" + data.phone + "','" + data.email +"')");
|
||||
}
|
||||
} while (cur.moveToNext());
|
||||
mView.loadUrl("javascript:navigator.AddressBook.droidDoneContacts();");
|
||||
mView.loadUrl("javascript:navigator.Contacts.droidDoneContacts();");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user