@@ -263,7 +263,7 @@ public class PolicyManagementFragment extends BaseSearchablePolicyPreferenceFrag
263
263
private static final String DISABLE_SCREEN_CAPTURE_KEY = "disable_screen_capture" ;
264
264
private static final String DISABLE_STATUS_BAR = "disable_status_bar" ;
265
265
private static final String ENABLE_BACKUP_SERVICE = "enable_backup_service" ;
266
- private static final String ENABLE_PROCESS_LOGGING = "enable_process_logging " ;
266
+ private static final String ENABLE_SECURITY_LOGGING = "enable_security_logging " ;
267
267
private static final String ENABLE_NETWORK_LOGGING = "enable_network_logging" ;
268
268
private static final String ENABLE_SYSTEM_APPS_BY_INTENT_KEY = "enable_system_apps_by_intent" ;
269
269
private static final String ENABLE_SYSTEM_APPS_BY_PACKAGE_NAME_KEY
@@ -314,7 +314,7 @@ public class PolicyManagementFragment extends BaseSearchablePolicyPreferenceFrag
314
314
private static final String EPHEMERAL_USER_KEY = "ephemeral_user" ;
315
315
private static final String REQUEST_BUGREPORT_KEY = "request_bugreport" ;
316
316
private static final String REQUEST_NETWORK_LOGS = "request_network_logs" ;
317
- private static final String REQUEST_PROCESS_LOGS = "request_process_logs " ;
317
+ private static final String REQUEST_SECURITY_LOGS = "request_security_logs " ;
318
318
private static final String RESET_PASSWORD_KEY = "reset_password" ;
319
319
private static final String LOCK_NOW_KEY = "lock_now" ;
320
320
private static final String SET_ACCESSIBILITY_SERVICES_KEY = "set_accessibility_services" ;
@@ -410,7 +410,7 @@ public class PolicyManagementFragment extends BaseSearchablePolicyPreferenceFrag
410
410
411
411
private SwitchPreference mEnableBackupServicePreference ;
412
412
private SwitchPreference mMandatoryBackupsPreference ;
413
- private SwitchPreference mEnableProcessLoggingPreference ;
413
+ private SwitchPreference mEnableSecurityLoggingPreference ;
414
414
private SwitchPreference mEnableNetworkLoggingPreference ;
415
415
private SwitchPreference mSetAutoTimeRequiredPreference ;
416
416
private DpcPreference mLogoutUserPreference ;
@@ -421,7 +421,7 @@ public class PolicyManagementFragment extends BaseSearchablePolicyPreferenceFrag
421
421
private Preference mAffiliatedUserPreference ;
422
422
private Preference mEphemeralUserPreference ;
423
423
private DpcPreference mRequestNetworkLogsPreference ;
424
- private DpcPreference mRequestProcessLogsPreference ;
424
+ private DpcPreference mRequestSecurityLogsPreference ;
425
425
private Preference mSetDeviceOrganizationNamePreference ;
426
426
427
427
private DpcSwitchPreference mAutoBrightnessPreference ;
@@ -530,14 +530,15 @@ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
530
530
mMandatoryBackupsPreference = (SwitchPreference ) findPreference (MANDATORY_BACKUPS );
531
531
mMandatoryBackupsPreference .setOnPreferenceChangeListener (this );
532
532
findPreference (REQUEST_BUGREPORT_KEY ).setOnPreferenceClickListener (this );
533
- mEnableProcessLoggingPreference = (SwitchPreference ) findPreference (ENABLE_PROCESS_LOGGING );
534
- mEnableProcessLoggingPreference .setOnPreferenceChangeListener (this );
535
- mRequestProcessLogsPreference = (DpcPreference ) findPreference (REQUEST_PROCESS_LOGS );
536
- mRequestProcessLogsPreference .setOnPreferenceClickListener (this );
537
- mRequestProcessLogsPreference .setCustomConstraint (
533
+ mEnableSecurityLoggingPreference =
534
+ (SwitchPreference ) findPreference (ENABLE_SECURITY_LOGGING );
535
+ mEnableSecurityLoggingPreference .setOnPreferenceChangeListener (this );
536
+ mRequestSecurityLogsPreference = (DpcPreference ) findPreference (REQUEST_SECURITY_LOGS );
537
+ mRequestSecurityLogsPreference .setOnPreferenceClickListener (this );
538
+ mRequestSecurityLogsPreference .setCustomConstraint (
538
539
() -> isSecurityLoggingEnabled ()
539
540
? NO_CUSTOM_CONSTRIANT
540
- : R .string .requires_process_logs );
541
+ : R .string .requires_security_logs );
541
542
mEnableNetworkLoggingPreference = (SwitchPreference ) findPreference (ENABLE_NETWORK_LOGGING );
542
543
mEnableNetworkLoggingPreference .setOnPreferenceChangeListener (this );
543
544
mRequestNetworkLogsPreference = (DpcPreference ) findPreference (REQUEST_NETWORK_LOGS );
@@ -642,7 +643,7 @@ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
642
643
reloadMuteAudioUi ();
643
644
reloadEnableBackupServiceUi ();
644
645
reloadMandatoryBackupsUi ();
645
- reloadEnableProcessLoggingUi ();
646
+ reloadEnableSecurityLoggingUi ();
646
647
reloadEnableNetworkLoggingUi ();
647
648
reloadSetAutoTimeRequiredUi ();
648
649
reloadEnableLogoutUi ();
@@ -760,8 +761,8 @@ public void onPositiveButtonClicked(String[] lockTaskArray) {
760
761
case REQUEST_NETWORK_LOGS :
761
762
showFragment (new NetworkLogsFragment ());
762
763
return true ;
763
- case REQUEST_PROCESS_LOGS :
764
- showFragment (new ProcessLogsFragment ());
764
+ case REQUEST_SECURITY_LOGS :
765
+ showFragment (new SecurityLogsFragment ());
765
766
return true ;
766
767
case SET_ACCESSIBILITY_SERVICES_KEY :
767
768
// Avoid starting the same task twice.
@@ -1155,9 +1156,9 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
1155
1156
setupMandatoryBackups (null );
1156
1157
return true ;
1157
1158
}
1158
- case ENABLE_PROCESS_LOGGING :
1159
+ case ENABLE_SECURITY_LOGGING :
1159
1160
setSecurityLoggingEnabled ((Boolean ) newValue );
1160
- reloadEnableProcessLoggingUi ();
1161
+ reloadEnableSecurityLoggingUi ();
1161
1162
return true ;
1162
1163
case ENABLE_NETWORK_LOGGING :
1163
1164
mDevicePolicyManager .setNetworkLoggingEnabled (mAdminComponentName ,
@@ -2102,12 +2103,12 @@ private void reloadEnableNetworkLoggingUi() {
2102
2103
}
2103
2104
2104
2105
@ TargetApi (Build .VERSION_CODES .N )
2105
- private void reloadEnableProcessLoggingUi () {
2106
- if (mEnableProcessLoggingPreference .isEnabled ()) {
2107
- boolean isProcessLoggingEnabled = mDevicePolicyManager . isSecurityLoggingEnabled (
2108
- mAdminComponentName );
2109
- mEnableProcessLoggingPreference .setChecked (isProcessLoggingEnabled );
2110
- mRequestProcessLogsPreference .refreshEnabledState ();
2106
+ private void reloadEnableSecurityLoggingUi () {
2107
+ if (mEnableSecurityLoggingPreference .isEnabled ()) {
2108
+ boolean securityLoggingEnabled =
2109
+ mDevicePolicyManager . isSecurityLoggingEnabled ( mAdminComponentName );
2110
+ mEnableSecurityLoggingPreference .setChecked (securityLoggingEnabled );
2111
+ mRequestSecurityLogsPreference .refreshEnabledState ();
2111
2112
}
2112
2113
}
2113
2114
0 commit comments