am 4c38fe36
: Merge "Protect against bogus input for ListViews" into jb-dev
* commit '4c38fe369fee76b8d4fca5a7b0b8d81a96f0219f': Protect against bogus input for ListViews
This commit is contained in:
@ -3351,6 +3351,14 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
|
|||||||
mPositionScroller.stop();
|
mPositionScroller.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!mIsAttached) {
|
||||||
|
// Something isn't right.
|
||||||
|
// Since we rely on being attached to get data set change notifications,
|
||||||
|
// don't risk doing anything where we might try to resync and find things
|
||||||
|
// in a bogus state.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (mFastScroller != null) {
|
if (mFastScroller != null) {
|
||||||
boolean intercepted = mFastScroller.onTouchEvent(ev);
|
boolean intercepted = mFastScroller.onTouchEvent(ev);
|
||||||
if (intercepted) {
|
if (intercepted) {
|
||||||
@ -3846,6 +3854,14 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
|
|||||||
mPositionScroller.stop();
|
mPositionScroller.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!mIsAttached) {
|
||||||
|
// Something isn't right.
|
||||||
|
// Since we rely on being attached to get data set change notifications,
|
||||||
|
// don't risk doing anything where we might try to resync and find things
|
||||||
|
// in a bogus state.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (mFastScroller != null) {
|
if (mFastScroller != null) {
|
||||||
boolean intercepted = mFastScroller.onInterceptTouchEvent(ev);
|
boolean intercepted = mFastScroller.onInterceptTouchEvent(ev);
|
||||||
if (intercepted) {
|
if (intercepted) {
|
||||||
|
@ -88,6 +88,9 @@ public class ListMenuPresenter implements MenuPresenter, AdapterView.OnItemClick
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
mMenu = menu;
|
mMenu = menu;
|
||||||
|
if (mAdapter != null) {
|
||||||
|
mAdapter.notifyDataSetChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user