summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server
diff options
context:
space:
mode:
authorJoe Onorato <joeo@android.com>2010-05-17 15:42:59 -0700
committerJoe Onorato <joeo@android.com>2010-06-02 14:48:42 -0700
commit4762c2d75a55e0854bbff2f996748116d4ab1a37 (patch)
tree7467da673f3e8e753a79ad044fc24e9ebb237a08 /services/java/com/android/server
parentf3f0e053f0cc66249a11639eb67d0cdc2da26ded (diff)
downloadframeworks_base-4762c2d75a55e0854bbff2f996748116d4ab1a37.zip
frameworks_base-4762c2d75a55e0854bbff2f996748116d4ab1a37.tar.gz
frameworks_base-4762c2d75a55e0854bbff2f996748116d4ab1a37.tar.bz2
Add expand and collapse.
Change-Id: I58ad95c59b2c46d3f25349e137d5624aefc6c6cd
Diffstat (limited to 'services/java/com/android/server')
-rw-r--r--services/java/com/android/server/status/StatusBarManagerService.java34
1 files changed, 28 insertions, 6 deletions
diff --git a/services/java/com/android/server/status/StatusBarManagerService.java b/services/java/com/android/server/status/StatusBarManagerService.java
index 1752f26..a59b914 100644
--- a/services/java/com/android/server/status/StatusBarManagerService.java
+++ b/services/java/com/android/server/status/StatusBarManagerService.java
@@ -49,7 +49,7 @@ import java.util.HashMap;
*/
public class StatusBarManagerService extends IStatusBarService.Stub
{
- static final String TAG = "StatusBar";
+ static final String TAG = "StatusBarManagerService";
static final boolean SPEW = true;
public static final String ACTION_STATUSBAR_START
@@ -58,7 +58,7 @@ public class StatusBarManagerService extends IStatusBarService.Stub
final Context mContext;
Handler mHandler = new Handler();
NotificationCallbacks mNotificationCallbacks;
- IStatusBar mBar;
+ volatile IStatusBar mBar;
StatusBarIconList mIcons = new StatusBarIconList();
private UninstallReceiver mUninstallReceiver;
@@ -115,20 +115,30 @@ public class StatusBarManagerService extends IStatusBarService.Stub
Intent intent = new Intent(ACTION_STATUSBAR_START);
mContext.sendBroadcast(intent /** permission **/);
}
-
+
// ================================================================================
// From IStatusBarService
// ================================================================================
public void expand() {
enforceExpandStatusBar();
+
+ if (mBar != null) {
+ try {
+ mBar.animateExpand();
+ } catch (RemoteException ex) {
+ }
+ }
}
public void collapse() {
enforceExpandStatusBar();
- }
- public void toggle() {
- enforceExpandStatusBar();
+ if (mBar != null) {
+ try {
+ mBar.animateCollapse();
+ } catch (RemoteException ex) {
+ }
+ }
}
public void disable(int what, IBinder token, String pkg) {
@@ -238,12 +248,24 @@ public class StatusBarManagerService extends IStatusBarService.Stub
"StatusBarManagerService");
}
+
+ // ================================================================================
+ // Callbacks from the status bar service.
+ // ================================================================================
public void registerStatusBar(IStatusBar bar, StatusBarIconList iconList) {
Slog.i(TAG, "registerStatusBar bar=" + bar);
mBar = bar;
iconList.copyFrom(mIcons);
}
+ /**
+ * The status bar service should call this when the user changes whether
+ * the status bar is visible or not.
+ */
+ public void visibilityChanged(boolean visible) {
+ Slog.d(TAG, "visibilityChanged visible=" + visible);
+ }
+
public IBinder addNotification(IconData iconData, NotificationData notificationData) {
return new Binder();
}