mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-09-08 02:22:16 +00:00
37 lines
1.6 KiB
Diff
37 lines
1.6 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
|
|
|
|
---
|
|
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 a8dd041454c9..6940b9eb36ed 100644
|
|
--- a/core/res/AndroidManifest.xml
|
|
+++ b/core/res/AndroidManifest.xml
|
|
@@ -1540,7 +1540,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 4649b88b9804..feaa92d0f615 100644
|
|
--- a/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
|
+++ b/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
|
@@ -1024,7 +1024,7 @@ public class PermissionManagerService {
|
|
}
|
|
|
|
public static boolean isSpecialRuntimePermission(final String permission) {
|
|
- return false;
|
|
+ return Manifest.permission.INTERNET.equals(permission);
|
|
}
|
|
|
|
/**
|