mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-09-08 18:44:54 +00:00
38 lines
1.7 KiB
Diff
38 lines
1.7 KiB
Diff
![]() |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Daniel Micay <danielmicay@gmail.com>
|
||
|
Date: Sun, 17 Mar 2019 11:59:15 -0400
|
||
|
Subject: [PATCH] make INTERNET into a special runtime permission
|
||
|
|
||
|
Ported from 10: 5e2898e9d21dd6802bb0b0139e7e496c41e1cd80
|
||
|
---
|
||
|
core/res/AndroidManifest.xml | 2 +-
|
||
|
.../android/server/pm/permission/PermissionManagerService.java | 2 +-
|
||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
|
||
|
index 030310406949..7c4a046fda7b 100644
|
||
|
--- a/core/res/AndroidManifest.xml
|
||
|
+++ b/core/res/AndroidManifest.xml
|
||
|
@@ -1735,7 +1735,7 @@
|
||
|
<permission android:name="android.permission.INTERNET"
|
||
|
android:description="@string/permdesc_createNetworkSockets"
|
||
|
android:label="@string/permlab_createNetworkSockets"
|
||
|
- android:protectionLevel="normal|instant" />
|
||
|
+ android:protectionLevel="dangerous|instant" />
|
||
|
|
||
|
<!-- Allows applications to access information about networks.
|
||
|
<p>Protection level: normal
|
||
|
diff --git a/services/core/java/com/android/server/pm/permission/PermissionManagerService.java b/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
||
|
index 41b43e3c38bd..22d3fd41ea64 100644
|
||
|
--- a/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
||
|
+++ b/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
||
|
@@ -2592,7 +2592,7 @@ public class PermissionManagerService extends IPermissionManager.Stub {
|
||
|
}
|
||
|
|
||
|
public static boolean isSpecialRuntimePermission(final String permission) {
|
||
|
- return false;
|
||
|
+ return Manifest.permission.INTERNET.equals(permission);
|
||
|
}
|
||
|
|
||
|
/**
|