Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ac0a46e authored by Charles Wang's avatar Charles Wang Committed by Android (Google) Code Review
Browse files

Merge "Refactor Wallet double tap power launch to be handled by SysUI instead of core." into main

parents 0d3de955 41b9693a
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -15,3 +15,13 @@ flag {
    description: "When the wallet QS tile is tapped, launch the selected card pending intent instead of the home screen pending intent."
    bug: "378469025"
}

flag {
    name: "launch_wallet_via_sysui_callbacks"
    namespace: "wallet_integration"
    description: "Refactor Wallet double press power launch to be handled by SysUI instead of core. This allows handling dismissing the keyguard before launch."
    bug: "384938619"
    metadata {
    purpose: PURPOSE_BUGFIX
    }
}
 No newline at end of file
+5 −0
Original line number Diff line number Diff line
@@ -123,6 +123,11 @@ oneway interface IStatusBar
     */
    void onCameraLaunchGestureDetected(int source);

    /**
     * Notifies the status bar that a wallet launch gesture has been detected.
     */
    void onWalletLaunchGestureDetected();

    /**
     * Notifies the status bar that the Emergency Action launch gesture has been detected.
     *
+11 −0
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FACE;
import static android.inputmethodservice.InputMethodService.BACK_DISPOSITION_ADJUST_NOTHING;
import static android.inputmethodservice.InputMethodService.BACK_DISPOSITION_DEFAULT;
import static android.inputmethodservice.InputMethodService.IME_ACTIVE;
import static android.service.quickaccesswallet.Flags.FLAG_LAUNCH_WALLET_OPTION_ON_POWER_DOUBLE_TAP;
import static android.service.quickaccesswallet.Flags.FLAG_LAUNCH_WALLET_VIA_SYSUI_CALLBACKS;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.WindowInsetsController.BEHAVIOR_DEFAULT;

@@ -366,6 +368,15 @@ public class CommandQueueTest extends SysuiTestCase {
        verify(mCallbacks).onCameraLaunchGestureDetected(eq(1));
    }

    @Test
    @EnableFlags({FLAG_LAUNCH_WALLET_OPTION_ON_POWER_DOUBLE_TAP,
            FLAG_LAUNCH_WALLET_VIA_SYSUI_CALLBACKS})
    public void testWalletLaunchGesture() {
        mCommandQueue.onWalletLaunchGestureDetected();
        waitForIdleSync();
        verify(mCallbacks).onWalletLaunchGestureDetected();
    }

    @Test
    public void testShowPipMenu() {
        mCommandQueue.showPictureInPictureMenu();
+4 −1
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ import com.android.systemui.statusbar.notification.stack.NotificationStackScroll
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler;
import com.android.systemui.wallet.controller.QuickAccessWalletController;

import org.junit.Before;
import org.junit.Test;
@@ -111,6 +112,7 @@ public class CentralSurfacesCommandQueueCallbacksTest extends SysuiTestCase {
    @Mock private EmergencyGestureIntentFactory mEmergencyGestureIntentFactory;
    @Mock private KeyguardInteractor mKeyguardInteractor;
    @Mock private QSPanelController mQSPanelController;
    @Mock private QuickAccessWalletController mQuickAccessWalletController;

    CentralSurfacesCommandQueueCallbacks mSbcqCallbacks;

@@ -149,7 +151,8 @@ public class CentralSurfacesCommandQueueCallbacksTest extends SysuiTestCase {
                mQSHost,
                mActivityStarter,
                mKeyguardInteractor,
                mEmergencyGestureIntentFactory);
                mEmergencyGestureIntentFactory,
                mQuickAccessWalletController);

        when(mUserTracker.getUserHandle()).thenReturn(
                UserHandle.of(ActivityManager.getCurrentUser()));
+4 −0
Original line number Diff line number Diff line
@@ -224,6 +224,10 @@ constructor(
        }
    }

    fun onWalletLaunchGestureDetected() {
        repository.updateWakefulness(powerButtonLaunchGestureTriggered = true)
    }

    companion object {
        private const val FSI_WAKE_WHY = "full_screen_intent"

Loading