Merge "Replace getBatteryIntent() to centralized method"

This commit is contained in:
YK Hung
2023-02-09 06:33:46 +00:00
committed by Android (Google) Code Review

View File

@@ -618,8 +618,7 @@ public class BatteryUtils {
/** Gets the latest sticky battery intent from the Android system. */ /** Gets the latest sticky battery intent from the Android system. */
public static Intent getBatteryIntent(Context context) { public static Intent getBatteryIntent(Context context) {
return context.registerReceiver( return com.android.settingslib.fuelgauge.BatteryUtils.getBatteryIntent(context);
/*receiver=*/ null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
} }
/** Gets the current dock defender mode */ /** Gets the current dock defender mode */