mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-24 23:19:31 -05:00
Misc patches
- 20.0: updated and enabled burnIn patch - 19.1: fixup apps having data restrictions wrongly applied Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
parent
7d6b8e3aeb
commit
751d1e8d72
@ -0,0 +1,27 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Oliver Scott <olivercscott@gmail.com>
|
||||
Date: Mon, 17 Oct 2022 15:36:18 +0200
|
||||
Subject: [PATCH] fixup! fw/b: Add support for allowing/disallowing apps on
|
||||
cellular, vpn and wifi networks
|
||||
|
||||
Do not set apps without INTERNET permission as blocked by restricted networking mode
|
||||
|
||||
Issue: calyxos#1266
|
||||
Change-Id: I11e30bc0c1f8c722d2b5941c17d430dba942594d
|
||||
---
|
||||
.../com/android/server/net/NetworkPolicyManagerService.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
|
||||
index 7d70b6d73497..d7fa56e56e0b 100644
|
||||
--- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
|
||||
+++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
|
||||
@@ -4300,7 +4300,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
|
||||
} else {
|
||||
uidBlockedState.blockedReasons &= ~BLOCKED_REASON_RESTRICTED_MODE;
|
||||
}
|
||||
- if (hasRestrictedModeAccess(uid)) {
|
||||
+ if (hasRestrictedModeAccess(uid) || !hasInternetPermissionUL(uid)) {
|
||||
uidBlockedState.allowedReasons |= ALLOWED_REASON_RESTRICTED_MODE_PERMISSIONS;
|
||||
} else {
|
||||
uidBlockedState.allowedReasons &= ~ALLOWED_REASON_RESTRICTED_MODE_PERMISSIONS;
|
@ -12,8 +12,9 @@ both horizontally and vertically workarounds this problem.
|
||||
|
||||
jrizzoli: integrate with runtime cmsdk preference
|
||||
|
||||
Linux4: removed toggle from settings - the burnIn protection is always
|
||||
Linux4: Removed toggle from settings - the burnIn protection is always
|
||||
enabled if the corresponding AOSP overlay is set to true
|
||||
Updated for T
|
||||
|
||||
Change-Id: I35b04d1edff86a556adb3ad349569e5d82653f16
|
||||
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
|
||||
@ -23,9 +24,10 @@ Signed-off-by: Joey Rizzoli <joey@lineageos.org>
|
||||
---
|
||||
.../SystemUI/res/values/lineage_dimens.xml | 3 +
|
||||
.../navigationbar/NavigationBarView.java | 26 +++++
|
||||
.../statusbar/phone/CentralSurfacesImpl.java | 14 +++
|
||||
.../statusbar/phone/PhoneStatusBarView.java | 27 +++++
|
||||
.../policy/BurnInProtectionController.java | 105 ++++++++++++++++++
|
||||
4 files changed, 161 insertions(+)
|
||||
5 files changed, 175 insertions(+)
|
||||
create mode 100644 packages/SystemUI/src/com/android/systemui/statusbar/policy/BurnInProtectionController.java
|
||||
|
||||
diff --git a/packages/SystemUI/res/values/lineage_dimens.xml b/packages/SystemUI/res/values/lineage_dimens.xml
|
||||
@ -41,10 +43,10 @@ index e1998ce3d3ab..dc59ccd794f7 100644
|
||||
+ <dimen name="burnin_protection_vertical_shift">1dp</dimen>
|
||||
</resources>
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java
|
||||
index 448639cc1fe5..2505301d4268 100644
|
||||
index 0e07d37483df..c523fb2ff7f0 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java
|
||||
@@ -158,6 +158,13 @@ public class NavigationBarView extends FrameLayout implements TunerService.Tunab
|
||||
@@ -162,6 +162,13 @@ public class NavigationBarView extends FrameLayout implements TunerService.Tunab
|
||||
private FloatingRotationButton mFloatingRotationButton;
|
||||
private RotationButtonController mRotationButtonController;
|
||||
|
||||
@ -58,7 +60,7 @@ index 448639cc1fe5..2505301d4268 100644
|
||||
/**
|
||||
* Helper that is responsible for showing the right toast when a disallowed activity operation
|
||||
* occurred. In pinned mode, we show instructions on how to break out of this mode, whilst in
|
||||
@@ -859,12 +866,31 @@ public class NavigationBarView extends FrameLayout implements TunerService.Tunab
|
||||
@@ -879,12 +886,31 @@ public class NavigationBarView extends FrameLayout implements TunerService.Tunab
|
||||
mContextualButtonGroup.setButtonVisibility(R.id.accessibility_button, visible);
|
||||
}
|
||||
|
||||
@ -90,6 +92,59 @@ index 448639cc1fe5..2505301d4268 100644
|
||||
updateOrientationViews();
|
||||
reloadNavIcons();
|
||||
}
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
|
||||
index dca07386a440..df02938f2718 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
|
||||
@@ -229,6 +229,7 @@ import com.android.systemui.statusbar.phone.panelstate.PanelExpansionChangeEvent
|
||||
import com.android.systemui.statusbar.phone.panelstate.PanelExpansionStateManager;
|
||||
import com.android.systemui.statusbar.policy.BatteryController;
|
||||
import com.android.systemui.statusbar.policy.BrightnessMirrorController;
|
||||
+import com.android.systemui.statusbar.policy.BurnInProtectionController;
|
||||
import com.android.systemui.statusbar.policy.ConfigurationController;
|
||||
import com.android.systemui.statusbar.policy.ConfigurationController.ConfigurationListener;
|
||||
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
|
||||
@@ -469,6 +470,7 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
||||
@Nullable
|
||||
protected LockscreenWallpaper mLockscreenWallpaper;
|
||||
private final AutoHideController mAutoHideController;
|
||||
+ private BurnInProtectionController mBurnInProtectionController;
|
||||
|
||||
private final Point mCurrentDisplaySize = new Point();
|
||||
|
||||
@@ -1220,6 +1222,12 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
||||
mNotificationPanelViewController.updatePanelExpansionAndVisibility();
|
||||
setBouncerShowingForStatusBarComponents(mBouncerShowing);
|
||||
checkBarModes();
|
||||
+
|
||||
+ if (mContext.getResources().getBoolean(
|
||||
+ com.android.internal.R.bool.config_enableBurnInProtection)) {
|
||||
+ mBurnInProtectionController = new BurnInProtectionController(mContext,
|
||||
+ this, mStatusBarView);
|
||||
+ }
|
||||
});
|
||||
initializer.initializeStatusBar(mCentralSurfacesComponent);
|
||||
|
||||
@@ -3763,6 +3771,9 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
||||
|
||||
updateNotificationPanelTouchState();
|
||||
mNotificationShadeWindowViewController.cancelCurrentTouch();
|
||||
+ if (mBurnInProtectionController != null) {
|
||||
+ mBurnInProtectionController.stopShiftTimer(true);
|
||||
+ }
|
||||
if (mLaunchCameraOnFinishedGoingToSleep) {
|
||||
mLaunchCameraOnFinishedGoingToSleep = false;
|
||||
|
||||
@@ -3867,6 +3878,9 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
||||
}
|
||||
}
|
||||
updateScrimController();
|
||||
+ if (mBurnInProtectionController != null) {
|
||||
+ mBurnInProtectionController.startShiftTimer(true);
|
||||
+ }
|
||||
}
|
||||
};
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
|
||||
index 3f37a352ed5f..b65cfe4fc4a1 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
|
||||
@ -151,7 +206,7 @@ index 3f37a352ed5f..b65cfe4fc4a1 100644
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BurnInProtectionController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BurnInProtectionController.java
|
||||
new file mode 100644
|
||||
index 000000000000..a7b7bd9e53dc
|
||||
index 000000000000..864d86ffd6a3
|
||||
--- /dev/null
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BurnInProtectionController.java
|
||||
@@ -0,0 +1,105 @@
|
||||
@ -183,7 +238,7 @@ index 000000000000..a7b7bd9e53dc
|
||||
+import com.android.systemui.R;
|
||||
+import com.android.systemui.navigationbar.NavigationBarView;
|
||||
+import com.android.systemui.statusbar.phone.PhoneStatusBarView;
|
||||
+import com.android.systemui.statusbar.phone.StatusBar;
|
||||
+import com.android.systemui.statusbar.phone.CentralSurfacesImpl;
|
||||
+
|
||||
+public class BurnInProtectionController {
|
||||
+ private static final String TAG = "BurnInProtectionController";
|
||||
@ -207,11 +262,11 @@ index 000000000000..a7b7bd9e53dc
|
||||
+ };
|
||||
+
|
||||
+ private PhoneStatusBarView mPhoneStatusBarView;
|
||||
+ private StatusBar mStatusBar;
|
||||
+ private CentralSurfacesImpl mStatusBar;
|
||||
+
|
||||
+ private Context mContext;
|
||||
+
|
||||
+ public BurnInProtectionController(Context context, StatusBar statusBar,
|
||||
+ public BurnInProtectionController(Context context, CentralSurfacesImpl statusBar,
|
||||
+ PhoneStatusBarView phoneStatusBarView) {
|
||||
+ mContext = context;
|
||||
+
|
||||
|
@ -126,6 +126,7 @@ sed -i '11iLOCAL_OVERRIDES_PACKAGES := Camera Camera2 LegacyCamera Snap OpenCame
|
||||
fi;
|
||||
|
||||
if enterAndClear "frameworks/base"; then
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/344888-backport.patch"; #fixup! fw/b: Add support for allowing/disallowing apps on cellular, vpn and wifi networks (CalyxOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0007-Always_Restict_Serial.patch"; #Always restrict access to Build.SERIAL (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0008-Browser_No_Location.patch"; #Don't grant location permission to system browsers (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0009-SystemUI_No_Permission_Review.patch"; #Allow SystemUI to directly manage Bluetooth/WiFi (GrapheneOS)
|
||||
|
@ -172,7 +172,7 @@ applyPatch "$DOS_PATCHES/android_frameworks_base/0020-Location_Indicators.patch"
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0022-Ignore_StatementService_ANR.patch"; #Don't report statementservice crashes (GrapheneOS)
|
||||
#applyPatch "$DOS_PATCHES/android_frameworks_base/326692.patch"; #Skip screen on animation when wake and unlock via biometrics (jesec) #TODO: 20REBASE
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0023-Skip_Screen_Animation.patch"; #SystemUI: Skip screen-on animation in all scenarios (kdrag0n)
|
||||
#applyPatch "$DOS_PATCHES/android_frameworks_base/0024-Burnin_Protection.patch"; #SystemUI: add burnIn protection (arter97) #TODO: 20REBASE
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0024-Burnin_Protection.patch"; #SystemUI: add burnIn protection (arter97)
|
||||
#applyPatch "$DOS_PATCHES/android_frameworks_base/0025-Monet_Toggle.patch"; #Make monet based theming user configurable (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0026-Crash_Details.patch"; #Add an option to show the details of an application error to the user (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0027-Installer_Glitch.patch"; #Make sure PackageInstaller UI returns a result (GrapheneOS)
|
||||
|
Loading…
Reference in New Issue
Block a user