Loading services/core/java/com/android/server/adb/AdbDebuggingManager.java +5 −19 Original line number Diff line number Diff line Loading @@ -72,7 +72,6 @@ import com.android.internal.messages.nano.SystemMessageProto.SystemMessage; import com.android.internal.util.FrameworkStatsLog; import com.android.internal.util.dump.DualDumpOutputStream; import com.android.server.FgThread; import com.android.server.adb.AdbDebuggingManager.AdbDebuggingThread.OnConnectionCallback; import java.io.File; import java.io.IOException; Loading Loading @@ -220,11 +219,6 @@ public class AdbDebuggingManager { @VisibleForTesting static class AdbDebuggingThread extends Thread { interface OnConnectionCallback { void onConnected(AdbDebuggingThread thread); } private final OnConnectionCallback mOnConnectionCallback; private LocalSocket mSocket; private OutputStream mOutputStream; private InputStream mInputStream; Loading @@ -233,9 +227,8 @@ public class AdbDebuggingManager { private boolean mConnected = false; @VisibleForTesting AdbDebuggingThread(OnConnectionCallback onConnectionCallback) { AdbDebuggingThread() { super(TAG); mOnConnectionCallback = onConnectionCallback; } @VisibleForTesting Loading @@ -252,7 +245,6 @@ public class AdbDebuggingManager { mConnected = false; openSocketLocked(); mConnected = true; mOnConnectionCallback.onConnected(this); } listenToSocket(); Loading Loading @@ -604,7 +596,7 @@ public class AdbDebuggingManager { AdbDebuggingHandler(Looper looper, AdbDebuggingThread thread) { super(looper); if (thread == null) { thread = new AdbDebuggingThread(new StartAdbWifiConnectionCallback()); thread = new AdbDebuggingThread(); thread.setHandler(this); } mThread = thread; Loading Loading @@ -967,6 +959,9 @@ public class AdbDebuggingManager { if (mAdbWifiEnabled) { // In scenarios where adbd is restarted, the tls port may change. startTLSPortPoller(); if (wifiLifeCycleOverAdbdauthSupported()) { mThread.sendResponse(MSG_START_ADB_WIFI); } } } case MSG_ADBD_SOCKET_DISCONNECTED -> { Loading Loading @@ -1567,13 +1562,4 @@ public class AdbDebuggingManager { interface Ticker { long currentTimeMillis(); } private class StartAdbWifiConnectionCallback implements OnConnectionCallback { @Override public void onConnected(AdbDebuggingThread thread) { if (isAdbWifiEnabled() && wifiLifeCycleOverAdbdauthSupported()) { thread.sendResponse(MSG_START_ADB_WIFI); } } } } services/tests/servicestests/src/com/android/server/adb/AdbDebuggingManagerTest.java +0 −4 Original line number Diff line number Diff line Loading @@ -1175,10 +1175,6 @@ public final class AdbDebuggingManagerTest { * indicating whether the key should be allowed to connect. */ private class AdbDebuggingThreadTest extends AdbDebuggingManager.AdbDebuggingThread { AdbDebuggingThreadTest() { super(thread -> {}); } @Override public void sendResponse(String msg) { TestResult result = new TestResult(TestResult.RESULT_RESPONSE_RECEIVED, msg); Loading Loading
services/core/java/com/android/server/adb/AdbDebuggingManager.java +5 −19 Original line number Diff line number Diff line Loading @@ -72,7 +72,6 @@ import com.android.internal.messages.nano.SystemMessageProto.SystemMessage; import com.android.internal.util.FrameworkStatsLog; import com.android.internal.util.dump.DualDumpOutputStream; import com.android.server.FgThread; import com.android.server.adb.AdbDebuggingManager.AdbDebuggingThread.OnConnectionCallback; import java.io.File; import java.io.IOException; Loading Loading @@ -220,11 +219,6 @@ public class AdbDebuggingManager { @VisibleForTesting static class AdbDebuggingThread extends Thread { interface OnConnectionCallback { void onConnected(AdbDebuggingThread thread); } private final OnConnectionCallback mOnConnectionCallback; private LocalSocket mSocket; private OutputStream mOutputStream; private InputStream mInputStream; Loading @@ -233,9 +227,8 @@ public class AdbDebuggingManager { private boolean mConnected = false; @VisibleForTesting AdbDebuggingThread(OnConnectionCallback onConnectionCallback) { AdbDebuggingThread() { super(TAG); mOnConnectionCallback = onConnectionCallback; } @VisibleForTesting Loading @@ -252,7 +245,6 @@ public class AdbDebuggingManager { mConnected = false; openSocketLocked(); mConnected = true; mOnConnectionCallback.onConnected(this); } listenToSocket(); Loading Loading @@ -604,7 +596,7 @@ public class AdbDebuggingManager { AdbDebuggingHandler(Looper looper, AdbDebuggingThread thread) { super(looper); if (thread == null) { thread = new AdbDebuggingThread(new StartAdbWifiConnectionCallback()); thread = new AdbDebuggingThread(); thread.setHandler(this); } mThread = thread; Loading Loading @@ -967,6 +959,9 @@ public class AdbDebuggingManager { if (mAdbWifiEnabled) { // In scenarios where adbd is restarted, the tls port may change. startTLSPortPoller(); if (wifiLifeCycleOverAdbdauthSupported()) { mThread.sendResponse(MSG_START_ADB_WIFI); } } } case MSG_ADBD_SOCKET_DISCONNECTED -> { Loading Loading @@ -1567,13 +1562,4 @@ public class AdbDebuggingManager { interface Ticker { long currentTimeMillis(); } private class StartAdbWifiConnectionCallback implements OnConnectionCallback { @Override public void onConnected(AdbDebuggingThread thread) { if (isAdbWifiEnabled() && wifiLifeCycleOverAdbdauthSupported()) { thread.sendResponse(MSG_START_ADB_WIFI); } } } }
services/tests/servicestests/src/com/android/server/adb/AdbDebuggingManagerTest.java +0 −4 Original line number Diff line number Diff line Loading @@ -1175,10 +1175,6 @@ public final class AdbDebuggingManagerTest { * indicating whether the key should be allowed to connect. */ private class AdbDebuggingThreadTest extends AdbDebuggingManager.AdbDebuggingThread { AdbDebuggingThreadTest() { super(thread -> {}); } @Override public void sendResponse(String msg) { TestResult result = new TestResult(TestResult.RESULT_RESPONSE_RECEIVED, msg); Loading