isAccessible flag fixes

Made the default value as true, and corrected the if accessible
condition. Also added a unit test for it.

Bug: 25880216
Change-Id: I6152a524670fa32b26afab33b6873ae31aae9515
2 files changed