Replace 'indexOf()' expression with 'contains()'

Change-Id: Ida566a24d78174690b11d758c769b1d559b7fae9
use variable instead of calculating again and use final

Change-Id: I04ea7c1940a5f4c6a4cf990a520a877eec065404
Merge "use variable instead of calculating again and use final"
Merge "Replace 'indexOf()' expression with 'contains()'"