void securityLogSetLoggingEnabledProperty(boolean enabled) {
SecurityLog.setLoggingEnabledProperty(enabled);
}
+
+ boolean securityLogGetLoggingEnabledProperty() {
+ return SecurityLog.getLoggingEnabledProperty();
+ }
+
+ boolean securityLogIsLoggingEnabled() {
+ return SecurityLog.isLoggingEnabled();
+ }
}
/**
if (mOwners.hasDeviceOwner()) {
mInjector.systemPropertiesSet(PROPERTY_DEVICE_OWNER_PRESENT, "true");
disableDeviceLoggingIfNotCompliant();
- if (SecurityLog.getLoggingEnabledProperty()) {
+ if (mInjector.securityLogGetLoggingEnabledProperty()) {
mSecurityLogMonitor.start();
}
} else {
mInjector.binderRestoreCallingIdentity(ident);
}
- if (SecurityLog.isLoggingEnabled()) {
+ if (mInjector.securityLogIsLoggingEnabled()) {
SecurityLog.writeEvent(SecurityLog.TAG_KEYGUARD_DISMISS_AUTH_ATTEMPT, /*result*/ 0);
}
}
}
}
- if (SecurityLog.isLoggingEnabled()) {
+ if (mInjector.securityLogIsLoggingEnabled()) {
SecurityLog.writeEvent(SecurityLog.TAG_KEYGUARD_DISMISS_AUTH_ATTEMPT, /*result*/ 1);
}
}
public void reportKeyguardDismissed() {
mContext.enforceCallingOrSelfPermission(
android.Manifest.permission.BIND_DEVICE_ADMIN, null);
- if (SecurityLog.isLoggingEnabled()) {
+ if (mInjector.securityLogIsLoggingEnabled()) {
SecurityLog.writeEvent(SecurityLog.TAG_KEYGUARD_DISMISSED);
}
}
public void reportKeyguardSecured() {
mContext.enforceCallingOrSelfPermission(
android.Manifest.permission.BIND_DEVICE_ADMIN, null);
- if (SecurityLog.isLoggingEnabled()) {
+ if (mInjector.securityLogIsLoggingEnabled()) {
SecurityLog.writeEvent(SecurityLog.TAG_KEYGUARD_SECURED);
}
}
Preconditions.checkNotNull(admin);
synchronized (this) {
getActiveAdminForCallerLocked(admin, DeviceAdminInfo.USES_POLICY_DEVICE_OWNER);
- return SecurityLog.getLoggingEnabledProperty();
+ return mInjector.securityLogGetLoggingEnabledProperty();
}
}