Skip to content

Commit 57a6e14

Browse files
jsharkeyAndroid (Google) Code Review
authored andcommitted
Merge "Clear identity when checking if bandwidth enabled."
2 parents 9ae1b69 + 49c1d17 commit 57a6e14

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)