Merge "Always send VIEW_CLICKED event from AdapterView.performItemClick()" into mnc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
b0f94ae5d2
@@ -304,16 +304,19 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup {
|
||||
* called, false otherwise is returned.
|
||||
*/
|
||||
public boolean performItemClick(View view, int position, long id) {
|
||||
final boolean result;
|
||||
if (mOnItemClickListener != null) {
|
||||
playSoundEffect(SoundEffectConstants.CLICK);
|
||||
mOnItemClickListener.onItemClick(this, view, position, id);
|
||||
if (view != null) {
|
||||
view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
|
||||
}
|
||||
return true;
|
||||
result = true;
|
||||
} else {
|
||||
result = false;
|
||||
}
|
||||
|
||||
return false;
|
||||
if (view != null) {
|
||||
view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user