Loading packages/SystemUI/res/layout-sw600dp/status_bar.xml +0 −12 Original line number Diff line number Diff line Loading @@ -35,18 +35,6 @@ android:clipChildren="false" > <ImageView android:id="@+id/clear_all_button" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_alignParentRight="true" android:layout_marginTop="1dp" android:layout_marginRight="20dp" android:paddingLeft="15dp" android:paddingRight="15dp" android:src="@drawable/ic_notify_clear" android:visibility="invisible" /> <!-- notification icons & panel access --> <include layout="@layout/status_bar_notification_area" android:layout_width="wrap_content" Loading packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel.xml +12 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,18 @@ android:gravity="right" > <ImageView android:id="@+id/clear_all_button" android:layout_width="wrap_content" android:layout_height="@*android:dimen/status_bar_height" android:layout_alignParentRight="true" android:layout_alignParentBottom="true" android:layout_marginRight="20dp" android:paddingLeft="15dp" android:paddingRight="15dp" android:src="@drawable/ic_notify_clear" android:visibility="invisible" /> <RelativeLayout android:id="@+id/content_parent" android:layout_height="wrap_content" Loading packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java +24 −5 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, final static int PANEL_FADE_DURATION = 150; boolean mShowing; boolean mHasClearableNotifications = false; int mNotificationCount = 0; NotificationPanelTitle mTitleArea; View mSettingsButton; Loading @@ -50,6 +51,7 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, View mSettingsView; ViewGroup mContentParent; TabletStatusBar mBar; View mClearButton; // amount to slide mContentParent down by when mContentFrame is missing float mContentFrameMissingTranslation; Loading Loading @@ -84,14 +86,27 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, mNotificationScroller = findViewById(R.id.notification_scroller); mContentFrame = (ViewGroup)findViewById(R.id.content_frame); mContentFrameMissingTranslation = mContentFrame.getBackground().getMinimumHeight() + 10; mContentFrameMissingTranslation = 0; // not needed with current assets // the "X" that appears in place of the clock when the panel is showing notifications mClearButton = findViewById(R.id.clear_all_button); mClearButton.setOnClickListener(mClearButtonListener); mShowing = false; setContentFrameVisible(mNotificationCount > 0, false); } private View.OnClickListener mClearButtonListener = new View.OnClickListener() { public void onClick(View v) { mBar.clearAll(); } }; public View getClearButton() { return mClearButton; } public void show(boolean show, boolean animate) { if (show && !mShowing) { setContentFrameVisible(mSettingsView != null || mNotificationCount > 0, false); Loading Loading @@ -264,12 +279,16 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, if (mBar != null) { final boolean showX = (isShowing() && mNotificationScroller.getVisibility() == View.VISIBLE && mNotificationCount > 0); mBar.getClearButton().setVisibility(showX ? View.VISIBLE : View.INVISIBLE); && mHasClearableNotifications && mNotificationScroller.getVisibility() == View.VISIBLE); getClearButton().setVisibility(showX ? View.VISIBLE : View.INVISIBLE); } } public void setClearable(boolean clearable) { mHasClearableNotifications = clearable; } public void updatePanelModeButtons() { final boolean settingsVisible = (mSettingsView != null); mSettingsButton.setVisibility(!settingsVisible ? View.VISIBLE : View.INVISIBLE); Loading packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java +12 −20 Original line number Diff line number Diff line Loading @@ -122,7 +122,6 @@ public class TabletStatusBar extends StatusBar implements View mNotificationTrigger; NotificationIconArea mNotificationIconArea; ViewGroup mNavigationArea; View mClearButton; boolean mNotificationDNDMode; NotificationData.Entry mNotificationDNDDummyEntry; Loading Loading @@ -453,10 +452,6 @@ public class TabletStatusBar extends StatusBar implements // the more notifications icon mNotificationIconArea = (NotificationIconArea)sb.findViewById(R.id.notificationIcons); // the "X" that appears in place of the clock when the panel is showing notifications mClearButton = sb.findViewById(R.id.clear_all_button); mClearButton.setOnClickListener(mClearButtonListener); // where the icons go mIconLayout = (NotificationIconArea.IconLayout) sb.findViewById(R.id.icons); mIconLayout.setOnTouchListener(new NotificationIconTouchListener()); Loading Loading @@ -587,21 +582,6 @@ public class TabletStatusBar extends StatusBar implements return sb; } private View.OnClickListener mClearButtonListener = new View.OnClickListener() { public void onClick(View v) { try { mBarService.onClearAllNotifications(); } catch (RemoteException ex) { // system process is dead if we're here. } animateCollapse(); } }; public View getClearButton() { return mClearButton; } public int getStatusBarHeight() { return mHeightReceiver.getHeight(); } Loading Loading @@ -1204,6 +1184,9 @@ public class TabletStatusBar extends StatusBar implements } private void setAreThereNotifications() { if (mNotificationPanel != null) { mNotificationPanel.setClearable(mNotificationData.hasClearableItems()); } } /** Loading Loading @@ -1779,6 +1762,15 @@ public class TabletStatusBar extends StatusBar implements return true; } public void clearAll() { try { mBarService.onClearAllNotifications(); } catch (RemoteException ex) { // system process is dead if we're here. } animateCollapse(); } public void userActivity() { } Loading packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarView.java +5 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,11 @@ public class TabletStatusBarView extends FrameLayout { mHandler = h; } /** * Let the status bar know that if you tap on ignore while panel is showing, don't do anything. * * Debounces taps on, say, a popup's trigger when the popup is already showing. */ public void setIgnoreChildren(int index, View ignore, View panel) { mIgnoreChildren[index] = ignore; mPanels[index] = panel; Loading Loading
packages/SystemUI/res/layout-sw600dp/status_bar.xml +0 −12 Original line number Diff line number Diff line Loading @@ -35,18 +35,6 @@ android:clipChildren="false" > <ImageView android:id="@+id/clear_all_button" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_alignParentRight="true" android:layout_marginTop="1dp" android:layout_marginRight="20dp" android:paddingLeft="15dp" android:paddingRight="15dp" android:src="@drawable/ic_notify_clear" android:visibility="invisible" /> <!-- notification icons & panel access --> <include layout="@layout/status_bar_notification_area" android:layout_width="wrap_content" Loading
packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel.xml +12 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,18 @@ android:gravity="right" > <ImageView android:id="@+id/clear_all_button" android:layout_width="wrap_content" android:layout_height="@*android:dimen/status_bar_height" android:layout_alignParentRight="true" android:layout_alignParentBottom="true" android:layout_marginRight="20dp" android:paddingLeft="15dp" android:paddingRight="15dp" android:src="@drawable/ic_notify_clear" android:visibility="invisible" /> <RelativeLayout android:id="@+id/content_parent" android:layout_height="wrap_content" Loading
packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java +24 −5 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, final static int PANEL_FADE_DURATION = 150; boolean mShowing; boolean mHasClearableNotifications = false; int mNotificationCount = 0; NotificationPanelTitle mTitleArea; View mSettingsButton; Loading @@ -50,6 +51,7 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, View mSettingsView; ViewGroup mContentParent; TabletStatusBar mBar; View mClearButton; // amount to slide mContentParent down by when mContentFrame is missing float mContentFrameMissingTranslation; Loading Loading @@ -84,14 +86,27 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, mNotificationScroller = findViewById(R.id.notification_scroller); mContentFrame = (ViewGroup)findViewById(R.id.content_frame); mContentFrameMissingTranslation = mContentFrame.getBackground().getMinimumHeight() + 10; mContentFrameMissingTranslation = 0; // not needed with current assets // the "X" that appears in place of the clock when the panel is showing notifications mClearButton = findViewById(R.id.clear_all_button); mClearButton.setOnClickListener(mClearButtonListener); mShowing = false; setContentFrameVisible(mNotificationCount > 0, false); } private View.OnClickListener mClearButtonListener = new View.OnClickListener() { public void onClick(View v) { mBar.clearAll(); } }; public View getClearButton() { return mClearButton; } public void show(boolean show, boolean animate) { if (show && !mShowing) { setContentFrameVisible(mSettingsView != null || mNotificationCount > 0, false); Loading Loading @@ -264,12 +279,16 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, if (mBar != null) { final boolean showX = (isShowing() && mNotificationScroller.getVisibility() == View.VISIBLE && mNotificationCount > 0); mBar.getClearButton().setVisibility(showX ? View.VISIBLE : View.INVISIBLE); && mHasClearableNotifications && mNotificationScroller.getVisibility() == View.VISIBLE); getClearButton().setVisibility(showX ? View.VISIBLE : View.INVISIBLE); } } public void setClearable(boolean clearable) { mHasClearableNotifications = clearable; } public void updatePanelModeButtons() { final boolean settingsVisible = (mSettingsView != null); mSettingsButton.setVisibility(!settingsVisible ? View.VISIBLE : View.INVISIBLE); Loading
packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java +12 −20 Original line number Diff line number Diff line Loading @@ -122,7 +122,6 @@ public class TabletStatusBar extends StatusBar implements View mNotificationTrigger; NotificationIconArea mNotificationIconArea; ViewGroup mNavigationArea; View mClearButton; boolean mNotificationDNDMode; NotificationData.Entry mNotificationDNDDummyEntry; Loading Loading @@ -453,10 +452,6 @@ public class TabletStatusBar extends StatusBar implements // the more notifications icon mNotificationIconArea = (NotificationIconArea)sb.findViewById(R.id.notificationIcons); // the "X" that appears in place of the clock when the panel is showing notifications mClearButton = sb.findViewById(R.id.clear_all_button); mClearButton.setOnClickListener(mClearButtonListener); // where the icons go mIconLayout = (NotificationIconArea.IconLayout) sb.findViewById(R.id.icons); mIconLayout.setOnTouchListener(new NotificationIconTouchListener()); Loading Loading @@ -587,21 +582,6 @@ public class TabletStatusBar extends StatusBar implements return sb; } private View.OnClickListener mClearButtonListener = new View.OnClickListener() { public void onClick(View v) { try { mBarService.onClearAllNotifications(); } catch (RemoteException ex) { // system process is dead if we're here. } animateCollapse(); } }; public View getClearButton() { return mClearButton; } public int getStatusBarHeight() { return mHeightReceiver.getHeight(); } Loading Loading @@ -1204,6 +1184,9 @@ public class TabletStatusBar extends StatusBar implements } private void setAreThereNotifications() { if (mNotificationPanel != null) { mNotificationPanel.setClearable(mNotificationData.hasClearableItems()); } } /** Loading Loading @@ -1779,6 +1762,15 @@ public class TabletStatusBar extends StatusBar implements return true; } public void clearAll() { try { mBarService.onClearAllNotifications(); } catch (RemoteException ex) { // system process is dead if we're here. } animateCollapse(); } public void userActivity() { } Loading
packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarView.java +5 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,11 @@ public class TabletStatusBarView extends FrameLayout { mHandler = h; } /** * Let the status bar know that if you tap on ignore while panel is showing, don't do anything. * * Debounces taps on, say, a popup's trigger when the popup is already showing. */ public void setIgnoreChildren(int index, View ignore, View panel) { mIgnoreChildren[index] = ignore; mPanels[index] = panel; Loading