feat(MultiFingerMultiTap): Add tutorial for two finger triple tap

This tutorial is showing when user enabled two finger triple tap shortcut

Bug: 297805269
Test: manual
Test: atest AccessibilityGesturenavigationTutorialTest
Change-Id: Ie56cffe809e801c497d9d55d92a4b55084d496ce
This commit is contained in:
Jean Chen
2023-10-27 16:58:48 +08:00
parent 198ae8901b
commit 2870455091
3 changed files with 48 additions and 0 deletions

View File

@@ -32,11 +32,15 @@ import android.app.settings.SettingsEnums;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.platform.test.annotations.RequiresFlagsEnabled;
import android.platform.test.flag.junit.CheckFlagsRule;
import android.platform.test.flag.junit.DeviceFlagsValueProvider;
import android.view.View;
import androidx.appcompat.app.AlertDialog;
import androidx.test.core.app.ApplicationProvider;
import com.android.server.accessibility.Flags;
import com.android.settings.SettingsActivity;
import com.android.settings.SubSettings;
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
@@ -59,6 +63,8 @@ public final class AccessibilityGestureNavigationTutorialTest {
@Rule
public final MockitoRule mMockitoRule = MockitoJUnit.rule();
@Rule
public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule();
@Mock
private DialogInterface.OnClickListener mOnClickListener;
@Mock
@@ -89,6 +95,19 @@ public final class AccessibilityGestureNavigationTutorialTest {
assertThat(alertDialog).isNotNull();
}
@Test
@RequiresFlagsEnabled(Flags.FLAG_ENABLE_MAGNIFICATION_MULTIPLE_FINGER_MULTIPLE_TAP_GESTURE)
public void createTutorialPages_turnOnTwoFingerTripleTapShortcut_hasOnePage() {
mShortcutTypes |= UserShortcutType.TWOFINGERTRIPLETAP;
final AlertDialog alertDialog =
createAccessibilityTutorialDialog(mContext, mShortcutTypes);
assertThat(createShortcutTutorialPages(mContext,
mShortcutTypes)).hasSize(/* expectedSize= */ 1);
assertThat(alertDialog).isNotNull();
}
@Test
public void createTutorialPages_turnOnSoftwareShortcut_hasOnePage() {
mShortcutTypes |= UserShortcutType.SOFTWARE;