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

Commit c44a8556 authored by Sergey Poromov's avatar Sergey Poromov Committed by android-build-merger
Browse files

Merge "Don\'t call BackupTransport#checkFullBackupSize when preflight timeouted." into nyc-dev

am: b9196c3a

* commit 'b9196c3a':
  Don't call BackupTransport#checkFullBackupSize when preflight timeouted.
parents 09d02c72 b9196c3a
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -3494,7 +3494,7 @@ public class BackupManagerService {
         */
        int preflightFullBackup(PackageInfo pkg, IBackupAgent agent);

        long expectedSize();
        long getExpectedSizeOrErrorCode();
    };

    class FullBackupEngine {
@@ -4555,6 +4555,10 @@ public class BackupManagerService {
                    // now wait to get our result back
                    mLatch.await();
                    int totalSize = mResult.get();
                    // If preflight timeouted, mResult will contain error code.
                    if (totalSize < 0) {
                        return totalSize;
                    }
                    if (MORE_DEBUG) {
                        Slog.v(TAG, "Got preflight response; size=" + totalSize);
                    }
@@ -4600,7 +4604,7 @@ public class BackupManagerService {
            }

            @Override
            public long expectedSize() {
            public long getExpectedSizeOrErrorCode() {
                try {
                    mLatch.await();
                    return mResult.get();
@@ -4649,7 +4653,7 @@ public class BackupManagerService {
            }

            long expectedSize() {
                return mPreflight.expectedSize();
                return mPreflight.getExpectedSizeOrErrorCode();
            }
        }
    }