summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/am/ActivityStackSupervisor.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 49b13c5..d54feeb 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -957,6 +957,15 @@ public final class ActivityStackSupervisor implements DisplayListener {
return ActivityManager.START_CANCELED;
}
+ if (intent.getAction() != null && !isProvisioned()) {
+ switch (intent.getAction()) {
+ case Intent.ACTION_PROCESS_TEXT:
+ case Intent.ACTION_ASSIST:
+ case Intent.ACTION_VOICE_ASSIST:
+ Slog.w(TAG, "not starting assist intent while not provisioned");
+ return ActivityManager.START_NOT_CURRENT_USER_ACTIVITY;
+ }
+ }
try {
//TODO: This needs to be a flushed out API in the future.
boolean isProtected = intent.getComponent() != null
@@ -4677,4 +4686,9 @@ public final class ActivityStackSupervisor implements DisplayListener {
return onLeanbackOnly;
}
+
+ private boolean isProvisioned() {
+ return Settings.Global.getInt(mService.mContext.getContentResolver(),
+ Settings.Global.DEVICE_PROVISIONED, 0) == 1;
+ }
}