SettingsLib: Fix possible NPEs

getText() can return null, resulting in a NPE when trying to call
toString(). Add a null check to prevent this.
Additionally add a null check for packageInfo, as this can also be null.

Change-Id: Ia76326522872f4de4702ef56640b2f7b357c2bb7
Reference: BugDumps 20161104-10 L#135
1 file changed