diff --git a/tests/robotests/src/com/android/settings/testutils/shadow/SettingsShadowResources.java b/tests/robotests/src/com/android/settings/testutils/shadow/SettingsShadowResources.java
index a68c5d38bac..bd21cdc3cb3 100644
--- a/tests/robotests/src/com/android/settings/testutils/shadow/SettingsShadowResources.java
+++ b/tests/robotests/src/com/android/settings/testutils/shadow/SettingsShadowResources.java
@@ -30,18 +30,12 @@ import org.robolectric.android.XmlResourceParserImpl;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.RealObject;
-import org.robolectric.res.StyleData;
-import org.robolectric.res.StyleResolver;
-import org.robolectric.res.ThemeStyleSet;
import org.robolectric.shadows.ShadowAssetManager;
import org.robolectric.shadows.ShadowResources;
import org.robolectric.util.ReflectionHelpers;
import org.robolectric.util.ReflectionHelpers.ClassParameter;
import org.w3c.dom.Node;
-import java.util.List;
-import java.util.Map;
-
/**
* Shadow Resources and Theme classes to handle resource references that Robolectric shadows cannot
* handle because they are too new or private.
@@ -207,46 +201,10 @@ public class SettingsShadowResources extends ShadowResources {
if (attributeValue.contains("attr/fingerprint_layout_theme")) {
// Workaround for https://github.com/robolectric/robolectric/issues/2641
node.setNodeValue("@style/FingerprintLayoutTheme");
- } else if (attributeValue.startsWith("@*android:string")) {
- node.setNodeValue("PLACEHOLDER");
- } else if (attributeValue.startsWith("@*android:dimen")) {
- node.setNodeValue("321dp");
- } else if (attributeValue.startsWith("@*android:drawable")) {
- node.setNodeValue("");
}
}
}
}
-
- // Track down all styles and remove all inheritance from private styles.
- final Map appliedStylesList =
- ReflectionHelpers.getField(mAssetManager, "nativeThemes");
- synchronized (appliedStylesList) {
- for (Long idx : appliedStylesList.keySet()) {
- final ThemeStyleSet appliedStyles = ReflectionHelpers.getField(
- appliedStylesList.get(idx), "themeStyleSet");
- // The Object's below are actually ShadowAssetManager.OverlayedStyle.
- // We can't use
-
- // it here because it's private.
- final List overlayedStyles =
- ReflectionHelpers.getField(appliedStyles, "styles");
- for (Object appliedStyle : overlayedStyles) {
- final StyleResolver styleResolver = ReflectionHelpers.getField(appliedStyle,
- "style");
- final List styleDatas =
- ReflectionHelpers.getField(styleResolver, "styles");
- for (StyleData styleData : styleDatas) {
- if (styleData.getParent() != null &&
- styleData.getParent().startsWith("@*android:style")) {
- ReflectionHelpers.setField(StyleData.class, styleData, "parent",
- null);
- }
- }
- }
-
- }
- }
return super.obtainStyledAttributes(set, attrs, defStyleAttr, defStyleRes);
}