Merge "Support different types of transitions." into sc-dev am: 332ee0f374 am: 40e49eafac am: 7b1e183a46

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14682961

Change-Id: Ibda870dd3253f9cbb0efd56deb66b00d45e19174
This commit is contained in:
TreeHugger Robot
2021-05-25 13:23:34 +00:00
committed by Automerger Merge Worker
3 changed files with 65 additions and 3 deletions

View File

@@ -37,6 +37,7 @@ import androidx.fragment.app.FragmentActivity;
import com.android.settings.SettingsActivity;
import com.android.settings.testutils.shadow.ShadowUtils;
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
import com.android.settingslib.transition.SettingsTransitionHelper;
import org.junit.Before;
import org.junit.Test;
@@ -97,6 +98,7 @@ public class SubSettingLauncherTest {
.setDestination(SubSettingLauncherTest.class.getName())
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.setSourceMetricsCategory(123)
.setTransitionType(SettingsTransitionHelper.TransitionType.TRANSITION_SLIDE)
.launch();
doNothing().when(launcher).launch(any(Intent.class));
verify(launcher).launch(intentArgumentCaptor.capture());
@@ -109,6 +111,8 @@ public class SubSettingLauncherTest {
assertThat(intent.getFlags()).isEqualTo(Intent.FLAG_ACTIVITY_NEW_TASK);
assertThat(intent.getIntExtra(MetricsFeatureProvider.EXTRA_SOURCE_METRICS_CATEGORY, -1))
.isEqualTo(123);
assertThat(intent.getIntExtra(SettingsBaseActivity.EXTRA_PAGE_TRANSITION_TYPE, -1))
.isEqualTo(SettingsTransitionHelper.TransitionType.TRANSITION_SLIDE);
}
@Test