Merge "Unbreak tethering for no offload supported devices" into rvc-dev am: 48a2ffac38 am: 3613937137 am: eabfad6bfd
Change-Id: Ib3d04c521dc773d2bfc9e52050190786f0708466
diff --git a/Tethering/src/com/android/networkstack/tethering/OffloadHardwareInterface.java b/Tethering/src/com/android/networkstack/tethering/OffloadHardwareInterface.java
index 55344fc..c4a1078 100644
--- a/Tethering/src/com/android/networkstack/tethering/OffloadHardwareInterface.java
+++ b/Tethering/src/com/android/networkstack/tethering/OffloadHardwareInterface.java
@@ -41,6 +41,7 @@
import java.net.SocketAddress;
import java.net.SocketException;
import java.util.ArrayList;
+import java.util.NoSuchElementException;
/**
@@ -143,7 +144,7 @@
IOffloadConfig offloadConfig;
try {
offloadConfig = IOffloadConfig.getService(true /*retry*/);
- } catch (RemoteException e) {
+ } catch (RemoteException | NoSuchElementException e) {
mLog.e("getIOffloadConfig error " + e);
return false;
}
@@ -239,8 +240,8 @@
if (mOffloadControl == null) {
try {
- mOffloadControl = IOffloadControl.getService();
- } catch (RemoteException e) {
+ mOffloadControl = IOffloadControl.getService(true /*retry*/);
+ } catch (RemoteException | NoSuchElementException e) {
mLog.e("tethering offload control not supported: " + e);
return false;
}