OSDN Git Service

Don't redundantly call transport.finishRestore()
authorChristopher Tate <ctate@google.com>
Tue, 28 Jul 2015 20:59:35 +0000 (13:59 -0700)
committerChristopher Tate <ctate@google.com>
Tue, 28 Jul 2015 21:04:04 +0000 (14:04 -0700)
The RestoreSession is no longer responsible for calling finishRestore();
that happens as part of tidying up after running the restore itself,
even in failure cases.

Bug 22640096

Change-Id: I0be52af2ae8c2c1ac685e9904ccb8120f7fcf522

services/backup/java/com/android/server/backup/BackupManagerService.java

index bf41f0f..a0aa569 100644 (file)
@@ -9535,16 +9535,8 @@ if (MORE_DEBUG) Slog.v(TAG, "   + got " + nRead + "; now wanting " + (size - soF
             public void run() {
                 // clean up the session's bookkeeping
                 synchronized (mSession) {
-                    try {
-                        if (mSession.mRestoreTransport != null) {
-                            mSession.mRestoreTransport.finishRestore();
-                        }
-                    } catch (Exception e) {
-                        Slog.e(TAG, "Error in finishRestore", e);
-                    } finally {
-                        mSession.mRestoreTransport = null;
-                        mSession.mEnded = true;
-                    }
+                    mSession.mRestoreTransport = null;
+                    mSession.mEnded = true;
                 }
 
                 // clean up the BackupManagerImpl side of the bookkeeping