Fix a security exception when unbinding services

Clear calling identity before calling oom adjust.

Bug: 38183641
Test: manual
Change-Id: Ia3cc7bb83a94d1bb280a43912a250bddc9ef2c11
This commit is contained in:
Amith Yamasani
2017-05-11 11:13:52 -07:00
parent 1c38d29482
commit b2926b1ddb

View File

@@ -1493,12 +1493,13 @@ public final class ActiveServices {
mAm.updateOomAdjLocked(r.binding.service.app, false);
}
}
mAm.updateOomAdjLocked();
} finally {
Binder.restoreCallingIdentity(origId);
}
mAm.updateOomAdjLocked();
return true;
}