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:
@@ -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
|
||||
|
Reference in New Issue
Block a user