diff options
author | keyboardr <keyboardr@google.com> | 2017-06-26 15:16:26 -0700 |
---|---|---|
committer | Brandon Maxwell <maxwelb@google.com> | 2017-06-30 14:33:17 -0700 |
commit | a60579e8f6abff88814d940f9da51e22788d6007 (patch) | |
tree | 188bdb9ec664a2d572efef0f87841958fa966c9d /java/com/android/dialer/blocking | |
parent | 4b499669dde98f485199fd38883ad0dc26d1f0f3 (diff) |
All Fragments are now support library Fragments.
Switch a bunch of imports to support library Fragments (and Loaders) instead of framework Fragments (and Loaders). This was needed to use FragmentManager.isStateSaved() instead of manually tracking that state. This should reduce errors around committing after state is saved.
Also adds METADATA presubmit to prevent new usages of framework Fragments or Loaders.
Bug: 38241305
Test: Covered by existing tests.
PiperOrigin-RevId: 160202511
Change-Id: I5dc0b467da984ca571e49b4dfa0deea44eb372b2
Diffstat (limited to 'java/com/android/dialer/blocking')
4 files changed, 6 insertions, 6 deletions
diff --git a/java/com/android/dialer/blocking/BlockNumberDialogFragment.java b/java/com/android/dialer/blocking/BlockNumberDialogFragment.java index 7ef77c4b6..7fedf518c 100644 --- a/java/com/android/dialer/blocking/BlockNumberDialogFragment.java +++ b/java/com/android/dialer/blocking/BlockNumberDialogFragment.java @@ -18,14 +18,14 @@ package com.android.dialer.blocking; import android.app.AlertDialog; import android.app.Dialog; -import android.app.DialogFragment; -import android.app.FragmentManager; import android.content.ContentValues; import android.content.Context; import android.content.DialogInterface; import android.net.Uri; import android.os.Bundle; import android.support.design.widget.Snackbar; +import android.support.v4.app.DialogFragment; +import android.support.v4.app.FragmentManager; import android.telephony.PhoneNumberUtils; import android.text.TextUtils; import android.view.View; diff --git a/java/com/android/dialer/blocking/BlockReportSpamDialogs.java b/java/com/android/dialer/blocking/BlockReportSpamDialogs.java index b5f81fcc5..ed30344d7 100644 --- a/java/com/android/dialer/blocking/BlockReportSpamDialogs.java +++ b/java/com/android/dialer/blocking/BlockReportSpamDialogs.java @@ -19,11 +19,11 @@ package com.android.dialer.blocking; import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; -import android.app.DialogFragment; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; import android.support.annotation.Nullable; +import android.support.v4.app.DialogFragment; import android.view.View; import android.widget.CheckBox; import android.widget.CompoundButton; @@ -99,7 +99,7 @@ public class BlockReportSpamDialogs { } /** Contains the common attributes between all block/unblock/report dialog fragments. */ - private static class CommonDialogsFragment extends DialogFragment { + public static class CommonDialogsFragment extends DialogFragment { /** The number to display in the dialog title. */ protected String mDisplayNumber; diff --git a/java/com/android/dialer/blocking/FilteredNumberCompat.java b/java/com/android/dialer/blocking/FilteredNumberCompat.java index e104c4f94..033f09c9f 100644 --- a/java/com/android/dialer/blocking/FilteredNumberCompat.java +++ b/java/com/android/dialer/blocking/FilteredNumberCompat.java @@ -17,7 +17,6 @@ package com.android.dialer.blocking; import android.annotation.TargetApi; -import android.app.FragmentManager; import android.content.ContentUris; import android.content.ContentValues; import android.content.Context; @@ -31,6 +30,7 @@ import android.provider.BlockedNumberContract; import android.provider.BlockedNumberContract.BlockedNumbers; import android.support.annotation.Nullable; import android.support.annotation.VisibleForTesting; +import android.support.v4.app.FragmentManager; import android.telecom.TelecomManager; import android.telephony.PhoneNumberUtils; import com.android.dialer.common.LogUtil; diff --git a/java/com/android/dialer/blocking/MigrateBlockedNumbersDialogFragment.java b/java/com/android/dialer/blocking/MigrateBlockedNumbersDialogFragment.java index 76e50b38e..1bf9175f5 100644 --- a/java/com/android/dialer/blocking/MigrateBlockedNumbersDialogFragment.java +++ b/java/com/android/dialer/blocking/MigrateBlockedNumbersDialogFragment.java @@ -18,10 +18,10 @@ package com.android.dialer.blocking; import android.app.AlertDialog; import android.app.Dialog; -import android.app.DialogFragment; import android.content.DialogInterface; import android.content.DialogInterface.OnShowListener; import android.os.Bundle; +import android.support.v4.app.DialogFragment; import android.view.View; import com.android.dialer.blocking.BlockedNumbersMigrator.Listener; import java.util.Objects; |