diff options
Diffstat (limited to 'src/com/android/dialer/compat/FilteredNumberCompat.java')
-rw-r--r-- | src/com/android/dialer/compat/FilteredNumberCompat.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/com/android/dialer/compat/FilteredNumberCompat.java b/src/com/android/dialer/compat/FilteredNumberCompat.java index 91563dc0d..ea994c977 100644 --- a/src/com/android/dialer/compat/FilteredNumberCompat.java +++ b/src/com/android/dialer/compat/FilteredNumberCompat.java @@ -238,6 +238,27 @@ public class FilteredNumberCompat { } /** + * Shows block number migration dialog if necessary. + * + * @param fragmentManager The {@link FragmentManager} used to show fragments. + * @param listener The {@link BlockedNumbersMigrator.Listener} to call when migration is + * complete. + * @return boolean True if migration dialog is shown. + */ + public static boolean maybeShowBlockNumberMigrationDialog( + ContentResolver contentResolver, FragmentManager fragmentManager, + BlockedNumbersMigrator.Listener listener) { + if (shouldShowMigrationDialog(true)) { + Log.i(TAG, "maybeShowBlockNumberMigrationDialog - showing migration dialog"); + MigrateBlockedNumbersDialogFragment + .newInstance(new BlockedNumbersMigrator(contentResolver), listener) + .show(fragmentManager, "MigrateBlockedNumbers"); + return true; + } + return false; + } + + /** * Shows the flow of {@link android.app.DialogFragment}s for blocking or unblocking numbers. * * @param blockId The id into the blocked numbers database. |