commit | 9515af4466cb16223e5dd29f0a13e1bfe4dcf5c8 | [log] [tgz] |
---|---|---|
author | Amith Yamasani <yamasani@google.com> | Thu May 11 11:13:52 2017 -0700 |
committer | gitbuildkicker <android-build@google.com> | Thu May 11 13:24:58 2017 -0700 |
tree | 41dc51eb476e9d5dade625bb229d271ee7e3f383 | |
parent | 8fdb925e4a2f16b1dad5a14ce807d3532bfb1c7a [diff] |
Fix a security exception when unbinding services Clear calling identity before calling oom adjust. Bug: 38183641 Test: manual Change-Id: Ia3cc7bb83a94d1bb280a43912a250bddc9ef2c11 (cherry picked from commit b2926b1ddb65c03bd417ba57121533fbf4286ee7)
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java index 1ed46a0..5e03508 100644 --- a/services/core/java/com/android/server/am/ActiveServices.java +++ b/services/core/java/com/android/server/am/ActiveServices.java
@@ -1493,12 +1493,13 @@ mAm.updateOomAdjLocked(r.binding.service.app, false); } } + + mAm.updateOomAdjLocked(); + } finally { Binder.restoreCallingIdentity(origId); } - mAm.updateOomAdjLocked(); - return true; }