IllegalStateException fixed in print service settings

Settings crashed due to IllegalStateException
as OnQueryTextListener refers to an already
detached view. The listener is set to null
on press of home key (onPause).

Change-Id: If9c76fe3ff040c295f0af9c092e8824b9a1371d7
(cherry picked from commit 31a46ced3e8aaac4bdf0c82a970983e2040a7428)