summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/ChooseLockPattern.java
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:06:01 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:06:01 -0800
commitabc48f80d8747b4fc051b7dd364355ee667a9bac (patch)
tree31ae577fe29d75963b071e738703e4db83ad6580 /src/com/android/settings/ChooseLockPattern.java
parentde2d9f5f109265873196f1615e1f3546b114aaa7 (diff)
downloadpackages_apps_settings-abc48f80d8747b4fc051b7dd364355ee667a9bac.zip
packages_apps_settings-abc48f80d8747b4fc051b7dd364355ee667a9bac.tar.gz
packages_apps_settings-abc48f80d8747b4fc051b7dd364355ee667a9bac.tar.bz2
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'src/com/android/settings/ChooseLockPattern.java')
-rw-r--r--src/com/android/settings/ChooseLockPattern.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/com/android/settings/ChooseLockPattern.java b/src/com/android/settings/ChooseLockPattern.java
index 973e655..3097e96 100644
--- a/src/com/android/settings/ChooseLockPattern.java
+++ b/src/com/android/settings/ChooseLockPattern.java
@@ -45,6 +45,17 @@ import java.util.List;
*/
public class ChooseLockPattern extends Activity implements View.OnClickListener{
+ /**
+ * Used by the choose lock pattern wizard to indicate the wizard is
+ * finished, and each activity in the wizard should finish.
+ * <p>
+ * Previously, each activity in the wizard would finish itself after
+ * starting the next activity. However, this leads to broken 'Back'
+ * behavior. So, now an activity does not finish itself until it gets this
+ * result.
+ */
+ static final int RESULT_FINISHED = RESULT_FIRST_USER;
+
// how long after a confirmation message is shown before moving on
static final int INFORMATION_MSG_TIMEOUT_MS = 3000;
@@ -298,6 +309,8 @@ public class ChooseLockPattern extends Activity implements View.OnClickListener{
mLockPatternView.clearPattern();
updateStage(Stage.Introduction);
} else if (mUiStage.leftMode == LeftButtonMode.Cancel) {
+ // They are canceling the entire wizard
+ setResult(RESULT_FINISHED);
finish();
} else {
throw new IllegalStateException("left footer button pressed, but stage of " +
@@ -368,6 +381,7 @@ public class ChooseLockPattern extends Activity implements View.OnClickListener{
}
if (resultCode != Activity.RESULT_OK) {
+ setResult(RESULT_FINISHED);
finish();
}
updateStage(Stage.Introduction);
@@ -475,6 +489,8 @@ public class ChooseLockPattern extends Activity implements View.OnClickListener{
mLockPatternUtils.setLockPatternEnabled(true);
mLockPatternUtils.setVisiblePatternEnabled(true);
}
+
+ setResult(RESULT_FINISHED);
finish();
}
}