Execute back key on key up.
Change-Id: Ic878e145f68f3a2b4e8167d4df0685c9d63462f2
diff --git a/src/com/android/contacts/DialtactsActivity.java b/src/com/android/contacts/DialtactsActivity.java
index 73d702b..2ba3d26 100644
--- a/src/com/android/contacts/DialtactsActivity.java
+++ b/src/com/android/contacts/DialtactsActivity.java
@@ -316,18 +316,16 @@
}
@Override
- public boolean onKeyDown(int keyCode, KeyEvent event) {
- // Handle BACK
- if (keyCode == KeyEvent.KEYCODE_BACK && isTaskRoot()) {
+ public void onBackPressed() {
+ if (isTaskRoot()) {
// Instead of stopping, simply push this to the back of the stack.
// This is only done when running at the top of the stack;
// otherwise, we have been launched by someone else so need to
// allow the user to go back to the caller.
moveTaskToBack(false);
- return true;
+ } else {
+ super.onBackPressed();
}
-
- return super.onKeyDown(keyCode, event);
}
/** {@inheritDoc} */