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

Commit 9e74581c authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Schematize ADB system properties"

parents 3e141a27 1470f025
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ import android.os.storage.StorageVolume;
import android.provider.Settings;
import android.service.usb.UsbDeviceManagerProto;
import android.service.usb.UsbHandlerProto;
import android.sysprop.AdbProperties;
import android.sysprop.VoldProperties;
import android.util.Pair;
import android.util.Slog;
@@ -285,7 +286,7 @@ public class UsbDeviceManager implements ActivityManagerInternal.ScreenObserver
        }
        mControlFds.put(UsbManager.FUNCTION_PTP, ptpFd);

        boolean secureAdbEnabled = SystemProperties.getBoolean("ro.adb.secure", false);
        boolean secureAdbEnabled = AdbProperties.secure().orElse(false);
        boolean dataEncrypted = "1".equals(VoldProperties.decrypt().orElse(""));
        if (secureAdbEnabled && !dataEncrypted) {
            mDebuggingManager = new UsbDebuggingManager(context);