Allow both contentIntent and setOnClickPendingIntent in notifications

From the app developer's request:

  Intents assigned to specific views should take precedence over the content intent, but it should not
  be required to set the content intent to null in order for the view-intents to work

Bug: 3107945
Change-Id: Ic5282d441277a9a8c8c700ef3f43872f3405b58a
This commit is contained in:
Joe Onorato
2010-10-31 11:38:04 -07:00
parent 2b69ce469d
commit 4058ba0526
3 changed files with 34 additions and 11 deletions

View File

@@ -23,22 +23,11 @@ import android.view.MotionEvent;
import android.widget.FrameLayout;
public class LatestItemView extends FrameLayout {
private boolean mDispatchTorches;
public LatestItemView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public boolean dispatchTouchEvent(MotionEvent ev) {
if (mDispatchTorches) {
return super.dispatchTouchEvent(ev);
} else {
return onTouchEvent(ev);
}
}
public void setOnClickListener(OnClickListener l) {
mDispatchTorches = l == null;
super.setOnClickListener(l);
}
}