Skip to content
Snippets Groups Projects
Commit 41c471d9 authored by Kurt Partridge's avatar Kurt Partridge Committed by Android (Google) Code Review
Browse files

Merge "[FileEncap5] Move conditional logic to caller"

parents 1bc20700 9283644c
No related branches found
No related tags found
No related merge requests found
......@@ -99,7 +99,9 @@ public final class UploaderService extends IntentService {
@Override
protected void onHandleIntent(Intent intent) {
if (!isPossibleToUpload()) return;
doUpload(isUploadingUnconditionally(intent.getExtras()));
if (isUploadingUnconditionally(intent.getExtras()) || isConvenientToUpload()) {
doUpload();
}
}
private boolean isUploadingUnconditionally(final Bundle bundle) {
......@@ -129,8 +131,7 @@ public final class UploaderService extends IntentService {
return wifiInfo.isConnected();
}
private void doUpload(final boolean isUploadingUnconditionally) {
if (!(isUploadingUnconditionally || isConvenientToUpload())) return;
private void doUpload() {
if (mFilesDir == null) {
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment