Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4a34217 authored by Aayush Gupta's avatar Aayush Gupta
Browse files

base: Add permissions to manage user tasks

parent a6b5c8e1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -84,6 +84,8 @@ package android {
    field public static final String GET_ACCOUNTS = "android.permission.GET_ACCOUNTS";
    field public static final String GET_ACCOUNTS_PRIVILEGED = "android.permission.GET_ACCOUNTS_PRIVILEGED";
    field public static final String GET_PACKAGE_SIZE = "android.permission.GET_PACKAGE_SIZE";
    field public static final String READ_TASKS = "android.permission.READ_TASKS";
    field public static final String WRITE_TASKS = "android.permission.WRITE_TASKS";
    field @Deprecated public static final String GET_TASKS = "android.permission.GET_TASKS";
    field public static final String GLOBAL_SEARCH = "android.permission.GLOBAL_SEARCH";
    field public static final String INSTALL_LOCATION_PROVIDER = "android.permission.INSTALL_LOCATION_PROVIDER";
@@ -190,6 +192,7 @@ package android {
    field public static final String SENSORS = "android.permission-group.SENSORS";
    field public static final String SMS = "android.permission-group.SMS";
    field public static final String STORAGE = "android.permission-group.STORAGE";
    field public static final String TASKS = "android.permission-group.TASKS";
  }
  public final class R {
+27 −0
Original line number Diff line number Diff line
@@ -2413,6 +2413,33 @@
                android:description="@string/permdesc_requestPasswordComplexity"
                android:protectionLevel="normal" />

    <!-- ====================================================================== -->
    <!-- Permissions for accessing user's tasks                                 -->
    <!-- ====================================================================== -->
    <eat-comment />

    <!-- Dummy user-facing group for tasks -->
    <permission-group android:name="android.permission-group.TASKS"
        android:icon="@drawable/perm_group_tasks"
        android:label="@string/permgrouplab_tasks"
        android:description="@string/permgroupdesc_tasks"
        android:request="@string/permgrouprequest_tasks"
        android:priority="100" />

    <!-- Allows an application to read tasks -->
    <permission android:name="android.permission.READ_TASKS"
        android:permissionGroup="android.permission-group.UNDEFINED"
        android:protectionLevel="dangerous"
        android:label="@string/permlab_readTasks"
        android:description="@string/permdesc_readTasks" />

    <!-- Allows an application to write tasks -->
    <permission android:name="android.permission.WRITE_TASKS"
        android:permissionGroup="android.permission-group.UNDEFINED"
        android:protectionLevel="dangerous"
        android:label="@string/permlab_writeTasks"
        android:description="@string/permdesc_writeTasks" />

    <!-- ================================== -->
    <!-- Permissions to access other installed applications  -->
    <!-- ================================== -->
+27 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2021 E FOUNDATION

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="24"
    android:viewportHeight="24"
    android:tint="?attr/colorControlNormal">

  <path
      android:fillColor="@android:color/white"
      android:pathData="M14,2H6C4.9,2 4.01,2.9 4.01,4L4,20c0,1.1 0.89,2 1.99,2H18c1.1,0 2,-0.9 2,-2V8L14,2zM18,20H6V4h7v5h5V20zM8.82,13.05L7.4,14.46L10.94,18l5.66,-5.66l-1.41,-1.41l-4.24,4.24L8.82,13.05z"/>
</vector>
+19 −0
Original line number Diff line number Diff line
@@ -5761,4 +5761,23 @@ ul.</string>
    <!-- Message shown to the user when the apps requests permission from this group. If ever possible this should stay below 80 characters (assuming the parameters takes 20 characters). Don't abbreviate until the message reaches 120 characters though. [CHAR LIMIT=120] -->
    <string name="permgrouprequest_fake_package_signature">Allow
        &lt;b><xliff:g id="app_name" example="Gmail">%1$s</xliff:g>&lt;/b> to spoof package signature?</string>

    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
    <string name="permlab_readTasks">Read tasks</string>
    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
    <string name="permdesc_readTasks">Allows the app to read tasks</string>

    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
    <string name="permlab_writeTasks">Write tasks</string>
    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
    <string name="permdesc_writeTasks">Allows the app to create, modify and delete tasks</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_tasks">Tasks</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_tasks">access and manage tasks</string>
    <!-- Message shown to the user when the apps requests permission from this group. If ever possible this should stay below 80 characters (assuming the parameters takes 20 characters). Don't abbreviate until the message reaches 120 characters though. [CHAR LIMIT=120] -->
    <string name="permgrouprequest_tasks">Allow
        &lt;b><xliff:g id="app_name" example="Gmail">%1$s</xliff:g>&lt;/b> to access and manage tasks?</string>

</resources>
+3 −0
Original line number Diff line number Diff line
@@ -84,6 +84,8 @@ package android {
    field public static final String GET_ACCOUNTS = "android.permission.GET_ACCOUNTS";
    field public static final String GET_ACCOUNTS_PRIVILEGED = "android.permission.GET_ACCOUNTS_PRIVILEGED";
    field public static final String GET_PACKAGE_SIZE = "android.permission.GET_PACKAGE_SIZE";
    field public static final String READ_TASKS = "android.permission.READ_TASKS";
    field public static final String WRITE_TASKS = "android.permission.WRITE_TASKS";
    field @Deprecated public static final String GET_TASKS = "android.permission.GET_TASKS";
    field public static final String GLOBAL_SEARCH = "android.permission.GLOBAL_SEARCH";
    field public static final String INSTALL_LOCATION_PROVIDER = "android.permission.INSTALL_LOCATION_PROVIDER";
@@ -190,6 +192,7 @@ package android {
    field public static final String SENSORS = "android.permission-group.SENSORS";
    field public static final String SMS = "android.permission-group.SMS";
    field public static final String STORAGE = "android.permission-group.STORAGE";
    field public static final String TASKS = "android.permission-group.TASKS";
  }
  public final class R {