Loading services/core/java/com/android/server/testharness/TestHarnessModeService.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.content.Context; import android.content.Intent; import android.content.Intent; import android.content.pm.UserInfo; import android.content.pm.UserInfo; import android.debug.AdbManagerInternal; import android.debug.AdbManagerInternal; import android.debug.AdbTransportType; import android.location.LocationManager; import android.location.LocationManager; import android.os.BatteryManager; import android.os.BatteryManager; import android.os.Binder; import android.os.Binder; Loading Loading @@ -164,6 +165,10 @@ public class TestHarnessModeService extends SystemService { // Stop ADB before we enable it, otherwise on userdebug/eng builds, the keys won't have // Stop ADB before we enable it, otherwise on userdebug/eng builds, the keys won't have // registered with adbd, and it will prompt the user to confirm the keys. // registered with adbd, and it will prompt the user to confirm the keys. Settings.Global.putInt(cr, Settings.Global.ADB_ENABLED, 0); Settings.Global.putInt(cr, Settings.Global.ADB_ENABLED, 0); AdbManagerInternal adbManager = LocalServices.getService(AdbManagerInternal.class); if (adbManager.isAdbEnabled(AdbTransportType.USB)) { adbManager.stopAdbdForTransport(AdbTransportType.USB); } // Disable the TTL for ADB keys before enabling ADB // Disable the TTL for ADB keys before enabling ADB Settings.Global.putLong(cr, Settings.Global.ADB_ALLOWED_CONNECTION_TIME, 0); Settings.Global.putLong(cr, Settings.Global.ADB_ALLOWED_CONNECTION_TIME, 0); Loading Loading
services/core/java/com/android/server/testharness/TestHarnessModeService.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.content.Context; import android.content.Intent; import android.content.Intent; import android.content.pm.UserInfo; import android.content.pm.UserInfo; import android.debug.AdbManagerInternal; import android.debug.AdbManagerInternal; import android.debug.AdbTransportType; import android.location.LocationManager; import android.location.LocationManager; import android.os.BatteryManager; import android.os.BatteryManager; import android.os.Binder; import android.os.Binder; Loading Loading @@ -164,6 +165,10 @@ public class TestHarnessModeService extends SystemService { // Stop ADB before we enable it, otherwise on userdebug/eng builds, the keys won't have // Stop ADB before we enable it, otherwise on userdebug/eng builds, the keys won't have // registered with adbd, and it will prompt the user to confirm the keys. // registered with adbd, and it will prompt the user to confirm the keys. Settings.Global.putInt(cr, Settings.Global.ADB_ENABLED, 0); Settings.Global.putInt(cr, Settings.Global.ADB_ENABLED, 0); AdbManagerInternal adbManager = LocalServices.getService(AdbManagerInternal.class); if (adbManager.isAdbEnabled(AdbTransportType.USB)) { adbManager.stopAdbdForTransport(AdbTransportType.USB); } // Disable the TTL for ADB keys before enabling ADB // Disable the TTL for ADB keys before enabling ADB Settings.Global.putLong(cr, Settings.Global.ADB_ALLOWED_CONNECTION_TIME, 0); Settings.Global.putLong(cr, Settings.Global.ADB_ALLOWED_CONNECTION_TIME, 0); Loading