Add Android 7.1 launcher shortcut for new session

This commit is contained in:
Fredrik Fornwall
2016-12-26 04:07:03 +01:00
parent 4c93cb42f1
commit df92896eef
4 changed files with 37 additions and 1 deletions

View File

@@ -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());
}
}
}