@Test public void onBackPressedWithViewAndScanning() throws Exception { final Runnable mockRunnable = mock(Runnable.class); final Output mockOutput = getMockOutput(true); presenter.setView(mockOutput); final boolean intercepted = presenter.onBackPressed(mockRunnable); assertThat(intercepted, equalTo(true)); verify(mockOutput, times(0)).cancelFlow(); verify(mockRunnable, times(0)).run(); }
@Override public boolean onBackPressed(@NonNull final Runnable ignored) { if (shouldUseDefaultBackPressedBehavior()) { execute(() -> view.cancelFlow()); } return true; }
SettingsSelectWifiNetworkPresenter extends BaseSelectWifiNetworkPresenter { @Override public boolean onBackPressed(@NonNull final Runnable ignored) { if (shouldUseDefaultBackPressedBehavior()) { execute(() -> view.cancelFlow()); } return true; } }
SettingsSelectWifiNetworkPresenter extends BaseSelectWifiNetworkPresenter { @Override public boolean onBackPressed(@NonNull final Runnable ignored) { if (shouldUseDefaultBackPressedBehavior()) { execute(() -> view.cancelFlow()); } return true; } SettingsSelectWifiNetworkPresenter(final HardwareInteractor hardwareInteractor,
                                              final boolean shouldUseToolbar); }
SettingsSelectWifiNetworkPresenter extends BaseSelectWifiNetworkPresenter { @Override public boolean onBackPressed(@NonNull final Runnable ignored) { if (shouldUseDefaultBackPressedBehavior()) { execute(() -> view.cancelFlow()); } return true; } SettingsSelectWifiNetworkPresenter(final HardwareInteractor hardwareInteractor,
                                              final boolean shouldUseToolbar); @Override boolean onBackPressed(@NonNull final Runnable ignored); @Override String getOnCreateAnalyticsEvent(); @Override String getOnScanAnalyticsEvent(); @Override String getOnRescanAnalyticsEvent(); }
SettingsSelectWifiNetworkPresenter extends BaseSelectWifiNetworkPresenter { @Override public boolean onBackPressed(@NonNull final Runnable ignored) { if (shouldUseDefaultBackPressedBehavior()) { execute(() -> view.cancelFlow()); } return true; } SettingsSelectWifiNetworkPresenter(final HardwareInteractor hardwareInteractor,
                                              final boolean shouldUseToolbar); @Override boolean onBackPressed(@NonNull final Runnable ignored); @Override String getOnCreateAnalyticsEvent(); @Override String getOnScanAnalyticsEvent(); @Override String getOnRescanAnalyticsEvent();  }