Load icon and title from Google ActivityInfo
am: 4e1b8feb5f

Change-Id: I74507308a9f07bfeb6d952ae7b26293de4ffaa80
diff --git a/Settings/src/com/android/tv/settings/MainFragment.java b/Settings/src/com/android/tv/settings/MainFragment.java
index 9d61b62..a48a734 100644
--- a/Settings/src/com/android/tv/settings/MainFragment.java
+++ b/Settings/src/com/android/tv/settings/MainFragment.java
@@ -445,16 +445,11 @@
             final ResolveInfo info = systemIntentIsHandled(getContext(),
                     googleSettingsPref.getIntent());
             googleSettingsPref.setVisible(info != null);
-            if (info != null) {
-                try {
-                    final Context targetContext = getContext()
-                            .createPackageContext(info.resolvePackageName != null ?
-                                    info.resolvePackageName : info.activityInfo.packageName, 0);
-                    googleSettingsPref.setIcon(targetContext.getDrawable(info.iconResourceId));
-                } catch (Resources.NotFoundException | PackageManager.NameNotFoundException
-                        | SecurityException e) {
-                    Log.e(TAG, "Google settings icon not found", e);
-                }
+            if (info != null && info.activityInfo != null) {
+                googleSettingsPref.setIcon(
+                    info.activityInfo.loadIcon(getContext().getPackageManager()));
+                googleSettingsPref.setTitle(
+                    info.activityInfo.loadLabel(getContext().getPackageManager()));
             }
 
             final Preference speechPref = findPreference(KEY_SPEECH_SETTINGS);