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
This commit is contained in:
Kiyoung Kim
2018-12-27 17:17:46 +09:00
parent 5f08027714
commit d8849f0351

View File

@@ -31,6 +31,7 @@ import android.os.RemoteException;
import android.os.SystemProperties;
import android.provider.Settings;
import android.service.adb.AdbServiceDumpProto;
import android.sysprop.AdbProperties;
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.Slog;
@@ -185,7 +186,7 @@ public class AdbService extends IAdbManager.Stub {
mContext = context;
mContentResolver = context.getContentResolver();
boolean secureAdbEnabled = SystemProperties.getBoolean("ro.adb.secure", false);
boolean secureAdbEnabled = AdbProperties.secure().orElse(false);
boolean dataEncrypted = "1".equals(SystemProperties.get("vold.decrypt"));
if (secureAdbEnabled && !dataEncrypted) {
mDebuggingManager = new AdbDebuggingManager(context);