From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sun, 17 Mar 2019 17:59:15 +0200 Subject: [PATCH] make INTERNET into a special runtime permission Ported from 12: a980a4c3d6b6906eb0ee5fb07ca4cf0bae052d00 --- core/api/current.txt | 1 + core/res/AndroidManifest.xml | 10 +++++++++- core/res/res/values/strings.xml | 5 +++++ .../pm/permission/PermissionManagerServiceImpl.java | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/core/api/current.txt b/core/api/current.txt index c8a43db2f9c2..f229b6e25126 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -225,6 +225,7 @@ package android { field public static final String LOCATION = "android.permission-group.LOCATION"; field public static final String MICROPHONE = "android.permission-group.MICROPHONE"; field public static final String NEARBY_DEVICES = "android.permission-group.NEARBY_DEVICES"; + field public static final String NETWORK = "android.permission-group.NETWORK"; field public static final String NOTIFICATIONS = "android.permission-group.NOTIFICATIONS"; field public static final String PHONE = "android.permission-group.PHONE"; field public static final String READ_MEDIA_AURAL = "android.permission-group.READ_MEDIA_AURAL"; diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 6e48de5ba31f..371a036e284a 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -1971,13 +1971,21 @@ + + + + android:protectionLevel="dangerous|instant" /> show notifications + + Network + + access the network + Retrieve window content diff --git a/services/core/java/com/android/server/pm/permission/PermissionManagerServiceImpl.java b/services/core/java/com/android/server/pm/permission/PermissionManagerServiceImpl.java index 1d974b980f6e..7c76d55d7ae4 100644 --- a/services/core/java/com/android/server/pm/permission/PermissionManagerServiceImpl.java +++ b/services/core/java/com/android/server/pm/permission/PermissionManagerServiceImpl.java @@ -2483,7 +2483,7 @@ public class PermissionManagerServiceImpl implements PermissionManagerServiceInt } public static boolean isSpecialRuntimePermission(final String permission) { - return false; + return Manifest.permission.INTERNET.equals(permission); } /**