Merge "Log and skip noteEvent calls with null name" into sc-dev am: 0e1ba5a342
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15419007 Change-Id: I68ee3667b725ca893ad4cdb8f88f6f160143f0a6
This commit is contained in:
committed by
Automerger Merge Worker
commit
b7b6ea7dcd
@@ -841,6 +841,12 @@ public final class BatteryStatsService extends IBatteryStats.Stub
|
|||||||
|
|
||||||
public void noteEvent(final int code, final String name, final int uid) {
|
public void noteEvent(final int code, final String name, final int uid) {
|
||||||
enforceCallingPermission();
|
enforceCallingPermission();
|
||||||
|
if (name == null) {
|
||||||
|
// TODO(b/194733136): Replace with an IllegalArgumentException throw.
|
||||||
|
Slog.wtfStack(TAG, "noteEvent called with null name. code = " + code);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
final long elapsedRealtime = SystemClock.elapsedRealtime();
|
final long elapsedRealtime = SystemClock.elapsedRealtime();
|
||||||
final long uptime = SystemClock.uptimeMillis();
|
final long uptime = SystemClock.uptimeMillis();
|
||||||
|
|||||||
Reference in New Issue
Block a user