summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-12-13 17:47:34 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2013-12-13 17:47:34 +0000
commita65366114ad3b1014c22d8a84c74a94fb7f47139 (patch)
tree442cbb71c7c302fccd43e9feb649711cc6d55315
parent12bfb31475b0ae719b4ae02b35f4d04c50f7215e (diff)
parentf427ab834cd2b767658c4ad9748db6b2917c4cfe (diff)
am f427ab83: am ce150742: am dc372cc7: Merge "Add a content observer for voicemail to the call log fragment"
* commit 'f427ab834cd2b767658c4ad9748db6b2917c4cfe': Add a content observer for voicemail to the call log fragment
-rw-r--r--src/com/android/dialer/calllog/CallLogFragment.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/dialer/calllog/CallLogFragment.java b/src/com/android/dialer/calllog/CallLogFragment.java
index c8e261358..e8d8b275a 100644
--- a/src/com/android/dialer/calllog/CallLogFragment.java
+++ b/src/com/android/dialer/calllog/CallLogFragment.java
@@ -29,6 +29,7 @@ import android.os.Handler;
import android.provider.CallLog;
import android.provider.CallLog.Calls;
import android.provider.ContactsContract;
+import android.provider.VoicemailContract.Status;
import android.telephony.PhoneNumberUtils;
import android.telephony.TelephonyManager;
import android.view.LayoutInflater;
@@ -97,6 +98,7 @@ public class CallLogFragment extends ListFragment
// See issue 6363009
private final ContentObserver mCallLogObserver = new CustomContentObserver();
private final ContentObserver mContactsObserver = new CustomContentObserver();
+ private final ContentObserver mVoicemailStatusObserver = new CustomContentObserver();
private boolean mRefreshDataRequired = true;
// Exactly same variable is in Fragment as a package private.
@@ -135,6 +137,8 @@ public class CallLogFragment extends ListFragment
mCallLogObserver);
getActivity().getContentResolver().registerContentObserver(
ContactsContract.Contacts.CONTENT_URI, true, mContactsObserver);
+ getActivity().getContentResolver().registerContentObserver(
+ Status.CONTENT_URI, true, mVoicemailStatusObserver);
setHasOptionsMenu(true);
updateCallList(mCallTypeFilter);
}
@@ -314,6 +318,7 @@ public class CallLogFragment extends ListFragment
mAdapter.changeCursor(null);
getActivity().getContentResolver().unregisterContentObserver(mCallLogObserver);
getActivity().getContentResolver().unregisterContentObserver(mContactsObserver);
+ getActivity().getContentResolver().unregisterContentObserver(mVoicemailStatusObserver);
}
@Override