summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2020-04-21 15:16:43 +0000
committer Lorenzo Colitti <lorenzo@google.com> 2020-04-22 06:59:12 +0000
commitd07c007d8980660656750b8c4fa02dd3d6ab5cfd (patch)
treec602faf2eb69eb344feb38205e0d7da53d043a1d
parentf21e3a96d32d502324b23a9d812c0bd3a2d4467b (diff)
Retry the call that fetches the tethering offload HAL.
The CL that moved the initialization of the tethering offload config HAL from C++ to Java caused the code not to retry fetching the service if it is not ready when tethering is started. This is because the C++ version of getService() retries, but the Java version only retries if getService(true) is called. Make the new code retry as well. b/152430668#comment4 asserts that the fetch will be retried only if the service is installed on the device, so the retries should be attempted (and thus should not have any startup time impact) on devices that do not support tethering offload. Bug: 152430668 Test: builds, boots, tethering offload works Merged-In: I093f127d90b2aa1b13eb0748378a24726d419472 Change-Id: I093f127d90b2aa1b13eb0748378a24726d419472
-rw-r--r--packages/Tethering/src/com/android/networkstack/tethering/OffloadHardwareInterface.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/Tethering/src/com/android/networkstack/tethering/OffloadHardwareInterface.java b/packages/Tethering/src/com/android/networkstack/tethering/OffloadHardwareInterface.java
index 85a23fb83fb2..55344fc75d65 100644
--- a/packages/Tethering/src/com/android/networkstack/tethering/OffloadHardwareInterface.java
+++ b/packages/Tethering/src/com/android/networkstack/tethering/OffloadHardwareInterface.java
@@ -142,7 +142,7 @@ public class OffloadHardwareInterface {
public boolean initOffloadConfig() {
IOffloadConfig offloadConfig;
try {
- offloadConfig = IOffloadConfig.getService();
+ offloadConfig = IOffloadConfig.getService(true /*retry*/);
} catch (RemoteException e) {
mLog.e("getIOffloadConfig error " + e);
return false;