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

Commit c32da6f8 authored by Shashwat Razdan's avatar Shashwat Razdan
Browse files

Adding ACCESS_SMARTSPACE permission to smartspace for client-side usage.

Bug: 297207196
Test: Deployed on Phone,CTS tests
Change-Id: I308637586cf3615dcf865eb445976f77226aa840
parent 3c9a185b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ package android {
    field public static final String ACCESS_RCS_USER_CAPABILITY_EXCHANGE = "android.permission.ACCESS_RCS_USER_CAPABILITY_EXCHANGE";
    field public static final String ACCESS_SHARED_LIBRARIES = "android.permission.ACCESS_SHARED_LIBRARIES";
    field public static final String ACCESS_SHORTCUTS = "android.permission.ACCESS_SHORTCUTS";
    field public static final String ACCESS_SMARTSPACE = "android.permission.ACCESS_SMARTSPACE";
    field public static final String ACCESS_SURFACE_FLINGER = "android.permission.ACCESS_SURFACE_FLINGER";
    field public static final String ACCESS_TUNED_INFO = "android.permission.ACCESS_TUNED_INFO";
    field public static final String ACCESS_TV_DESCRAMBLER = "android.permission.ACCESS_TV_DESCRAMBLER";
+5 −0
Original line number Diff line number Diff line
@@ -6930,6 +6930,11 @@
    <permission android:name="android.permission.MANAGE_SMARTSPACE"
        android:protectionLevel="signature" />

    <!-- @SystemApi Allows an application to access the smartspace service as a client.
     @hide  <p>Not for use by third-party applications.</p> -->
    <permission android:name="android.permission.ACCESS_SMARTSPACE"
        android:protectionLevel="signature|privileged|development" />

    <!-- @SystemApi Allows an application to manage the wallpaper effects
     generation service.
     @hide  <p>Not for use by third-party applications.</p> -->
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.server.smartspace;

import static android.Manifest.permission.MANAGE_SMARTSPACE;
import static android.Manifest.permission.ACCESS_SMARTSPACE;
import static android.app.ActivityManagerInternal.ALLOW_NON_FULL;
import static android.content.Context.SMARTSPACE_SERVICE;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
@@ -164,6 +165,7 @@ public class SmartspaceManagerService extends
            }
            Context ctx = getContext();
            if (!(ctx.checkCallingPermission(MANAGE_SMARTSPACE) == PERMISSION_GRANTED
                    || ctx.checkCallingPermission(ACCESS_SMARTSPACE) == PERMISSION_GRANTED
                    || mServiceNameResolver.isTemporary(userId)
                    || mActivityTaskManagerInternal.isCallerRecents(Binder.getCallingUid()))) {