Merge "Don't show user education when integration tests are running" into sc-v2-dev am: 91ce475306

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16339146

Change-Id: I4ca0b3bded860e42244b3480efd8e04fefae7a4f
This commit is contained in:
TreeHugger Robot
2021-11-29 19:22:43 +00:00
committed by Automerger Merge Worker

View File

@@ -32,6 +32,7 @@ import android.animation.AnimatorSet;
import android.animation.ObjectAnimator; import android.animation.ObjectAnimator;
import android.animation.ValueAnimator; import android.animation.ValueAnimator;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.app.ActivityManager;
import android.content.ContentResolver; import android.content.ContentResolver;
import android.content.Context; import android.content.Context;
import android.content.Intent; 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. * Whether the educational view should show for the expanded view "manage" menu.
*/ */
private boolean shouldShowManageEdu() { private boolean shouldShowManageEdu() {
if (ActivityManager.isRunningInTestHarness()) {
return false;
}
final boolean seen = getPrefBoolean(ManageEducationViewKt.PREF_MANAGED_EDUCATION); final boolean seen = getPrefBoolean(ManageEducationViewKt.PREF_MANAGED_EDUCATION);
final boolean shouldShow = (!seen || BubbleDebugConfig.forceShowUserEducation(mContext)) final boolean shouldShow = (!seen || BubbleDebugConfig.forceShowUserEducation(mContext))
&& mExpandedBubble != null; && mExpandedBubble != null;
@@ -1140,6 +1144,9 @@ public class BubbleStackView extends FrameLayout
* Whether education view should show for the collapsed stack. * Whether education view should show for the collapsed stack.
*/ */
private boolean shouldShowStackEdu() { private boolean shouldShowStackEdu() {
if (ActivityManager.isRunningInTestHarness()) {
return false;
}
final boolean seen = getPrefBoolean(StackEducationViewKt.PREF_STACK_EDUCATION); final boolean seen = getPrefBoolean(StackEducationViewKt.PREF_STACK_EDUCATION);
final boolean shouldShow = !seen || BubbleDebugConfig.forceShowUserEducation(mContext); final boolean shouldShow = !seen || BubbleDebugConfig.forceShowUserEducation(mContext);
if (BubbleDebugConfig.DEBUG_USER_EDUCATION) { if (BubbleDebugConfig.DEBUG_USER_EDUCATION) {