Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 296f7c4f authored by Bartosz Fabianowski's avatar Bartosz Fabianowski
Browse files

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
parent 9290184e
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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