From a19402165000e9513f3097e10df2b7ebc8dbe1d4 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Thu, 28 Jun 2012 16:07:22 -0700 Subject: Maybe fix issue #6756472: Share button is not defocusing the shade I got this reproduce a few times, then wasn't able to. I made this change and then couldn't reproduce it. Maybe it fixed it. The change here is to explicitly pass in the handler class to apply() and reapply(), instead of relying it being set as a member of the RemoteViews class. This is much cleaner and more explicitly about setting that for the click callbacks. Bug: 6756472 Change-Id: I8d029c3836501df3206c433838124b4be3890a8b --- .../src/com/android/systemui/statusbar/BaseStatusBar.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'packages/SystemUI/src') diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index ec99513..1204a89 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -577,11 +577,9 @@ public abstract class BaseStatusBar extends SystemUI implements View expandedLarge = null; Exception exception = null; try { - oneU.setOnClickHandler(mOnClickHandler); - expandedOneU = oneU.apply(mContext, adaptive); + expandedOneU = oneU.apply(mContext, adaptive, mOnClickHandler); if (large != null) { - large.setOnClickHandler(mOnClickHandler); - expandedLarge = large.apply(mContext, adaptive); + expandedLarge = large.apply(mContext, adaptive, mOnClickHandler); } } catch (RuntimeException e) { @@ -872,9 +870,9 @@ public abstract class BaseStatusBar extends SystemUI implements oldEntry.notification = notification; try { // Reapply the RemoteViews - contentView.reapply(mContext, oldEntry.expanded); + contentView.reapply(mContext, oldEntry.expanded, mOnClickHandler); if (bigContentView != null && oldEntry.getLargeView() != null) { - bigContentView.reapply(mContext, oldEntry.getLargeView()); + bigContentView.reapply(mContext, oldEntry.getLargeView(), mOnClickHandler); } // update the contentIntent final PendingIntent contentIntent = notification.notification.contentIntent; -- cgit v1.1