diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-08-19 20:18:08 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-08-19 21:21:37 -0700 |
commit | 848c2dc93b6795e171f3dd6f64ea0be65e2762ca (patch) | |
tree | a775562a70274c54b893cabf4e72b6228dc302ff /core/java/android/hardware/display/DisplayManager.java | |
parent | 82d53ce283b7c275624d66e9bf20cfe2614af5c4 (diff) | |
download | frameworks_base-848c2dc93b6795e171f3dd6f64ea0be65e2762ca.zip frameworks_base-848c2dc93b6795e171f3dd6f64ea0be65e2762ca.tar.gz frameworks_base-848c2dc93b6795e171f3dd6f64ea0be65e2762ca.tar.bz2 |
Stub out display manager service implementation.
Reverting to the previous stub as the display adapter registration
and the logical to physical mapping is not at all what we are going
to need moving forward.
Fixed up the service initialization order so that the display manager
service has a context from the start.
Change-Id: I717f2f1099c7a77180ef207c371ec8329258850a
Diffstat (limited to 'core/java/android/hardware/display/DisplayManager.java')
-rw-r--r-- | core/java/android/hardware/display/DisplayManager.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/java/android/hardware/display/DisplayManager.java b/core/java/android/hardware/display/DisplayManager.java index 640044b..dc79710 100644 --- a/core/java/android/hardware/display/DisplayManager.java +++ b/core/java/android/hardware/display/DisplayManager.java @@ -45,14 +45,19 @@ public final class DisplayManager { /** * Gets an instance of the display manager. - * @return The display manager instance. + * + * @return The display manager instance, may be null early in system startup + * before the display manager has been fully initialized. + * * @hide */ public static DisplayManager getInstance() { synchronized (DisplayManager.class) { if (sInstance == null) { IBinder b = ServiceManager.getService(Context.DISPLAY_SERVICE); - sInstance = new DisplayManager(IDisplayManager.Stub.asInterface(b)); + if (b != null) { + sInstance = new DisplayManager(IDisplayManager.Stub.asInterface(b)); + } } return sInstance; } |