Use activity context to get display in CtsPreferenceTestCases

ag/11867297 seems to have caused crashes due to getting the display from a context not associated with a display. Using the Activity here instead should avoid crashes.

Bug: b/159243084
Change-Id: I0c49f226f60bb81d71acfbf3a41a8834a720eb2b
Test: CtsPreferenceTestCases
1 file changed