Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d4c7923 authored by Kurt Partridge's avatar Kurt Partridge Committed by Android Git Automerger
Browse files

am 719bb3aa: Merge "[FileEncap3] Extract isUploadingUnconditionally method"

* commit '719bb3aa':
  [FileEncap3] Extract isUploadingUnconditionally method
parents dd505586 719bb3aa
Loading
Loading
Loading
Loading
+8 −5
Original line number Original line Diff line number Diff line
@@ -99,12 +99,15 @@ public final class UploaderService extends IntentService {
    @Override
    @Override
    protected void onHandleIntent(Intent intent) {
    protected void onHandleIntent(Intent intent) {
        if (!isPossibleToUpload()) return;
        if (!isPossibleToUpload()) return;
        boolean isUploadingUnconditionally = false;
        doUpload(isUploadingUnconditionally(intent.getExtras()));
        Bundle bundle = intent.getExtras();
        if (bundle != null && bundle.containsKey(EXTRA_UPLOAD_UNCONDITIONALLY)) {
            isUploadingUnconditionally = bundle.getBoolean(EXTRA_UPLOAD_UNCONDITIONALLY);
    }
    }
        doUpload(isUploadingUnconditionally);

    private boolean isUploadingUnconditionally(final Bundle bundle) {
        if (bundle == null) return false;
        if (bundle.containsKey(EXTRA_UPLOAD_UNCONDITIONALLY)) {
            return bundle.getBoolean(EXTRA_UPLOAD_UNCONDITIONALLY);
        }
        return false;
    }
    }


    private boolean isExternallyPowered() {
    private boolean isExternallyPowered() {