title: How to finish child activity android
body: <p>Login Activity</p>
  
  <pre><code>mGoogleBtn.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  Toast.makeText(LoginActivity.this, "1", Toast.LENGTH_LONG).show();
  
                  Intent intent = new Intent(LoginActivity.this, GoogleAuthentication.class);
                  intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                  intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
                  startActivity(intent);
              }
          });
  </code></pre>
  
  <p>Then in my GoogleAuthentication Activity , googleSignIn method is called in oncreate</p>
  
  <pre><code>  private void googleSignIn() {
          Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);
          startActivityForResult(signInIntent, GOOGLE_RC_SIGN_IN);
      }
  </code></pre>
  
  <p>Under this method , I tried to kill my child activity but its not getting killed</p>
  
  <pre><code> @Override
      public void onActivityResult(int requestCode, int resultCode, Intent data) {
          super.onActivityResult(requestCode, resultCode, data);
          if (requestCode == GOOGLE_RC_SIGN_IN) {
              GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);
  
              if (result.isSuccess()) {
                  GoogleSignInAccount account = result.getSignInAccount();
                  firebaseAuthWithGoogle(account);
              }else {
                  finishActivity(requestCode);
                  this.finish();
                  Intent intent = new Intent(GoogleAuthentication.this, LoginActivity.class);
                  intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
                  startActivity(intent);
                  Toast.makeText(GoogleAuthentication.this, "Google Authentication Failed", Toast.LENGTH_LONG).show();
              }
          }
      }
  </code></pre>
  
  <p>I want this child activity to be killed when I press back button .... right now , its not killed and when I open someother activity this google sign intent activity pops in again.</p>
  
  <p>Please help , thansk for you time.</p>