use of com.android.dialer.blocking.FilteredNumberAsyncQueryHandler in project android_packages_apps_Dialer by LineageOS.
the class VisualVoicemailUpdateTask method scheduleTask.
/**
* Updates the voicemail notifications displayed.
*/
static void scheduleTask(@NonNull Context context, @NonNull Runnable callback) {
Assert.isNotNull(context);
Assert.isNotNull(callback);
if (!TelecomUtil.isDefaultDialer(context)) {
LogUtil.i("VisualVoicemailUpdateTask.scheduleTask", "not default dialer, not running");
callback.run();
return;
}
Input input = new Input(context, CallLogNotificationsQueryHelper.getInstance(context), new FilteredNumberAsyncQueryHandler(context));
DialerExecutors.createNonUiTaskBuilder(new VisualVoicemailUpdateTask()).onSuccess(output -> {
LogUtil.i("VisualVoicemailUpdateTask.scheduleTask", "update successful");
callback.run();
}).onFailure(throwable -> {
LogUtil.i("VisualVoicemailUpdateTask.scheduleTask", "update failed: " + throwable);
callback.run();
}).build().executeParallel(input);
}
use of com.android.dialer.blocking.FilteredNumberAsyncQueryHandler in project android_packages_apps_Dialer by LineageOS.
the class BlockedListSearchFragment method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setShowEmptyListForNullQuery(true);
/*
* Pass in the empty string here so ContactEntryListFragment#setQueryString interprets it as
* an empty search query, rather than as an uninitalized value. In the latter case, the
* adapter returned by #createListAdapter is used, which populates the view with contacts.
* Passing in the empty string forces ContactEntryListFragment to interpret it as an empty
* query, which results in showing an empty view
*/
setQueryString(getQueryString() == null ? "" : getQueryString());
mFilteredNumberAsyncQueryHandler = new FilteredNumberAsyncQueryHandler(getContext());
}
use of com.android.dialer.blocking.FilteredNumberAsyncQueryHandler in project android_packages_apps_Dialer by LineageOS.
the class DialerApplication method onCreate.
@Override
public void onCreate() {
Trace.beginSection("DialerApplication.onCreate");
if (BuildType.get() == BuildType.BUGFOOD) {
enableStrictMode();
}
super.onCreate();
new BlockedNumbersAutoMigrator(this.getApplicationContext(), new FilteredNumberAsyncQueryHandler(this), new DefaultDialerExecutorFactory()).asyncAutoMigrate();
CallLogComponent.get(this).callLogFramework().registerContentObservers(getApplicationContext());
PersistentLogger.initialize(this);
if (BuildCompat.isAtLeastO()) {
NotificationChannelManager.initChannels(this);
}
Trace.endSection();
}
Aggregations