|
@@ -23,6 +23,7 @@
|
|
|
package com.owncloud.android.ui.activity;
|
|
|
|
|
|
import android.content.Intent;
|
|
|
+import android.os.Build;
|
|
|
import android.os.Bundle;
|
|
|
import android.os.SystemClock;
|
|
|
import android.text.Editable;
|
|
@@ -365,9 +366,9 @@ 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_CHECK.equals(getIntent().getAction())){
|
|
|
+ if(ACTION_CHECK.equals(getIntent().getAction()) && Build.VERSION.SDK_INT>=21){
|
|
|
moveTaskToBack(true);
|
|
|
- finish();
|
|
|
+ finishAndRemoveTask();
|
|
|
}else if (ACTION_REQUEST_WITH_RESULT.equals(getIntent().getAction()) ||
|
|
|
ACTION_CHECK_WITH_RESULT.equals(getIntent().getAction())) {
|
|
|
finish();
|