Use DevicePolicyManager#isSecurityLoggingEnabled
Now that this method has been opened up to callers with system UID, use it. Bug: 36584321 Test: Settings runs (it would crash if it had no access to the method) Change-Id: I30254ab08e434d5e2b58f41ddaf7d85b4dcd96b0
This commit is contained in:
@@ -19,7 +19,6 @@ package com.android.settings.enterprise;
|
||||
import android.annotation.NonNull;
|
||||
import android.app.admin.DevicePolicyManager;
|
||||
import android.content.ComponentName;
|
||||
import android.os.SystemProperties;
|
||||
import android.os.UserHandle;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
@@ -70,9 +69,7 @@ public class DevicePolicyManagerWrapperImpl implements DevicePolicyManagerWrappe
|
||||
|
||||
@Override
|
||||
public boolean isSecurityLoggingEnabled(@Nullable ComponentName admin) {
|
||||
// TODO(b/36584321): Switch to DevicePolicyManager#isSecurityLoggingEnabled once that is
|
||||
// callable by the system.
|
||||
return SystemProperties.getBoolean("persist.logd.security", false);
|
||||
return mDpm.isSecurityLoggingEnabled(admin);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user