Merge "Avoid sealed check when unparceling AccessibilityNodeInfo" into mnc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
f93d16bc70
@@ -1011,6 +1011,10 @@ public class AccessibilityNodeInfo implements Parcelable {
|
|||||||
public void addAction(AccessibilityAction action) {
|
public void addAction(AccessibilityAction action) {
|
||||||
enforceNotSealed();
|
enforceNotSealed();
|
||||||
|
|
||||||
|
addActionUnchecked(action);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addActionUnchecked(AccessibilityAction action) {
|
||||||
if (action == null) {
|
if (action == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2846,9 +2850,9 @@ public class AccessibilityNodeInfo implements Parcelable {
|
|||||||
addLegacyStandardActions(legacyStandardActions);
|
addLegacyStandardActions(legacyStandardActions);
|
||||||
final int nonLegacyActionCount = actionCount - Integer.bitCount(legacyStandardActions);
|
final int nonLegacyActionCount = actionCount - Integer.bitCount(legacyStandardActions);
|
||||||
for (int i = 0; i < nonLegacyActionCount; i++) {
|
for (int i = 0; i < nonLegacyActionCount; i++) {
|
||||||
AccessibilityAction action = new AccessibilityAction(
|
final AccessibilityAction action = new AccessibilityAction(
|
||||||
parcel.readInt(), parcel.readCharSequence());
|
parcel.readInt(), parcel.readCharSequence());
|
||||||
addAction(action);
|
addActionUnchecked(action);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user