summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2012-03-30 16:37:36 -0400
committerDaniel Sandler <dsandler@android.com>2012-03-30 22:18:06 -0400
commit96fd7c1c1acc03b40b1813ef65793560c175ef80 (patch)
treee12358e8b7a6b534f378d77c0814285c4a8e1632 /packages
parent5eeee5e0bbf5aba0097a510b3e9dbb286b2b30cd (diff)
downloadframeworks_base-96fd7c1c1acc03b40b1813ef65793560c175ef80.zip
frameworks_base-96fd7c1c1acc03b40b1813ef65793560c175ef80.tar.gz
frameworks_base-96fd7c1c1acc03b40b1813ef65793560c175ef80.tar.bz2
Show action buttons in expanded notifications.
Any notification with at least one action will now have an expanded form by default. BigPicture/BigText can have actions, too, of course. Change-Id: I6f54cac65d9a9f335d8038c2105cd2c674f991ff
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java22
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java18
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java18
3 files changed, 22 insertions, 36 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 23222f2..b982220 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -19,6 +19,9 @@ package com.android.systemui.statusbar;
import java.util.ArrayList;
import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
@@ -181,6 +184,25 @@ public abstract class BaseStatusBar extends SystemUI implements
return vetoButton;
}
+
+ protected void applyLegacyRowBackground(StatusBarNotification sbn, View content) {
+ if (sbn.notification.contentView.getLayoutId() !=
+ com.android.internal.R.layout.notification_template_base) {
+ int version = 0;
+ try {
+ ApplicationInfo info = mContext.getPackageManager().getApplicationInfo(sbn.pkg, 0);
+ version = info.targetSdkVersion;
+ } catch (NameNotFoundException ex) {
+ Slog.e(TAG, "Failed looking up ApplicationInfo for " + sbn.pkg, ex);
+ }
+ if (version > 0 && version < Build.VERSION_CODES.GINGERBREAD) {
+ content.setBackgroundResource(R.drawable.notification_row_legacy_bg);
+ } else {
+ content.setBackgroundResource(R.drawable.notification_row_bg);
+ }
+ }
+ }
+
public void dismissIntruder() {
// pass
}
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 7c679b2..3737604 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -895,24 +895,6 @@ public class PhoneStatusBar extends BaseStatusBar {
return true;
}
- void applyLegacyRowBackground(StatusBarNotification sbn, View content) {
- if (sbn.notification.contentView.getLayoutId() !=
- com.android.internal.R.layout.status_bar_latest_event_content) {
- int version = 0;
- try {
- ApplicationInfo info = mContext.getPackageManager().getApplicationInfo(sbn.pkg, 0);
- version = info.targetSdkVersion;
- } catch (NameNotFoundException ex) {
- Slog.e(TAG, "Failed looking up ApplicationInfo for " + sbn.pkg, ex);
- }
- if (version > 0 && version < Build.VERSION_CODES.GINGERBREAD) {
- content.setBackgroundResource(R.drawable.notification_row_legacy_bg);
- } else {
- content.setBackgroundResource(R.drawable.notification_row_bg);
- }
- }
- }
-
StatusBarNotification removeNotificationViews(IBinder key) {
NotificationData.Entry entry = mNotificationData.remove(key);
if (entry == null) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
index 2491d18..3fa4a05 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -1880,24 +1880,6 @@ public class TabletStatusBar extends BaseStatusBar implements
return true;
}
- void applyLegacyRowBackground(StatusBarNotification sbn, View content) {
- if (sbn.notification.contentView.getLayoutId() !=
- com.android.internal.R.layout.status_bar_latest_event_content) {
- int version = 0;
- try {
- ApplicationInfo info = mContext.getPackageManager().getApplicationInfo(sbn.pkg, 0);
- version = info.targetSdkVersion;
- } catch (NameNotFoundException ex) {
- Slog.e(TAG, "Failed looking up ApplicationInfo for " + sbn.pkg, ex);
- }
- if (version > 0 && version < Build.VERSION_CODES.GINGERBREAD) {
- content.setBackgroundResource(R.drawable.notification_row_legacy_bg);
- } else {
- content.setBackgroundResource(R.drawable.notification_row_bg);
- }
- }
- }
-
public void clearAll() {
try {
mBarService.onClearAllNotifications();