diff --git a/src/com/android/settings/fuelgauge/BatteryStatsHelperLoader.java b/src/com/android/settings/fuelgauge/BatteryStatsHelperLoader.java
deleted file mode 100644
index 5de83d3..0000000
--- a/src/com/android/settings/fuelgauge/BatteryStatsHelperLoader.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.settings.fuelgauge;
-
-import android.content.Context;
-import android.os.UserManager;
-
-import androidx.annotation.VisibleForTesting;
-
-import com.android.internal.os.BatteryStatsHelper;
-import com.android.settingslib.utils.AsyncLoaderCompat;
-
-/**
- * Loader to get new {@link BatteryStatsHelper} in the background
- */
-public class BatteryStatsHelperLoader extends AsyncLoaderCompat<BatteryStatsHelper> {
-    @VisibleForTesting
-    UserManager mUserManager;
-    @VisibleForTesting
-    BatteryUtils mBatteryUtils;
-
-    public BatteryStatsHelperLoader(Context context) {
-        super(context);
-        mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE);
-        mBatteryUtils = BatteryUtils.getInstance(context);
-    }
-
-    @Override
-    public BatteryStatsHelper loadInBackground() {
-        Context context = getContext();
-        final BatteryStatsHelper statsHelper = new BatteryStatsHelper(context,
-                true /* collectBatteryBroadcast */);
-        mBatteryUtils.initBatteryStatsHelper(statsHelper, null /* bundle */, mUserManager);
-
-        return statsHelper;
-    }
-
-    @Override
-    protected void onDiscardResult(BatteryStatsHelper result) {
-
-    }
-
-}
diff --git a/src/com/android/settings/fuelgauge/PowerUsageBase.java b/src/com/android/settings/fuelgauge/PowerUsageBase.java
index 29ecedc..28d7715 100644
--- a/src/com/android/settings/fuelgauge/PowerUsageBase.java
+++ b/src/com/android/settings/fuelgauge/PowerUsageBase.java
@@ -29,7 +29,6 @@
 import androidx.loader.app.LoaderManager;
 import androidx.loader.content.Loader;
 
