Ensure objects remain valid after calling policy am: f68fc4c575

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/31301350

Change-Id: I1659b1e4365cf9491c8aa76e72a2592315397228
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>