From f05b4475cd9e8a24ce5ffcce279d620133069466 Mon Sep 17 00:00:00 2001 From: Mark Chien Date: Tue, 7 Nov 2023 08:25:50 +0000 Subject: [PATCH] Remove unnecessary dropShellPermissionIdentity The test doesn't explicitly call adoptShellPermissionIdentity anymore. Instead it use runAsShell everywhere. Remove the dead code. Bug: 254183718 Change-Id: Ia949e0e315a3b3ae915752e95ef9fe896fdc0f5b Test: TH --- .../base/android/net/EthernetTetheringTestBase.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/Tethering/tests/integration/base/android/net/EthernetTetheringTestBase.java b/Tethering/tests/integration/base/android/net/EthernetTetheringTestBase.java index 1c4a6629d1..377da91ca4 100644 --- a/Tethering/tests/integration/base/android/net/EthernetTetheringTestBase.java +++ b/Tethering/tests/integration/base/android/net/EthernetTetheringTestBase.java @@ -146,8 +146,6 @@ public abstract class EthernetTetheringTestBase { private final TetheringManager mTm = mContext.getSystemService(TetheringManager.class); private final PackageManager mPackageManager = mContext.getPackageManager(); private final CtsNetUtils mCtsNetUtils = new CtsNetUtils(mContext); - private final UiAutomation mUiAutomation = - InstrumentationRegistry.getInstrumentation().getUiAutomation(); // Late initialization in setUp() private boolean mRunTests; @@ -276,7 +274,6 @@ public abstract class EthernetTetheringTestBase { } finally { mHandlerThread.quitSafely(); mHandlerThread.join(); - mUiAutomation.dropShellPermissionIdentity(); } }