summaryrefslogtreecommitdiff
path: root/services/contentsuggestions
diff options
context:
space:
mode:
authorSatakshi <satakshir@google.com>2019-10-29 10:57:43 -0700
committerSatakshi <satakshir@google.com>2019-11-06 13:46:08 -0800
commitd2010f262862a7cd33edde539d9a1323a0d5e61d (patch)
treeac783ad35f6e38690ad3380ebf146563ef6360d3 /services/contentsuggestions
parent3ad8b97d661cae88e05db41bb46273a1ea9dd729 (diff)
Screenshot Notification Smart Action: AiAi and - Sys UI integration
This change creates ScreenshotNotificationSmartActionsProvider, which is overridden in GoogleSystemUI. Calling AiAi is guarded by a device config flag created in cl/277143225. Test: Manually tested the code in this CL and corresponding change in SystemUIGoogle. Took a screenshot and verified that AiAi gets invoked and the screenshot notification shows smart actions. Ran new tests added in this CL 'atest ScreenshotNotificationSmartActionsTest' Bug: 143556894 Change-Id: I439a4be9aac53fb02b566ae4d438afe3edf2b37a
Diffstat (limited to 'services/contentsuggestions')
-rw-r--r--services/contentsuggestions/java/com/android/server/contentsuggestions/ContentSuggestionsManagerService.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/services/contentsuggestions/java/com/android/server/contentsuggestions/ContentSuggestionsManagerService.java b/services/contentsuggestions/java/com/android/server/contentsuggestions/ContentSuggestionsManagerService.java
index ecea251cc1ac..9cdb58d8c019 100644
--- a/services/contentsuggestions/java/com/android/server/contentsuggestions/ContentSuggestionsManagerService.java
+++ b/services/contentsuggestions/java/com/android/server/contentsuggestions/ContentSuggestionsManagerService.java
@@ -16,7 +16,6 @@
package com.android.server.contentsuggestions;
-import static android.Manifest.permission.BIND_CONTENT_SUGGESTIONS_SERVICE;
import static android.Manifest.permission.MANAGE_CONTENT_SUGGESTIONS;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
@@ -96,7 +95,7 @@ public class ContentSuggestionsManagerService extends
private void enforceCaller(int userId, String func) {
Context ctx = getContext();
- if (ctx.checkCallingPermission(BIND_CONTENT_SUGGESTIONS_SERVICE) == PERMISSION_GRANTED
+ if (ctx.checkCallingPermission(MANAGE_CONTENT_SUGGESTIONS) == PERMISSION_GRANTED
|| mServiceNameResolver.isTemporary(userId)
|| mActivityTaskManagerInternal.isCallerRecents(Binder.getCallingUid())) {
return;