summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorMady Mellor <madym@google.com>2021-11-24 17:06:32 -0800
committerMady Mellor <madym@google.com>2021-11-24 17:08:07 -0800
commita11bcc2a2b5a3857cf2e5919251431abb19b039f (patch)
tree3247a9debcf7cc57ea8fff6f1b498cb8b2a3c315 /libs
parent35185d54b4352ac30d587ee42b360d9c46136d10 (diff)
Don't show user education when integration tests are running
Test: atest PlatformScenarioTests:android.platform.test.scenario.sysui.bubble.Overflow Fixes: 150344903 Change-Id: I9167359811bb2d105fcd6b075b95aa283ff25e30
Diffstat (limited to 'libs')
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
index 300319a2f78f..4ffb68530838 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
@@ -32,6 +32,7 @@ import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.annotation.SuppressLint;
+import android.app.ActivityManager;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
@@ -1116,6 +1117,9 @@ public class BubbleStackView extends FrameLayout
* Whether the educational view should show for the expanded view "manage" menu.
*/
private boolean shouldShowManageEdu() {
+ if (ActivityManager.isRunningInTestHarness()) {
+ return false;
+ }
final boolean seen = getPrefBoolean(ManageEducationViewKt.PREF_MANAGED_EDUCATION);
final boolean shouldShow = (!seen || BubbleDebugConfig.forceShowUserEducation(mContext))
&& mExpandedBubble != null;
@@ -1140,6 +1144,9 @@ public class BubbleStackView extends FrameLayout
* Whether education view should show for the collapsed stack.
*/
private boolean shouldShowStackEdu() {
+ if (ActivityManager.isRunningInTestHarness()) {
+ return false;
+ }
final boolean seen = getPrefBoolean(StackEducationViewKt.PREF_STACK_EDUCATION);
final boolean shouldShow = !seen || BubbleDebugConfig.forceShowUserEducation(mContext);
if (BubbleDebugConfig.DEBUG_USER_EDUCATION) {