summaryrefslogtreecommitdiffstats
path: root/services/backup
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2013-12-20 13:27:30 -0800
committerAmith Yamasani <yamasani@google.com>2013-12-20 14:46:56 -0800
commit817ec49e7991d4cac50b2308cd7cf5f8641e1e29 (patch)
tree173ef0eb001119a0d093f0398769a3c0a0f5a369 /services/backup
parent9158825f9c41869689d6b1786d7c7aa8bdd524ce (diff)
downloadframeworks_base-817ec49e7991d4cac50b2308cd7cf5f8641e1e29.zip
frameworks_base-817ec49e7991d4cac50b2308cd7cf5f8641e1e29.tar.gz
frameworks_base-817ec49e7991d4cac50b2308cd7cf5f8641e1e29.tar.bz2
Wrap some services into a SystemService
These services can now be excluded by modifying the list of REQUIRED_SERVICES (TB renamed) Changed appwidget, devicepolicy, backup and print services. Change-Id: Id8e2855d5c045cd57bdb02dca9ed75172803bce7
Diffstat (limited to 'services/backup')
-rw-r--r--services/backup/java/com/android/server/backup/BackupManagerService.java4
-rw-r--r--services/backup/java/com/android/server/backup/BackupManagerSystemService.java36
2 files changed, 39 insertions, 1 deletions
diff --git a/services/backup/java/com/android/server/backup/BackupManagerService.java b/services/backup/java/com/android/server/backup/BackupManagerService.java
index c2b0d10..c6dc5e6 100644
--- a/services/backup/java/com/android/server/backup/BackupManagerService.java
+++ b/services/backup/java/com/android/server/backup/BackupManagerService.java
@@ -84,6 +84,7 @@ import com.android.internal.backup.IBackupTransport;
import com.android.internal.backup.IObbBackupService;
import com.android.internal.backup.LocalTransport;
import com.android.server.EventLogTags;
+import com.android.server.SystemService;
import com.android.server.backup.PackageManagerBackupAgent.Metadata;
import java.io.BufferedInputStream;
@@ -137,6 +138,7 @@ import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.SecretKeySpec;
public class BackupManagerService extends IBackupManager.Stub {
+
private static final String TAG = "BackupManagerService";
private static final boolean DEBUG = true;
private static final boolean MORE_DEBUG = false;
@@ -6089,7 +6091,7 @@ public class BackupManagerService extends IBackupManager.Stub {
}
}
- // clean up the BackupManagerService side of the bookkeeping
+ // clean up the BackupManagerImpl side of the bookkeeping
// and cancel any pending timeout message
mBackupManager.clearRestoreSession(mSession);
}
diff --git a/services/backup/java/com/android/server/backup/BackupManagerSystemService.java b/services/backup/java/com/android/server/backup/BackupManagerSystemService.java
new file mode 100644
index 0000000..db2c94a
--- /dev/null
+++ b/services/backup/java/com/android/server/backup/BackupManagerSystemService.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.backup;
+
+import android.content.Context;
+
+import com.android.server.SystemService;
+
+public class BackupManagerSystemService extends SystemService {
+ private BackupManagerService mBackupManagerImpl;
+
+ @Override
+ public void onCreate(Context context) {
+ mBackupManagerImpl = new BackupManagerService(context);
+ }
+
+ @Override
+ public void onStart() {
+ publishBinderService(Context.BACKUP_SERVICE, mBackupManagerImpl);
+ }
+}
+