Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4158fd2 authored by Dmitri Plotnikov's avatar Dmitri Plotnikov
Browse files

Enforce declared permissions on getCellularBatteryStats() and getWifiBatteryStats()

Bug: 188420344
Bug: 188420350
Test: build, flash, presubmit
Change-Id: I8071478f9d9b60e89f32d5b15a0c815bc18a86a5
parent fe788b0b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2499,6 +2499,7 @@ public final class BatteryStatsService extends IBatteryStats.Stub
     * @hide
     */
    public CellularBatteryStats getCellularBatteryStats() {
        enforceCallingPermission();
        // Wait for the completion of pending works if there is any
        awaitCompletion();
        synchronized (mStats) {
@@ -2511,6 +2512,7 @@ public final class BatteryStatsService extends IBatteryStats.Stub
     * @hide
     */
    public WifiBatteryStats getWifiBatteryStats() {
        enforceCallingPermission();
        // Wait for the completion of pending works if there is any
        awaitCompletion();
        synchronized (mStats) {