Solve crash on creating groups
This commit is contained in:
parent
23a7d0ea09
commit
5e9767e2b5
@ -44,7 +44,6 @@ public class ContactRow extends LinearLayout {
|
||||
|
||||
this.setOnClickListener(new OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mSelectedCheckBox.performClick();
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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()];
|
||||
|
Loading…
Reference in New Issue
Block a user