Skip to content

Commit

Permalink
needs assynctask
Browse files Browse the repository at this point in the history
  • Loading branch information
brigadinhos committed May 17, 2017
1 parent 3924023 commit bec15f2
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import pt.ulisboa.tecnico.cmu.tg14.locmessclient.DataObjects.ServicesDataHolder;
import pt.ulisboa.tecnico.cmu.tg14.locmessclient.Utils.FeedReaderDbHelper;

import pt.ulisboa.tecnico.cmu.tg14.locmessclient.Utils.Network.ServerActions;
import pt.ulisboa.tecnico.cmu.tg14.locmessclient.Utils.ServiceManager;


Expand Down Expand Up @@ -177,9 +178,8 @@ public boolean onNavigationItemSelected(final MenuItem item) {
.setCancelable(false)
.setPositiveButton("Yes",new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,int id) {
Intent intent = new Intent(getApplicationContext(), MainActivity.class);
Intent intent = new Intent(getApplicationContext(), LoginActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.putExtra("EXIT", true);
logout();
startActivity(intent);
}
Expand Down Expand Up @@ -215,8 +215,9 @@ public void onFragmentInteraction(Uri uri) {
private void logout() {
// delete all sensitive data from database
// TODO : do I need to stop services?
FeedReaderDbHelper dbHelper = new FeedReaderDbHelper(getApplicationContext());
dbHelper.dropDatabase(activity);
// TODO : >>>>> PUT THIS ON ASSYNCTASK <<<<<
new FeedReaderDbHelper(getApplicationContext()).dropDatabase(activity);
new ServerActions(activity).logout();
}

}

0 comments on commit bec15f2

Please sign in to comment.