Skip to content

Commit 5158b42

Browse files
committed
Launcher3: Setup icon pack's launchIntent
This allow us to open the icon pack's app by clicking the gear icon when opening the icon pack selection page.
1 parent 7b8512f commit 5158b42

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/com/android/launcher3/icons/pack/IconPackSettingsFragment.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,14 @@ private SelectorWithWidgetPreference buildPreference(Context context, String pkg
146146
pref.setTitle(label);
147147
pref.setPersistent(false);
148148
pref.setChecked(isChecked);
149+
if (!pkgName.equals(IconDatabase.VALUE_DEFAULT)) {
150+
Intent intent = context.getPackageManager().getLaunchIntentForPackage(pkgName);
151+
if (intent != null) {
152+
pref.setExtraWidgetOnClickListener((v) -> {
153+
context.startActivity(intent);
154+
});
155+
}
156+
}
149157
return pref;
150158
}
151159

0 commit comments

Comments
 (0)