summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com
diff options
context:
space:
mode:
authorSiddartha Pothapragada <spotha@codeaurora.org>2012-03-07 10:37:24 -0800
committerArne Coucheron <arco68@gmail.com>2012-03-24 20:05:01 +0100
commit472ea3e0219f8b631b5ca79fc319ceacca635732 (patch)
treee9dd3e5d3ca9ffe4c7bedc410f55f8c10b8f152f /packages/SystemUI/src/com
parent843609a7d1ee88f9bcc10bd8314981a9a188a054 (diff)
downloadframeworks_base-472ea3e0219f8b631b5ca79fc319ceacca635732.zip
frameworks_base-472ea3e0219f8b631b5ca79fc319ceacca635732.tar.gz
frameworks_base-472ea3e0219f8b631b5ca79fc319ceacca635732.tar.bz2
Frameworks/SystemUI: Hide expanded dialog when screen is off
Hide the expanded dialog while screen is off. Otherwise it causes continuous buffer updates to SurfaceTexture even when SCREEN is turned off and while In-Call causing a spike in power consumtion. This fix ensures that the power consumption is kept to a minimum in such a scenario. CRs-Fixed: 339815 Change-Id: Ib9154528d4f88ba12ca234be7f929a61ed098be7
Diffstat (limited to 'packages/SystemUI/src/com')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index da47219..d551ef5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -437,6 +437,7 @@ public class PhoneStatusBar extends StatusBar {
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
+ filter.addAction(Intent.ACTION_SCREEN_ON);
filter.addAction(Intent.ACTION_SCREEN_OFF);
context.registerReceiver(mBroadcastReceiver, filter);
@@ -2314,10 +2315,20 @@ public class PhoneStatusBar extends StatusBar {
}
}
animateCollapse(excludeRecents);
+ if(Intent.ACTION_SCREEN_OFF.equals(action)) {
+ // Explicitly hide the expanded dialog. Otherwise it
+ // causes continuous buffer updates to SurfaceTexture
+ // even when SCREEN is turned off (while In-Call).
+ // This keeps the power consumption to a minimum
+ // in such a scenario.
+ mExpandedDialog.hide();
+ }
}
else if (Intent.ACTION_CONFIGURATION_CHANGED.equals(action)) {
repositionNavigationBar();
updateResources();
+ } else if (Intent.ACTION_SCREEN_ON.equals(action)) {
+ mExpandedDialog.show();
}
}
};