Crashes extends AbstractAppCenterService { public static void generateTestCrash() { if (Constants.APPLICATION_DEBUGGABLE) { throw new TestCrashException(); } else { AppCenterLog.warn(LOG_TAG, "The application is not debuggable so SDK won't generate test crash"); } } private  Crashes(); @NonNull static synchronized Crashes getInstance(); static AppCenterFuture<Boolean> isEnabled(); static AppCenterFuture<Void> setEnabled(boolean enabled); @SuppressWarnings({"SameParameterValue", "WeakerAccess"}) static void trackError(Throwable throwable); static void trackError(Throwable throwable, Map<String, String> properties, Iterable<ErrorAttachmentLog> attachments); static void generateTestCrash(); static void setListener(CrashesListener listener); static AppCenterFuture<String> getMinidumpDirectory(); static void notifyUserConfirmation(@UserConfirmationDef int userConfirmation); static AppCenterFuture<Boolean> hasCrashedInLastSession(); static AppCenterFuture<ErrorReport> getLastSessionCrashReport(); static AppCenterFuture<Boolean> hasReceivedMemoryWarningInLastSession(); @Override synchronized void onStarted(@NonNull Context context, @NonNull Channel channel, String appSecret, String transmissionTargetToken, boolean startedFromApp); @Override Map<String, LogFactory> getLogFactories(); @Override String getServiceName(); static final int SEND; static final int DONT_SEND; static final int ALWAYS_SEND; @VisibleForTesting
    static final String PREF_KEY_ALWAYS_SEND; static final String LOG_TAG; }
@Test(expected = TestCrashException.class) public void generateTestCrashInDebug() { Constants.APPLICATION_DEBUGGABLE = true; Crashes.generateTestCrash(); }
@Test public void generateTestCrashInRelease() { Constants.APPLICATION_DEBUGGABLE = false; Crashes.generateTestCrash(); }