Allow taps on the ticker to pass through to the notification target view
so the notification panel still opens. Bug: 3313762 Change-Id: Ia4e869b859fabe7016283f36631891c179dc82bf
This commit is contained in:
@@ -25,30 +25,39 @@
|
||||
android:layout_alignParentRight="true"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
<com.android.systemui.statusbar.tablet.InputMethodButton
|
||||
android:id="@+id/imeSwitchButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="8dip"
|
||||
android:src="@drawable/ic_sysbar_ime_default"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
<com.android.systemui.statusbar.tablet.NotificationIconArea
|
||||
android:id="@+id/notificationIcons"
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/notificationAndImeArea"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
<view
|
||||
class="com.android.systemui.statusbar.tablet.NotificationIconArea$IconLayout"
|
||||
android:id="@+id/icons"
|
||||
|
||||
<com.android.systemui.statusbar.tablet.InputMethodButton
|
||||
android:id="@+id/imeSwitchButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginLeft="8dip"
|
||||
android:src="@drawable/ic_sysbar_ime_default"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
</com.android.systemui.statusbar.tablet.NotificationIconArea>
|
||||
<com.android.systemui.statusbar.tablet.NotificationIconArea
|
||||
android:id="@+id/notificationIcons"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
<view
|
||||
class="com.android.systemui.statusbar.tablet.NotificationIconArea$IconLayout"
|
||||
android:id="@+id/icons"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingTop="5dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
/>
|
||||
</com.android.systemui.statusbar.tablet.NotificationIconArea>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/notificationTrigger"
|
||||
|
||||
@@ -119,6 +119,7 @@ public class TabletStatusBar extends StatusBar {
|
||||
View mMenuButton;
|
||||
View mRecentButton;
|
||||
|
||||
ViewGroup mNotificationAndImeArea;
|
||||
InputMethodButton mInputMethodSwitchButton;
|
||||
|
||||
NotificationPanel mNotificationPanel;
|
||||
@@ -344,6 +345,7 @@ public class TabletStatusBar extends StatusBar {
|
||||
mRecentButton.setOnClickListener(mOnClickListener);
|
||||
|
||||
// The bar contents buttons
|
||||
mNotificationAndImeArea = (ViewGroup)sb.findViewById(R.id.notificationAndImeArea);
|
||||
mInputMethodSwitchButton = (InputMethodButton) sb.findViewById(R.id.imeSwitchButton);
|
||||
|
||||
// for redirecting errant bar taps to the IME
|
||||
@@ -718,15 +720,14 @@ public class TabletStatusBar extends StatusBar {
|
||||
if (0 == (mDisabled & (StatusBarManager.DISABLE_NOTIFICATION_ICONS
|
||||
| StatusBarManager.DISABLE_NOTIFICATION_TICKER))) {
|
||||
mTicker.add(key, n);
|
||||
|
||||
mNotificationArea.setVisibility(View.GONE);
|
||||
mNotificationAndImeArea.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// called by TabletTicker when it's done with all queued ticks
|
||||
public void doneTicking() {
|
||||
mNotificationArea.setVisibility(View.VISIBLE);
|
||||
mNotificationAndImeArea.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
public void animateExpand() {
|
||||
|
||||
@@ -60,6 +60,7 @@ public class TabletStatusBarView extends FrameLayout {
|
||||
}
|
||||
}
|
||||
}
|
||||
Slog.d(TabletStatusBar.TAG, "TabletStatusBarView not intercepting event");
|
||||
return super.onInterceptTouchEvent(ev);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public class TabletTicker
|
||||
|
||||
private static final String TAG = "StatusBar.TabletTicker";
|
||||
|
||||
private static final boolean CLICKABLE_TICKER = true;
|
||||
private static final boolean CLICKABLE_TICKER = false;
|
||||
|
||||
// 3 is enough to let us see most cases, but not get so far behind that it's too annoying.
|
||||
private static final int QUEUE_LENGTH = 3;
|
||||
@@ -209,12 +209,16 @@ public class TabletTicker
|
||||
final FrameLayout view = new FrameLayout(mContext);
|
||||
final int width = res.getDimensionPixelSize(R.dimen.notification_ticker_width);
|
||||
final int height = res.getDimensionPixelSize(R.dimen.notification_large_icon_height);
|
||||
WindowManager.LayoutParams lp = new WindowManager.LayoutParams(width, height,
|
||||
WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL,
|
||||
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
|
||||
int windowFlags = WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
|
||||
| WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
|
||||
| WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
|
||||
| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL,
|
||||
| WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS;
|
||||
if (CLICKABLE_TICKER) {
|
||||
windowFlags |= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
|
||||
} else {
|
||||
windowFlags |= WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE;
|
||||
}
|
||||
WindowManager.LayoutParams lp = new WindowManager.LayoutParams(width, height,
|
||||
WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL, windowFlags,
|
||||
PixelFormat.TRANSLUCENT);
|
||||
lp.gravity = Gravity.BOTTOM | Gravity.RIGHT;
|
||||
// lp.windowAnimations = com.android.internal.R.style.Animation_Toast;
|
||||
|
||||
Reference in New Issue
Block a user