Skip to content

Commit 424781e

Browse files
author
Robert Greenwalt
committed
Fix NPE in ConnectivityService.
If it's configured with a defined network but can't create a network state tracker for it, it would NPE and restart the framework whenever a default network disconnects. bug:5603268 Change-Id: I816c4f522d766e0353a713623f6635b03395b01e
1 parent 1f8c621 commit 424781e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

services/java/com/android/server/ConnectivityService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,6 +1597,7 @@ private void tryFailover(int prevNetType) {
15971597
if (checkType == prevNetType) continue;
15981598
if (mNetConfigs[checkType] == null) continue;
15991599
if (!mNetConfigs[checkType].isDefault()) continue;
1600+
if (mNetTrackers[checkType] == null) continue;
16001601

16011602
// Enabling the isAvailable() optimization caused mobile to not get
16021603
// selected if it was in the middle of error handling. Specifically

0 commit comments

Comments
 (0)