Factor out preference-in-storage check to overridable method.

Change-Id: I2fff3192802f8a180330fda66388eda394334a5a
Merge pull request #69 from AOSPA-legacy/lollipop

Factor out preference-in-storage check to overridable method.