summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI
diff options
context:
space:
mode:
authorJoe Onorato <joeo@google.com>2010-09-27 15:55:23 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-09-27 15:55:23 -0700
commit3ce57747d534913b662213f866fc00b6fa61d92a (patch)
treedfa1850e819f98be657d1fb62640e841f02886e9 /packages/SystemUI
parent710e049a6e19ee8e6c6d9218e6ecc69fce5130c2 (diff)
parenta4a6503d30ed21402847dbd25849ba2dc68a1369 (diff)
downloadframeworks_base-3ce57747d534913b662213f866fc00b6fa61d92a.zip
frameworks_base-3ce57747d534913b662213f866fc00b6fa61d92a.tar.gz
frameworks_base-3ce57747d534913b662213f866fc00b6fa61d92a.tar.bz2
Merge "Don't show X for notifications that can't be cleared"
Diffstat (limited to 'packages/SystemUI')
-rw-r--r--packages/SystemUI/res/drawable-mdpi/status_bar_veto_normal.pngbin699 -> 1139 bytes
-rw-r--r--packages/SystemUI/res/drawable-mdpi/status_bar_veto_pressed.pngbin1192 -> 1139 bytes
-rw-r--r--packages/SystemUI/res/layout-xlarge/status_bar_latest_event.xml6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarService.java28
4 files changed, 20 insertions, 14 deletions
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_veto_normal.png b/packages/SystemUI/res/drawable-mdpi/status_bar_veto_normal.png
index f9a7cc2..3b7c9c7 100644
--- a/packages/SystemUI/res/drawable-mdpi/status_bar_veto_normal.png
+++ b/packages/SystemUI/res/drawable-mdpi/status_bar_veto_normal.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_veto_pressed.png b/packages/SystemUI/res/drawable-mdpi/status_bar_veto_pressed.png
index 4461ac8..3b7c9c7 100644
--- a/packages/SystemUI/res/drawable-mdpi/status_bar_veto_pressed.png
+++ b/packages/SystemUI/res/drawable-mdpi/status_bar_veto_pressed.png
Binary files differ
diff --git a/packages/SystemUI/res/layout-xlarge/status_bar_latest_event.xml b/packages/SystemUI/res/layout-xlarge/status_bar_latest_event.xml
index fa492d0..049a1cc 100644
--- a/packages/SystemUI/res/layout-xlarge/status_bar_latest_event.xml
+++ b/packages/SystemUI/res/layout-xlarge/status_bar_latest_event.xml
@@ -8,12 +8,14 @@
<ImageButton
android:id="@+id/veto"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:src="@drawable/status_bar_veto"
+ android:scaleType="center"
android:background="@null"
- android:padding="2dip"
+ android:paddingLeft="16dip"
+ android:paddingRight="16dip"
/>
<com.android.systemui.statusbar.LatestItemView android:id="@+id/content"
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarService.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarService.java
index 41ae06a..0e26f52 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarService.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarService.java
@@ -733,19 +733,23 @@ public class TabletStatusBarService extends StatusBarService {
LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View row = inflater.inflate(R.layout.status_bar_latest_event, parent, false);
View vetoButton = row.findViewById(R.id.veto);
- final String _pkg = sbn.pkg;
- final String _tag = sbn.tag;
- final int _id = sbn.id;
- vetoButton.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- try {
- mBarService.onNotificationClear(_pkg, _tag, _id);
- } catch (RemoteException ex) {
- // system process is dead if we're here.
+ if (entry.notification.isClearable()) {
+ final String _pkg = sbn.pkg;
+ final String _tag = sbn.tag;
+ final int _id = sbn.id;
+ vetoButton.setOnClickListener(new View.OnClickListener() {
+ public void onClick(View v) {
+ try {
+ mBarService.onNotificationClear(_pkg, _tag, _id);
+ } catch (RemoteException ex) {
+ // system process is dead if we're here.
+ }
+ // animateCollapse();
}
-// animateCollapse();
- }
- });
+ });
+ } else {
+ vetoButton.setVisibility(View.INVISIBLE);
+ }
// bind the click event to the content area
ViewGroup content = (ViewGroup)row.findViewById(R.id.content);