Skip to content

Commit 49c1d17

Browse files
committed
Clear identity when checking if bandwidth enabled.
Change-Id: I0f10f86dc14483e29609057c671454b322da4826
1 parent 81d9433 commit 49c1d17

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

services/java/com/android/server/net/NetworkStatsService.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,11 +1050,14 @@ private void assertBandwidthControlEnabled() {
10501050
}
10511051

10521052
private boolean isBandwidthControlEnabled() {
1053+
final long token = Binder.clearCallingIdentity();
10531054
try {
10541055
return mNetworkManager.isBandwidthControlEnabled();
10551056
} catch (RemoteException e) {
10561057
// ignored; service lives in system_server
10571058
return false;
1059+
} finally {
1060+
Binder.restoreCallingIdentity(token);
10581061
}
10591062
}
10601063

0 commit comments

Comments
 (0)