diff options
author | Joe Onorato <joeo@android.com> | 2010-05-23 15:18:41 -0400 |
---|---|---|
committer | Joe Onorato <joeo@android.com> | 2010-06-02 14:48:43 -0700 |
commit | aaba60b281713d45a0f232580302c7b54a7207df (patch) | |
tree | 9e61b9f0133548c1fdc7aacde289c8539fe37698 /packages | |
parent | e345fff2f80947b0a821f6674c197a02b7bff08e (diff) | |
download | frameworks_base-aaba60b281713d45a0f232580302c7b54a7207df.zip frameworks_base-aaba60b281713d45a0f232580302c7b54a7207df.tar.gz frameworks_base-aaba60b281713d45a0f232580302c7b54a7207df.tar.bz2 |
Notifications don't crash when you click them, and pass through events to NotificationManagerService
Change-Id: Iae4a636d3c6d5c617440b11eb5b8bc77838ad584
Diffstat (limited to 'packages')
-rw-r--r-- | packages/StatusBarPhone/src/com/android/policy/statusbar/phone/PhoneStatusBarService.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/packages/StatusBarPhone/src/com/android/policy/statusbar/phone/PhoneStatusBarService.java b/packages/StatusBarPhone/src/com/android/policy/statusbar/phone/PhoneStatusBarService.java index 37b3655..97b38b6 100644 --- a/packages/StatusBarPhone/src/com/android/policy/statusbar/phone/PhoneStatusBarService.java +++ b/packages/StatusBarPhone/src/com/android/policy/statusbar/phone/PhoneStatusBarService.java @@ -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; } @@ -119,7 +119,6 @@ public class PhoneStatusBarService extends StatusBarService { int mPixelFormat; H mHandler = new H(); Object mQueueLock = new Object(); - NotificationCallbacks mNotificationCallbacks; // icons String[] mRightIconSlots; @@ -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(); } } @@ -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(); } }; |