title: Remove Recent Apps Button From Navigation Bar
body: <p>I am currently developing an app and I would like to have a little more control over it then usual without having to root the device.
  I would like to remove the capability of the recent apps button in the navigation bar, or at least make it do something else from the default actions. Is there a way to do this? I'm sure there is since SureLock does the same thing.
  Thanks</p>
  
  <p>I have found a workaround for this on this website:<a href="http://www.juliencavandoli.com/how-to-disable-recent-apps-dialog-on-long-press-home-button/" rel="nofollow">http://www.juliencavandoli.com/how-to-disable-recent-apps-dialog-on-long-press-home-button/</a>
  you need to add this permission: android.permission.REORDER_TASKS
  And add this code:</p>
  
  <pre><code>public void onWindowFocusChanged(boolean hasFocus)
  {
      super.onWindowFocusChanged(hasFocus);
      if( !hasFocus)
      {
      ActivityManager am = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
      am.moveTaskToFront(getTaskId(), ActivityManager.MOVE_TASK_WITH_HOME );
      sendBroadcast( new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS) );
      }
  }
  </code></pre>