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

Commit 387267ea authored by Michal Karpinski's avatar Michal Karpinski
Browse files

Don't overly call transport.transportDirName()

Test: runtest -p com.android.server.backup frameworks-services
Bug: 63401141
Change-Id: I485bd98f805fd6be689765e77a582820c53e9bc0
parent aeff5b88
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -2877,7 +2877,7 @@ public class BackupManagerService implements BackupManagerServiceInterface {
                    // The backend reports that our dataset has been wiped.  Note this in
                    // the event log; the no-success code below will reset the backup
                    // state as well.
                    EventLog.writeEvent(EventLogTags.BACKUP_RESET, mTransport.transportDirName());
                    EventLog.writeEvent(EventLogTags.BACKUP_RESET, transportName);
                }
            } catch (Exception e) {
                Slog.e(TAG, "Error in backup thread", e);
@@ -9781,7 +9781,8 @@ if (MORE_DEBUG) Slog.v(TAG, " + got " + nRead + "; now wanting " + (size - soF
                    }
                    Slog.i(TAG, "Initializing (wiping) backup transport storage: " + transportName);
                    EventLog.writeEvent(EventLogTags.BACKUP_START, transport.transportDirName());
                    String transportDirName = transport.transportDirName();
                    EventLog.writeEvent(EventLogTags.BACKUP_START, transportDirName);
                    long startRealtime = SystemClock.elapsedRealtime();
                    int status = transport.initializeDevice();
@@ -9794,7 +9795,7 @@ if (MORE_DEBUG) Slog.v(TAG, " + got " + nRead + "; now wanting " + (size - soF
                        Slog.i(TAG, "Device init successful");
                        int millis = (int) (SystemClock.elapsedRealtime() - startRealtime);
                        EventLog.writeEvent(EventLogTags.BACKUP_INITIALIZE);
                        resetBackupState(new File(mBaseStateDir, transport.transportDirName()));
                        resetBackupState(new File(mBaseStateDir, transportDirName));
                        EventLog.writeEvent(EventLogTags.BACKUP_SUCCESS, 0, millis);
                        synchronized (mQueueLock) {
                            recordInitPendingLocked(false, transportName);
+1 −1
Original line number Diff line number Diff line
@@ -339,7 +339,7 @@ public class PerformBackupTask implements BackupRestoreTask {
                // The backend reports that our dataset has been wiped.  Note this in
                // the event log; the no-success code below will reset the backup
                // state as well.
                EventLog.writeEvent(EventLogTags.BACKUP_RESET, mTransport.transportDirName());
                EventLog.writeEvent(EventLogTags.BACKUP_RESET, transportName);
            }
        } catch (Exception e) {
            Slog.e(TAG, "Error in backup thread", e);
+3 −2
Original line number Diff line number Diff line
@@ -79,7 +79,8 @@ public class PerformInitializeTask implements Runnable {
                }

                Slog.i(TAG, "Initializing (wiping) backup transport storage: " + transportName);
                EventLog.writeEvent(EventLogTags.BACKUP_START, transport.transportDirName());
                String transportDirName = transport.transportDirName();
                EventLog.writeEvent(EventLogTags.BACKUP_START, transportDirName);
                long startRealtime = SystemClock.elapsedRealtime();
                int status = transport.initializeDevice();

@@ -94,7 +95,7 @@ public class PerformInitializeTask implements Runnable {
                    EventLog.writeEvent(EventLogTags.BACKUP_INITIALIZE);
                    backupManagerService
                            .resetBackupState(new File(backupManagerService.getBaseStateDir(),
                                    transport.transportDirName()));
                                    transportDirName));
                    EventLog.writeEvent(EventLogTags.BACKUP_SUCCESS, 0, millis);
                    synchronized (backupManagerService.getQueueLock()) {
                        backupManagerService.recordInitPendingLocked(false, transportName);