在某些情况下,我不想听我的手机状态。如何销毁 PhoneStateListener 类的对象?
我以这种方式创建对象
try {
phoneCallListener = new WnetPlayerPhoneCallListener();
TelephonyManager mTM = (TelephonyManager) this.getSystemService(Context.TELEPHONY_SERVICE);
mTM.listen(phoneCallListener, PhoneStateListener.LISTEN_CALL_STATE);
} catch(Exception e) {
Log.e("PhoneCallListener", "Exception: "+e.toString());
}