title: finish() not working as expected
body: <p>As I'm creating an android application in which first I've created main activity, then I've added splash activity along with the one normal activity.</p>
  
  <p>So my <strong>problem</strong> is whenever I <strong>click on exit</strong> in my app it <strong>closes</strong> the main activity and <strong>returns</strong> that <strong>one normal activity in splash activity.</strong>
  I am using <strong><code>finish();</code></strong> on exit button which is present in main activity.</p>
  
  <p>So how can I exit the app which <strong>comes</strong> to android launcher screen</p>
  
  <p>I've also tried creating <strong>new intent</strong> with <strong>Action Main</strong> but its only <strong>minimizing the app</strong> I want to close it</p>
  
  <p><strong>MainActivity.class</strong></p>
  
  <pre><code>if (id == R.id.exit) {
              AlertDialog.Builder builder = new AlertDialog.Builder(homeActivity.this);
              builder.setMessage("Do You Want To Exit?").setCancelable(false)
                      .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
                          @Override
                          public void onClick(DialogInterface dialog, int which) {
                              finish();
                          }
                      }).setNegativeButton("No", new DialogInterface.OnClickListener() {
                  @Override
                  public void onClick(DialogInterface dialog, int which) {
                      dialog.cancel();
                  }
              });
              AlertDialog alert = builder.create();
              alert.setIcon(R.drawable.ic_error_outline_black_24dp);
              alert.setTitle("Exit!!");
              alert.show();
        }
  </code></pre>