-import com.android.internal.os.BatteryStatsHelper;
 import com.android.settings.dashboard.DashboardFragment;
 
 /**
@@ -44,10 +43,8 @@
     private static final String KEY_REFRESH_TYPE = "refresh_type";
     private static final String KEY_INCLUDE_HISTORY = "include_history";
 
-    private static final int LOADER_BATTERY_STATS_HELPER = 0;
     private static final int LOADER_BATTERY_USAGE_STATS = 1;
 
-    protected BatteryStatsHelper mStatsHelper;
     @VisibleForTesting
     BatteryUsageStats mBatteryUsageStats;
 
@@ -55,12 +52,6 @@
     private BatteryBroadcastReceiver mBatteryBroadcastReceiver;
     protected boolean mIsBatteryPresent = true;
 
-    // TODO(b/180630447): switch to BatteryUsageStatsLoader and remove all references to
-    // BatteryStatsHelper and BatterySipper
-    @VisibleForTesting
-    final BatteryStatsHelperLoaderCallbacks mBatteryStatsHelperLoaderCallbacks =
-            new BatteryStatsHelperLoaderCallbacks();
-
     @VisibleForTesting
     final BatteryUsageStatsLoaderCallbacks mBatteryUsageStatsLoaderCallbacks =
             new BatteryUsageStatsLoaderCallbacks();
@@ -69,13 +60,11 @@
     public void onAttach(Activity activity) {
         super.onAttach(activity);
         mUm = (UserManager) activity.getSystemService(Context.USER_SERVICE);
-        mStatsHelper = new BatteryStatsHelper(activity, true);
     }
 
     @Override
     public void onCreate(Bundle icicle) {
         super.onCreate(icicle);
-        mStatsHelper.create(icicle);
         setHasOptionsMenu(true);
 
         mBatteryBroadcastReceiver = new BatteryBroadcastReceiver(getContext());
@@ -103,18 +92,11 @@
         final Bundle bundle = new Bundle();
         bundle.putInt(KEY_REFRESH_TYPE, refreshType);
         bundle.putBoolean(KEY_INCLUDE_HISTORY, isBatteryHistoryNeeded());
-        getLoaderManager().restartLoader(LOADER_BATTERY_STATS_HELPER, bundle,
-                mBatteryStatsHelperLoaderCallbacks);
         getLoaderManager().restartLoader(LOADER_BATTERY_USAGE_STATS, bundle,
                 mBatteryUsageStatsLoaderCallbacks);
     }
 
     private void onLoadFinished(@BatteryUpdateType int refreshType) {
-        // Wait for both loaders to finish before proceeding.
-        if (mStatsHelper == null || mBatteryUsageStats == null) {
-            return;
-        }
-
         refreshUi(refreshType);
     }
 
@@ -127,28 +109,6 @@
         BatteryUtils.logRuntime(TAG, "updatePreference", startTime);
     }
 
-    private class BatteryStatsHelperLoaderCallbacks
-            implements LoaderManager.LoaderCallbacks<BatteryStatsHelper> {
-        private int mRefreshType;
-
-        @Override
-        public Loader<BatteryStatsHelper> onCreateLoader(int id, Bundle args) {
-            mRefreshType = args.getInt(KEY_REFRESH_TYPE);
-            return new BatteryStatsHelperLoader(getContext());
-        }
-
-        @Override
-        public void onLoadFinished(Loader<BatteryStatsHelper> loader,
-                BatteryStatsHelper batteryHelper) {
-            mStatsHelper = batteryHelper;
-            PowerUsageBase.this.onLoadFinished(mRefreshType);
-        }
-
-        @Override
-        public void onLoaderReset(Loader<BatteryStatsHelper> loader) {
-        }
-    }
-
     private class BatteryUsageStatsLoaderCallbacks
             implements LoaderManager.LoaderCallbacks<BatteryUsageStats> {
         private int mRefreshType;
diff --git a/tests/robotests/src/com/android/settings/accounts/AvatarViewMixinTest.java b/tests/robotests/src/com/android/settings/accounts/AvatarViewMixinTest.java
index 02b318f..534d3c6 100644
--- a/tests/robotests/src/com/android/settings/accounts/AvatarViewMixinTest.java
+++ b/tests/robotests/src/com/android/settings/accounts/AvatarViewMixinTest.java
@@ -120,7 +120,6 @@
     @Test
     @Config(qualifiers = "mcc999",
             shadows = {
-                    BatteryFixSliceTest.ShadowBatteryStatsHelperLoader.class,
                     BatteryFixSliceTest.ShadowBatteryTipLoader.class
             })
     public void onStart_useMockAvatarViewMixin_shouldBeExecuted() {
diff --git a/tests/robotests/src/com/android/settings/fuelgauge/BatteryBroadcastReceiverTest.java b/tests/robotests/src/com/android/settings/fuelgauge/BatteryBroadcastReceiverTest.java
index a072988..5f08698 100644
--- a/tests/robotests/src/com/android/settings/fuelgauge/BatteryBroadcastReceiverTest.java
+++ b/tests/robotests/src/com/android/settings/fuelgauge/BatteryBroadcastReceiverTest.java
@@ -78,7 +78,6 @@
 
     @Test
     @Config(shadows = {
-            BatteryFixSliceTest.ShadowBatteryStatsHelperLoader.class,
             BatteryFixSliceTest.ShadowBatteryTipLoader.class
     })
     public void testOnReceive_batteryLevelChanged_dataUpdated() {
@@ -93,7 +92,6 @@
 
     @Test
     @Config(shadows = {
-            BatteryFixSliceTest.ShadowBatteryStatsHelperLoader.class,
             BatteryFixSliceTest.ShadowBatteryTipLoader.class
     })
     public void testOnReceive_batteryHealthChanged_dataUpdated() {
@@ -108,7 +106,6 @@
 
     @Test
     @Config(shadows = {
-            BatteryFixSliceTest.ShadowBatteryStatsHelperLoader.class,
             BatteryFixSliceTest.ShadowBatteryTipLoader.class
     })
     public void onReceive_batteryNotPresent_shouldShowHelpMessage() {
@@ -121,7 +118,6 @@
 
     @Test
     @Config(shadows = {
-            BatteryFixSliceTest.ShadowBatteryStatsHelperLoader.class,
             BatteryFixSliceTest.ShadowBatteryTipLoader.class
     })
     public void testOnReceive_powerSaveModeChanged_listenerInvoked() {
@@ -133,7 +129,6 @@
 
     @Test
     @Config(shadows = {
-            BatteryFixSliceTest.ShadowBatteryStatsHelperLoader.class,
             BatteryFixSliceTest.ShadowBatteryTipLoader.class
     })
     public void testOnReceive_batteryDataNotChanged_listenerNotInvoked() {
@@ -154,7 +149,6 @@
 
     @Test
     @Config(shadows = {
-            BatteryFixSliceTest.ShadowBatteryStatsHelperLoader.class,
             BatteryFixSliceTest.ShadowBatteryTipLoader.class
     })
     public void testRegister_updateBatteryStatus() {
diff --git a/tests/robotests/src/com/android/settings/fuelgauge/BatteryStatsHelperLoaderTest.java b/tests/robotests/src/com/android/settings/fuelgauge/BatteryStatsHelperLoaderTest.java
deleted file mode 100644
index 92a3dc0..0000000
--- a/tests/robotests/src/com/android/settings/fuelgauge/BatteryStatsHelperLoaderTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.settings.fuelgauge;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.content.Context;
-import android.net.ConnectivityManager;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.robolectric.RobolectricTestRunner;
-import org.robolectric.RuntimeEnvironment;
-
-@RunWith(RobolectricTestRunner.class)
-public class BatteryStatsHelperLoaderTest {
-    @Mock
-    private BatteryUtils mBatteryUtils;
-    @Mock
-    private ConnectivityManager mConnectivityManager;
-
-    private Context mContext;
-    private BatteryStatsHelperLoader mBatteryStatsHelperLoader;
-
-    @Before
-    public void setUp() {
-        MockitoAnnotations.initMocks(this);
-        mContext = spy(RuntimeEnvironment.application);
-        doReturn(mConnectivityManager).when(mContext).getSystemService(
-                Context.CONNECTIVITY_SERVICE);
-
-        mBatteryStatsHelperLoader = spy(new BatteryStatsHelperLoader(mContext));
-        mBatteryStatsHelperLoader.mBatteryUtils = mBatteryUtils;
-    }
-
-    @Test
-    public void testLoadInBackground_loadWithoutBundle() {
-        when(mBatteryStatsHelperLoader.getContext()).thenReturn(mContext);
-        mBatteryStatsHelperLoader.loadInBackground();
-
-        verify(mBatteryUtils).initBatteryStatsHelper(any(), eq(null), any());
-    }
-}
diff --git a/tests/robotests/src/com/android/settings/fuelgauge/BatteryUsageStatsLoaderTest.java b/tests/robotests/src/com/android/settings/fuelgauge/BatteryUsageStatsLoaderTest.java
new file mode 100644
index 0000000..8c47ff6
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/fuelgauge/BatteryUsageStatsLoaderTest.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.settings.fuelgauge;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.when;
+
+import android.content.Context;
+import android.os.BatteryStatsManager;
+import android.os.BatteryUsageStats;
+import android.os.BatteryUsageStatsQuery;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Captor;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.RobolectricTestRunner;
+import org.robolectric.RuntimeEnvironment;
+
+@RunWith(RobolectricTestRunner.class)
+public class BatteryUsageStatsLoaderTest {
+    private Context mContext;
+    @Mock
+    private BatteryStatsManager mBatteryStatsManager;
+    @Mock
+    private BatteryUsageStats mBatteryUsageStats;
+    @Captor
+    private ArgumentCaptor<BatteryUsageStatsQuery> mUsageStatsQueryCaptor;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mContext = spy(RuntimeEnvironment.application);
+        doReturn(mBatteryStatsManager).when(mContext).getSystemService(
+                Context.BATTERY_STATS_SERVICE);
+    }
+
+    @Test
+    public void testLoadInBackground_loadWithoutHistory() {
+        BatteryUsageStatsLoader loader = new BatteryUsageStatsLoader(
+                mContext, /* includeBatteryHistory */ false);
+
+        when(mBatteryStatsManager.getBatteryUsageStats(mUsageStatsQueryCaptor.capture()))
+                .thenReturn(mBatteryUsageStats);
+
+        loader.loadInBackground();
+
+        final int queryFlags = mUsageStatsQueryCaptor.getValue().getFlags();
+        assertThat(queryFlags
+                & BatteryUsageStatsQuery.FLAG_BATTERY_USAGE_STATS_INCLUDE_HISTORY).isEqualTo(0);
+    }
+
+    @Test
+    public void testLoadInBackground_loadWithHistory() {
+        BatteryUsageStatsLoader loader = new BatteryUsageStatsLoader(
+                mContext, /* includeBatteryHistory */ true);
+
+        when(mBatteryStatsManager.getBatteryUsageStats(mUsageStatsQueryCaptor.capture()))
+                .thenReturn(mBatteryUsageStats);
+
+        loader.loadInBackground();
+
+        final int queryFlags = mUsageStatsQueryCaptor.getValue().getFlags();
+        assertThat(queryFlags
+                & BatteryUsageStatsQuery.FLAG_BATTERY_USAGE_STATS_INCLUDE_HISTORY).isNotEqualTo(0);
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/fuelgauge/PowerUsageBaseTest.java b/tests/robotests/src/com/android/settings/fuelgauge/PowerUsageBaseTest.java
index 8754700..451e605 100644
--- a/tests/robotests/src/com/android/settings/fuelgauge/PowerUsageBaseTest.java
+++ b/tests/robotests/src/com/android/settings/fuelgauge/PowerUsageBaseTest.java
@@ -27,7 +27,6 @@
 
 import androidx.loader.app.LoaderManager;
 
-import com.android.internal.os.BatteryStatsHelper;
 import com.android.settings.testutils.shadow.ShadowDashboardFragment;
 import com.android.settingslib.core.AbstractPreferenceController;
 
@@ -46,8 +45,6 @@
 public class PowerUsageBaseTest {
 
     @Mock
-    private BatteryStatsHelper mBatteryStatsHelper;
-    @Mock
     private LoaderManager mLoaderManager;
     private TestFragment mFragment;
 
@@ -56,7 +53,6 @@
         MockitoAnnotations.initMocks(this);
 
         mFragment = spy(new TestFragment());
-        mFragment.setBatteryStatsHelper(mBatteryStatsHelper);
         doReturn(mLoaderManager).when(mFragment).getLoaderManager();
     }
 
@@ -98,9 +94,5 @@
         protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
             return null;
         }
