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: Iec37f5f35b1452afdf7b15e9f31c4b4726127065
This commit is contained in:
Kiyoung Kim
2018-12-27 14:31:48 +09:00
parent 45f4f49ace
commit 37bd3482ca
2 changed files with 11 additions and 16 deletions

View File

@@ -22,6 +22,7 @@ import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemProperties;
import android.os.UserManager;
import android.sysprop.AdbProperties;
import android.text.TextUtils;
import android.util.Log;
@@ -39,9 +40,6 @@ public class ClearAdbKeysPreferenceController extends DeveloperOptionsPreference
private static final String TAG = "ClearAdbPrefCtrl";
private static final String CLEAR_ADB_KEYS = "clear_adb_keys";
@VisibleForTesting
static final String RO_ADB_SECURE_PROPERTY_KEY = "ro.adb.secure";
private final IAdbManager mAdbManager;
private final DevelopmentSettingsDashboardFragment mFragment;
@@ -55,7 +53,7 @@ public class ClearAdbKeysPreferenceController extends DeveloperOptionsPreference
@Override
public boolean isAvailable() {
return SystemProperties.getBoolean(RO_ADB_SECURE_PROPERTY_KEY, false /* default */);
return AdbProperties.secure().orElse(false);
}
@Override