summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/res/res/layout/notification_template_base.xml2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java14
-rw-r--r--tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java12
3 files changed, 22 insertions, 6 deletions
diff --git a/core/res/res/layout/notification_template_base.xml b/core/res/res/layout/notification_template_base.xml
index 74b3fa9..bd26232 100644
--- a/core/res/res/layout/notification_template_base.xml
+++ b/core/res/res/layout/notification_template_base.xml
@@ -19,7 +19,7 @@
android:background="@android:color/background_dark"
android:id="@+id/status_bar_latest_event_content"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="64dp"
internal:layout_minHeight="64dp"
internal:layout_maxHeight="64dp"
>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index ede8e7a..dba70be 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -354,9 +354,10 @@ public abstract class BaseStatusBar extends SystemUI implements
LayoutInflater inflater = (LayoutInflater)mContext.getSystemService(
Context.LAYOUT_INFLATER_SERVICE);
View row = inflater.inflate(R.layout.status_bar_notification_row, parent, false);
+
// XXX: temporary: while testing big notifications, auto-expand all of them
ViewGroup.LayoutParams lp = row.getLayoutParams();
- if (sbn.notification.bigContentView != null) {
+ if (large != null) {
lp.height = ViewGroup.LayoutParams.WRAP_CONTENT;
} else {
lp.height = minHeight;
@@ -372,9 +373,16 @@ public abstract class BaseStatusBar extends SystemUI implements
// bind the click event to the content area
ViewGroup content = (ViewGroup)row.findViewById(R.id.content);
ViewGroup adaptive = (ViewGroup)row.findViewById(R.id.adaptive);
- // XXX: update to allow controls within notification views
+
+ // Ensure that R.id.content is properly set to 64dp high if 1U
+ lp = content.getLayoutParams();
+ if (large == null) {
+ lp.height = minHeight;
+ }
+ content.setLayoutParams(lp);
+
content.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
-// content.setOnFocusChangeListener(mFocusChangeListener);
+
PendingIntent contentIntent = sbn.notification.contentIntent;
if (contentIntent != null) {
final View.OnClickListener listener = new NotificationClicker(contentIntent,
diff --git a/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java b/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java
index 5eac1f2..a90af15 100644
--- a/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java
+++ b/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java
@@ -24,6 +24,7 @@ import android.content.ContentResolver;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
+import android.os.Bundle;
import android.os.Environment;
import android.os.Vibrator;
import android.os.Handler;
@@ -44,10 +45,10 @@ public class NotificationTestList extends TestActivity
private final static String TAG = "NotificationTestList";
NotificationManager mNM;
- Vibrator mVibrator = (Vibrator)getSystemService(VIBRATOR_SERVICE);
+ Vibrator mVibrator;
Handler mHandler = new Handler();
- long mActivityCreateTime = System.currentTimeMillis();
+ long mActivityCreateTime;
long mChronometerBase = 0;
boolean mProgressDone = true;
@@ -67,6 +68,13 @@ public class NotificationTestList extends TestActivity
final int kUnnumberedIconResID = R.drawable.notificationx;
@Override
+ public void onCreate(Bundle icicle) {
+ super.onCreate(icicle);
+ mVibrator = (Vibrator)getSystemService(VIBRATOR_SERVICE);
+ mActivityCreateTime = System.currentTimeMillis();
+ }
+
+ @Override
protected String tag() {
return TAG;
}