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

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

Change-Id: I65b348d0cdec8bef4835e01bd4cc39bd0e848bb9