From a09574a1dbe0a99eeed8b59cf92d05d8ee8e680d Mon Sep 17 00:00:00 2001 From: Quang Anh Luong Date: Fri, 14 Feb 2025 16:54:52 +0900 Subject: [PATCH] no-op: use stopTetheringInternal when restarting tethering on start startTethering will sometimes restart tethering if there is an existing request of the same type but with different contents. This call is equivalent to stopTetheringInternal, so use that instead for simplicity. Bug: 216524590 Test: covered by existing tests Change-Id: I224c10557c2348e2d2f971e1e3ecb11ae346d2cf --- .../src/com/android/networkstack/tethering/Tethering.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Tethering/src/com/android/networkstack/tethering/Tethering.java b/Tethering/src/com/android/networkstack/tethering/Tethering.java index 56185e6c47..e37c5db55b 100644 --- a/Tethering/src/com/android/networkstack/tethering/Tethering.java +++ b/Tethering/src/com/android/networkstack/tethering/Tethering.java @@ -708,8 +708,7 @@ public class Tethering { // If tethering is already enabled with a different request, // disable before re-enabling. if (unfinishedRequest != null && !unfinishedRequest.equalsIgnoreUidPackage(request)) { - enableTetheringInternal(false /* disabled */, unfinishedRequest, null); - mEntitlementMgr.stopProvisioningIfNeeded(type); + stopTetheringInternal(type); } mPendingTetheringRequests.put(type, request);