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/incallui | |
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/incallui')
-rw-r--r-- | java/com/android/incallui/InCallActivityCommon.java | 6 | ||||
-rw-r--r-- | java/com/android/incallui/spam/SpamNotificationActivity.java | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/java/com/android/incallui/InCallActivityCommon.java b/java/com/android/incallui/InCallActivityCommon.java index 4b0a3cd05..435493696 100644 --- a/java/com/android/incallui/InCallActivityCommon.java +++ b/java/com/android/incallui/InCallActivityCommon.java @@ -226,7 +226,9 @@ public class InCallActivityCommon { SelectPhoneAccountDialogFragment dialogFragment = (SelectPhoneAccountDialogFragment) - inCallActivity.getFragmentManager().findFragmentByTag(TAG_SELECT_ACCOUNT_FRAGMENT); + inCallActivity + .getSupportFragmentManager() + .findFragmentByTag(TAG_SELECT_ACCOUNT_FRAGMENT); if (dialogFragment != null) { dialogFragment.setListener(selectAccountListener); } @@ -884,7 +886,7 @@ public class InCallActivityCommon { selectAccountListener, waitingForAccountCall.getId()); selectPhoneAccountDialogFragment.show( - inCallActivity.getFragmentManager(), TAG_SELECT_ACCOUNT_FRAGMENT); + inCallActivity.getSupportFragmentManager(), TAG_SELECT_ACCOUNT_FRAGMENT); return true; } } diff --git a/java/com/android/incallui/spam/SpamNotificationActivity.java b/java/com/android/incallui/spam/SpamNotificationActivity.java index ece0e4931..2b8687d2c 100644 --- a/java/com/android/incallui/spam/SpamNotificationActivity.java +++ b/java/com/android/incallui/spam/SpamNotificationActivity.java @@ -197,7 +197,7 @@ public class SpamNotificationActivity extends FragmentActivity { } }, dismissListener) - .show(getFragmentManager(), BlockReportSpamDialogs.NOT_SPAM_DIALOG_TAG); + .show(getSupportFragmentManager(), BlockReportSpamDialogs.NOT_SPAM_DIALOG_TAG); } else { reportNotSpamAndFinish(number, contactLookupResultType); } @@ -222,7 +222,9 @@ public class SpamNotificationActivity extends FragmentActivity { } }, dismissListener) - .show(getFragmentManager(), BlockReportSpamDialogs.BLOCK_REPORT_SPAM_DIALOG_TAG); + .show( + getSupportFragmentManager(), + BlockReportSpamDialogs.BLOCK_REPORT_SPAM_DIALOG_TAG); } }); } else { @@ -252,7 +254,7 @@ public class SpamNotificationActivity extends FragmentActivity { /** Checks if the user has migrated to the new blocking and display a dialog if necessary. */ private void maybeShowBlockNumberMigrationDialog(BlockedNumbersMigrator.Listener listener) { if (!FilteredNumberCompat.maybeShowBlockNumberMigrationDialog( - this, getFragmentManager(), listener)) { + this, getSupportFragmentManager(), listener)) { listener.onComplete(); } } |