Remove BatteryFixSlice as it's not used
The BatteryFixSlice hasn't been used for a while, and it's introducing
memory leaks due to a design change at the framework's end. Hence,
remove it.
Bug: 245385410
Test: robotests
Change-Id: I517cab71a32613d5cb5fcd3beb991a24926a2902
Merged-In: I517cab71a32613d5cb5fcd3beb991a24926a2902
(cherry picked from commit e3fcf1f082)
This commit is contained in:
committed by
Yanting Yang
parent
1d04eb6eb7
commit
2f80e073d0
@@ -33,7 +33,6 @@ import android.os.BatteryManager;
|
||||
import android.os.PowerManager;
|
||||
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.homepage.contextualcards.slices.BatteryFixSliceTest;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
@@ -42,7 +41,6 @@ import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.RuntimeEnvironment;
|
||||
import org.robolectric.annotation.Config;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
public class BatteryBroadcastReceiverTest {
|
||||
@@ -77,9 +75,6 @@ public class BatteryBroadcastReceiverTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(shadows = {
|
||||
BatteryFixSliceTest.ShadowBatteryTipLoader.class
|
||||
})
|
||||
public void testOnReceive_batteryLevelChanged_dataUpdated() {
|
||||
mBatteryBroadcastReceiver.onReceive(mContext, mChargingIntent);
|
||||
|
||||
@@ -91,9 +86,6 @@ public class BatteryBroadcastReceiverTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(shadows = {
|
||||
BatteryFixSliceTest.ShadowBatteryTipLoader.class
|
||||
})
|
||||
public void testOnReceive_batteryHealthChanged_dataUpdated() {
|
||||
mChargingIntent
|
||||
.putExtra(BatteryManager.EXTRA_HEALTH, BatteryManager.BATTERY_HEALTH_OVERHEAT);
|
||||
@@ -105,9 +97,6 @@ public class BatteryBroadcastReceiverTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(shadows = {
|
||||
BatteryFixSliceTest.ShadowBatteryTipLoader.class
|
||||
})
|
||||
public void onReceive_batteryNotPresent_shouldShowHelpMessage() {
|
||||
mChargingIntent.putExtra(BatteryManager.EXTRA_PRESENT, false);
|
||||
|
||||
@@ -117,9 +106,6 @@ public class BatteryBroadcastReceiverTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(shadows = {
|
||||
BatteryFixSliceTest.ShadowBatteryTipLoader.class
|
||||
})
|
||||
public void testOnReceive_powerSaveModeChanged_listenerInvoked() {
|
||||
mBatteryBroadcastReceiver.onReceive(mContext,
|
||||
new Intent(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED));
|
||||
@@ -128,9 +114,6 @@ public class BatteryBroadcastReceiverTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(shadows = {
|
||||
BatteryFixSliceTest.ShadowBatteryTipLoader.class
|
||||
})
|
||||
public void testOnReceive_batteryDataNotChanged_listenerNotInvoked() {
|
||||
final String batteryLevel = Utils.getBatteryPercentage(mChargingIntent);
|
||||
final String batteryStatus =
|
||||
@@ -148,9 +131,6 @@ public class BatteryBroadcastReceiverTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(shadows = {
|
||||
BatteryFixSliceTest.ShadowBatteryTipLoader.class
|
||||
})
|
||||
public void testRegister_updateBatteryStatus() {
|
||||
doReturn(mChargingIntent).when(mContext).registerReceiver(any(), any());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user