Merge "Hold RECEIVE_BOOT_COMPLETED permission to receive ACTION_BOOT_COMPLETED" into ub-contactsdialer-i-dev
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 974824b..25b2ff4 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -16,8 +16,8 @@
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
           package="com.android.contacts"
-          android:versionCode="10708"
-          android:versionName="1.7.8">
+          android:versionCode="10709"
+          android:versionName="1.7.9">
 
     <uses-sdk
         android:minSdkVersion="21"
diff --git a/src/com/android/contacts/activities/PeopleActivity.java b/src/com/android/contacts/activities/PeopleActivity.java
index 84ddbd5..5a38043 100644
--- a/src/com/android/contacts/activities/PeopleActivity.java
+++ b/src/com/android/contacts/activities/PeopleActivity.java
@@ -760,9 +760,12 @@
 
     @Override
     public boolean onKeyDown(int keyCode, KeyEvent event) {
-        // Only consume the event if the drawer is closed. Otherwise, key events will activate
-        // search mode when drawer is open.
+        // If the drawer is open, consume KEYCODE_BACK event only.
         if (mDrawerLayout.isDrawerOpen(GravityCompat.START)) {
+            if (keyCode == KeyEvent.KEYCODE_BACK) {
+                // Should eventually go to onBackPressed().
+                return super.onKeyDown(keyCode, event);
+            }
             return false;
         }
         // Bring up the search UI if the user starts typing