Merge "Cleanup internal status bar APIs." into jb-mr1-dev
diff --git a/core/java/android/app/StatusBarManager.java b/core/java/android/app/StatusBarManager.java
index 1e61e10..3d656c7 100644
--- a/core/java/android/app/StatusBarManager.java
+++ b/core/java/android/app/StatusBarManager.java
@@ -97,13 +97,13 @@
}
/**
- * Expand the notifications.
+ * Expand the notifications panel.
*/
- public void expandNotifications() {
+ public void expandNotificationsPanel() {
try {
final IStatusBarService svc = getService();
if (svc != null) {
- svc.expandNotifications();
+ svc.expandNotificationsPanel();
}
} catch (RemoteException ex) {
// system process is dead anyway.
@@ -112,13 +112,13 @@
}
/**
- * Collapse the notifications.
+ * Collapse the notifications and settings panels.
*/
- public void collapseNotifications() {
+ public void collapsePanels() {
try {
final IStatusBarService svc = getService();
if (svc != null) {
- svc.collapseNotifications();
+ svc.collapsePanels();
}
} catch (RemoteException ex) {
// system process is dead anyway.
@@ -127,28 +127,13 @@
}
/**
- * Expand the quick settings.
+ * Expand the settings panel.
*/
- public void expandQuickSettings() {
+ public void expandSettingsPanel() {
try {
final IStatusBarService svc = getService();
if (svc != null) {
- svc.expandQuickSettings();
- }
- } catch (RemoteException ex) {
- // system process is dead anyway.
- throw new RuntimeException(ex);
- }
- }
-
- /**
- * Collapse the quick settings.
- */
- public void collapseQuickSettings() {
- try {
- final IStatusBarService svc = getService();
- if (svc != null) {
- svc.collapseQuickSettings();
+ svc.expandSettingsPanel();
}
} catch (RemoteException ex) {
// system process is dead anyway.
diff --git a/core/java/com/android/internal/statusbar/IStatusBar.aidl b/core/java/com/android/internal/statusbar/IStatusBar.aidl
index 0737b52..780f5b3 100644
--- a/core/java/com/android/internal/statusbar/IStatusBar.aidl
+++ b/core/java/com/android/internal/statusbar/IStatusBar.aidl
@@ -28,10 +28,9 @@
void updateNotification(IBinder key, in StatusBarNotification notification);
void removeNotification(IBinder key);
void disable(int state);
- void animateExpandNotifications();
- void animateCollapseNotifications();
- void animateExpandQuickSettings();
- void animateCollapseQuickSettings();
+ void animateExpandNotificationsPanel();
+ void animateExpandSettingsPanel();
+ void animateCollapsePanels();
void setSystemUiVisibility(int vis, int mask);
void topAppWindowChanged(boolean menuVisible);
void setImeWindowStatus(in IBinder token, int vis, int backDisposition);
diff --git a/core/java/com/android/internal/statusbar/IStatusBarService.aidl b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
index 60e2b34..600c27a 100644
--- a/core/java/com/android/internal/statusbar/IStatusBarService.aidl
+++ b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
@@ -24,16 +24,15 @@
/** @hide */
interface IStatusBarService
{
- void expandNotifications();
- void collapseNotifications();
- void expandQuickSettings();
- void collapseQuickSettings();
+ void expandNotificationsPanel();
+ void collapsePanels();
void disable(int what, IBinder token, String pkg);
void setIcon(String slot, String iconPackage, int iconId, int iconLevel, String contentDescription);
void setIconVisibility(String slot, boolean visible);
void removeIcon(String slot);
void topAppWindowChanged(boolean menuVisible);
void setImeWindowStatus(in IBinder token, int vis, int backDisposition);
+ void expandSettingsPanel();
// ---- Methods below are for use by the status bar policy services ----
// You need the STATUS_BAR_SERVICE permission
diff --git a/packages/SystemUI/src/com/android/systemui/SearchPanelView.java b/packages/SystemUI/src/com/android/systemui/SearchPanelView.java
index b0879fc..f71f554 100644
--- a/packages/SystemUI/src/com/android/systemui/SearchPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/SearchPanelView.java
@@ -72,7 +72,7 @@
private void startAssistActivity() {
// Close Recent Apps if needed
- mBar.animateCollapseNotifications(CommandQueue.FLAG_EXCLUDE_SEARCH_PANEL);
+ mBar.animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_SEARCH_PANEL);
// Launch Assist
Intent intent = ((SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE))
.getAssistIntent(mContext, UserHandle.USER_CURRENT);
@@ -220,7 +220,7 @@
public void hide(boolean animate) {
if (mBar != null) {
// This will indirectly cause show(false, ...) to get called
- mBar.animateCollapseNotifications(CommandQueue.FLAG_EXCLUDE_NONE);
+ mBar.animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE);
} else {
setVisibility(View.INVISIBLE);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index de016c0..d7b1b35 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -185,7 +185,7 @@
if (isActivity && handled) {
// close the shade if it was open
- animateCollapseNotifications(CommandQueue.FLAG_EXCLUDE_NONE);
+ animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE);
visibilityChanged(false);
}
return handled;
@@ -357,7 +357,7 @@
public boolean onMenuItemClick(MenuItem item) {
if (item.getItemId() == R.id.notification_inspect_item) {
startApplicationDetailsActivity(packageNameF);
- animateCollapseNotifications(CommandQueue.FLAG_EXCLUDE_NONE);
+ animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE);
} else {
return false;
}
@@ -789,7 +789,7 @@
}
// close the shade if it was open
- animateCollapseNotifications(CommandQueue.FLAG_EXCLUDE_NONE);
+ animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE);
visibilityChanged(false);
// If this click was on the intruder alert, hide that instead
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
index 39e49b8..752bb0c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
@@ -46,17 +46,16 @@
private static final int MSG_REMOVE_NOTIFICATION = 4 << MSG_SHIFT;
private static final int MSG_DISABLE = 5 << MSG_SHIFT;
private static final int MSG_EXPAND_NOTIFICATIONS = 6 << MSG_SHIFT;
- private static final int MSG_COLLAPSE_NOTIFICATIONS = 7 << MSG_SHIFT;
- private static final int MSG_EXPAND_QUICK_SETTINGS = 8 << MSG_SHIFT;
- private static final int MSG_COLLAPSE_QUICK_SETTINGS = 9 << MSG_SHIFT;
- private static final int MSG_SET_SYSTEMUI_VISIBILITY = 10 << MSG_SHIFT;
- private static final int MSG_TOP_APP_WINDOW_CHANGED = 11 << MSG_SHIFT;
- private static final int MSG_SHOW_IME_BUTTON = 12 << MSG_SHIFT;
- private static final int MSG_SET_HARD_KEYBOARD_STATUS = 13 << MSG_SHIFT;
- private static final int MSG_TOGGLE_RECENT_APPS = 14 << MSG_SHIFT;
- private static final int MSG_PRELOAD_RECENT_APPS = 15 << MSG_SHIFT;
- private static final int MSG_CANCEL_PRELOAD_RECENT_APPS = 16 << MSG_SHIFT;
- private static final int MSG_SET_NAVIGATION_ICON_HINTS = 17 << MSG_SHIFT;
+ private static final int MSG_COLLAPSE_PANELS = 7 << MSG_SHIFT;
+ private static final int MSG_EXPAND_SETTINGS = 8 << MSG_SHIFT;
+ private static final int MSG_SET_SYSTEMUI_VISIBILITY = 9 << MSG_SHIFT;
+ private static final int MSG_TOP_APP_WINDOW_CHANGED = 10 << MSG_SHIFT;
+ private static final int MSG_SHOW_IME_BUTTON = 11 << MSG_SHIFT;
+ private static final int MSG_SET_HARD_KEYBOARD_STATUS = 12 << MSG_SHIFT;
+ private static final int MSG_TOGGLE_RECENT_APPS = 13 << MSG_SHIFT;
+ private static final int MSG_PRELOAD_RECENT_APPS = 14 << MSG_SHIFT;
+ private static final int MSG_CANCEL_PRELOAD_RECENT_APPS = 15 << MSG_SHIFT;
+ private static final int MSG_SET_NAVIGATION_ICON_HINTS = 16 << MSG_SHIFT;
public static final int FLAG_EXCLUDE_NONE = 0;
public static final int FLAG_EXCLUDE_SEARCH_PANEL = 1 << 0;
@@ -86,10 +85,9 @@
public void updateNotification(IBinder key, StatusBarNotification notification);
public void removeNotification(IBinder key);
public void disable(int state);
- public void animateExpandNotifications();
- public void animateCollapseNotifications(int flags);
- public void animateExpandQuickSettings();
- public void animateCollapseQuickSettings();
+ public void animateExpandNotificationsPanel();
+ public void animateCollapsePanels(int flags);
+ public void animateExpandSettingsPanel();
public void setSystemUiVisibility(int vis, int mask);
public void topAppWindowChanged(boolean visible);
public void setImeWindowStatus(IBinder token, int vis, int backDisposition);
@@ -154,31 +152,24 @@
}
}
- public void animateExpandNotifications() {
+ public void animateExpandNotificationsPanel() {
synchronized (mList) {
mHandler.removeMessages(MSG_EXPAND_NOTIFICATIONS);
mHandler.sendEmptyMessage(MSG_EXPAND_NOTIFICATIONS);
}
}
- public void animateCollapseNotifications() {
+ public void animateCollapsePanels() {
synchronized (mList) {
- mHandler.removeMessages(MSG_COLLAPSE_NOTIFICATIONS);
- mHandler.sendEmptyMessage(MSG_COLLAPSE_NOTIFICATIONS);
+ mHandler.removeMessages(MSG_COLLAPSE_PANELS);
+ mHandler.sendEmptyMessage(MSG_COLLAPSE_PANELS);
}
}
- public void animateExpandQuickSettings() {
+ public void animateExpandSettingsPanel() {
synchronized (mList) {
- mHandler.removeMessages(MSG_EXPAND_QUICK_SETTINGS);
- mHandler.sendEmptyMessage(MSG_EXPAND_QUICK_SETTINGS);
- }
- }
-
- public void animateCollapseQuickSettings() {
- synchronized (mList) {
- mHandler.removeMessages(MSG_COLLAPSE_QUICK_SETTINGS);
- mHandler.sendEmptyMessage(MSG_COLLAPSE_QUICK_SETTINGS);
+ mHandler.removeMessages(MSG_EXPAND_SETTINGS);
+ mHandler.sendEmptyMessage(MSG_EXPAND_SETTINGS);
}
}
@@ -289,16 +280,13 @@
mCallbacks.disable(msg.arg1);
break;
case MSG_EXPAND_NOTIFICATIONS:
- mCallbacks.animateExpandNotifications();
+ mCallbacks.animateExpandNotificationsPanel();
break;
- case MSG_COLLAPSE_NOTIFICATIONS:
- mCallbacks.animateCollapseNotifications(0);
+ case MSG_COLLAPSE_PANELS:
+ mCallbacks.animateCollapsePanels(0);
break;
- case MSG_EXPAND_QUICK_SETTINGS:
- mCallbacks.animateExpandQuickSettings();
- break;
- case MSG_COLLAPSE_QUICK_SETTINGS:
- mCallbacks.animateCollapseQuickSettings();
+ case MSG_EXPAND_SETTINGS:
+ mCallbacks.animateExpandSettingsPanel();
break;
case MSG_SET_SYSTEMUI_VISIBILITY:
mCallbacks.setSystemUiVisibility(msg.arg1, msg.arg2);
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 d72632f..508835f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -104,7 +104,8 @@
= "com.android.internal.policy.statusbar.START";
private static final int MSG_OPEN_NOTIFICATION_PANEL = 1000;
- private static final int MSG_CLOSE_NOTIFICATION_PANEL = 1001;
+ private static final int MSG_CLOSE_PANELS = 1001;
+ private static final int MSG_OPEN_SETTINGS_PANEL = 1002;
// 1020-1030 reserved for BaseStatusBar
// will likely move to a resource or other tunable param at some point
@@ -296,7 +297,7 @@
public boolean onTouch(View v, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
if (mExpandedVisible && !mAnimating) {
- animateCollapseNotifications();
+ animateCollapsePanels();
}
}
return mStatusBarWindow.onTouchEvent(event);
@@ -778,7 +779,7 @@
}
if (CLOSE_PANEL_WHEN_EMPTIED && mNotificationData.size() == 0 && !mAnimating) {
- animateCollapseNotifications();
+ animateCollapsePanels();
}
}
@@ -1051,7 +1052,7 @@
}
if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) {
if ((state & StatusBarManager.DISABLE_EXPAND) != 0) {
- animateCollapseNotifications();
+ animateCollapsePanels();
}
}
@@ -1111,10 +1112,13 @@
super.handleMessage(m);
switch (m.what) {
case MSG_OPEN_NOTIFICATION_PANEL:
- animateExpandNotifications();
+ animateExpandNotificationsPanel();
break;
- case MSG_CLOSE_NOTIFICATION_PANEL:
- animateCollapseNotifications();
+ case MSG_OPEN_SETTINGS_PANEL:
+ animateExpandSettingsPanel();
+ break;
+ case MSG_CLOSE_PANELS:
+ animateCollapsePanels();
break;
case MSG_SHOW_INTRUDER:
setIntruderAlertVisibility(true);
@@ -1167,11 +1171,11 @@
visibilityChanged(true);
}
- public void animateCollapseNotifications() {
- animateCollapseNotifications(CommandQueue.FLAG_EXCLUDE_NONE);
+ public void animateCollapsePanels() {
+ animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE);
}
- public void animateCollapseNotifications(int flags) {
+ public void animateCollapsePanels(int flags) {
if (SPEW) {
Slog.d(TAG, "animateCollapse():"
+ " mExpandedVisible=" + mExpandedVisible
@@ -1196,7 +1200,7 @@
}
@Override
- public void animateExpandNotifications() {
+ public void animateExpandNotificationsPanel() {
if (SPEW) Slog.d(TAG, "animateExpand: mExpandedVisible=" + mExpandedVisible);
if ((mDisabled & StatusBarManager.DISABLE_EXPAND) != 0) {
return ;
@@ -1208,7 +1212,7 @@
}
@Override
- public void animateExpandQuickSettings() {
+ public void animateExpandSettingsPanel() {
if (SPEW) Slog.d(TAG, "animateExpand: mExpandedVisible=" + mExpandedVisible);
if ((mDisabled & StatusBarManager.DISABLE_EXPAND) != 0) {
return;
@@ -1352,7 +1356,7 @@
if (0 != (diff & View.SYSTEM_UI_FLAG_LOW_PROFILE)) {
final boolean lightsOut = (0 != (vis & View.SYSTEM_UI_FLAG_LOW_PROFILE));
if (lightsOut) {
- animateCollapseNotifications();
+ animateCollapsePanels();
if (mTicking) {
mTicker.halt();
}
@@ -1678,7 +1682,7 @@
}
}
if (snapshot.isEmpty()) {
- animateCollapseNotifications(CommandQueue.FLAG_EXCLUDE_NONE);
+ animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE);
return;
}
new Thread(new Runnable() {
@@ -1729,7 +1733,7 @@
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
- animateCollapseNotifications(CommandQueue.FLAG_EXCLUDE_NONE);
+ animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE);
}
}, totalDelay + 225);
}
@@ -1751,7 +1755,7 @@
v.getContext().startActivityAsUser(new Intent(Settings.ACTION_SETTINGS)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK),
new UserHandle(UserHandle.USER_CURRENT));
- animateCollapseNotifications();
+ animateCollapsePanels();
}
};
@@ -1767,7 +1771,7 @@
flags |= CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL;
}
}
- animateCollapseNotifications(flags);
+ animateCollapsePanels(flags);
}
else if (Intent.ACTION_SCREEN_OFF.equals(action)) {
// no waiting!
@@ -1792,7 +1796,7 @@
@Override
public void userSwitched(int newUserId) {
if (MULTIUSER_DEBUG) mNotificationPanelDebugText.setText("USER " + newUserId);
- animateCollapseNotifications();
+ animateCollapsePanels();
updateNotificationIcons();
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
index 585793e..35b9f85 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
@@ -235,7 +235,7 @@
}
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
mContext.startActivityAsUser(intent, new UserHandle(UserHandle.USER_CURRENT));
- getService().animateCollapseNotifications();
+ getService().animateCollapsePanels();
}
private void addUserTiles(ViewGroup parent, LayoutInflater inflater) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
index 85b91d1..0176f42 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
@@ -70,7 +70,7 @@
switch (event.getKeyCode()) {
case KeyEvent.KEYCODE_BACK:
if (!down) {
- mService.animateCollapseNotifications();
+ mService.animateCollapsePanels();
}
return true;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
index 73d1c7c..b431287 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
@@ -204,14 +204,14 @@
// We exclusively handle the back key by hiding this panel.
case KeyEvent.KEYCODE_BACK: {
if (event.getAction() == KeyEvent.ACTION_UP) {
- mBar.animateCollapseNotifications();
+ mBar.animateCollapsePanels();
}
return true;
}
// We react to the home key but let the system handle it.
case KeyEvent.KEYCODE_HOME: {
if (event.getAction() == KeyEvent.ACTION_UP) {
- mBar.animateCollapseNotifications();
+ mBar.animateCollapsePanels();
}
} break;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SettingsView.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SettingsView.java
index ab4ef75..194f1f6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SettingsView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SettingsView.java
@@ -112,7 +112,7 @@
private void onClickNetwork() {
getContext().startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
- getStatusBarManager().collapseNotifications();
+ getStatusBarManager().collapsePanels();
}
// Settings
@@ -121,7 +121,7 @@
getContext().startActivityAsUser(new Intent(Settings.ACTION_SETTINGS)
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK),
new UserHandle(UserHandle.USER_CURRENT));
- getStatusBarManager().collapseNotifications();
+ getStatusBarManager().collapsePanels();
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
index d1dd3c7..97451ae 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -740,7 +740,7 @@
SharedPreferences.Editor editor = Prefs.edit(mContext);
editor.putBoolean(Prefs.DO_NOT_DISTURB_PREF, false);
editor.apply();
- animateCollapseNotifications();
+ animateCollapsePanels();
visibilityChanged(false);
}
});
@@ -821,7 +821,7 @@
break;
case MSG_HIDE_CHROME:
if (DEBUG) Slog.d(TAG, "showing shadows (lights out)");
- animateCollapseNotifications();
+ animateCollapsePanels();
visibilityChanged(false);
mBarContents.setVisibility(View.GONE);
mShadow.setVisibility(View.VISIBLE);
@@ -907,7 +907,7 @@
if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) {
if ((state & StatusBarManager.DISABLE_EXPAND) != 0) {
Slog.i(TAG, "DISABLE_EXPAND: yes");
- animateCollapseNotifications();
+ animateCollapsePanels();
visibilityChanged(false);
}
}
@@ -988,16 +988,16 @@
mFeedbackIconArea.setVisibility(View.VISIBLE);
}
- public void animateExpandNotifications() {
+ public void animateExpandNotificationsPanel() {
mHandler.removeMessages(MSG_OPEN_NOTIFICATION_PANEL);
mHandler.sendEmptyMessage(MSG_OPEN_NOTIFICATION_PANEL);
}
- public void animateCollapseNotifications() {
- animateCollapseNotifications(CommandQueue.FLAG_EXCLUDE_NONE);
+ public void animateCollapsePanels() {
+ animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE);
}
- public void animateCollapseNotifications(int flags) {
+ public void animateCollapsePanels(int flags) {
if ((flags & CommandQueue.FLAG_EXCLUDE_NOTIFICATION_PANEL) == 0) {
mHandler.removeMessages(MSG_CLOSE_NOTIFICATION_PANEL);
mHandler.sendEmptyMessage(MSG_CLOSE_NOTIFICATION_PANEL);
@@ -1022,12 +1022,7 @@
}
@Override
- public void animateExpandQuickSettings() {
- // TODO: Implement when TabletStatusBar begins to be used.
- }
-
- @Override
- public void animateCollapseQuickSettings() {
+ public void animateExpandSettingsPanel() {
// TODO: Implement when TabletStatusBar begins to be used.
}
@@ -1299,7 +1294,7 @@
mVT.computeCurrentVelocity(1000); // pixels per second
// require a little more oomph once we're already in peekaboo mode
if (mVT.getYVelocity() < -mNotificationFlingVelocity) {
- animateExpandNotifications();
+ animateExpandNotificationsPanel();
visibilityChanged(true);
hilite(false);
mVT.recycle();
@@ -1317,7 +1312,7 @@
&& Math.abs(event.getY() - mInitialTouchY) < (mTouchSlop / 3)
// dragging off the bottom doesn't count
&& (int)event.getY() < v.getBottom()) {
- animateExpandNotifications();
+ animateExpandNotificationsPanel();
visibilityChanged(true);
v.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
v.playSoundEffect(SoundEffectConstants.CLICK);
@@ -1493,7 +1488,7 @@
} catch (RemoteException ex) {
// system process is dead if we're here.
}
- animateCollapseNotifications();
+ animateCollapsePanels();
visibilityChanged(false);
}
@@ -1509,7 +1504,7 @@
flags |= CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL;
}
}
- animateCollapseNotifications(flags);
+ animateCollapsePanels(flags);
}
}
};
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java
index fd2ee38..519d3c1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java
@@ -61,11 +61,11 @@
}
@Override
- public void animateExpandNotifications() {
+ public void animateExpandNotificationsPanel() {
}
@Override
- public void animateCollapseNotifications(int flags) {
+ public void animateCollapsePanels(int flags) {
}
@Override
@@ -143,10 +143,6 @@
}
@Override
- public void animateExpandQuickSettings() {
- }
-
- @Override
- public void animateCollapseQuickSettings() {
+ public void animateExpandSettingsPanel() {
}
}
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 2f2b7b0..e4eeceb 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -2936,8 +2936,7 @@
try {
IStatusBarService statusbar = getStatusBarService();
if (statusbar != null) {
- statusbar.collapseNotifications();
- statusbar.collapseQuickSettings();
+ statusbar.collapsePanels();
}
} catch (RemoteException ex) {
// re-acquire status bar service next time it is needed.
diff --git a/services/java/com/android/server/StatusBarManagerService.java b/services/java/com/android/server/StatusBarManagerService.java
index b567992..87b0eb3 100644
--- a/services/java/com/android/server/StatusBarManagerService.java
+++ b/services/java/com/android/server/StatusBarManagerService.java
@@ -117,45 +117,34 @@
// ================================================================================
// From IStatusBarService
// ================================================================================
- public void expandNotifications() {
+ public void expandNotificationsPanel() {
enforceExpandStatusBar();
if (mBar != null) {
try {
- mBar.animateExpandNotifications();
+ mBar.animateExpandNotificationsPanel();
} catch (RemoteException ex) {
}
}
}
- public void collapseNotifications() {
+ public void collapsePanels() {
enforceExpandStatusBar();
if (mBar != null) {
try {
- mBar.animateCollapseNotifications();
+ mBar.animateCollapsePanels();
} catch (RemoteException ex) {
}
}
}
- public void expandQuickSettings() {
+ public void expandSettingsPanel() {
enforceExpandStatusBar();
if (mBar != null) {
try {
- mBar.animateExpandQuickSettings();
- } catch (RemoteException ex) {
- }
- }
- }
-
- public void collapseQuickSettings() {
- enforceExpandStatusBar();
-
- if (mBar != null) {
- try {
- mBar.animateCollapseQuickSettings();
+ mBar.animateExpandSettingsPanel();
} catch (RemoteException ex) {
}
}
@@ -620,8 +609,7 @@
String action = intent.getAction();
if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)
|| Intent.ACTION_SCREEN_OFF.equals(action)) {
- collapseNotifications();
- collapseQuickSettings();
+ collapsePanels();
}
/*
else if (Telephony.Intents.SPN_STRINGS_UPDATED_ACTION.equals(action)) {
diff --git a/services/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/java/com/android/server/accessibility/AccessibilityManagerService.java
index cae67e9..d46c829 100644
--- a/services/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -2028,7 +2028,7 @@
StatusBarManager statusBarManager = (StatusBarManager) mContext.getSystemService(
android.app.Service.STATUS_BAR_SERVICE);
- statusBarManager.expandNotifications();
+ statusBarManager.expandNotificationsPanel();
Binder.restoreCallingIdentity(token);
}
@@ -2038,7 +2038,7 @@
StatusBarManager statusBarManager = (StatusBarManager) mContext.getSystemService(
android.app.Service.STATUS_BAR_SERVICE);
- statusBarManager.expandQuickSettings();
+ statusBarManager.expandSettingsPanel();
Binder.restoreCallingIdentity(token);
}
diff --git a/tests/StatusBar/src/com/android/statusbartest/StatusBarTest.java b/tests/StatusBar/src/com/android/statusbartest/StatusBarTest.java
index 3b6e1074..50f98b8 100644
--- a/tests/StatusBar/src/com/android/statusbartest/StatusBarTest.java
+++ b/tests/StatusBar/src/com/android/statusbartest/StatusBarTest.java
@@ -284,25 +284,39 @@
}, 3000);
}
},
- new Test("Expand") {
+ new Test("Expand notifications") {
public void run() {
- mStatusBarManager.expandNotifications();
+ mStatusBarManager.expandNotificationsPanel();
}
},
- new Test("Expand in 3 sec.") {
+ new Test(" ... in 3 sec.") {
public void run() {
mHandler.postDelayed(new Runnable() {
public void run() {
- mStatusBarManager.expandNotifications();
+ mStatusBarManager.expandNotificationsPanel();
}
}, 3000);
}
},
- new Test("Collapse in 3 sec.") {
+ new Test("Expand settings") {
+ public void run() {
+ mStatusBarManager.expandSettingsPanel();
+ }
+ },
+ new Test(" ... in 3 sec.") {
public void run() {
mHandler.postDelayed(new Runnable() {
public void run() {
- mStatusBarManager.collapseNotifications();
+ mStatusBarManager.expandSettingsPanel();
+ }
+ }, 3000);
+ }
+ },
+ new Test("Collapse panels in 3 sec.") {
+ public void run() {
+ mHandler.postDelayed(new Runnable() {
+ public void run() {
+ mStatusBarManager.collapsePanels();
}
}, 3000);
}