Snap for 7390572 from f3649f5e98 to sc-v2-release
Change-Id: I52b905569ec97d2ba3a8d518ed0e614a6ec1b7f3
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<com.android.launcher3.taskbar.TaskbarContainerView
|
||||
<com.android.launcher3.taskbar.TaskbarDragLayer
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/taskbar_container"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -52,4 +52,4 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</com.android.launcher3.taskbar.TaskbarContainerView>
|
||||
</com.android.launcher3.taskbar.TaskbarDragLayer>
|
||||
@@ -46,7 +46,7 @@ public class LauncherTaskbarUIController extends TaskbarUIController {
|
||||
private final TaskbarHotseatController mHotseatController;
|
||||
|
||||
private final TaskbarActivityContext mContext;
|
||||
final TaskbarContainerView mTaskbarContainerView;
|
||||
final TaskbarDragLayer mTaskbarDragLayer;
|
||||
final TaskbarView mTaskbarView;
|
||||
|
||||
private @Nullable Animator mAnimator;
|
||||
@@ -55,8 +55,8 @@ public class LauncherTaskbarUIController extends TaskbarUIController {
|
||||
public LauncherTaskbarUIController(
|
||||
BaseQuickstepLauncher launcher, TaskbarActivityContext context) {
|
||||
mContext = context;
|
||||
mTaskbarContainerView = context.getDragLayer();
|
||||
mTaskbarView = mTaskbarContainerView.findViewById(R.id.taskbar_view);
|
||||
mTaskbarDragLayer = context.getDragLayer();
|
||||
mTaskbarView = mTaskbarDragLayer.findViewById(R.id.taskbar_view);
|
||||
|
||||
mLauncher = launcher;
|
||||
mTaskbarStateHandler = mLauncher.getTaskbarStateHandler();
|
||||
@@ -99,7 +99,7 @@ public class LauncherTaskbarUIController extends TaskbarUIController {
|
||||
return new TaskbarAnimationControllerCallbacks() {
|
||||
@Override
|
||||
public void updateTaskbarBackgroundAlpha(float alpha) {
|
||||
mTaskbarContainerView.setTaskbarBackgroundAlpha(alpha);
|
||||
mTaskbarDragLayer.setTaskbarBackgroundAlpha(alpha);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -109,7 +109,7 @@ public class LauncherTaskbarUIController extends TaskbarUIController {
|
||||
|
||||
@Override
|
||||
public void updateImeBarVisibilityAlpha(float alpha) {
|
||||
mTaskbarContainerView.updateImeBarVisibilityAlpha(alpha);
|
||||
mTaskbarDragLayer.updateImeBarVisibilityAlpha(alpha);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -202,7 +202,7 @@ public class LauncherTaskbarUIController extends TaskbarUIController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onImeVisible(TaskbarContainerView containerView, boolean isVisible) {
|
||||
protected void onImeVisible(TaskbarDragLayer containerView, boolean isVisible) {
|
||||
mTaskbarAnimationController.animateToVisibilityForIme(isVisible ? 0 : 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
|
||||
|
||||
private final DeviceProfile mDeviceProfile;
|
||||
private final LayoutInflater mLayoutInflater;
|
||||
private final TaskbarContainerView mTaskbarContainerView;
|
||||
private final TaskbarDragLayer mDragLayer;
|
||||
private final TaskbarIconController mIconController;
|
||||
private final MyDragController mDragController;
|
||||
|
||||
@@ -123,9 +123,9 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
|
||||
mDeviceProfile.updateIconSize(iconScale, getResources());
|
||||
|
||||
mLayoutInflater = LayoutInflater.from(this).cloneInContext(this);
|
||||
mTaskbarContainerView = (TaskbarContainerView) mLayoutInflater
|
||||
mDragLayer = (TaskbarDragLayer) mLayoutInflater
|
||||
.inflate(R.layout.taskbar, null, false);
|
||||
mIconController = new TaskbarIconController(this, mTaskbarContainerView);
|
||||
mIconController = new TaskbarIconController(this, mDragLayer);
|
||||
mDragController = new MyDragController(this);
|
||||
|
||||
Display display = windowContext.getDisplay();
|
||||
@@ -157,7 +157,7 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
|
||||
);
|
||||
|
||||
mIconController.init(mOnTaskbarIconClickListener, mOnTaskbarIconLongClickListener);
|
||||
mWindowManager.addView(mTaskbarContainerView, mWindowLayoutParams);
|
||||
mWindowManager.addView(mDragLayer, mWindowLayoutParams);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -168,7 +168,7 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
|
||||
return;
|
||||
}
|
||||
mWindowLayoutParams.height = height;
|
||||
mWindowManager.updateViewLayout(mTaskbarContainerView, mWindowLayoutParams);
|
||||
mWindowManager.updateViewLayout(mDragLayer, mWindowLayoutParams);
|
||||
}
|
||||
|
||||
public boolean canShowNavButtons() {
|
||||
@@ -181,8 +181,8 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
|
||||
}
|
||||
|
||||
@Override
|
||||
public TaskbarContainerView getDragLayer() {
|
||||
return mTaskbarContainerView;
|
||||
public TaskbarDragLayer getDragLayer() {
|
||||
return mDragLayer;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -192,7 +192,7 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
|
||||
|
||||
@Override
|
||||
public Rect getFolderBoundingBox() {
|
||||
return mTaskbarContainerView.getFolderBoundingBox();
|
||||
return mDragLayer.getFolderBoundingBox();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -216,15 +216,28 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
|
||||
public void onDestroy() {
|
||||
setUIController(TaskbarUIController.DEFAULT);
|
||||
mIconController.onDestroy();
|
||||
mWindowManager.removeViewImmediate(mTaskbarContainerView);
|
||||
mWindowManager.removeViewImmediate(mDragLayer);
|
||||
}
|
||||
|
||||
void onNavigationButtonClick(@TaskbarButton int buttonType) {
|
||||
mNavButtonController.onButtonClick(buttonType);
|
||||
}
|
||||
|
||||
public TaskbarIconController getIconController() {
|
||||
return mIconController;
|
||||
/**
|
||||
* Should be called when the IME visibility changes, so we can hide/show Taskbar accordingly.
|
||||
*/
|
||||
public void setImeIsVisible(boolean isImeVisible) {
|
||||
mIconController.setImeIsVisible(isImeVisible);
|
||||
}
|
||||
|
||||
/**
|
||||
* When in 3 button nav, the above doesn't get called since we prevent sysui nav bar from
|
||||
* instantiating at all, which is what's responsible for sending sysui state flags over.
|
||||
*
|
||||
* @param vis IME visibility flag
|
||||
*/
|
||||
public void updateImeStatus(int displayId, int vis, boolean showImeSwitcher) {
|
||||
mIconController.updateImeStatus(displayId, vis, showImeSwitcher);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+6
-6
@@ -35,7 +35,7 @@ import com.android.systemui.shared.system.ViewTreeObserverWrapper.OnComputeInset
|
||||
/**
|
||||
* Top-level ViewGroup that hosts the TaskbarView as well as Views created by it such as Folder.
|
||||
*/
|
||||
public class TaskbarContainerView extends BaseDragLayer<TaskbarActivityContext> {
|
||||
public class TaskbarDragLayer extends BaseDragLayer<TaskbarActivityContext> {
|
||||
|
||||
private final int mFolderMargin;
|
||||
private final Paint mTaskbarBackgroundPaint;
|
||||
@@ -45,20 +45,20 @@ public class TaskbarContainerView extends BaseDragLayer<TaskbarActivityContext>
|
||||
|
||||
private final OnComputeInsetsListener mTaskbarInsetsComputer = this::onComputeTaskbarInsets;
|
||||
|
||||
public TaskbarContainerView(@NonNull Context context) {
|
||||
public TaskbarDragLayer(@NonNull Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public TaskbarContainerView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||
public TaskbarDragLayer(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public TaskbarContainerView(@NonNull Context context, @Nullable AttributeSet attrs,
|
||||
public TaskbarDragLayer(@NonNull Context context, @Nullable AttributeSet attrs,
|
||||
int defStyleAttr) {
|
||||
this(context, attrs, defStyleAttr, 0);
|
||||
}
|
||||
|
||||
public TaskbarContainerView(@NonNull Context context, @Nullable AttributeSet attrs,
|
||||
public TaskbarDragLayer(@NonNull Context context, @Nullable AttributeSet attrs,
|
||||
int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, 1 /* alphaChannelCount */);
|
||||
mFolderMargin = getResources().getDimensionPixelSize(R.dimen.taskbar_folder_margin);
|
||||
@@ -118,7 +118,7 @@ public class TaskbarContainerView extends BaseDragLayer<TaskbarActivityContext>
|
||||
public void onViewRemoved(View child) {
|
||||
super.onViewRemoved(child);
|
||||
if (mControllerCallbacks != null) {
|
||||
mControllerCallbacks.onContainerViewRemoved();
|
||||
mControllerCallbacks.onDragLayerViewRemoved();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class TaskbarIconController {
|
||||
private final Rect mTempRect = new Rect();
|
||||
|
||||
private final TaskbarActivityContext mActivity;
|
||||
private final TaskbarContainerView mContainerView;
|
||||
private final TaskbarDragLayer mDragLayer;
|
||||
|
||||
private final TaskbarView mTaskbarView;
|
||||
private final ImeBarView mImeBarView;
|
||||
@@ -49,15 +49,15 @@ public class TaskbarIconController {
|
||||
@NonNull
|
||||
private TaskbarUIController mUIController = TaskbarUIController.DEFAULT;
|
||||
|
||||
TaskbarIconController(TaskbarActivityContext activity, TaskbarContainerView containerView) {
|
||||
TaskbarIconController(TaskbarActivityContext activity, TaskbarDragLayer dragLayer) {
|
||||
mActivity = activity;
|
||||
mContainerView = containerView;
|
||||
mTaskbarView = mContainerView.findViewById(R.id.taskbar_view);
|
||||
mImeBarView = mContainerView.findViewById(R.id.ime_bar_view);
|
||||
mDragLayer = dragLayer;
|
||||
mTaskbarView = mDragLayer.findViewById(R.id.taskbar_view);
|
||||
mImeBarView = mDragLayer.findViewById(R.id.ime_bar_view);
|
||||
}
|
||||
|
||||
public void init(OnClickListener clickListener, OnLongClickListener longClickListener) {
|
||||
mContainerView.addOnLayoutChangeListener((v, a, b, c, d, e, f, g, h) ->
|
||||
mDragLayer.addOnLayoutChangeListener((v, a, b, c, d, e, f, g, h) ->
|
||||
mUIController.alignRealHotseatWithTaskbar());
|
||||
|
||||
ButtonProvider buttonProvider = new ButtonProvider(mActivity);
|
||||
@@ -65,11 +65,11 @@ public class TaskbarIconController {
|
||||
mTaskbarView.construct(clickListener, longClickListener, buttonProvider);
|
||||
mTaskbarView.getLayoutParams().height = mActivity.getDeviceProfile().taskbarSize;
|
||||
|
||||
mContainerView.init(new Callbacks(), mTaskbarView);
|
||||
mDragLayer.init(new Callbacks(), mTaskbarView);
|
||||
}
|
||||
|
||||
public void onDestroy() {
|
||||
mContainerView.onDestroy();
|
||||
mDragLayer.onDestroy();
|
||||
}
|
||||
|
||||
public void setUIController(@NonNull TaskbarUIController uiController) {
|
||||
@@ -96,11 +96,11 @@ public class TaskbarIconController {
|
||||
*/
|
||||
public void setImeIsVisible(boolean isImeVisible) {
|
||||
mTaskbarView.setTouchesEnabled(!isImeVisible);
|
||||
mUIController.onImeVisible(mContainerView, isImeVisible);
|
||||
mUIController.onImeVisible(mDragLayer, isImeVisible);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callbacks for {@link TaskbarContainerView} to interact with the icon controller
|
||||
* Callbacks for {@link TaskbarDragLayer} to interact with the icon controller
|
||||
*/
|
||||
public class Callbacks {
|
||||
|
||||
@@ -109,7 +109,7 @@ public class TaskbarIconController {
|
||||
*/
|
||||
public void updateInsetsTouchability(InsetsInfo insetsInfo) {
|
||||
insetsInfo.touchableRegion.setEmpty();
|
||||
if (mContainerView.getAlpha() < AlphaUpdateListener.ALPHA_CUTOFF_THRESHOLD) {
|
||||
if (mDragLayer.getAlpha() < AlphaUpdateListener.ALPHA_CUTOFF_THRESHOLD) {
|
||||
// Let touches pass through us.
|
||||
insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_REGION);
|
||||
} else if (mImeBarView.getVisibility() == VISIBLE) {
|
||||
@@ -122,7 +122,7 @@ public class TaskbarIconController {
|
||||
insetsInfo.setTouchableInsets(TOUCHABLE_INSETS_FRAME);
|
||||
} else {
|
||||
if (mTaskbarView.mSystemButtonContainer.getVisibility() == VISIBLE) {
|
||||
mContainerView.getDescendantRectRelativeToSelf(
|
||||
mDragLayer.getDescendantRectRelativeToSelf(
|
||||
mTaskbarView.mSystemButtonContainer, mTempRect);
|
||||
insetsInfo.touchableRegion.set(mTempRect);
|
||||
}
|
||||
@@ -135,15 +135,15 @@ public class TaskbarIconController {
|
||||
// mTaskbarView is, since its position never changes and insets rather than overlays.
|
||||
insetsInfo.contentInsets.left = mTaskbarView.getLeft();
|
||||
insetsInfo.contentInsets.top = mTaskbarView.getTop();
|
||||
insetsInfo.contentInsets.right = mContainerView.getWidth() - mTaskbarView.getRight();
|
||||
insetsInfo.contentInsets.bottom = mContainerView.getHeight() - mTaskbarView.getBottom();
|
||||
insetsInfo.contentInsets.right = mDragLayer.getWidth() - mTaskbarView.getRight();
|
||||
insetsInfo.contentInsets.bottom = mDragLayer.getHeight() - mTaskbarView.getBottom();
|
||||
}
|
||||
|
||||
public void onContainerViewRemoved() {
|
||||
int count = mContainerView.getChildCount();
|
||||
public void onDragLayerViewRemoved() {
|
||||
int count = mDragLayer.getChildCount();
|
||||
// Ensure no other children present (like Folders, etc)
|
||||
for (int i = 0; i < count; i++) {
|
||||
View v = mContainerView.getChildAt(i);
|
||||
View v = mDragLayer.getChildAt(i);
|
||||
if (!((v instanceof TaskbarView) || (v instanceof ImeBarView))) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ public class TaskbarManager implements DisplayController.DisplayInfoChangeListen
|
||||
public void onSystemUiFlagsChanged(int systemUiStateFlags) {
|
||||
boolean isImeVisible = (systemUiStateFlags & SYSUI_STATE_IME_SHOWING) != 0;
|
||||
if (mTaskbarActivityContext != null) {
|
||||
mTaskbarActivityContext.getIconController().setImeIsVisible(isImeVisible);
|
||||
mTaskbarActivityContext.setImeIsVisible(isImeVisible);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,8 +154,7 @@ public class TaskbarManager implements DisplayController.DisplayInfoChangeListen
|
||||
public void updateImeStatus(int displayId, int vis, int backDisposition,
|
||||
boolean showImeSwitcher) {
|
||||
if (mTaskbarActivityContext != null) {
|
||||
mTaskbarActivityContext.getIconController()
|
||||
.updateImeStatus(displayId, vis, showImeSwitcher);
|
||||
mTaskbarActivityContext.updateImeStatus(displayId, vis, showImeSwitcher);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public class TaskbarUIController {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void onImeVisible(TaskbarContainerView container, boolean isVisible) {
|
||||
protected void onImeVisible(TaskbarDragLayer container, boolean isVisible) {
|
||||
container.updateImeBarVisibilityAlpha(isVisible ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ import com.android.systemui.plugins.ResourceProvider;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Applies spring forces to animate from a starting rect to a target rect,
|
||||
@@ -353,7 +353,8 @@ public class RectFSpringAnim2 extends RectFSpringAnim {
|
||||
|
||||
private Interpolator getAppCloseInterpolator(Context context) {
|
||||
ResourceProvider rp = DynamicResource.provider(context);
|
||||
String path = String.format("M 0,0 C %f, %f, %f, %f, %f, %f C %f, %f, %f, %f, 1, 1",
|
||||
String path = String.format(Locale.ENGLISH,
|
||||
"M 0,0 C %f, %f, %f, %f, %f, %f C %f, %f, %f, %f, 1, 1",
|
||||
rp.getFloat(R.dimen.c1_a),
|
||||
rp.getFloat(R.dimen.c1_b),
|
||||
rp.getFloat(R.dimen.c1_c),
|
||||
|
||||
@@ -298,7 +298,7 @@ public class FloatingHeaderView extends LinearLayout implements
|
||||
|
||||
@Override
|
||||
protected void dispatchDraw(Canvas canvas) {
|
||||
if (mHeaderCollapsed && mTabLayout.getVisibility() == VISIBLE
|
||||
if (mHeaderCollapsed && !mCollapsed && mTabLayout.getVisibility() == VISIBLE
|
||||
&& mHeaderColor != Color.TRANSPARENT) {
|
||||
mBGPaint.setColor(mHeaderColor);
|
||||
mBGPaint.setAlpha((int) (255 * mHeaderAnimator.getAnimatedFraction()));
|
||||
|
||||
@@ -236,6 +236,7 @@ public class GridCustomizationsProvider extends ContentProvider {
|
||||
return;
|
||||
}
|
||||
observer.destroyed = true;
|
||||
observer.renderer.getHostToken().unlinkToDeath(observer, 0);
|
||||
Executors.MAIN_EXECUTOR.execute(observer.renderer::destroy);
|
||||
PreviewLifecycleObserver cached = mActivePreviews.get(observer.renderer.getHostToken());
|
||||
if (cached == observer) {
|
||||
|
||||
@@ -45,6 +45,8 @@ import android.view.ContextThemeWrapper;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowInsets;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.TextClock;
|
||||
|
||||
import com.android.launcher3.BubbleTextView;
|
||||
@@ -56,6 +58,7 @@ import com.android.launcher3.InvariantDeviceProfile;
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.LauncherSettings.Favorites;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.WorkspaceLayoutManager;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.folder.FolderIcon;
|
||||
@@ -205,10 +208,19 @@ public class LauncherPreviewRenderer extends ContextWrapper
|
||||
mIdp = idp;
|
||||
mDp = idp.getDeviceProfile(context).copy(context);
|
||||
|
||||
// TODO: get correct insets once display cutout API is available.
|
||||
mInsets = new Rect();
|
||||
mInsets.left = mInsets.right = (mDp.widthPx - mDp.availableWidthPx) / 2;
|
||||
mInsets.top = mInsets.bottom = (mDp.heightPx - mDp.availableHeightPx) / 2;
|
||||
if (Utilities.ATLEAST_R) {
|
||||
WindowInsets currentWindowInsets = context.getSystemService(WindowManager.class)
|
||||
.getCurrentWindowMetrics().getWindowInsets();
|
||||
mInsets = new Rect(
|
||||
currentWindowInsets.getSystemWindowInsetLeft(),
|
||||
currentWindowInsets.getSystemWindowInsetTop(),
|
||||
currentWindowInsets.getSystemWindowInsetRight(),
|
||||
currentWindowInsets.getSystemWindowInsetBottom());
|
||||
} else {
|
||||
mInsets = new Rect();
|
||||
mInsets.left = mInsets.right = (mDp.widthPx - mDp.availableWidthPx) / 2;
|
||||
mInsets.top = mInsets.bottom = (mDp.heightPx - mDp.availableHeightPx) / 2;
|
||||
}
|
||||
mDp.updateInsets(mInsets);
|
||||
|
||||
BaseIconFactory iconFactory =
|
||||
|
||||
@@ -32,6 +32,7 @@ import android.view.Display;
|
||||
import android.view.SurfaceControlViewHost;
|
||||
import android.view.SurfaceControlViewHost.SurfacePackage;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager.LayoutParams;
|
||||
import android.view.animation.AccelerateDecelerateInterpolator;
|
||||
|
||||
import androidx.annotation.UiThread;
|
||||
@@ -41,6 +42,7 @@ import com.android.launcher3.InvariantDeviceProfile;
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.LauncherSettings;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.graphics.LauncherPreviewRenderer.PreviewContext;
|
||||
import com.android.launcher3.model.BgDataModel;
|
||||
import com.android.launcher3.model.GridSizeMigrationTask;
|
||||
@@ -139,6 +141,10 @@ public class PreviewSurfaceRenderer {
|
||||
if (mWallpaperColors != null) {
|
||||
// Create a themed context, without affecting the main application context
|
||||
Context context = mContext.createDisplayContext(mDisplay);
|
||||
if (Utilities.ATLEAST_R) {
|
||||
context = context.createWindowContext(
|
||||
LayoutParams.TYPE_APPLICATION_OVERLAY, null);
|
||||
}
|
||||
LocalColorExtractor.newInstance(mContext)
|
||||
.applyColorsOverride(context, mWallpaperColors);
|
||||
inflationContext = new ContextThemeWrapper(context,
|
||||
|
||||
@@ -496,13 +496,14 @@ public final class LauncherInstrumentation {
|
||||
private void fail(String message) {
|
||||
checkForAnomaly();
|
||||
Assert.fail(formatSystemHealthMessage(formatErrorWithEvents(
|
||||
"http://go/tapl test failure:\nOverview: " + getContextDescription()
|
||||
"http://go/tapl test failure:\nSummary: " + getContextDescription()
|
||||
+ " - visible state is " + getVisibleStateMessage()
|
||||
+ ";\nDetails: " + message, true)));
|
||||
}
|
||||
|
||||
private String getContextDescription() {
|
||||
return mDiagnosticContext.isEmpty() ? "" : String.join(", ", mDiagnosticContext);
|
||||
return mDiagnosticContext.isEmpty()
|
||||
? "(no context)" : String.join(", ", mDiagnosticContext);
|
||||
}
|
||||
|
||||
void assertTrue(String message, boolean condition) {
|
||||
|
||||
Reference in New Issue
Block a user