Rename RefactoredBackupManagerService to BackupManagerService
The interface will be removed in a subsequent CL, it will be
easier to deal with merge conflicts.
Test: 1) m -j RunFrameworksServicesRoboTests
2) runtest -p com.android.server.backup frameworks-services
Bug: 65823538
Change-Id: I37c4c6758c646e1b18889ed05aa1b1d7c6129cf0
diff --git a/services/tests/servicestests/src/com/android/server/backup/TrampolineTest.java b/services/tests/servicestests/src/com/android/server/backup/TrampolineTest.java
index 5786095..bbd999b 100644
--- a/services/tests/servicestests/src/com/android/server/backup/TrampolineTest.java
+++ b/services/tests/servicestests/src/com/android/server/backup/TrampolineTest.java
@@ -82,7 +82,7 @@
};
private final int NON_USER_SYSTEM = UserHandle.USER_SYSTEM + 1;
- @Mock private RefactoredBackupManagerService mBackupManagerServiceMock;
+ @Mock private BackupManagerService mBackupManagerServiceMock;
@Mock private Context mContextMock;
@Mock private File mSuppressFileMock;
@Mock private File mSuppressFileParentMock;
@@ -101,7 +101,7 @@
public void setUp() {
MockitoAnnotations.initMocks(this);
- TrampolineTestable.sRefactoredBackupManagerServiceMock = mBackupManagerServiceMock;
+ TrampolineTestable.sBackupManagerServiceMock = mBackupManagerServiceMock;
TrampolineTestable.sSuppressFile = mSuppressFileMock;
TrampolineTestable.sCallingUid = Process.SYSTEM_UID;
TrampolineTestable.sBackupDisabled = false;
@@ -863,7 +863,7 @@
static boolean sBackupDisabled = false;
static File sSuppressFile = null;
static int sCallingUid = -1;
- static RefactoredBackupManagerService sRefactoredBackupManagerServiceMock = null;
+ static BackupManagerService sBackupManagerServiceMock = null;
private int mCreateServiceCallsCount = 0;
TrampolineTestable(Context context) {
@@ -886,9 +886,9 @@
}
@Override
- protected BackupManagerServiceInterface createRefactoredBackupManagerService() {
+ protected BackupManagerServiceInterface createBackupManagerService() {
mCreateServiceCallsCount++;
- return sRefactoredBackupManagerServiceMock;
+ return sBackupManagerServiceMock;
}
int getCreateServiceCallsCount() {
diff --git a/services/tests/servicestests/src/com/android/server/backup/utils/AppBackupUtilsTest.java b/services/tests/servicestests/src/com/android/server/backup/utils/AppBackupUtilsTest.java
index ed26296..86c83d6 100644
--- a/services/tests/servicestests/src/com/android/server/backup/utils/AppBackupUtilsTest.java
+++ b/services/tests/servicestests/src/com/android/server/backup/utils/AppBackupUtilsTest.java
@@ -27,7 +27,7 @@
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
-import com.android.server.backup.RefactoredBackupManagerService;
+import com.android.server.backup.BackupManagerService;
import com.android.server.backup.testutils.PackageManagerStub;
import org.junit.Test;
@@ -82,7 +82,7 @@
applicationInfo.flags |= ApplicationInfo.FLAG_ALLOW_BACKUP;
applicationInfo.uid = Process.SYSTEM_UID;
applicationInfo.backupAgentName = CUSTOM_BACKUP_AGENT_NAME;
- applicationInfo.packageName = RefactoredBackupManagerService.SHARED_BACKUP_AGENT_PACKAGE;
+ applicationInfo.packageName = BackupManagerService.SHARED_BACKUP_AGENT_PACKAGE;
boolean isEligible = AppBackupUtils.appIsEligibleForBackup(applicationInfo,
mPackageManagerStub);
diff --git a/services/tests/servicestests/src/com/android/server/backup/utils/TarBackupReaderTest.java b/services/tests/servicestests/src/com/android/server/backup/utils/TarBackupReaderTest.java
index 6b25d12..0cdf04b 100644
--- a/services/tests/servicestests/src/com/android/server/backup/utils/TarBackupReaderTest.java
+++ b/services/tests/servicestests/src/com/android/server/backup/utils/TarBackupReaderTest.java
@@ -47,7 +47,7 @@
import com.android.frameworks.servicestests.R;
import com.android.server.backup.FileMetadata;
-import com.android.server.backup.RefactoredBackupManagerService;
+import com.android.server.backup.BackupManagerService;
import com.android.server.backup.restore.PerformAdbRestoreTask;
import com.android.server.backup.restore.RestorePolicy;
import com.android.server.backup.testutils.PackageManagerStub;
@@ -143,8 +143,7 @@
assertThat(restorePolicy).isEqualTo(RestorePolicy.IGNORE);
assertThat(fileMetadata.packageName).isEqualTo(TEST_PACKAGE_NAME);
- assertThat(fileMetadata.path).isEqualTo(
- RefactoredBackupManagerService.BACKUP_MANIFEST_FILENAME);
+ assertThat(fileMetadata.path).isEqualTo(BackupManagerService.BACKUP_MANIFEST_FILENAME);
tarBackupReader.skipTarPadding(fileMetadata.size);