Skip to content
This repository has been archived by the owner on Dec 24, 2022. It is now read-only.

Remove "Press back once more to exit" prompt #169

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, Strin
private BitmapDrawable mIcon;
private int mCurrentDrawerPos;

private boolean mCanQuit = false;

@Override
protected void onCreate(Bundle savedInstanceState) {
UiUtils.setPreferenceTheme(this);
Expand Down Expand Up @@ -210,19 +208,7 @@ public void finish() {
}
}

if (mCanQuit) {
super.finish();
return;
}

Toast.makeText(this, R.string.back_again_to_quit, Toast.LENGTH_SHORT).show();
mCanQuit = true;
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
mCanQuit = false;
}
}, 3000);
super.finish();
}

@Override
Expand Down