2022-10-15 07:53:14 -04:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: flawedworld <flawedworld@flawed.world>
|
|
|
|
Date: Fri, 15 Oct 2021 17:07:13 +0100
|
|
|
|
Subject: [PATCH] enable secondary user logout support by default
|
|
|
|
|
|
|
|
Ported from 11, 12 moved the isLogoutEnabled boolean to ActiveAdmin.java
|
|
|
|
---
|
|
|
|
.../java/com/android/server/devicepolicy/ActiveAdmin.java | 2 +-
|
|
|
|
.../server/devicepolicy/DevicePolicyManagerService.java | 4 ++--
|
|
|
|
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/ActiveAdmin.java b/services/devicepolicy/java/com/android/server/devicepolicy/ActiveAdmin.java
|
|
|
|
index 0c69067ab131..ef3213b68bfe 100644
|
|
|
|
--- a/services/devicepolicy/java/com/android/server/devicepolicy/ActiveAdmin.java
|
|
|
|
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/ActiveAdmin.java
|
|
|
|
@@ -214,7 +214,7 @@ class ActiveAdmin {
|
|
|
|
boolean requireAutoTime = false;
|
|
|
|
boolean forceEphemeralUsers = false;
|
|
|
|
boolean isNetworkLoggingEnabled = false;
|
|
|
|
- boolean isLogoutEnabled = false;
|
|
|
|
+ boolean isLogoutEnabled = true;
|
|
|
|
|
|
|
|
// one notification after enabling + one more after reboots
|
|
|
|
static final int DEF_MAXIMUM_NETWORK_LOGGING_NOTIFICATIONS_SHOWN = 2;
|
|
|
|
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
2023-06-20 18:13:52 -04:00
|
|
|
index 10ab3fb67f47..4998c2b695e7 100644
|
2022-10-15 07:53:14 -04:00
|
|
|
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
|
|
|
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
2023-06-20 18:13:52 -04:00
|
|
|
@@ -16096,11 +16096,11 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
|
2022-10-15 07:53:14 -04:00
|
|
|
@Override
|
|
|
|
public boolean isLogoutEnabled() {
|
|
|
|
if (!mHasFeature) {
|
|
|
|
- return false;
|
|
|
|
+ return true;
|
|
|
|
}
|
|
|
|
synchronized (getLockObject()) {
|
|
|
|
ActiveAdmin deviceOwner = getDeviceOwnerAdminLocked();
|
|
|
|
- return (deviceOwner != null) && deviceOwner.isLogoutEnabled;
|
|
|
|
+ return (deviceOwner == null) || deviceOwner.isLogoutEnabled;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|