mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-10 20:44:12 +08:00
Add Android 7.1 launcher shortcut for new session
This commit is contained in:
@@ -522,7 +522,13 @@ public final class TermuxActivity extends Activity implements ServiceConnection
|
||||
finish();
|
||||
}
|
||||
} else {
|
||||
switchToSession(getStoredCurrentSessionOrLast());
|
||||
Intent i = getIntent();
|
||||
if (i != null && i.getAction().equals(Intent.ACTION_RUN)) {
|
||||
// Android 7.1 app shortcut from res/xml/shortcuts.xml.
|
||||
addNewSession(false, null);
|
||||
} else {
|
||||
switchToSession(getStoredCurrentSessionOrLast());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user