# TestActivityStack

Added in 1.2.0

*** ** * ** ***


```
public final class TestActivityStack
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/embedding/ActivityStack` | `https://developer.android.com/reference/androidx/window/testing/embedding/TestActivityStack#createTestActivityStack(kotlin.collections.List,kotlin.Boolean)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html> activitiesInProcess, boolean isEmpty )` Creates an `https://developer.android.com/reference/androidx/window/embedding/ActivityStack` instance for testing. |

## Public methods

### createTestActivityStack

Artifact: [androidx.window:window-testing](https://developer.android.com/jetpack/androidx/releases/window) [View Source](https://cs.android.com/search?q=file:androidx/window/testing/embedding/ActivityStackTesting.kt+function:TestActivityStack)

```
public static final @NonNull ActivityStack createTestActivityStack(
    @NonNull List<@NonNull Activity> activitiesInProcess,
    boolean isEmpty
)
```

Creates an `https://developer.android.com/reference/androidx/window/embedding/ActivityStack` instance for testing. The default values are an empty list for `https://developer.android.com/reference/androidx/window/testing/embedding/package-summary#TestActivityStack(kotlin.collections.List,kotlin.Boolean)` but a false value for `https://developer.android.com/reference/androidx/window/testing/embedding/package-summary#TestActivityStack(kotlin.collections.List,kotlin.Boolean)`. This is the same as being embedded with an `https://developer.android.com/reference/android/app/Activity.html` from another process.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/app/Activity.html> activitiesInProcess` | The `https://developer.android.com/reference/android/app/Activity.html` list with the same process of the host task with empty list as the default value. |
| `boolean isEmpty` | Indicates whether this `ActivityStack` contains any `https://developer.android.com/reference/android/app/Activity.html` regardless of the process with `false` as the default value. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/window/embedding/ActivityStack` | An `https://developer.android.com/reference/androidx/window/embedding/ActivityStack` instance for testing. |