title: Android : why PhoneCallListener still alive after activity finish?
body: <p>im using a phone call listener in my activity but after finishing my activity , afer user make a call, my phone call listener not dead and brig up activity again !! please help me.</p>
  
  <pre><code>phoneListener = new PhoneCallListener();
  telephonyManager = (TelephonyManager) 
              TransferActivity.this.getSystemService(Context.TELEPHONY_SERVICE);
  telephonyManager.listen(phoneListener,  PhoneStateListener.LISTEN_CALL_STATE);
  </code></pre>
  
  <p>PhoneCallListener class :</p>
  
  <pre><code>private class PhoneCallListener extends PhoneStateListener {
      boolean isPhoneCalling = false;
      @Override
      public void onCallStateChanged(int state, String incomingNumber) {
  
          if (TelephonyManager.CALL_STATE_RINGING == state) {
          }
          if (TelephonyManager.CALL_STATE_OFFHOOK == state) {
              isPhoneCalling = true;
          }
          if (TelephonyManager.CALL_STATE_IDLE == state) {
              if (isPhoneCalling) {
                  isPhoneCalling = false;
                      Intent intent = getIntent();
                      startActivity(intent);
                  }
              }
          }
      }
  }
  </code></pre>