Loading core/java/com/android/internal/statusbar/IStatusBarService.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -33,4 +33,6 @@ interface IStatusBarService // ---- Methods below are for use by the status bar policy services ---- void registerStatusBar(IStatusBar callbacks, out StatusBarIconList state); void visibilityChanged(boolean visible); void onNotificationClick(String pkg, String tag, int id); void onClearAllNotifications(); } packages/StatusBarPhone/src/com/android/policy/statusbar/phone/PhoneStatusBarService.java +12 −5 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ public class PhoneStatusBarService extends StatusBarService { switch (event.getKeyCode()) { case KeyEvent.KEYCODE_BACK: if (!down) { //TODO PhoneStatusBarService.this.collapse(); animateCollapse(); } return true; } Loading @@ -119,7 +119,6 @@ public class PhoneStatusBarService extends StatusBarService { int mPixelFormat; H mHandler = new H(); Object mQueueLock = new Object(); NotificationCallbacks mNotificationCallbacks; // icons String[] mRightIconSlots; Loading Loading @@ -925,12 +924,16 @@ public class PhoneStatusBarService extends StatusBarService { new Rect(pos[0], pos[1], pos[0]+v.getWidth(), pos[1]+v.getHeight())); try { mIntent.send(PhoneStatusBarService.this, 0, overlay); mNotificationCallbacks.onNotificationClick(mPkg, mTag, mId); } catch (PendingIntent.CanceledException e) { // the stack trace isn't very helpful here. Just log the exception message. Slog.w(TAG, "Sending contentIntent failed: " + e); } //collapse(); try { mBarService.onNotificationClick(mPkg, mTag, mId); } catch (RemoteException ex) { // system process is dead if we're here. } animateCollapse(); } } Loading Loading @@ -1314,7 +1317,11 @@ public class PhoneStatusBarService extends StatusBarService { private View.OnClickListener mClearButtonListener = new View.OnClickListener() { public void onClick(View v) { mNotificationCallbacks.onClearAll(); try { mBarService.onClearAllNotifications(); } catch (RemoteException ex) { // system process is dead if we're here. } animateCollapse(); } }; Loading services/java/com/android/server/status/StatusBarManagerService.java +9 −1 Original line number Diff line number Diff line Loading @@ -264,6 +264,14 @@ public class StatusBarManagerService extends IStatusBarService.Stub Slog.d(TAG, "visibilityChanged visible=" + visible); } public void onNotificationClick(String pkg, String tag, int id) { mNotificationCallbacks.onNotificationClick(pkg, tag, id); } public void onClearAllNotifications() { mNotificationCallbacks.onClearAll(); } // ================================================================================ // Callbacks for NotificationManagerService. // ================================================================================ Loading Loading
core/java/com/android/internal/statusbar/IStatusBarService.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -33,4 +33,6 @@ interface IStatusBarService // ---- Methods below are for use by the status bar policy services ---- void registerStatusBar(IStatusBar callbacks, out StatusBarIconList state); void visibilityChanged(boolean visible); void onNotificationClick(String pkg, String tag, int id); void onClearAllNotifications(); }
packages/StatusBarPhone/src/com/android/policy/statusbar/phone/PhoneStatusBarService.java +12 −5 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ public class PhoneStatusBarService extends StatusBarService { switch (event.getKeyCode()) { case KeyEvent.KEYCODE_BACK: if (!down) { //TODO PhoneStatusBarService.this.collapse(); animateCollapse(); } return true; } Loading @@ -119,7 +119,6 @@ public class PhoneStatusBarService extends StatusBarService { int mPixelFormat; H mHandler = new H(); Object mQueueLock = new Object(); NotificationCallbacks mNotificationCallbacks; // icons String[] mRightIconSlots; Loading Loading @@ -925,12 +924,16 @@ public class PhoneStatusBarService extends StatusBarService { new Rect(pos[0], pos[1], pos[0]+v.getWidth(), pos[1]+v.getHeight())); try { mIntent.send(PhoneStatusBarService.this, 0, overlay); mNotificationCallbacks.onNotificationClick(mPkg, mTag, mId); } catch (PendingIntent.CanceledException e) { // the stack trace isn't very helpful here. Just log the exception message. Slog.w(TAG, "Sending contentIntent failed: " + e); } //collapse(); try { mBarService.onNotificationClick(mPkg, mTag, mId); } catch (RemoteException ex) { // system process is dead if we're here. } animateCollapse(); } } Loading Loading @@ -1314,7 +1317,11 @@ public class PhoneStatusBarService extends StatusBarService { private View.OnClickListener mClearButtonListener = new View.OnClickListener() { public void onClick(View v) { mNotificationCallbacks.onClearAll(); try { mBarService.onClearAllNotifications(); } catch (RemoteException ex) { // system process is dead if we're here. } animateCollapse(); } }; Loading
services/java/com/android/server/status/StatusBarManagerService.java +9 −1 Original line number Diff line number Diff line Loading @@ -264,6 +264,14 @@ public class StatusBarManagerService extends IStatusBarService.Stub Slog.d(TAG, "visibilityChanged visible=" + visible); } public void onNotificationClick(String pkg, String tag, int id) { mNotificationCallbacks.onNotificationClick(pkg, tag, id); } public void onClearAllNotifications() { mNotificationCallbacks.onClearAll(); } // ================================================================================ // Callbacks for NotificationManagerService. // ================================================================================ Loading