Modificator / E-Ink-Launcher

E-reader Launcher for Android, Electronic paper book...
Apache License 2.0
186 stars 51 forks source link

Use `Intent.ACTION_MAIN` when launching an app #14

Closed Kazurin-775 closed 3 years ago

Kazurin-775 commented 3 years ago

The current code (EInkLauncherView.java#L343) doesn't set an action for the Intent that launches an app. The action should be set to Intent.ACTION_MAIN for a launching Intent:

intent.setAction(Intent.ACTION_MAIN);

Or even better, use:

Intent intent = getPackageManager().getLaunchIntentForPackage("com.package.address");

If the action is not set, it defaults to null, which will break some apps (for example plateaukao/browser; also see this issue).

Modificator commented 3 years ago

Thanks,I fix it