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() {
|
this.setOnClickListener(new OnClickListener() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
mSelectedCheckBox.performClick();
|
mSelectedCheckBox.performClick();
|
||||||
|
|
||||||
|
@ -67,7 +67,6 @@ public class GroupEditActivity extends ListActivity {
|
|||||||
Button ok = (Button) findViewById(R.id.okGroups);
|
Button ok = (Button) findViewById(R.id.okGroups);
|
||||||
ok.setOnClickListener(new OnClickListener() {
|
ok.setOnClickListener(new OnClickListener() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
createGroup();
|
createGroup();
|
||||||
reNameGroup();
|
reNameGroup();
|
||||||
@ -156,7 +155,6 @@ public class GroupEditActivity extends ListActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
CheckBox cBox = (CheckBox)v;
|
CheckBox cBox = (CheckBox)v;
|
||||||
createGroup();
|
createGroup();
|
||||||
|
@ -42,7 +42,7 @@ public class GroupsDbAdapter {
|
|||||||
public static final String KEY_GROUP_TO_PHONE_PHONEID = "pid";
|
public static final String KEY_GROUP_TO_PHONE_PHONEID = "pid";
|
||||||
|
|
||||||
private static final String TAG = "groupsDbAdapter";
|
private static final String TAG = "groupsDbAdapter";
|
||||||
private DatabaseHelper mDbHelper;
|
private GroupDbHelper mDbHelper;
|
||||||
private SQLiteDatabase mDb;
|
private SQLiteDatabase mDb;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -56,16 +56,16 @@ public class GroupsDbAdapter {
|
|||||||
"create table group_TO_PHONE (_id integer primary key autoincrement, "
|
"create table group_TO_PHONE (_id integer primary key autoincrement, "
|
||||||
+ "gid integer not null, pid integer not null);";
|
+ "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_TABLE = "groups";
|
||||||
private static final String DATABASE_GROUP_TO_PHONE_TABLE = "group_TO_PHONE";
|
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 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);
|
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
|
* @throws SQLException if the database could be neither opened or created
|
||||||
*/
|
*/
|
||||||
public GroupsDbAdapter open() throws SQLException {
|
public GroupsDbAdapter open() throws SQLException {
|
||||||
mDbHelper = new DatabaseHelper(mCtx);
|
mDbHelper = new GroupDbHelper(mCtx);
|
||||||
mDb = mDbHelper.getWritableDatabase();
|
mDb = mDbHelper.getWritableDatabase();
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +66,6 @@ public class MultiSmsSender extends Activity {
|
|||||||
|
|
||||||
mAddButton.setOnClickListener(new OnClickListener() {
|
mAddButton.setOnClickListener(new OnClickListener() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
selectNumbers();
|
selectNumbers();
|
||||||
}
|
}
|
||||||
@ -74,7 +73,6 @@ public class MultiSmsSender extends Activity {
|
|||||||
|
|
||||||
mSend.setOnClickListener(new OnClickListener() {
|
mSend.setOnClickListener(new OnClickListener() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
sendMessage();
|
sendMessage();
|
||||||
|
|
||||||
@ -161,7 +159,6 @@ public class MultiSmsSender extends Activity {
|
|||||||
getResources().getString(R.string.ok),
|
getResources().getString(R.string.ok),
|
||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
|
|
||||||
@ -175,7 +172,6 @@ public class MultiSmsSender extends Activity {
|
|||||||
getResources().getString(R.string.ok),
|
getResources().getString(R.string.ok),
|
||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
|
|
||||||
|
@ -50,7 +50,6 @@ public class PhoneNumberSelection extends ListActivity
|
|||||||
Button ok = (Button) findViewById(R.id.okContacts);
|
Button ok = (Button) findViewById(R.id.okContacts);
|
||||||
ok.setOnClickListener(new OnClickListener() {
|
ok.setOnClickListener(new OnClickListener() {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
Intent i = new Intent();
|
Intent i = new Intent();
|
||||||
String [] numbers = new String[mSelectedSet.size()];
|
String [] numbers = new String[mSelectedSet.size()];
|
||||||
|
Loading…
Reference in New Issue
Block a user