summaryrefslogtreecommitdiffstats
path: root/services/print
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2014-02-10 19:47:07 -0800
committerJeff Brown <jeffbrown@google.com>2014-02-10 20:01:43 -0800
commitb880d880c6cd989eacc28c365fc9a41d31900da1 (patch)
tree660d93bbe7f1b74aa9eac16ac69efe16f67f346e /services/print
parentd9f9da396b41f394991f676bc74dcfc59c7070a8 (diff)
downloadframeworks_base-b880d880c6cd989eacc28c365fc9a41d31900da1.zip
frameworks_base-b880d880c6cd989eacc28c365fc9a41d31900da1.tar.gz
frameworks_base-b880d880c6cd989eacc28c365fc9a41d31900da1.tar.bz2
Make SystemService constructor take a Context.
This change simplifies the process of initializing a SystemService by folding the onCreate() step back into the constructor. It removes some ambuiguity about what work should happen in the constructor and should make it possible for services to retain most of their final fields after refactoring into the new pattern. Change-Id: I25f41af0321bc01898658ab44b369f9c5d16800b
Diffstat (limited to 'services/print')
-rw-r--r--services/print/java/com/android/server/print/PrintManagerService.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/services/print/java/com/android/server/print/PrintManagerService.java b/services/print/java/com/android/server/print/PrintManagerService.java
index 1e35678..c6fdbe5 100644
--- a/services/print/java/com/android/server/print/PrintManagerService.java
+++ b/services/print/java/com/android/server/print/PrintManagerService.java
@@ -66,13 +66,13 @@ import java.util.Set;
*/
public final class PrintManagerService extends SystemService {
+ private final PrintManagerImpl mPrintManagerImpl;
- private PrintManagerImpl mPrintManagerImpl;
-
- @Override
- public void onCreate(Context context) {
+ public PrintManagerService(Context context) {
+ super(context);
mPrintManagerImpl = new PrintManagerImpl(context);
}
+
@Override
public void onStart() {
publishBinderService(Context.PRINT_SERVICE, mPrintManagerImpl);