2022-02-25 18:38:36 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Daniel Micay <danielmicay@gmail.com>
|
2022-04-11 00:24:01 +00:00
|
|
|
Date: Sun, 17 Mar 2019 11:59:15 -0400
|
|
|
|
Subject: [PATCH] make INTERNET into a special runtime permission
|
2022-02-25 18:38:36 +00:00
|
|
|
|
|
|
|
---
|
2022-04-11 00:24:01 +00:00
|
|
|
core/res/AndroidManifest.xml | 2 +-
|
|
|
|
.../android/server/pm/permission/PermissionManagerService.java | 2 +-
|
|
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
2022-02-25 18:38:36 +00:00
|
|
|
|
2022-04-11 00:24:01 +00:00
|
|
|
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
|
2023-08-08 09:30:19 +00:00
|
|
|
index a8dd041454c9..6940b9eb36ed 100644
|
2022-04-11 00:24:01 +00:00
|
|
|
--- a/core/res/AndroidManifest.xml
|
|
|
|
+++ b/core/res/AndroidManifest.xml
|
2022-06-12 14:38:06 +00:00
|
|
|
@@ -1540,7 +1540,7 @@
|
2022-04-11 00:24:01 +00:00
|
|
|
<permission android:name="android.permission.INTERNET"
|
|
|
|
android:description="@string/permdesc_createNetworkSockets"
|
|
|
|
android:label="@string/permlab_createNetworkSockets"
|
|
|
|
- android:protectionLevel="normal|instant" />
|
|
|
|
+ android:protectionLevel="dangerous|instant" />
|
2022-02-25 18:38:36 +00:00
|
|
|
|
2022-04-11 00:24:01 +00:00
|
|
|
<!-- Allows applications to access information about networks.
|
|
|
|
<p>Protection level: normal
|
2022-02-25 18:38:36 +00:00
|
|
|
diff --git a/services/core/java/com/android/server/pm/permission/PermissionManagerService.java b/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
2024-06-19 22:43:50 +00:00
|
|
|
index f247610fa8a3..a57a2b819f84 100644
|
2022-02-25 18:38:36 +00:00
|
|
|
--- a/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
|
|
|
+++ b/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
2024-06-19 22:43:50 +00:00
|
|
|
@@ -1025,7 +1025,7 @@ public class PermissionManagerService {
|
2022-02-25 18:38:36 +00:00
|
|
|
}
|
|
|
|
|
2022-04-11 00:24:01 +00:00
|
|
|
public static boolean isSpecialRuntimePermission(final String permission) {
|
|
|
|
- return false;
|
|
|
|
+ return Manifest.permission.INTERNET.equals(permission);
|
|
|
|
}
|
2022-02-25 18:38:36 +00:00
|
|
|
|
2022-04-11 00:24:01 +00:00
|
|
|
/**
|