Merge "Remove InterruptedException from NsdService#create"
This commit is contained in:
commit
65a00a1fa5
2 changed files with 3 additions and 7 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -600,7 +600,7 @@ public class NsdService extends INsdManager.Stub {
|
|||
mMDnsEventCallback = new MDnsEventCallback(mNsdStateMachine);
|
||||
}
|
||||
|
||||
public static NsdService create(Context context) throws InterruptedException {
|
||||
public static NsdService create(Context context) {
|
||||
HandlerThread thread = new HandlerThread(TAG);
|
||||
thread.start();
|
||||
Handler handler = new Handler(thread.getLooper());
|
||||
|
|
|
|||
Loading…
Reference in a new issue