Search in sources :

Example 1 with SubmitDebugLogRepository

use of org.thoughtcrime.securesms.logsubmit.SubmitDebugLogRepository in project Signal-Android by WhisperSystems.

the class ShakeToReport method submitLog.

private void submitLog(@NonNull Activity activity) {
    AlertDialog spinner = SimpleProgressDialog.show(activity);
    SubmitDebugLogRepository repo = new SubmitDebugLogRepository();
    Log.i(TAG, "Submitting log...");
    repo.buildAndSubmitLog(url -> {
        Log.i(TAG, "Logs uploaded!");
        ThreadUtil.runOnMain(() -> {
            spinner.dismiss();
            if (url.isPresent()) {
                showPostSubmitDialog(activity, url.get());
            } else {
                Toast.makeText(activity, R.string.ShakeToReport_failed_to_submit, Toast.LENGTH_SHORT).show();
                enableIfVisible();
            }
        });
    });
}
Also used : AlertDialog(androidx.appcompat.app.AlertDialog) SubmitDebugLogRepository(org.thoughtcrime.securesms.logsubmit.SubmitDebugLogRepository)

Aggregations

AlertDialog (androidx.appcompat.app.AlertDialog)1 SubmitDebugLogRepository (org.thoughtcrime.securesms.logsubmit.SubmitDebugLogRepository)1