mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-09-06 09:33:15 +00:00
70 lines
3.6 KiB
Diff
70 lines
3.6 KiB
Diff
![]() |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Daniel Micay <danielmicay@gmail.com>
|
||
|
Date: Fri, 21 Jul 2017 11:23:07 -0400
|
||
|
Subject: [PATCH] add a NETWORK permission group for INTERNET
|
||
|
|
||
|
Ported from 10: b5c9f9407d5f5407686ea8c02fa67573ddc07824
|
||
|
|
||
|
Changes from 10:
|
||
|
- Needed to run `m api-stubs-docs-non-updatable-update-current-api`
|
||
|
to fix the "You have tried to change the API from what has been
|
||
|
previously approved" errors.
|
||
|
---
|
||
|
core/api/current.txt | 2 ++
|
||
|
core/res/AndroidManifest.xml | 8 ++++++++
|
||
|
core/res/res/values/strings.xml | 5 +++++
|
||
|
3 files changed, 15 insertions(+)
|
||
|
|
||
|
diff --git a/core/api/current.txt b/core/api/current.txt
|
||
|
index 1dd401d04e2b..8d0391a80193 100644
|
||
|
--- a/core/api/current.txt
|
||
|
+++ b/core/api/current.txt
|
||
|
@@ -203,6 +203,8 @@ 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 OTHER_SENSORS = "android.permission-group.OTHER_SENSORS";
|
||
|
field public static final String PHONE = "android.permission-group.PHONE";
|
||
|
field public static final String SENSORS = "android.permission-group.SENSORS";
|
||
|
field public static final String SMS = "android.permission-group.SMS";
|
||
|
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
|
||
|
index 7c4a046fda7b..76811630410d 100644
|
||
|
--- a/core/res/AndroidManifest.xml
|
||
|
+++ b/core/res/AndroidManifest.xml
|
||
|
@@ -1729,10 +1729,18 @@
|
||
|
<!-- ======================================= -->
|
||
|
<eat-comment />
|
||
|
|
||
|
+ <!-- Network access -->
|
||
|
+ <permission-group android:name="android.permission-group.NETWORK"
|
||
|
+ android:icon="@drawable/perm_group_network"
|
||
|
+ android:label="@string/permgrouplab_network"
|
||
|
+ android:description="@string/permgroupdesc_network"
|
||
|
+ android:priority="900" />
|
||
|
+
|
||
|
<!-- Allows applications to open network sockets.
|
||
|
<p>Protection level: normal
|
||
|
-->
|
||
|
<permission android:name="android.permission.INTERNET"
|
||
|
+ android:permissionGroup="android.permission-group.UNDEFINED"
|
||
|
android:description="@string/permdesc_createNetworkSockets"
|
||
|
android:label="@string/permlab_createNetworkSockets"
|
||
|
android:protectionLevel="dangerous|instant" />
|
||
|
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
|
||
|
index 166d6abd1809..27c9026c863a 100644
|
||
|
--- a/core/res/res/values/strings.xml
|
||
|
+++ b/core/res/res/values/strings.xml
|
||
|
@@ -837,6 +837,11 @@
|
||
|
<!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
|
||
|
<string name="permgroupdesc_sensors">access sensor data about your vital signs</string>
|
||
|
|
||
|
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
|
||
|
+ <string name="permgrouplab_network">Network</string>
|
||
|
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
|
||
|
+ <string name="permgroupdesc_network">access the network</string>
|
||
|
+
|
||
|
<!-- Title for the capability of an accessibility service to retrieve window content. -->
|
||
|
<string name="capability_title_canRetrieveWindowContent">Retrieve window content</string>
|
||
|
<!-- Description for the capability of an accessibility service to retrieve window content. -->
|