# HG changeset patch # User nikita@nikita-lab # Date 1243000177 -7200 # Node ID 32104eafe7843cea5998c2f2ed18ab8236f97226 # Parent 088857b09c7ddbb5211c887d61dcb6e54a1d6218 merged diff -r 088857b09c7d -r 32104eafe784 src/com/beem/project/beem/ui/ContactDialog.java --- a/src/com/beem/project/beem/ui/ContactDialog.java Fri May 22 15:43:31 2009 +0200 +++ b/src/com/beem/project/beem/ui/ContactDialog.java Fri May 22 15:49:37 2009 +0200 @@ -17,7 +17,7 @@ private Contact mContact; private Context mContext; - public ContactDialog(final Context context, Contact curContact, Intent curIntent) { + public ContactDialog(final Context context, Contact curContact) { super(context); mContext = context; setContentView(R.layout.contactdialog); @@ -29,11 +29,10 @@ @Override public void onClick(View v) { - /*Activity a = ContactDialog.this.getOwnerActivity(); + Activity a = ContactDialog.this.getOwnerActivity(); Intent i = new Intent(mContext, SendIM.class); i.putExtra("contact", mContact); - a.startActivity(i);*/ - String type = ((TextView) v).getText(); + a.startActivity(i); dismiss(); } diff -r 088857b09c7d -r 32104eafe784 src/com/beem/project/beem/ui/ContactList.java --- a/src/com/beem/project/beem/ui/ContactList.java Fri May 22 15:43:31 2009 +0200 +++ b/src/com/beem/project/beem/ui/ContactList.java Fri May 22 15:49:37 2009 +0200 @@ -65,7 +65,6 @@ mRosterListener = new BeemRosterListener(); mSettings = getSharedPreferences(getString(R.string.PreferenceFileName), MODE_PRIVATE); mBeemApplication = BeemApplication.getApplication(this); -<<<<<<< local groupMap = new HashMap>(); groupName = new ArrayList(); mBeemApplication.callWhenConnectedToServer(mHandler, new Runnable() { @@ -76,32 +75,17 @@ mRoster = mService.getRoster(); } catch (RemoteException e1) { Log.e(TAG, "Get roster failed", e1); -======= - - //TODO: a refaire - /*if (mSettings.getString(getString(R.string.PreferenceHostKey), "").equals("")) - startActivityForResult(new Intent(this, ContactListSettings.class), PREFERENCECHANGED);*/ - } - - @Override - protected void onResume() { - super.onResume(); - ->>>>>>> other } - - @Override - protected void onDestroy() { - mBeemApplication.unbindBeemService(); - super.onDestroy(); + if (mRoster != null) { + try { + mRoster.addConnectionListener(mRosterListener); + } catch (RemoteException e) { + e.printStackTrace(); + } } -<<<<<<< local callbackShowContactList(); } - }); - //TODO: a refaire - if (mSettings.getString(getString(R.string.PreferenceHostKey), "").equals("")) - startActivityForResult(new Intent(ContactList.this, ContactListSettings.class), PREFERENCECHANGED); + }); } @Override @@ -109,8 +93,6 @@ mBeemApplication.unbindBeemService(); super.onDestroy(); } -======= ->>>>>>> other private void callbackShowContactList() { if (mRoster != null) { @@ -173,22 +155,6 @@ mBeemApplication.stopBeemService(); } } -<<<<<<< local - } - - @Override - public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) { - Intent i = new Intent(ContactList.this, SendIM.class); - try { - i.putExtra("contact", groupMap.get(groupName.get(groupPosition)).get(childPosition)); - startActivity(i); - return true; - } catch (NullPointerException e) { - Log.e(TAG, "Child not found", e); - return false; - } -======= ->>>>>>> other } private void buildContactList(List listContact) { @@ -259,7 +225,6 @@ } void createDialog(Contact contact) { - Dialog dialogContact= new ContactDialog(ContactList.this, contact); dialogContact.show(); }