Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3d7edcd authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Ensure ADB is stopped when enabling Test Harness Mode" into rvc-dev am:...

Merge "Ensure ADB is stopped when enabling Test Harness Mode" into rvc-dev am: e23c8dd1 am: 895775b1 am: b824248f

Change-Id: I48a1664b5fdd2035a7f22cbbfd6d5855af61674d
parents 8843e5fe b824248f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -161,6 +161,10 @@ public class TestHarnessModeService extends SystemService {
    private void configureSettings() {
        ContentResolver cr = getContext().getContentResolver();

        // 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.
        Settings.Global.putInt(cr, Settings.Global.ADB_ENABLED, 0);

        // Disable the TTL for ADB keys before enabling ADB
        Settings.Global.putLong(cr, Settings.Global.ADB_ALLOWED_CONNECTION_TIME, 0);
        Settings.Global.putInt(cr, Settings.Global.ADB_ENABLED, 1);