diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-05-24 22:53:55 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-05-24 22:53:55 +0000 |
commit | bf4ad52488b3f1e5c3ddac111c0f6420177eda8c (patch) | |
tree | 3cd07ed7f24947560e57629e081a51eb55cfd026 | |
parent | 61fab3347ca5a59ed705b22083f56c7c1d600e1f (diff) | |
parent | f7605407d619ee88a7810b131d55882e25fae7cd (diff) | |
download | base-bf4ad52488b3f1e5c3ddac111c0f6420177eda8c.tar.gz |
Merge cherrypicks of [2310999, 2310925, 2310891, 2311000, 2310892, 2310858, 2310986, 2310963, 2311043, 2310928, 2311044, 2310990, 2311022, 2311023, 2310917, 2310994, 2311024, 2311045, 2310967, 2310995, 2311003, 2311059, 2311025, 2311060, 2310953, 2311061, 2311004, 2311046, 2311005, 2311047, 2311006, 2311079, 2310954, 2311026, 2310896, 2310898, 2310997, 2311062, 2310955, 2311029, 2310998, 2311080, 2311119, 2311030, 2310933, 2311140, 2311063, 2310934, 2311049, 2311050, 2311084, 2311031, 2311145, 2311164] into nyc-mr2-security-c-releaseandroid-7.1.2_r27
Change-Id: Iaca90436dbd44ed8bd2629340441480ea362844c
3 files changed, 14 insertions, 17 deletions
diff --git a/core/java/android/view/accessibility/AccessibilityNodeInfo.java b/core/java/android/view/accessibility/AccessibilityNodeInfo.java index c1076e7b1cec..8463a1aa571f 100644 --- a/core/java/android/view/accessibility/AccessibilityNodeInfo.java +++ b/core/java/android/view/accessibility/AccessibilityNodeInfo.java @@ -2760,16 +2760,19 @@ public class AccessibilityNodeInfo implements Parcelable { if (mActions != null && !mActions.isEmpty()) { final int actionCount = mActions.size(); - parcel.writeInt(actionCount); + int nonLegacyActionCount = 0; int defaultLegacyStandardActions = 0; for (int i = 0; i < actionCount; i++) { AccessibilityAction action = mActions.get(i); if (isDefaultLegacyStandardAction(action)) { defaultLegacyStandardActions |= action.getId(); + } else { + nonLegacyActionCount++; } } parcel.writeInt(defaultLegacyStandardActions); + parcel.writeInt(nonLegacyActionCount); for (int i = 0; i < actionCount; i++) { AccessibilityAction action = mActions.get(i); @@ -2780,6 +2783,7 @@ public class AccessibilityNodeInfo implements Parcelable { } } else { parcel.writeInt(0); + parcel.writeInt(0); } parcel.writeInt(mMaxTextLength); @@ -2947,16 +2951,13 @@ public class AccessibilityNodeInfo implements Parcelable { mBoundsInScreen.left = parcel.readInt(); mBoundsInScreen.right = parcel.readInt(); - final int actionCount = parcel.readInt(); - if (actionCount > 0) { - final int legacyStandardActions = parcel.readInt(); - addLegacyStandardActions(legacyStandardActions); - final int nonLegacyActionCount = actionCount - Integer.bitCount(legacyStandardActions); - for (int i = 0; i < nonLegacyActionCount; i++) { - final AccessibilityAction action = new AccessibilityAction( - parcel.readInt(), parcel.readCharSequence()); - addActionUnchecked(action); - } + final int legacyStandardActions = parcel.readInt(); + addLegacyStandardActions(legacyStandardActions); + final int nonLegacyActionCount = parcel.readInt(); + for (int i = 0; i < nonLegacyActionCount; i++) { + final AccessibilityAction action = new AccessibilityAction( + parcel.readInt(), parcel.readCharSequence()); + addActionUnchecked(action); } mMaxTextLength = parcel.readInt(); diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java index 85fc8b0adec8..e4f573b7b8a7 100644 --- a/core/java/com/android/internal/os/ZygoteInit.java +++ b/core/java/com/android/internal/os/ZygoteInit.java @@ -644,7 +644,7 @@ public class ZygoteInit { OsConstants.CAP_NET_RAW, OsConstants.CAP_SYS_MODULE, OsConstants.CAP_SYS_NICE, - OsConstants.CAP_SYS_RESOURCE, + OsConstants.CAP_SYS_PTRACE, OsConstants.CAP_SYS_TIME, OsConstants.CAP_SYS_TTY_CONFIG ); diff --git a/services/core/java/com/android/server/vr/VrManagerService.java b/services/core/java/com/android/server/vr/VrManagerService.java index a9a6aa1000cf..14fe0e8f1d6c 100644 --- a/services/core/java/com/android/server/vr/VrManagerService.java +++ b/services/core/java/com/android/server/vr/VrManagerService.java @@ -539,16 +539,12 @@ public class VrManagerService extends SystemService implements EnabledComponentC false, mOverlayToken, null, oldUserId); } - if (!mVrModeEnabled) { - return; - } - // Apply the restrictions for the current user based on vr state String[] exemptions = (exemptedPackage == null) ? new String[0] : new String[] { exemptedPackage }; appOpsManager.setUserRestrictionForUser(AppOpsManager.OP_SYSTEM_ALERT_WINDOW, - true, mOverlayToken, exemptions, newUserId); + mVrModeEnabled, mOverlayToken, exemptions, newUserId); } private void updateDependentAppOpsLocked(String newVrServicePackage, int newUserId, |