mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-29 01:16:26 -05:00
Multi user tweaks from GrapheneOS
Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
parent
2400cf0964
commit
58b53de17a
@ -0,0 +1,36 @@
|
||||
From f1d6d41b4fa836b7b0953eb3b24f3af6e1d5cbcf Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Sun, 4 Oct 2020 19:02:09 -0400
|
||||
Subject: [PATCH] enable secondary user logout support by default
|
||||
|
||||
---
|
||||
.../server/devicepolicy/DevicePolicyManagerService.java | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
||||
index ae354a953eec..47769ef9e7a8 100644
|
||||
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
||||
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
||||
@@ -1166,7 +1166,7 @@ public void onUserRestrictionsChanged(int userId, Bundle newRestrictions,
|
||||
boolean requireAutoTime = false; // Can only be set by a device owner.
|
||||
boolean forceEphemeralUsers = false; // Can only be set by a device owner.
|
||||
boolean isNetworkLoggingEnabled = false; // Can only be set by a device owner.
|
||||
- boolean isLogoutEnabled = false; // Can only be set by a device owner.
|
||||
+ boolean isLogoutEnabled = true; // Can only be set by a device owner.
|
||||
|
||||
// one notification after enabling + one more after reboots
|
||||
static final int DEF_MAXIMUM_NETWORK_LOGGING_NOTIFICATIONS_SHOWN = 2;
|
||||
@@ -15116,11 +15116,11 @@ public void setLogoutEnabled(ComponentName admin, boolean enabled) {
|
||||
@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;
|
||||
}
|
||||
}
|
||||
|
@ -71,7 +71,7 @@
|
||||
<bool name="config_enableMultiUserUI">true</bool>
|
||||
|
||||
<!-- Maximum number of supported users -->
|
||||
<integer name="config_multiuserMaximumUsers">6</integer>
|
||||
<integer name="config_multiuserMaximumUsers">16</integer>
|
||||
|
||||
<!-- Remote server that can provide NTP responses. -->
|
||||
<string translatable="false" name="config_ntpServer">1.android.pool.ntp.org</string>
|
||||
|
@ -113,6 +113,7 @@ applyPatch "$DOS_PATCHES/android_frameworks_base/0009-SystemUI_No_Permission_Rev
|
||||
if [ "$DOS_GRAPHENE_EXEC" = true ]; then applyPatch "$DOS_PATCHES/android_frameworks_base/0010-Exec_Based_Spawning.patch"; fi; #Add exec-based spawning support (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES_COMMON/android_frameworks_base/0003-SUPL_No_IMSI.patch"; #Don't send IMSI to SUPL (MSe1969)
|
||||
applyPatch "$DOS_PATCHES_COMMON/android_frameworks_base/0004-Fingerprint_Lockout.patch"; #Enable fingerprint lockout after three failed attempts (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES_COMMON/android_frameworks_base/0005-User_Logout.patch"; #Allow user logout (GrapheneOS)
|
||||
if [ "$DOS_SENSORS_PERM" = true ]; then applyPatch "$DOS_PATCHES/android_frameworks_base/0011-Sensors.patch"; fi; #Permission for sensors access (MSe1969)
|
||||
#applyPatch "$DOS_PATCHES/android_frameworks_base/0012-Private_DNS.patch"; #More 'Private DNS' options (CalyxOS)
|
||||
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then applyPatch "$DOS_PATCHES/android_frameworks_base/0002-Signature_Spoofing.patch"; fi; #Allow packages to spoof their signature (microG)
|
||||
|
@ -108,6 +108,7 @@ applyPatch "$DOS_PATCHES/android_frameworks_base/0009-SystemUI_No_Permission_Rev
|
||||
if [ "$DOS_GRAPHENE_EXEC" = true ]; then applyPatch "$DOS_PATCHES/android_frameworks_base/0010-Exec_Based_Spawning.patch"; fi; #add exec-based spawning support (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0003-SUPL_No_IMSI.patch"; #Don't send IMSI to SUPL (MSe1969)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0004-Fingerprint_Lockout.patch"; #Enable fingerprint lockout after three failed attempts (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES_COMMON/android_frameworks_base/0005-User_Logout.patch"; #Allow user logout (GrapheneOS)
|
||||
if [ "$DOS_SENSORS_PERM_NEW" = true ]; then applyPatch "$DOS_PATCHES/android_frameworks_base/0011-Sensors.patch"; fi; #Permission for sensors access (MSe1969)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0012-Restore_SensorsOff.patch"; #Restore the Sensors Off tile
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0013-Private_DNS.patch"; #More 'Private DNS' options (CalyxOS)
|
||||
|
@ -90,6 +90,7 @@ applyPatch "$DOS_PATCHES/android_frameworks_base/0008-Browser_No_Location.patch"
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0009-SystemUI_No_Permission_Review.patch"; #Allow SystemUI to directly manage Bluetooth/WiFi (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0003-SUPL_No_IMSI.patch"; #Don't send IMSI to SUPL (MSe1969)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0004-Fingerprint_Lockout.patch"; #Enable fingerprint lockout after three failed attempts (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES_COMMON/android_frameworks_base/0005-User_Logout.patch"; #Allow user logout (GrapheneOS)
|
||||
if [ "$DOS_SENSORS_PERM_NEW" = true ]; then applyPatch "$DOS_PATCHES/android_frameworks_base/0010-Sensors.patch"; fi #Permission for sensors access (MSe1969)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0011-Restore_SensorsOff.patch"; #Restore the Sensors Off tile
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0012-Private_DNS.patch"; #More 'Private DNS' options (CalyxOS)
|
||||
|
Loading…
Reference in New Issue
Block a user