Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c50556be authored by Adam77Root's avatar Adam77Root Committed by Steve Kondik
Browse files

Open app when clicking on icon in App Info screen

Based on Xposed module Shortcut in App Info:
http://repo.xposed.info/module/com.mohammadag.shortcutinappinfo

There is no vibration as in the module as I didn't find it necessary

Change-Id: I07b3f947aaaa13702adba3b4e78bb780fe861baf
parent 4da3535c
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -638,6 +638,21 @@ public class InstalledAppDetails extends Fragment
        ImageView icon = (ImageView) appSnippet.findViewById(R.id.app_icon);
        mState.ensureIcon(mAppEntry);
        icon.setImageDrawable(mAppEntry.icon);

        // Clicking on application icon opens application.
        final String finalPackageName = pkgInfo.packageName;
        icon.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                PackageManager pm = v.getContext().getPackageManager();
                Intent intent = pm.getLaunchIntentForPackage(finalPackageName);
                if (intent == null)
                    return;

                v.getContext().startActivity(intent);
            }
        });

        // Set application name.
        TextView label = (TextView) appSnippet.findViewById(R.id.app_name);
        label.setText(mAppEntry.label);