Remove InterruptedException from NsdService#create
- NsdService isn't using NativeDaemonConnector to connect to mdnsresponder after aosp/2049246, so NsdService#create won't throw InterruptedException. - Also no need to catch InterruptedException in ConnectivityServiceInitializer. Bug: 209894875 Test: atest FrameworksNetTests CtsNetTestCases Merged-In: I1d0b973f9dac0f1d4f9d4d03faef66f05edde3fc Change-Id: I1d0b973f9dac0f1d4f9d4d03faef66f05edde3fc
This commit is contained in:
@@ -123,12 +123,8 @@ public final class ConnectivityServiceInitializer extends SystemService {
|
||||
/** Return NsdService instance or null if current SDK is lower than T */
|
||||
private NsdService createNsdService(final Context context) {
|
||||
if (!SdkLevel.isAtLeastT()) return null;
|
||||
try {
|
||||
return NsdService.create(context);
|
||||
} catch (InterruptedException e) {
|
||||
Log.d(TAG, "Unable to get NSD service", e);
|
||||
return null;
|
||||
}
|
||||
|
||||
return NsdService.create(context);
|
||||
}
|
||||
|
||||
/** Return Nearby service instance or null if current SDK is lower than T */
|
||||
|
||||
Reference in New Issue
Block a user