summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHUANG Menghuai <menghuai.huang@orange.com>2013-08-20 14:23:40 +0800
committerHUANG Menghuai <menghuai.huang@orange.com>2013-12-05 17:45:29 +0800
commit7b49a0460e356a49d78c6c4d6a751cd479a840fb (patch)
tree63d864f3a9b0b55c7f0f16e46c69b8b945dd5857
parent66b5a6fca7042c991536feacaadbc7ded60b1917 (diff)
Add a content observer for voicemail to the call log fragment
The voicemail status message was not updated with new voicemail status. Change-Id: I3430bb5c21d8b25c863ca1e74f48774012c961c8 Signed-off-by: HUANG Menghuai <menghuai.huang@orange.com>
-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