
This revokes the permissions to all user installed apps on update. Likely an expected quirk of being on 20.0 without the permission. 19.1 upgrades and new 20.0 installs should be fine. TODO: update 19.1 with the SpecialRuntimePermAppUtils too Signed-off-by: Tad <tad@spotco.us>
35 lines
1.5 KiB
Diff
35 lines
1.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Dmitry Muhomor <muhomor.dmitry@gmail.com>
|
|
Date: Tue, 14 Dec 2021 18:17:11 +0200
|
|
Subject: [PATCH] skip reportNetworkConnectivity() when permission is revoked
|
|
|
|
---
|
|
framework/src/android/net/ConnectivityManager.java | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
diff --git a/framework/src/android/net/ConnectivityManager.java b/framework/src/android/net/ConnectivityManager.java
|
|
index f741c2bb3..f5bac0613 100644
|
|
--- a/framework/src/android/net/ConnectivityManager.java
|
|
+++ b/framework/src/android/net/ConnectivityManager.java
|
|
@@ -41,6 +41,7 @@ import android.compat.annotation.UnsupportedAppUsage;
|
|
import android.content.ComponentName;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
+import android.content.pm.SpecialRuntimePermAppUtils;
|
|
import android.net.ConnectivityDiagnosticsManager.DataStallReport.DetectionMethod;
|
|
import android.net.IpSecManager.UdpEncapsulationSocket;
|
|
import android.net.SocketKeepalive.Callback;
|
|
@@ -3358,6 +3359,12 @@ public class ConnectivityManager {
|
|
*/
|
|
public void reportNetworkConnectivity(@Nullable Network network, boolean hasConnectivity) {
|
|
printStackTrace();
|
|
+
|
|
+ if (SpecialRuntimePermAppUtils.isInternetCompatEnabled()) {
|
|
+ // caller doesn't have INTERNET, but expects to always have it
|
|
+ return;
|
|
+ }
|
|
+
|
|
try {
|
|
mService.reportNetworkConnectivity(network, hasConnectivity);
|
|
} catch (RemoteException e) {
|