use of com.android.dialer.database.CallLogQueryHandler in project android_packages_apps_Dialer by LineageOS.
the class VisualVoicemailEnabledChecker method asyncUpdate.
/**
* Perform an async query into the system to check the status of visual voicemail. If the status
* has changed, Callback.onVisualVoicemailEnabledStatusChanged() will be called.
*/
public void asyncUpdate() {
mCallLogQueryHandler = new CallLogQueryHandler(mContext, mContext.getContentResolver(), this);
mCallLogQueryHandler.fetchVoicemailStatus();
}
use of com.android.dialer.database.CallLogQueryHandler in project android_packages_apps_Dialer by LineageOS.
the class CallLogFragment method onCreate.
@Override
public void onCreate(Bundle state) {
LogUtil.d("CallLogFragment.onCreate", toString());
super.onCreate(state);
mRefreshDataRequired = true;
if (state != null) {
mCallTypeFilter = state.getInt(KEY_FILTER_TYPE, mCallTypeFilter);
mLogLimit = state.getInt(KEY_LOG_LIMIT, mLogLimit);
mDateLimit = state.getLong(KEY_DATE_LIMIT, mDateLimit);
mIsCallLogActivity = state.getBoolean(KEY_IS_CALL_LOG_ACTIVITY, mIsCallLogActivity);
mHasReadCallLogPermission = state.getBoolean(KEY_HAS_READ_CALL_LOG_PERMISSION, false);
mRefreshDataRequired = state.getBoolean(KEY_REFRESH_DATA_REQUIRED, mRefreshDataRequired);
selectAllMode = state.getBoolean(KEY_SELECT_ALL_MODE, false);
}
final Activity activity = getActivity();
final ContentResolver resolver = activity.getContentResolver();
mCallLogQueryHandler = new CallLogQueryHandler(activity, resolver, this, mLogLimit);
if (PermissionsUtil.hasCallLogReadPermissions(getContext())) {
resolver.registerContentObserver(CallLog.CONTENT_URI, true, mCallLogObserver);
} else {
LogUtil.w("CallLogFragment.onCreate", "call log permission not available");
}
if (PermissionsUtil.hasContactsReadPermissions(getContext())) {
resolver.registerContentObserver(ContactsContract.Contacts.CONTENT_URI, true, mContactsObserver);
} else {
LogUtil.w("CallLogFragment.onCreate", "contacts permission not available.");
}
setHasOptionsMenu(true);
}
use of com.android.dialer.database.CallLogQueryHandler in project android_packages_apps_Dialer by LineageOS.
the class ListsFragment method onResume.
@Override
public void onResume() {
LogUtil.d("ListsFragment.onResume", null);
Trace.beginSection(TAG + " onResume");
super.onResume();
mPaused = false;
if (getUserVisibleHint()) {
sendScreenViewForCurrentPosition();
}
// Fetch voicemail status to determine if we should show the voicemail tab.
mCallLogQueryHandler = new CallLogQueryHandler(getActivity(), getActivity().getContentResolver(), this);
mCallLogQueryHandler.fetchVoicemailStatus();
mCallLogQueryHandler.fetchMissedCallsUnreadCount();
Trace.endSection();
mCurrentPage = mAdapter.getItem(mViewPager.getCurrentItem());
if (mCurrentPage instanceof CallLogFragment) {
((CallLogFragment) mCurrentPage).onVisible();
}
}
Aggregations