zbkoong / android-rcs-ims-stack

Automatically exported from code.google.com/p/android-rcs-ims-stack
0 stars 0 forks source link

Finish is called when user clicks on Cancel option in back button in one to one chat window #105

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In one to one chat window(ChatView.java), when we click on back button, it 
will show the popup window by asking Ok or Cancel. When user clicks on Cancel, 
it actually closing the activity. 
But ideally, it should continue the current chat without closing the 
onetoonechat window. This is a bug.
2.
3.

What is the expected output? What do you see instead?
But ideally, it should continue the current chat without closing the 
onetoonechat window. This is a bug.

What version of the product are you using? On what operating system?
2.5.0

Please provide any additional information below.
Fix for this is to not to call the finish in setNegativeButton: onClick function

Code before fix:
        builder.setNegativeButton(getString(R.string.label_cancel), new DialogInterface.OnClickListener() {
        public void onClick(DialogInterface dialog, int which) {
        // Exit activity
            finish();
                        }
Code after fix:
                    builder.setNegativeButton(getString(R.string.label_cancel), new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int which) {
                            // Exit activity
                            //Commented the below finish as it should not exist from activity when cancel was chit.
                            //finish();
                        }

Original issue reported on code.google.com by appapur...@gmail.com on 14 Mar 2013 at 12:09

GoogleCodeExporter commented 9 years ago
The RI is not a final application. This is a test tool and we want to test 
several usecases, it's the reason why we offer the possibility to close the 
session or not, it depends of the test to be done.

Original comment by jmauffret@gmail.com on 15 Mar 2013 at 12:13