@@ -104,7 +104,8 @@ public class PhoneStatusBar extends BaseStatusBar {
104104 = "com.android.internal.policy.statusbar.START" ;
105105
106106 private static final int MSG_OPEN_NOTIFICATION_PANEL = 1000 ;
107- private static final int MSG_CLOSE_NOTIFICATION_PANEL = 1001 ;
107+ private static final int MSG_CLOSE_PANELS = 1001 ;
108+ private static final int MSG_OPEN_SETTINGS_PANEL = 1002 ;
108109 // 1020-1030 reserved for BaseStatusBar
109110
110111 // will likely move to a resource or other tunable param at some point
@@ -296,7 +297,7 @@ protected PhoneStatusBarView makeStatusBarView() {
296297 public boolean onTouch (View v , MotionEvent event ) {
297298 if (event .getAction () == MotionEvent .ACTION_DOWN ) {
298299 if (mExpandedVisible && !mAnimating ) {
299- animateCollapseNotifications ();
300+ animateCollapsePanels ();
300301 }
301302 }
302303 return mStatusBarWindow .onTouchEvent (event );
@@ -778,7 +779,7 @@ public void removeNotification(IBinder key) {
778779 }
779780
780781 if (CLOSE_PANEL_WHEN_EMPTIED && mNotificationData .size () == 0 && !mAnimating ) {
781- animateCollapseNotifications ();
782+ animateCollapsePanels ();
782783 }
783784 }
784785
@@ -1051,7 +1052,7 @@ public void disable(int state) {
10511052 }
10521053 if ((diff & StatusBarManager .DISABLE_EXPAND ) != 0 ) {
10531054 if ((state & StatusBarManager .DISABLE_EXPAND ) != 0 ) {
1054- animateCollapseNotifications ();
1055+ animateCollapsePanels ();
10551056 }
10561057 }
10571058
@@ -1111,10 +1112,13 @@ public void handleMessage(Message m) {
11111112 super .handleMessage (m );
11121113 switch (m .what ) {
11131114 case MSG_OPEN_NOTIFICATION_PANEL :
1114- animateExpandNotifications ();
1115+ animateExpandNotificationsPanel ();
11151116 break ;
1116- case MSG_CLOSE_NOTIFICATION_PANEL :
1117- animateCollapseNotifications ();
1117+ case MSG_OPEN_SETTINGS_PANEL :
1118+ animateExpandSettingsPanel ();
1119+ break ;
1120+ case MSG_CLOSE_PANELS :
1121+ animateCollapsePanels ();
11181122 break ;
11191123 case MSG_SHOW_INTRUDER :
11201124 setIntruderAlertVisibility (true );
@@ -1167,11 +1171,11 @@ void makeExpandedVisible(boolean revealAfterDraw) {
11671171 visibilityChanged (true );
11681172 }
11691173
1170- public void animateCollapseNotifications () {
1171- animateCollapseNotifications (CommandQueue .FLAG_EXCLUDE_NONE );
1174+ public void animateCollapsePanels () {
1175+ animateCollapsePanels (CommandQueue .FLAG_EXCLUDE_NONE );
11721176 }
11731177
1174- public void animateCollapseNotifications (int flags ) {
1178+ public void animateCollapsePanels (int flags ) {
11751179 if (SPEW ) {
11761180 Slog .d (TAG , "animateCollapse():"
11771181 + " mExpandedVisible=" + mExpandedVisible
@@ -1196,7 +1200,7 @@ public void animateCollapseNotifications(int flags) {
11961200 }
11971201
11981202 @ Override
1199- public void animateExpandNotifications () {
1203+ public void animateExpandNotificationsPanel () {
12001204 if (SPEW ) Slog .d (TAG , "animateExpand: mExpandedVisible=" + mExpandedVisible );
12011205 if ((mDisabled & StatusBarManager .DISABLE_EXPAND ) != 0 ) {
12021206 return ;
@@ -1208,7 +1212,7 @@ public void animateExpandNotifications() {
12081212 }
12091213
12101214 @ Override
1211- public void animateExpandQuickSettings () {
1215+ public void animateExpandSettingsPanel () {
12121216 if (SPEW ) Slog .d (TAG , "animateExpand: mExpandedVisible=" + mExpandedVisible );
12131217 if ((mDisabled & StatusBarManager .DISABLE_EXPAND ) != 0 ) {
12141218 return ;
@@ -1352,7 +1356,7 @@ public void setSystemUiVisibility(int vis, int mask) {
13521356 if (0 != (diff & View .SYSTEM_UI_FLAG_LOW_PROFILE )) {
13531357 final boolean lightsOut = (0 != (vis & View .SYSTEM_UI_FLAG_LOW_PROFILE ));
13541358 if (lightsOut ) {
1355- animateCollapseNotifications ();
1359+ animateCollapsePanels ();
13561360 if (mTicking ) {
13571361 mTicker .halt ();
13581362 }
@@ -1678,7 +1682,7 @@ public void onClick(View v) {
16781682 }
16791683 }
16801684 if (snapshot .isEmpty ()) {
1681- animateCollapseNotifications (CommandQueue .FLAG_EXCLUDE_NONE );
1685+ animateCollapsePanels (CommandQueue .FLAG_EXCLUDE_NONE );
16821686 return ;
16831687 }
16841688 new Thread (new Runnable () {
@@ -1729,7 +1733,7 @@ public void run() {
17291733 mHandler .postDelayed (new Runnable () {
17301734 @ Override
17311735 public void run () {
1732- animateCollapseNotifications (CommandQueue .FLAG_EXCLUDE_NONE );
1736+ animateCollapsePanels (CommandQueue .FLAG_EXCLUDE_NONE );
17331737 }
17341738 }, totalDelay + 225 );
17351739 }
@@ -1751,7 +1755,7 @@ public void onClick(View v) {
17511755 v .getContext ().startActivityAsUser (new Intent (Settings .ACTION_SETTINGS )
17521756 .setFlags (Intent .FLAG_ACTIVITY_NEW_TASK ),
17531757 new UserHandle (UserHandle .USER_CURRENT ));
1754- animateCollapseNotifications ();
1758+ animateCollapsePanels ();
17551759 }
17561760 };
17571761
@@ -1767,7 +1771,7 @@ public void onReceive(Context context, Intent intent) {
17671771 flags |= CommandQueue .FLAG_EXCLUDE_RECENTS_PANEL ;
17681772 }
17691773 }
1770- animateCollapseNotifications (flags );
1774+ animateCollapsePanels (flags );
17711775 }
17721776 else if (Intent .ACTION_SCREEN_OFF .equals (action )) {
17731777 // no waiting!
@@ -1792,7 +1796,7 @@ else if (Intent.ACTION_SCREEN_ON.equals(action)) {
17921796 @ Override
17931797 public void userSwitched (int newUserId ) {
17941798 if (MULTIUSER_DEBUG ) mNotificationPanelDebugText .setText ("USER " + newUserId );
1795- animateCollapseNotifications ();
1799+ animateCollapsePanels ();
17961800 updateNotificationIcons ();
17971801 }
17981802
0 commit comments