OSDN Git Service

Fix erroneous protected-broadcast check
authorMakoto Onuki <omakoto@google.com>
Fri, 30 Mar 2018 23:46:19 +0000 (16:46 -0700)
committerMakoto Onuki <omakoto@google.com>
Fri, 30 Mar 2018 23:49:06 +0000 (16:49 -0700)
commitb3c3958020567525583c01b8c88cafdb6471d269
tree0a8694ad0f9e6d873e1da7948aeca8f3843d7f7a
parentea3377b4d47cf590548428df230b713231793ea6
Fix erroneous protected-broadcast check

This happens because isPermittedShellBroadcast() is called twice,
one for runtime receivers and the other manifest receivers, and
when SysUI sends a broadcast to its own runtime receiver, another
check also happens for manifest receivers but there's no receivers.

Fixes: 77154348
Test: Manual test with the following steps:
- adb shell dumpsys battery unplug
- adb shell settings delete secure low_power_manual_activation_count
- adb shell settings delete secure low_power_warning_acknowledged
- adb shell settings delete secure suppress_auto_battery_saver
- Then enable battery saver
- Make sure there's no error on logcat.

Change-Id: I9e4305016e10059bd067f06d05433102864b2036
services/core/java/com/android/server/am/ActivityManagerService.java