summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2012-01-08 09:35:21 +0300
committerGerrit Code Review <gerrit@review.cyanogenmod.com>2012-01-08 09:35:21 +0300
commit166e7b17c880e41e09a86f499859fd0623de0aa9 (patch)
treeebf16707d248e36b965fe42aa8944ac99ff855fe /packages
parent379e40fca591d47293e6bf7bacba69adc3753e28 (diff)
parentbf11c2fa945d5e8b685c1eb4866edc60d2ec3170 (diff)
downloadframeworks_base-166e7b17c880e41e09a86f499859fd0623de0aa9.zip
frameworks_base-166e7b17c880e41e09a86f499859fd0623de0aa9.tar.gz
frameworks_base-166e7b17c880e41e09a86f499859fd0623de0aa9.tar.bz2
Merge "PowerWidget : Indicator observer / Hide onLongClick" into ics
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/res/drawable/stat_power_bg.xml28
-rw-r--r--packages/SystemUI/res/layout/power_widget_button.xml2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/PowerWidget.java5
4 files changed, 12 insertions, 30 deletions
diff --git a/packages/SystemUI/res/drawable/stat_power_bg.xml b/packages/SystemUI/res/drawable/stat_power_bg.xml
deleted file mode 100644
index a21b510..0000000
--- a/packages/SystemUI/res/drawable/stat_power_bg.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-
- <item android:state_pressed="true"
- android:drawable="@drawable/stat_inner_press" />
-
- <item android:state_focused="true" android:state_enabled="true"
- android:state_window_focused="true"
- android:drawable="@drawable/stat_inner_focus" />
-
- <item
- android:drawable="@drawable/stat_power_background" />
-</selector>
diff --git a/packages/SystemUI/res/layout/power_widget_button.xml b/packages/SystemUI/res/layout/power_widget_button.xml
index e84fd85..ecd0cdd 100644
--- a/packages/SystemUI/res/layout/power_widget_button.xml
+++ b/packages/SystemUI/res/layout/power_widget_button.xml
@@ -23,7 +23,7 @@
android:orientation="vertical"
android:clickable="true"
android:focusable="true"
- android:background="@drawable/stat_power_bg">
+ android:background="@drawable/stat_power_background">
<ImageView android:id="@+id/power_widget_button_image"
android:layout_width="match_parent"
android:layout_height="0dip"
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 d5dce20..be0ba4a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -348,7 +348,12 @@ public class PhoneStatusBar extends StatusBar {
}
}
});
-
+ mPowerWidget.setGlobalButtonOnLongClickListener(new View.OnLongClickListener() {
+ public boolean onLongClick(View v) {
+ animateCollapse();
+ return true;
+ }
+ });
mTicker = new MyTicker(context, sb);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/PowerWidget.java b/packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/PowerWidget.java
index e8ad635..97408f2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/PowerWidget.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/PowerWidget.java
@@ -266,6 +266,11 @@ public class PowerWidget extends FrameLayout {
Settings.System.getUriFor(Settings.System.EXPANDED_VIEW_WIDGET_COLOR),
false, this);
+ // watch for changes in indicator visibility
+ resolver.registerContentObserver(
+ Settings.System.getUriFor(Settings.System.EXPANDED_HIDE_INDICATOR),
+ false, this);
+
// watch for power-button specifc stuff that has been loaded
for(Uri uri : PowerButton.getAllObservedUris()) {
resolver.registerContentObserver(uri, false, this);