-
-        private void setBatteryStatsHelper(BatteryStatsHelper batteryStatsHelper) {
-            mStatsHelper = batteryStatsHelper;
-        }
     }
 }
diff --git a/tests/robotests/src/com/android/settings/fuelgauge/PowerUsageSummaryTest.java b/tests/robotests/src/com/android/settings/fuelgauge/PowerUsageSummaryTest.java
index e345ab2..11b6ad2 100644
--- a/tests/robotests/src/com/android/settings/fuelgauge/PowerUsageSummaryTest.java
+++ b/tests/robotests/src/com/android/settings/fuelgauge/PowerUsageSummaryTest.java
@@ -21,7 +21,6 @@
 
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.anyLong;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.doReturn;
@@ -40,8 +39,6 @@
 import androidx.loader.app.LoaderManager;
 import androidx.preference.PreferenceScreen;
 
-import com.android.internal.os.BatterySipper;
-import com.android.internal.os.BatteryStatsHelper;
 import com.android.settings.R;
 import com.android.settings.SettingsActivity;
 import com.android.settings.fuelgauge.batterytip.BatteryTipPreferenceController;
@@ -54,7 +51,6 @@
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Answers;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 import org.robolectric.RobolectricTestRunner;
@@ -62,35 +58,19 @@
 import org.robolectric.annotation.Config;
 import org.robolectric.util.ReflectionHelpers;
 
