Avoid unnecessary FindClass("java/lang/String").

Use previously retrieved global reference instead.
Check for NULL after creating the global reference.

Change-Id: I21670d2ef0f63ddb5801dd21e7e56359e5519479
Fix incorrect fragment animation used for hiding fragments

Mirror of support lib patch
https://android-review.googlesource.com/#/c/60032/ into
frameworks/base.

AOSP Commit: https://android-review.googlesource.com/#/c/60167/

Change-Id: I8d1cb2e217721336674b8e3e2ef8722a8d9baefd