diff options
2 files changed, 12 insertions, 12 deletions
diff --git a/services/core/java/com/android/server/security/intrusiondetection/IntrusionDetectionEventTransportConnection.java b/services/core/java/com/android/server/security/intrusiondetection/IntrusionDetectionEventTransportConnection.java index 2ddbeab5c8d8..a16e66de09a9 100644 --- a/services/core/java/com/android/server/security/intrusiondetection/IntrusionDetectionEventTransportConnection.java +++ b/services/core/java/com/android/server/security/intrusiondetection/IntrusionDetectionEventTransportConnection.java @@ -50,7 +50,7 @@ public class IntrusionDetectionEventTransportConnection implements ServiceConnec private static final String PRODUCTION_BUILD = "user"; private static final String PROPERTY_BUILD_TYPE = "ro.build.type"; private static final String PROPERTY_INTRUSION_DETECTION_SERVICE_NAME = - "intrusiondetection_service_name"; + "debug.intrusiondetection_package_name"; private static final long FUTURE_TIMEOUT_MILLIS = 60 * 1000; // 1 min private static final String TAG = "IntrusionDetectionEventTransportConnection"; private final Context mContext; @@ -147,9 +147,9 @@ public class IntrusionDetectionEventTransportConnection implements ServiceConnec } private String getSystemPropertyValue(String propertyName) { - String comamandString = "getprop " + propertyName; + String commandString = "getprop " + propertyName; try { - Process process = Runtime.getRuntime().exec(comamandString); + Process process = Runtime.getRuntime().exec(commandString); BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream())); String propertyValue = reader.readLine(); @@ -175,6 +175,10 @@ public class IntrusionDetectionEventTransportConnection implements ServiceConnec mIntrusionDetectionEventTransportConfig = getSystemPropertyValue(PROPERTY_INTRUSION_DETECTION_SERVICE_NAME); } + Slog.d( + TAG, + "mIntrusionDetectionEventTransportConfig: " + + mIntrusionDetectionEventTransportConfig); if (TextUtils.isEmpty(mIntrusionDetectionEventTransportConfig)) { Slog.e(TAG, "Unable to find a valid config for the transport service"); diff --git a/services/core/java/com/android/server/security/intrusiondetection/IntrusionDetectionService.java b/services/core/java/com/android/server/security/intrusiondetection/IntrusionDetectionService.java index 0287b415b9c2..8ff1c7f22ffb 100644 --- a/services/core/java/com/android/server/security/intrusiondetection/IntrusionDetectionService.java +++ b/services/core/java/com/android/server/security/intrusiondetection/IntrusionDetectionService.java @@ -232,12 +232,10 @@ public class IntrusionDetectionService extends SystemService { return; } - // TODO: temporarily disable the following for the CTS IntrusionDetectionManagerTest. - // Enable it when the transport component is ready. - // if (!mIntrusionDetectionEventTransportConnection.initialize()) { - // callback.onFailure(ERROR_TRANSPORT_UNAVAILABLE); - // return; - // } + if (!mIntrusionDetectionEventTransportConnection.initialize()) { + callback.onFailure(ERROR_TRANSPORT_UNAVAILABLE); + return; + } mDataAggregator.enable(); mState = STATE_ENABLED; @@ -252,9 +250,7 @@ public class IntrusionDetectionService extends SystemService { return; } - // TODO: temporarily disable the following for the CTS IntrusionDetectionManagerTest. - // Enable it when the transport component is ready. - // mIntrusionDetectionEventTransportConnection.release(); + mIntrusionDetectionEventTransportConnection.release(); mDataAggregator.disable(); mState = STATE_DISABLED; notifyStateMonitors(); |