Set a couple flags on the ShortcutIntent

This commit is contained in:
Henrik Rydgård committed 2021-09-08 23:43:35 +02:00
1 parent bad0736fa3
commit 273376ab8d
1 file changed
+3 -1
@@ -81,7 +81,9 @@ public class ShortcutActivity extends Activity {
// This is Intent that will be sent when user execute our shortcut on
// homescreen. Set our app as target Context. Set Main activity as
// target class. Add any parameter as data.
Intent shortcutIntent = new Intent(this, PpssppActivity.class);
Intent shortcutIntent = new Intent(getApplicationContext(), PpssppActivity.class);
shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
Log.i(TAG, "Shortcut URI: " + uri.toString());
shortcutIntent.setData(uri);
String path = uri.toString();