-import java.util.ArrayList;
 import java.util.List;
 
 // TODO: Improve this test class so that it starts up the real activity and fragment.
 @RunWith(RobolectricTestRunner.class)
 public class PowerUsageSummaryTest {
 
-    private static final int UID = 123;
-    private static final int POWER_MAH = 100;
     private static final long TIME_SINCE_LAST_FULL_CHARGE_MS = 120 * 60 * 1000;
-    private static final long TIME_SINCE_LAST_FULL_CHARGE_US =
-            TIME_SINCE_LAST_FULL_CHARGE_MS * 1000;
-    private static final long USAGE_TIME_MS = 65 * 60 * 1000;
-    private static final double TOTAL_POWER = 200;
     private static Intent sAdditionalBatteryInfoIntent;
 
     @BeforeClass
     public static void beforeClass() {
         sAdditionalBatteryInfoIntent = new Intent("com.example.app.ADDITIONAL_BATTERY_INFO");
     }
-
-    @Mock
-    private BatterySipper mNormalBatterySipper;
-    @Mock
-    private BatterySipper mScreenBatterySipper;
-    @Mock
-    private BatterySipper mCellBatterySipper;
-    @Mock(answer = Answers.RETURNS_DEEP_STUBS)
-    private BatteryStatsHelper mBatteryHelper;
     @Mock
     private SettingsActivity mSettingsActivity;
     @Mock
@@ -104,7 +84,6 @@
     @Mock
     private PreferenceScreen mPreferenceScreen;
 
-    private List<BatterySipper> mUsageList;
     private Context mRealContext;
     private TestFragment mFragment;
     private FakeFeatureFactory mFeatureFactory;
@@ -123,27 +102,6 @@
         when(mFragment.getActivity()).thenReturn(mSettingsActivity);
         when(mFeatureFactory.powerUsageFeatureProvider.getAdditionalBatteryInfoIntent())
                 .thenReturn(sAdditionalBatteryInfoIntent);
-        when(mBatteryHelper.getTotalPower()).thenReturn(TOTAL_POWER);
-        when(mBatteryHelper.getStats().computeBatteryRealtime(anyLong(), anyInt()))
-                .thenReturn(TIME_SINCE_LAST_FULL_CHARGE_US);
-
-        when(mNormalBatterySipper.getUid()).thenReturn(UID);
-        mNormalBatterySipper.totalPowerMah = POWER_MAH;
-        mNormalBatterySipper.drainType = BatterySipper.DrainType.APP;
-
-        mCellBatterySipper.drainType = BatterySipper.DrainType.CELL;
-        mCellBatterySipper.totalPowerMah = POWER_MAH;
-
-        mScreenBatterySipper.drainType = BatterySipper.DrainType.SCREEN;
-        mScreenBatterySipper.usageTimeMs = USAGE_TIME_MS;
-
-        mUsageList = new ArrayList<>();
-        mUsageList.add(mNormalBatterySipper);
-        mUsageList.add(mScreenBatterySipper);
-        mUsageList.add(mCellBatterySipper);
-
-        mFragment.mStatsHelper = mBatteryHelper;
-        when(mBatteryHelper.getUsageList()).thenReturn(mUsageList);
         mFragment.mBatteryUtils = spy(new BatteryUtils(mRealContext));
         ReflectionHelpers.setField(mFragment, "mVisibilityLoggerMixin", mVisibilityLoggerMixin);
         ReflectionHelpers.setField(mFragment, "mBatteryBroadcastReceiver",
diff --git a/tests/robotests/src/com/android/settings/homepage/SettingsHomepageActivityTest.java b/tests/robotests/src/com/android/settings/homepage/SettingsHomepageActivityTest.java
index 40315d2..173f625 100644
--- a/tests/robotests/src/com/android/settings/homepage/SettingsHomepageActivityTest.java
+++ b/tests/robotests/src/com/android/settings/homepage/SettingsHomepageActivityTest.java
@@ -68,7 +68,6 @@
 
     @Test
     @Config(shadows = {
-            BatteryFixSliceTest.ShadowBatteryStatsHelperLoader.class,
             BatteryFixSliceTest.ShadowBatteryTipLoader.class
     })
     public void onStart_isNotDebuggable_shouldHideSystemOverlay() {
@@ -88,7 +87,6 @@
 
     @Test
     @Config(shadows = {
-            BatteryFixSliceTest.ShadowBatteryStatsHelperLoader.class,
             BatteryFixSliceTest.ShadowBatteryTipLoader.class,
     })
     public void onStop_isNotDebuggable_shouldRemoveHideSystemOverlay() {
diff --git a/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/BatteryFixSliceTest.java b/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/BatteryFixSliceTest.java
index d64d098..cffc4d1 100644
--- a/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/BatteryFixSliceTest.java
+++ b/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/BatteryFixSliceTest.java
@@ -30,9 +30,7 @@
 import androidx.slice.SliceProvider;
 import androidx.slice.widget.SliceLiveData;
 
-import com.android.internal.os.BatteryStatsHelper;
 import com.android.settings.R;
-import com.android.settings.fuelgauge.BatteryStatsHelperLoader;
 import com.android.settings.fuelgauge.BatteryUsageStatsLoader;
 import com.android.settings.fuelgauge.batterytip.AppInfo;
 import com.android.settings.fuelgauge.batterytip.BatteryTipLoader;
@@ -137,15 +135,6 @@
         assertThat(ShadowEarlyWarningTip.isIconTintColorIdCalled()).isTrue();
     }
 
-    @Implements(BatteryStatsHelperLoader.class)
-    public static class ShadowBatteryStatsHelperLoader {
-
-        @Implementation
-        protected BatteryStatsHelper loadInBackground() {
-            return null;
-        }
-    }
-
     @Implements(BatteryUsageStatsLoader.class)
     public static class ShadowBatteryUsageStatsLoader {
 
