Merge "Fix potential ClassCastException." into mnc-dr1.5-dev