summaryrefslogtreecommitdiffstats
path: root/services/backup
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2014-02-11 08:33:50 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-02-11 08:33:50 +0000
commitcab8617b8ccea3a99b1ee15e15915c512a10c738 (patch)
tree48d07ae2e7f69eadd4e7cd8c7d20c4ea6b37bda1 /services/backup
parent33fa09b1ffe8d14d146de4b2632103d831ff8988 (diff)
parent25df673b849de374cf1de40250dfd8a48b7ac28b (diff)
downloadframeworks_base-cab8617b8ccea3a99b1ee15e15915c512a10c738.zip
frameworks_base-cab8617b8ccea3a99b1ee15e15915c512a10c738.tar.gz
frameworks_base-cab8617b8ccea3a99b1ee15e15915c512a10c738.tar.bz2
am 25df673b: am 1b51c9cb: Merge "Make SystemService constructor take a Context." into klp-modular-dev
* commit '25df673b849de374cf1de40250dfd8a48b7ac28b': Make SystemService constructor take a Context.
Diffstat (limited to 'services/backup')
-rw-r--r--services/backup/java/com/android/server/backup/BackupManagerService.java14
-rw-r--r--services/backup/java/com/android/server/backup/BackupManagerSystemService.java36
2 files changed, 14 insertions, 36 deletions
diff --git a/services/backup/java/com/android/server/backup/BackupManagerService.java b/services/backup/java/com/android/server/backup/BackupManagerService.java
index 1e7c18a..7aff444 100644
--- a/services/backup/java/com/android/server/backup/BackupManagerService.java
+++ b/services/backup/java/com/android/server/backup/BackupManagerService.java
@@ -277,6 +277,20 @@ public class BackupManagerService extends IBackupManager.Stub {
// Watch the device provisioning operation during setup
ContentObserver mProvisionedObserver;
+ public static final class Lifecycle extends SystemService {
+ private final BackupManagerService mService;
+
+ public Lifecycle(Context context) {
+ super(context);
+ mService = new BackupManagerService(context);
+ }
+
+ @Override
+ public void onStart() {
+ publishBinderService(Context.BACKUP_SERVICE, mService);
+ }
+ }
+
class ProvisionedObserver extends ContentObserver {
public ProvisionedObserver(Handler handler) {
super(handler);
diff --git a/services/backup/java/com/android/server/backup/BackupManagerSystemService.java b/services/backup/java/com/android/server/backup/BackupManagerSystemService.java
deleted file mode 100644
index db2c94a..0000000
--- a/services/backup/java/com/android/server/backup/BackupManagerSystemService.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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);
- }
-}
-