summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Kiyoung Kim <kiyoungkim@google.com> 2018-12-27 14:29:54 +0900
committer Kiyoung Kim <kiyoungkim@google.com> 2019-02-12 02:58:22 +0000
commit1470f025f580330d1db941f5de27f0a65358aa2a (patch)
treea7b4f12e9f7318e24277046b69f0a6f6825afeab
parentdb5c59214ffa767d6494c98d8c90347f2bda2130 (diff)
Schematize ADB system properties
Properties accessed across partitions are now schematized and will become APIs to make explicit interfaces among partitions. Bug: 117924132 Test: m -j Change-Id: I654c0e1f234d097a66f79ba8c019b8bebc794816 Merged-In: I654c0e1f234d097a66f79ba8c019b8bebc794816
-rw-r--r--services/usb/java/com/android/server/usb/UsbDeviceManager.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/usb/java/com/android/server/usb/UsbDeviceManager.java b/services/usb/java/com/android/server/usb/UsbDeviceManager.java
index 7ea61e30dafe..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,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);