Loading core/java/android/app/smartspace/flags.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -6,3 +6,10 @@ flag { description: "Flag to enable the FlaggedApi to include RemoteViews in SmartspaceTarget" bug: "300157758" } flag { name: "access_smartspace" namespace: "sysui_integrations" description: "Flag to enable the ACCESS_SMARTSPACE check in SmartspaceManagerService" bug: "297207196" } services/smartspace/java/com/android/server/smartspace/SmartspaceManagerService.java +3 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.app.smartspace.ISmartspaceManager; import android.app.smartspace.SmartspaceConfig; import android.app.smartspace.SmartspaceSessionId; import android.app.smartspace.SmartspaceTargetEvent; import android.app.smartspace.flags.Flags; import android.content.Context; import android.os.Binder; import android.os.IBinder; Loading Loading @@ -165,7 +166,8 @@ public class SmartspaceManagerService extends } Context ctx = getContext(); if (!(ctx.checkCallingPermission(MANAGE_SMARTSPACE) == PERMISSION_GRANTED || ctx.checkCallingPermission(ACCESS_SMARTSPACE) == PERMISSION_GRANTED || (Flags.accessSmartspace() && ctx.checkCallingPermission(ACCESS_SMARTSPACE) == PERMISSION_GRANTED) || mServiceNameResolver.isTemporary(userId) || mActivityTaskManagerInternal.isCallerRecents(Binder.getCallingUid()))) { Loading Loading
core/java/android/app/smartspace/flags.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -6,3 +6,10 @@ flag { description: "Flag to enable the FlaggedApi to include RemoteViews in SmartspaceTarget" bug: "300157758" } flag { name: "access_smartspace" namespace: "sysui_integrations" description: "Flag to enable the ACCESS_SMARTSPACE check in SmartspaceManagerService" bug: "297207196" }
services/smartspace/java/com/android/server/smartspace/SmartspaceManagerService.java +3 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.app.smartspace.ISmartspaceManager; import android.app.smartspace.SmartspaceConfig; import android.app.smartspace.SmartspaceSessionId; import android.app.smartspace.SmartspaceTargetEvent; import android.app.smartspace.flags.Flags; import android.content.Context; import android.os.Binder; import android.os.IBinder; Loading Loading @@ -165,7 +166,8 @@ public class SmartspaceManagerService extends } Context ctx = getContext(); if (!(ctx.checkCallingPermission(MANAGE_SMARTSPACE) == PERMISSION_GRANTED || ctx.checkCallingPermission(ACCESS_SMARTSPACE) == PERMISSION_GRANTED || (Flags.accessSmartspace() && ctx.checkCallingPermission(ACCESS_SMARTSPACE) == PERMISSION_GRANTED) || mServiceNameResolver.isTemporary(userId) || mActivityTaskManagerInternal.isCallerRecents(Binder.getCallingUid()))) { Loading