SplitPairFilter
public final class SplitPairFilter
Filter for 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 Activity.getComponentName and the new started activity Intent, it matches the SplitPairRule that holds this filter.
Summary
Public constructors |
|---|
SplitPairFilter( |
Public methods |
|
|---|---|
boolean |
|
final @NonNull ComponentName |
|
final String |
|
final @NonNull ComponentName |
|
int |
hashCode() |
final boolean |
matchesActivityIntentPair(Returns |
final boolean |
matchesActivityPair(Returns |
@NonNull String |
toString() |
Public constructors
SplitPairFilter
public SplitPairFilter(
@NonNull ComponentName primaryActivityName,
@NonNull ComponentName secondaryActivityName,
String secondaryActivityIntentAction
)
| Parameters | |
|---|---|
@NonNull ComponentName primaryActivityName |
Component name of the primary activity in the split. Must be non-empty. Can contain a single wildcard at the end. Supported formats:
|
@NonNull ComponentName secondaryActivityName |
Component name of the secondary activity in the split. Must be non-empty. Can contain a single wildcard at the end. Supported formats:
|
String secondaryActivityIntentAction |
action used for secondary activity launch Intent. If it is not |
Public methods
getSecondaryActivityIntentAction
public final String getSecondaryActivityIntentAction()
getSecondaryActivityName
public final @NonNull ComponentName getSecondaryActivityName()
matchesActivityIntentPair
public final boolean matchesActivityIntentPair(
@NonNull Activity primaryActivity,
@NonNull Intent secondaryActivityIntent
)
Returns true if this SplitPairFilter matches the primaryActivity and the secondaryActivityIntent If the SplitPairFilter is created with secondaryActivityIntentAction, the filter will also compare it with Intent.getAction of the secondaryActivityIntent.
| Parameters | |
|---|---|
@NonNull Activity primaryActivity |
the |
@NonNull Intent secondaryActivityIntent |
the |
matchesActivityPair
public final boolean matchesActivityPair(
@NonNull Activity primaryActivity,
@NonNull Activity secondaryActivity
)
Returns true if this SplitPairFilter matches primaryActivity and secondaryActivity. If the SplitPairFilter is created with secondaryActivityIntentAction, the filter will also compare it with Intent.getAction of Activity.getIntent of secondaryActivity.
| Parameters | |
|---|---|
@NonNull Activity primaryActivity |
the |
@NonNull Activity secondaryActivity |
the |