Merge "Removes unnecessary weak reference on the java object associated with" am: 244406a4f5 am: 7c40bef8d7

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404077

Change-Id: Ib94d193de1d8a77e83cf9dce799be48d5115e15f