title: Disable Android home button
body: <p>I'm implementing lock screen apps, user required to key in passcode and unlock the device for some duration.</p>
  
  <p>I test in Samsung Note 3 and xiaomi redmi 1.</p>
  
  <p>All the physical buttons in Note 3 has been locked, but somehow I cannot disable xiaomi redmi 1's home button. **The home button will run onPause event.</p>
  
  <p><a href="https://i.stack.imgur.com/4Z9Xe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4Z9Xe.png" alt="enter image description here"></a></p>
  
  <p>I used the code couldn't show the button in logcat.</p>
  
  <pre><code>@Override
      public boolean dispatchKeyEvent(KeyEvent event) {
          Log.d("button", String.valueOf(event.getKeyCode()));
          return true;
      }
  </code></pre>
  
  <p>I've try to use onPause and run my apps again, but it respond slow.</p>
  
  <pre><code>@Override
  public void onPause() {
      super.onPause();.
      Intent intent = new Intent(LockScreenActivity.this, SettingActivity.class);
      startActivity(intent);
  }
  </code></pre>