summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/res/layout/status_bar_expanded.xml6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandedView.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java30
3 files changed, 37 insertions, 6 deletions
diff --git a/packages/SystemUI/res/layout/status_bar_expanded.xml b/packages/SystemUI/res/layout/status_bar_expanded.xml
index 82f41e6b10f6..dbbaf968b5bc 100644
--- a/packages/SystemUI/res/layout/status_bar_expanded.xml
+++ b/packages/SystemUI/res/layout/status_bar_expanded.xml
@@ -103,9 +103,9 @@
<TextView android:id="@+id/noNotificationsTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@drawable/title_bar_portrait"
- android:paddingLeft="5dp"
- android:textAppearance="@style/TextAppearance.StatusBar.Title"
+ android:textAppearance="@android:style/TextAppearance.Large"
+ android:padding="8dp"
+ android:gravity="center"
android:text="@string/status_bar_no_notifications_title"
/>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandedView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandedView.java
index 3276e1f7ac86..2d3ecae24176 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandedView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandedView.java
@@ -18,6 +18,7 @@ package com.android.systemui.statusbar.phone;
import android.content.Context;
import android.util.AttributeSet;
+import android.util.Slog;
import android.widget.LinearLayout;
public class ExpandedView extends LinearLayout {
@@ -44,8 +45,10 @@ public class ExpandedView extends LinearLayout {
super.onLayout(changed, left, top, right, bottom);
int height = bottom - top;
if (height != mPrevHeight) {
- //Slog.d(StatusBar.TAG, "height changed old=" + mPrevHeight
- // + " new=" + height);
+ if (PhoneStatusBar.DEBUG) {
+ Slog.d(PhoneStatusBar.TAG, "ExpandedView height changed old=" + mPrevHeight
+ + " new=" + height);
+ }
mPrevHeight = height;
mService.updateExpandedViewPos(PhoneStatusBar.EXPANDED_LEAVE_ALONE);
}
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 d3671ed1057f..e14317bb3317 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -255,6 +255,9 @@ public class PhoneStatusBar extends StatusBar {
ExpandedView expanded = (ExpandedView)View.inflate(context,
R.layout.status_bar_expanded, null);
+ if (DEBUG) {
+ expanded.setBackgroundColor(0x6000FF80);
+ }
expanded.mService = this;
mIntruderAlertView = View.inflate(context, R.layout.intruder_alert, null);
@@ -1267,6 +1270,10 @@ public class PhoneStatusBar extends StatusBar {
Slog.d(TAG, "panel: beginning to track the user's touch, y=" + y + " opening=" + opening);
}
+ // there are some race conditions that cause this to be inaccurate; let's recalculate it any
+ // time we're about to drag the panel
+ updateExpandedSize();
+
mTracking = true;
mVelocityTracker = VelocityTracker.obtain();
if (opening) {
@@ -1780,7 +1787,7 @@ public class PhoneStatusBar extends StatusBar {
void updateExpandedViewPos(int expandedPosition) {
if (SPEW) {
Slog.d(TAG, "updateExpandedViewPos before expandedPosition=" + expandedPosition
- + " mTrackingParams.y=" + mTrackingParams.y
+ + " mTrackingParams.y=" + ((mTrackingParams == null) ? "?" : mTrackingParams.y)
+ " mTrackingPosition=" + mTrackingPosition);
}
@@ -1824,6 +1831,16 @@ public class PhoneStatusBar extends StatusBar {
mExpandedParams.y = pos + mTrackingView.getHeight()
- (mTrackingParams.height-closePos) - contentsBottom;
+
+ if (SPEW) {
+ Slog.d(PhoneStatusBar.TAG,
+ "pos=" + pos +
+ " trackingHeight=" + mTrackingView.getHeight() +
+ " (trackingParams.height - closePos)=" +
+ (mTrackingParams.height - closePos) +
+ " contentsBottom=" + contentsBottom);
+ }
+
} else {
// If the tracking view is not yet visible, then we can't have
// a good value of the close view location. We need to wait for
@@ -1866,6 +1883,10 @@ public class PhoneStatusBar extends StatusBar {
}
int getExpandedHeight(int disph) {
+ if (DEBUG) {
+ Slog.d(TAG, "getExpandedHeight(" + disph + "): sbView="
+ + mStatusBarView.getHeight() + " closeView=" + mCloseView.getHeight());
+ }
return disph - mStatusBarView.getHeight() - mCloseView.getHeight();
}
@@ -1875,6 +1896,9 @@ public class PhoneStatusBar extends StatusBar {
}
void updateExpandedSize() {
+ if (DEBUG) {
+ Slog.d(TAG, "updateExpandedSize()");
+ }
if (mExpandedDialog != null && mExpandedParams != null && mDisplaySize != null) {
mExpandedParams.width = mDisplaySize.x;
mExpandedParams.height = getExpandedHeight(mDisplaySize.y);
@@ -1883,6 +1907,10 @@ public class PhoneStatusBar extends StatusBar {
} else {
mExpandedDialog.getWindow().setAttributes(mExpandedParams);
}
+ if (DEBUG) {
+ Slog.d(TAG, "updateExpandedSize: height=" + mExpandedParams.height + " " +
+ (mExpandedVisible ? "VISIBLE":"INVISIBLE"));
+ }
}
}