# SplitPairFilter

Artifact: [androidx.window:window](https://developer.android.com/jetpack/androidx/releases/window) [View Source](https://cs.android.com/search?q=file:androidx/window/embedding/SplitPairFilter.kt+class:androidx.window.embedding.SplitPairFilter) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/window#1.0.0)

*** ** * ** ***

<br />

```
class SplitPairFilter
```

<br />

*** ** * ** ***

Filter for `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairRule` and used to find if a pair of activities should be put in a split. It is used when a new activity is started from the primary activity. If the filter matches the primary `https://developer.android.com/reference/android/app/Activity.html#getComponentName()` and the new started activity `https://developer.android.com/reference/android/content/Intent.html`, it matches the `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairRule` that holds this filter.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#SplitPairFilter(android.content.ComponentName,android.content.ComponentName,kotlin.String)( primaryActivityName: https://developer.android.com/reference/android/content/ComponentName.html, secondaryActivityName: https://developer.android.com/reference/android/content/ComponentName.html, secondaryActivityIntentAction: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html? )` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#matchesActivityIntentPair(android.app.Activity,android.content.Intent)( primaryActivity: https://developer.android.com/reference/android/app/Activity.html, secondaryActivityIntent: https://developer.android.com/reference/android/content/Intent.html )` Returns `true` if this `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter` matches the `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#matchesActivityIntentPair(android.app.Activity,android.content.Intent)` and the `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#matchesActivityIntentPair(android.app.Activity,android.content.Intent)` If the `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter` is created with `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#secondaryActivityIntentAction()`, the filter will also compare it with `https://developer.android.com/reference/android/content/Intent.html#getAction()` of the `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#matchesActivityIntentPair(android.app.Activity,android.content.Intent)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#matchesActivityPair(android.app.Activity,android.app.Activity)( primaryActivity: https://developer.android.com/reference/android/app/Activity.html, secondaryActivity: https://developer.android.com/reference/android/app/Activity.html )` Returns `true` if this `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter` matches `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#matchesActivityPair(android.app.Activity,android.app.Activity)` and `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#matchesActivityPair(android.app.Activity,android.app.Activity)`. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#toString()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/android/content/ComponentName.html` | `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#primaryActivityName()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#secondaryActivityIntentAction()` |
| `https://developer.android.com/reference/android/content/ComponentName.html` | `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#secondaryActivityName()` |

## Public constructors

### SplitPairFilter

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/window#1.0.0)

```
SplitPairFilter(
    primaryActivityName: ComponentName,
    secondaryActivityName: ComponentName,
    secondaryActivityIntentAction: String?
)
```

| Parameters |
|---|---|
| `primaryActivityName: https://developer.android.com/reference/android/content/ComponentName.html` | Component name of the primary activity in the split. Must be non-empty. Can contain a single wildcard at the end. Supported formats: - package/class - `package/*` - `package/suffix.*` - `*/*` |
| `secondaryActivityName: https://developer.android.com/reference/android/content/ComponentName.html` | Component name of the secondary activity in the split. Must be non-empty. Can contain a single wildcard at the end. Supported formats: - package/class - `package/*` - `package/suffix.*` - `*/*` |
| `secondaryActivityIntentAction: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | action used for secondary activity launch Intent. If it is not `null`, the `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter` will check the activity `https://developer.android.com/reference/android/content/Intent.html#getAction()` besides the component name. If it is `null`, `https://developer.android.com/reference/android/content/Intent.html#getAction()` will be ignored. |

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### matchesActivityIntentPair

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/window#1.0.0)

```
fun matchesActivityIntentPair(
    primaryActivity: Activity,
    secondaryActivityIntent: Intent
): Boolean
```

Returns `true` if this `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter` matches the `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#matchesActivityIntentPair(android.app.Activity,android.content.Intent)` and the `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#matchesActivityIntentPair(android.app.Activity,android.content.Intent)` If the `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter` is created with `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#secondaryActivityIntentAction()`, the filter will also compare it with `https://developer.android.com/reference/android/content/Intent.html#getAction()` of the `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#matchesActivityIntentPair(android.app.Activity,android.content.Intent)`.

| Parameters |
|---|---|
| `primaryActivity: https://developer.android.com/reference/android/app/Activity.html` | the `https://developer.android.com/reference/android/app/Activity.html` to test against with the `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#primaryActivityName()` |
| `secondaryActivityIntent: https://developer.android.com/reference/android/content/Intent.html` | the `https://developer.android.com/reference/android/content/Intent.html` to test against with the `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#secondaryActivityName()` |

### matchesActivityPair

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/window#1.0.0)

```
fun matchesActivityPair(
    primaryActivity: Activity,
    secondaryActivity: Activity
): Boolean
```

Returns `true` if this `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter` matches `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#matchesActivityPair(android.app.Activity,android.app.Activity)` and `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#matchesActivityPair(android.app.Activity,android.app.Activity)`. If the `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter` is created with `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#secondaryActivityIntentAction()`, the filter will also compare it with `https://developer.android.com/reference/android/content/Intent.html#getAction()` of `https://developer.android.com/reference/android/app/Activity.html#getIntent()` of `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#matchesActivityPair(android.app.Activity,android.app.Activity)`.

| Parameters |
|---|---|
| `primaryActivity: https://developer.android.com/reference/android/app/Activity.html` | the `https://developer.android.com/reference/android/app/Activity.html` to test against with the `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#primaryActivityName()` |
| `secondaryActivity: https://developer.android.com/reference/android/app/Activity.html` | the `https://developer.android.com/reference/android/app/Activity.html` to test against with the `https://developer.android.com/reference/kotlin/androidx/window/embedding/SplitPairFilter#secondaryActivityName()` |

### toString

```
open fun toString(): String
```

## Public properties

### primaryActivityName

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/window#1.0.0)

```
val primaryActivityName: ComponentName
```

### secondaryActivityIntentAction

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/window#1.0.0)

```
val secondaryActivityIntentAction: String?
```

### secondaryActivityName

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/window#1.0.0)

```
val secondaryActivityName: ComponentName
```