mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
Closed the screen when press back button from App passcode screen
Signed-off-by: Kuuuna98 <yunaghgh@naver.com>
This commit is contained in:
parent
4ef7aa90b9
commit
ddc3db038c
1 changed files with 6 additions and 3 deletions
|
@ -365,10 +365,13 @@ public class PassCodeActivity extends AppCompatActivity implements Injectable {
|
|||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event){
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount()== 0){
|
||||
if (ACTION_REQUEST_WITH_RESULT.equals(getIntent().getAction()) ||
|
||||
ACTION_CHECK_WITH_RESULT.equals(getIntent().getAction())) {
|
||||
if(ACTION_CHECK.equals(getIntent().getAction())){
|
||||
moveTaskToBack(true);
|
||||
finishAndRemoveTask();
|
||||
}else if (ACTION_REQUEST_WITH_RESULT.equals(getIntent().getAction()) ||
|
||||
ACTION_CHECK_WITH_RESULT.equals(getIntent().getAction())) {
|
||||
finish();
|
||||
} // else, do nothing, but report that the key was consumed to stay alive
|
||||
}// else, do nothing, but report that the key was consumed to stay alive
|
||||
return true;
|
||||
}
|
||||
return super.onKeyDown(keyCode, event);
|
||||
|
|
Loading…
Reference in a new issue