diff options
author | Yorke Lee <yorkelee@google.com> | 2013-08-09 09:40:31 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2013-08-09 09:41:35 -0700 |
commit | efd8a915b4c37c9f755c25f045cad9e538918dfa (patch) | |
tree | e3dcdec36bd3ad8385e5918f95860402882838e9 /src | |
parent | 15ef3e1d3772d9e35182572fed9b0f1c7c958547 (diff) |
Remove phone call receiver in call log fragment
The most recent call log item in favorites removes the need to
return the call log tab to the All tab on a phone call.
Change-Id: Id0a36bc97c04656cf86a485e44e616b7d652d0b2
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/calllog/CallLogFragment.java | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/com/android/dialer/calllog/CallLogFragment.java b/src/com/android/dialer/calllog/CallLogFragment.java index 5d750044f..a76d0c17e 100644 --- a/src/com/android/dialer/calllog/CallLogFragment.java +++ b/src/com/android/dialer/calllog/CallLogFragment.java @@ -90,7 +90,6 @@ public class CallLogFragment extends ListFragment private final Handler mHandler = new Handler(); private TelephonyManager mTelephonyManager; - private PhoneStateListener mPhoneStateListener; private class CustomContentObserver extends ContentObserver { public CustomContentObserver() { @@ -322,7 +321,6 @@ public class CallLogFragment extends ListFragment mAdapter.changeCursor(null); getActivity().getContentResolver().unregisterContentObserver(mCallLogObserver); getActivity().getContentResolver().unregisterContentObserver(mContactsObserver); - unregisterPhoneCallReceiver(); } @Override @@ -340,12 +338,6 @@ public class CallLogFragment extends ListFragment } private void updateCallList(int filterType) { - if (filterType == CallLogQueryHandler.CALL_TYPE_ALL) { - unregisterPhoneCallReceiver(); - } else { - // TODO krelease: Make this work - //registerPhoneCallReceiver(); - } mCallLogQueryHandler.fetchCalls(filterType); } @@ -487,48 +479,4 @@ public class CallLogFragment extends ListFragment serviceIntent.setAction(CallLogNotificationsService.ACTION_UPDATE_NOTIFICATIONS); getActivity().startService(serviceIntent); } - - // TODO krelease: Make the ViewPager switch to the correct tab (All) when a phone call is - // placed. - // This should probably be moved to the call log activity. - /** - * Register a phone call filter to reset the call type when a phone call is place. - */ - /* - private void registerPhoneCallReceiver() { - if (mPhoneStateListener != null) { - return; // Already registered. - } - mTelephonyManager = (TelephonyManager) getActivity().getSystemService( - Context.TELEPHONY_SERVICE); - mPhoneStateListener = new PhoneStateListener() { - @Override - public void onCallStateChanged(int state, String incomingNumber) { - if (state != TelephonyManager.CALL_STATE_OFFHOOK && - state != TelephonyManager.CALL_STATE_RINGING) { - return; - } - mHandler.post(new Runnable() { - @Override - public void run() { - if (getActivity() == null || getActivity().isFinishing()) { - return; - } - } - }); - } - }; - mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE); - } - */ - - /** - * Un-registers the phone call receiver. - */ - private void unregisterPhoneCallReceiver() { - if (mPhoneStateListener != null) { - mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE); - mPhoneStateListener = null; - } - } } |