Fix ToggleScreenMagnificationPreferenceFragmentTest

**Root cause**
ShadowFragment makes the test using an empty implementation of onCreate,
hence the test execution throws SuperNotCalledException.

ShadowFragment was accidentally added to this test when migrate to the
latest Robolectric. Removing ShadowFragment in the config fixes the
test.

Fix: 300158627
Test: atest ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: I8782ac11a93c5f89b781dcca1713968ed18802cf
diff --git a/tests/robotests/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragmentTest.java b/tests/robotests/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragmentTest.java
index 72e9b54..f0b2fbe 100644
--- a/tests/robotests/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragmentTest.java
@@ -57,7 +57,6 @@
 import com.google.common.truth.Correspondence;
 
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.robolectric.RobolectricTestRunner;
@@ -78,7 +77,6 @@
         ShadowUserManager.class,
         ShadowStorageManager.class,
         ShadowSettings.ShadowSecure.class,
-        com.android.settings.testutils.shadow.ShadowFragment.class,
 })
 public class ToggleScreenMagnificationPreferenceFragmentTest {
 
@@ -101,7 +99,6 @@
 
     private static final String KEY_FOLLOW_TYPING =
             Settings.Secure.ACCESSIBILITY_MAGNIFICATION_FOLLOW_TYPING_ENABLED;
-
     private FragmentController<ToggleScreenMagnificationPreferenceFragment> mFragController;
     private Context mContext;
     private Resources mSpyResources;
@@ -109,6 +106,7 @@
 
     @Before
     public void setUpTestFragment() {
+
         mContext = ApplicationProvider.getApplicationContext();
 
         // Set up the fragment that support window magnification feature
@@ -130,7 +128,6 @@
     }
 
     @Test
-    @Ignore
     public void onResume_defaultStateForFollowingTyping_switchPreferenceShouldReturnTrue() {
         setKeyFollowTypingEnabled(true);
 
@@ -144,7 +141,6 @@
     }
 
     @Test
-    @Ignore
     public void onResume_disableFollowingTyping_switchPreferenceShouldReturnFalse() {
         setKeyFollowTypingEnabled(false);
 
@@ -158,7 +154,6 @@
     }
 
     @Test
-    @Ignore
     public void onResume_haveRegisterToSpecificUris() {
         ShadowContentResolver shadowContentResolver = Shadows.shadowOf(
                 mContext.getContentResolver());
@@ -187,7 +182,6 @@
     }
 
     @Test
-    @Ignore
     public void hasValueInSettings_putValue_hasValue() {
         setMagnificationTripleTapEnabled(/* enabled= */ true);
 
@@ -196,7 +190,6 @@
     }
 
     @Test
-    @Ignore
     public void optInAllValuesToSettings_optInValue_haveMatchString() {
         int shortcutTypes = UserShortcutType.SOFTWARE | UserShortcutType.TRIPLETAP;
 
@@ -210,7 +203,6 @@
     }
 
     @Test
-    @Ignore
     public void optInAllValuesToSettings_existOtherValue_optInValue_haveMatchString() {
         putStringIntoSettings(SOFTWARE_SHORTCUT_KEY, PLACEHOLDER_COMPONENT_NAME.flattenToString());
 
@@ -222,7 +214,6 @@
     }
 
     @Test
-    @Ignore
     public void optInAllValuesToSettings_software_sizeValueIsNull_putLargeSizeValue() {
         ShadowSettings.ShadowSecure.reset();
 
@@ -236,7 +227,6 @@
     }
 
     @Test
-    @Ignore
     public void optInAllValuesToSettings_software_sizeValueIsNotNull_sizeValueIsNotChanged() {
         for (int size : new int[] {FloatingMenuSizePreferenceController.Size.LARGE,
                 FloatingMenuSizePreferenceController.Size.SMALL}) {
@@ -255,7 +245,6 @@
     }
 
     @Test
-    @Ignore
     public void optInAllValuesToSettings_hardware_sizeValueIsNotChanged() {
         for (int size : new int[] {FloatingMenuSizePreferenceController.Size.UNKNOWN,
                 FloatingMenuSizePreferenceController.Size.LARGE,
@@ -274,7 +263,6 @@
     }
 
     @Test
-    @Ignore
     public void optInAllValuesToSettings_tripletap_sizeValueIsNotChanged() {
         for (int size : new int[] {FloatingMenuSizePreferenceController.Size.UNKNOWN,
                 FloatingMenuSizePreferenceController.Size.LARGE,
@@ -293,7 +281,6 @@
     }
 
     @Test
-    @Ignore
     public void optOutAllValuesToSettings_optOutValue_emptyString() {
         putStringIntoSettings(SOFTWARE_SHORTCUT_KEY, MAGNIFICATION_CONTROLLER_NAME);
         putStringIntoSettings(HARDWARE_SHORTCUT_KEY, MAGNIFICATION_CONTROLLER_NAME);
@@ -310,7 +297,6 @@
     }
 
     @Test
-    @Ignore
     public void optOutValueFromSettings_existOtherValue_optOutValue_haveMatchString() {
         putStringIntoSettings(SOFTWARE_SHORTCUT_KEY,
                 PLACEHOLDER_COMPONENT_NAME.flattenToString() + ":" + MAGNIFICATION_CONTROLLER_NAME);
@@ -328,7 +314,6 @@
     }
 
     @Test
-    @Ignore
     public void updateShortcutPreferenceData_assignDefaultValueToVariable() {
         mFragController.create(R.id.main_content, /* bundle= */ null).start().resume();
 
@@ -341,7 +326,6 @@
     }
 
     @Test
-    @Ignore
     public void updateShortcutPreferenceData_hasValueInSettings_assignToVariable() {
         putStringIntoSettings(SOFTWARE_SHORTCUT_KEY, MAGNIFICATION_CONTROLLER_NAME);
         setMagnificationTripleTapEnabled(/* enabled= */ true);
@@ -355,7 +339,6 @@
     }
 
     @Test
-    @Ignore
     public void updateShortcutPreferenceData_hasValueInSharedPreference_assignToVariable() {
         final PreferredShortcut tripleTapShortcut = new PreferredShortcut(
                 MAGNIFICATION_CONTROLLER_NAME, UserShortcutType.TRIPLETAP);
@@ -370,7 +353,6 @@
     }
 
     @Test
-    @Ignore
     public void setupMagnificationEditShortcutDialog_shortcutPreferenceOff_checkboxIsEmptyValue() {
         ToggleScreenMagnificationPreferenceFragment fragment =
                 mFragController.create(R.id.main_content, /* bundle= */
@@ -386,7 +368,6 @@
     }
 
     @Test
-    @Ignore
     public void setupMagnificationEditShortcutDialog_shortcutPreferenceOn_checkboxIsSavedValue() {
         ToggleScreenMagnificationPreferenceFragment fragment =
                 mFragController.create(R.id.main_content, /* bundle= */
@@ -407,7 +388,6 @@
     }
 
     @Test
-    @Ignore
     public void restoreValueFromSavedInstanceState_assignToVariable() {
         final Bundle fragmentState = createFragmentSavedInstanceState(
                 UserShortcutType.HARDWARE | UserShortcutType.TRIPLETAP);
@@ -429,7 +409,6 @@
     }
 
     @Test
-    @Ignore
     public void onCreateView_magnificationAreaNotSupported_settingsPreferenceIsNull() {
         setWindowMagnificationSupported(
                 /* magnificationAreaSupported= */ false,
@@ -441,7 +420,6 @@
     }
 
     @Test
-    @Ignore
     public void onCreateView_windowMagnificationNotSupported_settingsPreferenceIsNull() {
         setWindowMagnificationSupported(
                 /* magnificationAreaSupported= */ true,
@@ -453,7 +431,6 @@
     }
 
     @Test
-    @Ignore
     public void onCreateView_setDialogDelegateAndAddTheControllerToLifeCycleObserver() {
         Correspondence instanceOf = Correspondence.transforming(
                 observer -> (observer instanceof MagnificationModePreferenceController),
@@ -471,7 +448,6 @@
     }
 
     @Test
-    @Ignore
     public void onCreateDialog_setDialogDelegate_invokeDialogDelegate() {
         ToggleScreenMagnificationPreferenceFragment fragment =
                 mFragController.create(
@@ -488,7 +464,6 @@
     }
 
     @Test
-    @Ignore
     public void getMetricsCategory_returnsCorrectCategory() {
         ToggleScreenMagnificationPreferenceFragment fragment =
                 mFragController.create(
@@ -499,7 +474,6 @@
     }
 
     @Test
-    @Ignore
     public void getHelpResource_returnsCorrectHelpResource() {
         ToggleScreenMagnificationPreferenceFragment fragment =
                 mFragController.create(
@@ -509,7 +483,6 @@
     }
 
     @Test
-    @Ignore
     public void onProcessArguments_defaultArgumentUnavailable_shouldSetDefaultArguments() {
         ToggleScreenMagnificationPreferenceFragment fragment =
                 mFragController.create(
@@ -524,7 +497,6 @@
     }
 
     @Test
-    @Ignore
     public void getSummary_magnificationEnabled_returnShortcutOnWithSummary() {
         setMagnificationTripleTapEnabled(true);
 
@@ -535,7 +507,6 @@
     }
 
     @Test
-    @Ignore
     public void getSummary_magnificationDisabled_returnShortcutOffWithSummary() {
         setMagnificationTripleTapEnabled(false);