Solve crash on creating groups

This commit is contained in:
Mathieu Maret 2010-05-13 11:41:51 +02:00
parent 23a7d0ea09
commit 5e9767e2b5
5 changed files with 7 additions and 14 deletions

View File

@ -44,7 +44,6 @@ public class ContactRow extends LinearLayout {
this.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
mSelectedCheckBox.performClick();

View File

@ -67,7 +67,6 @@ public class GroupEditActivity extends ListActivity {
Button ok = (Button) findViewById(R.id.okGroups);
ok.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
createGroup();
reNameGroup();
@ -156,7 +155,6 @@ public class GroupEditActivity extends ListActivity {
}
@Override
public void onClick(View v) {
CheckBox cBox = (CheckBox)v;
createGroup();

View File

@ -42,7 +42,7 @@ public class GroupsDbAdapter {
public static final String KEY_GROUP_TO_PHONE_PHONEID = "pid";
private static final String TAG = "groupsDbAdapter";
private DatabaseHelper mDbHelper;
private GroupDbHelper mDbHelper;
private SQLiteDatabase mDb;
/**
@ -56,16 +56,16 @@ public class GroupsDbAdapter {
"create table group_TO_PHONE (_id integer primary key autoincrement, "
+ "gid integer not null, pid integer not null);";
private static final String DATABASE_NAME = "data";
private static final String DATABASE_NAME = "dataGroup";
private static final String DATABASE_GROUP_TABLE = "groups";
private static final String DATABASE_GROUP_TO_PHONE_TABLE = "group_TO_PHONE";
private static final int DATABASE_VERSION = 3;
private static final int DATABASE_VERSION = 4;
private final Context mCtx;
private static class DatabaseHelper extends SQLiteOpenHelper {
private static class GroupDbHelper extends SQLiteOpenHelper {
DatabaseHelper(Context context) {
GroupDbHelper(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}
@ -107,8 +107,9 @@ public class GroupsDbAdapter {
* @throws SQLException if the database could be neither opened or created
*/
public GroupsDbAdapter open() throws SQLException {
mDbHelper = new DatabaseHelper(mCtx);
mDbHelper = new GroupDbHelper(mCtx);
mDb = mDbHelper.getWritableDatabase();
return this;
}

View File

@ -66,7 +66,6 @@ public class MultiSmsSender extends Activity {
mAddButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
selectNumbers();
}
@ -74,7 +73,6 @@ public class MultiSmsSender extends Activity {
mSend.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
sendMessage();
@ -161,7 +159,6 @@ public class MultiSmsSender extends Activity {
getResources().getString(R.string.ok),
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
@ -175,7 +172,6 @@ public class MultiSmsSender extends Activity {
getResources().getString(R.string.ok),
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();

View File

@ -50,7 +50,6 @@ public class PhoneNumberSelection extends ListActivity
Button ok = (Button) findViewById(R.id.okContacts);
ok.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Intent i = new Intent();
String [] numbers = new String[mSelectedSet.size()];