diff options
author | Craig Mautner <cmautner@google.com> | 2012-12-18 08:33:27 -0800 |
---|---|---|
committer | Craig Mautner <cmautner@google.com> | 2012-12-18 10:03:21 -0800 |
commit | 0bf6ec9e377f9fafb67a36f7fb54d3f6676634fc (patch) | |
tree | b0eb5cc9b7ff7dd8c0bbc585f31c2d94a7737d5c /services/java/com/android/server/display/DisplayManagerService.java | |
parent | 2268e7ee5c450c45121ebd5796221592c087ed73 (diff) |
Clean up warnings.
Change-Id: I1dfe21e5f64364c90565b594e28074cabe7daa64
Diffstat (limited to 'services/java/com/android/server/display/DisplayManagerService.java')
-rw-r--r-- | services/java/com/android/server/display/DisplayManagerService.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/services/java/com/android/server/display/DisplayManagerService.java b/services/java/com/android/server/display/DisplayManagerService.java index e09970e93ae8..813c9c75f531 100644 --- a/services/java/com/android/server/display/DisplayManagerService.java +++ b/services/java/com/android/server/display/DisplayManagerService.java @@ -118,6 +118,9 @@ public final class DisplayManagerService extends IDisplayManager.Stub { // The synchronization root for the display manager. // This lock guards most of the display manager's state. + // NOTE: This is synchronized on while holding WindowManagerService.mWindowMap so never call + // into WindowManagerService methods that require mWindowMap while holding this unless you are + // very very sure that no deadlock can occur. private final SyncRoot mSyncRoot = new SyncRoot(); // True if in safe mode. @@ -158,7 +161,7 @@ public final class DisplayManagerService extends IDisplayManager.Stub { new CopyOnWriteArrayList<DisplayTransactionListener>(); // Set to true if all displays have been blanked by the power manager. - private int mAllDisplayBlankStateFromPowerManager; + private int mAllDisplayBlankStateFromPowerManager = DISPLAY_BLANK_STATE_UNKNOWN; // Set to true when there are pending display changes that have yet to be applied // to the surface flinger state. @@ -541,9 +544,8 @@ public final class DisplayManagerService extends IDisplayManager.Stub { synchronized (mSyncRoot) { if (mWifiDisplayAdapter != null) { return mWifiDisplayAdapter.getWifiDisplayStatusLocked(); - } else { - return new WifiDisplayStatus(); } + return new WifiDisplayStatus(); } } finally { Binder.restoreCallingIdentity(token); @@ -812,11 +814,9 @@ public final class DisplayManagerService extends IDisplayManager.Stub { Slog.w(TAG, "Missing logical display to use for physical display device: " + device.getDisplayDeviceInfoLocked()); return; - } else { - boolean isBlanked = (mAllDisplayBlankStateFromPowerManager - == DISPLAY_BLANK_STATE_BLANKED); - display.configureDisplayInTransactionLocked(device, isBlanked); } + boolean isBlanked = (mAllDisplayBlankStateFromPowerManager == DISPLAY_BLANK_STATE_BLANKED); + display.configureDisplayInTransactionLocked(device, isBlanked); // Update the viewports if needed. DisplayDeviceInfo info = device.getDisplayDeviceInfoLocked(); |