Skip to content

Commit

Permalink
Merge pull request #222 from Logan676/fix_gesture_lock_bug
Browse files Browse the repository at this point in the history
override back button default behavior
  • Loading branch information
lins05 committed Jan 9, 2015
2 parents 3da2d03 + 1c07e4f commit ffe91ce
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.List;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.os.CountDownTimer;
Expand All @@ -20,8 +21,6 @@
import com.seafile.seadroid2.gesturelock.LockPatternUtils;
import com.seafile.seadroid2.gesturelock.LockPatternView;
import com.seafile.seadroid2.gesturelock.LockPatternView.Cell;
import com.seafile.seadroid2.gesturelock.LockPatternView.DisplayMode;
import com.seafile.seadroid2.gesturelock.LockPatternView.OnPatternListener;


public class UnlockGesturePasswordActivity extends Activity {
Expand Down Expand Up @@ -71,6 +70,17 @@ protected void onDestroy() {
mCountdownTimer.cancel();
}

@Override
public void onBackPressed() {
// stop default action (finishing the current activity) to be executed.
// super.onBackPressed();
Intent i = new Intent();
i.setAction(Intent.ACTION_MAIN);
i.addCategory(Intent.CATEGORY_HOME);
startActivity(i);
finish();
}

private Runnable mClearPatternRunnable = new Runnable() {
public void run() {
mLockPatternView.clearPattern();
Expand Down

0 comments on commit ffe91ce

Please sign in to comment.