Merge "Note BATTERY_LEVEL_CHANGED semantics." into tm-dev am: ce680c7636

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18458392

Change-Id: Id2fffe342db1662959fee7093ec66f759f879639
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Kweku Adams
2022-05-20 22:29:39 +00:00
committed by Automerger Merge Worker
2 changed files with 2 additions and 2 deletions

View File

@@ -382,7 +382,7 @@ public class InternalResourceService extends SystemService {
if (increased) { if (increased) {
mAgent.distributeBasicIncomeLocked(newBatteryLevel); mAgent.distributeBasicIncomeLocked(newBatteryLevel);
} else if (newBatteryLevel == mCurrentBatteryLevel) { } else if (newBatteryLevel == mCurrentBatteryLevel) {
Slog.wtf(TAG, "Battery level stayed the same"); // The broadcast is also sent when the plug type changes...
return; return;
} }
mCurrentBatteryLevel = newBatteryLevel; mCurrentBatteryLevel = newBatteryLevel;

View File

@@ -3259,7 +3259,7 @@ public class Intent implements Parcelable, Cloneable {
/** /**
* Broadcast Action: Sent when the current battery level changes. * Broadcast Action: Sent when the current battery level or plug type changes.
* *
* It has {@link android.os.BatteryManager#EXTRA_EVENTS} that carries a list of {@link Bundle} * It has {@link android.os.BatteryManager#EXTRA_EVENTS} that carries a list of {@link Bundle}
* instances representing individual battery level changes with associated * instances representing individual battery level changes with associated