Last active
November 26, 2021 21:38
-
-
Save victorbrndls/42284995bb70903fab0f33de3024bf49 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Returns a Task that results in TRUE if the reports can be uplaoded | |
private Task<Boolean> waitForReportAction() { | |
if (dataCollectionArbiter.isAutomaticDataCollectionEnabled()) { | |
Logger.getLogger().d("Automatic data collection is enabled. Allowing upload."); | |
... | |
return Tasks.forResult(true); | |
} else { | |
Logger.getLogger().d("Automatic data collection is disabled."); | |
... | |
dataCollectionArbiter.waitForAutomaticDataCollectionEnabled().onSuccessTask(new SuccessContinuation<Void, Boolean>() { | |
public Task<Boolean> then(@Nullable Void aVoid) throws Exception { | |
return Tasks.forResult(true); | |
} | |
}); | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment