Hide potentially invisible DO Disclosures by default
Hiding/unhiding a pref triggers an animation. DO Disclosures that may not be visible should be hidden by default so that they fade in if applicable, not fade out if not applicable. Also, the network and security logging disclosures should only be shown if logging is currently on or was on in the past and a network log was retrieved at least once. Bug: 32692748 Test: m RunSettingsRoboTests Change-Id: I8c85f2f66ba295f145e5f5e79febb1b1a9bc6ede
This commit is contained in:
@@ -19,6 +19,7 @@ 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;
|
||||
|
||||
@@ -67,6 +68,18 @@ public class DevicePolicyManagerWrapperImpl implements DevicePolicyManagerWrappe
|
||||
return mDpm.getPermissionGrantState(admin, packageName, permission);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNetworkLoggingEnabled(@Nullable ComponentName admin) {
|
||||
return mDpm.isNetworkLoggingEnabled(admin);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getLastSecurityLogRetrievalTime() {
|
||||
return mDpm.getLastSecurityLogRetrievalTime();
|
||||
|
Reference in New Issue
Block a user