diff options
| -rw-r--r-- | services/usb/java/com/android/server/usb/UsbDeviceManager.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/services/usb/java/com/android/server/usb/UsbDeviceManager.java b/services/usb/java/com/android/server/usb/UsbDeviceManager.java index cb96e9dd0243..da682c6df621 100644 --- a/services/usb/java/com/android/server/usb/UsbDeviceManager.java +++ b/services/usb/java/com/android/server/usb/UsbDeviceManager.java @@ -69,6 +69,8 @@ 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; @@ -284,8 +286,8 @@ public class UsbDeviceManager implements ActivityManagerInternal.ScreenObserver } mControlFds.put(UsbManager.FUNCTION_PTP, ptpFd); - boolean secureAdbEnabled = SystemProperties.getBoolean("ro.adb.secure", false); - boolean dataEncrypted = "1".equals(SystemProperties.get("vold.decrypt")); + boolean secureAdbEnabled = AdbProperties.secure().orElse(false); + boolean dataEncrypted = "1".equals(VoldProperties.decrypt().orElse("")); if (secureAdbEnabled && !dataEncrypted) { mDebuggingManager = new UsbDebuggingManager(context); } |