Fix 3482911: NPE in CustomizePagedView.resetCheckedItem
Also fixes an issue where quick swipes on an item could cause it to animate in from (0, 0) sometimes. Change-Id: Ie3312389bcb5109f4b26ec518a29b4aa88161377
This commit is contained in:
@@ -1420,7 +1420,7 @@ public abstract class PagedView extends ViewGroup {
|
||||
* Otherwise, returns null.
|
||||
*/
|
||||
protected Checkable getSingleCheckedGrandchild() {
|
||||
if (mChoiceMode == CHOICE_MODE_SINGLE) {
|
||||
if (mChoiceMode != CHOICE_MODE_MULTIPLE) {
|
||||
final int childCount = getChildCount();
|
||||
for (int i = 0; i < childCount; ++i) {
|
||||
Page layout = (Page) getChildAt(i);
|
||||
@@ -1436,14 +1436,6 @@ public abstract class PagedView extends ViewGroup {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Object getChosenItem() {
|
||||
View checkedView = (View) getSingleCheckedGrandchild();
|
||||
if (checkedView != null) {
|
||||
return checkedView.getTag();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
protected void resetCheckedGrandchildren() {
|
||||
// loop through children, and set all of their children to _not_ be checked
|
||||
final ArrayList<Checkable> checked = getCheckedGrandchildren();
|
||||
|
||||
Reference in New Issue
Block a user