This repository has been archived by the owner on Jan 25, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes for NPE in notify and OTR state; related to issue #118
- added new WarningDialogActivity for displaying general warning popup messages from within a service. this is now used to display any errors relating to OTR state being out of sync with remote contact - any warning or error messages are now injecting back into the convo stream so remote participant will be notified if there is a problem - on receiving FINISHED state change, now call endSession of the OTR manager so that we are assured state is actually ended
- Loading branch information
Showing
5 changed files
with
90 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
src/info/guardianproject/otr/app/im/app/WarningDialogActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package info.guardianproject.otr.app.im.app; | ||
|
||
import android.app.Activity; | ||
import android.app.AlertDialog; | ||
import android.content.DialogInterface; | ||
import android.content.DialogInterface.OnDismissListener; | ||
import android.os.Bundle; | ||
|
||
public class WarningDialogActivity extends Activity { | ||
|
||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
|
||
String title = getIntent().getStringExtra("title"); | ||
|
||
String msg = getIntent().getStringExtra("msg"); | ||
|
||
showDialog (title, msg); | ||
} | ||
|
||
|
||
|
||
private void showDialog (String title, String msg) | ||
{ | ||
|
||
AlertDialog ad = new AlertDialog.Builder(this) | ||
.setTitle(title).setIcon(android.R.drawable.ic_dialog_alert) | ||
.setMessage(msg).show(); | ||
|
||
ad.setOnDismissListener(new OnDismissListener () { | ||
|
||
@Override | ||
public void onDismiss(DialogInterface arg0) { | ||
|
||
WarningDialogActivity.this.finish(); | ||
|
||
} | ||
|
||
}); | ||
|
||
|
||
} | ||
|
||
|
||
|
||
|
||
} |
uh yeah, why was this deleted? i am in idiot sometimes.