Fix build error for public removePreferenceIfPackageNotInstalled

Change-Id: Ic8168dec01aedb8fd8a13bfd6d82b6fa860af583