Remove the failsafe activity

The failsafe activity were infrequently used while confusing users.

Replace it with an app shortcut on Android 7.1+ and a separate app on
earlier versions.
This commit is contained in:
Fredrik Fornwall
2019-05-20 13:30:46 +02:00
parent fef0c66868
commit af9f28c010
5 changed files with 21 additions and 31 deletions

View File

@@ -2,7 +2,6 @@
<resources>
<string name="application_name">Termux</string>
<string name="shared_user_label">Termux user</string>
<string name="app_failsafe_mode">Termux (failsafe)</string>
<string name="new_session">New session</string>
<string name="new_session_failsafe">Failsafe</string>
<string name="toggle_soft_keyboard">Keyboard</string>

View File

@@ -1,5 +1,6 @@
<shortcuts xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:shortcutId="new_session"
android:enabled="true"
@@ -11,4 +12,19 @@
android:targetPackage="com.termux"
android:targetClass="com.termux.app.TermuxActivity"/>
</shortcut>
<shortcut
android:shortcutId="new_failsafe_session"
android:enabled="true"
android:icon="@drawable/ic_new_session"
android:shortcutShortLabel="@string/new_session_failsafe"
tools:targetApi="n_mr1">
<intent
android:action="android.intent.action.RUN"
android:targetPackage="com.termux"
android:targetClass="com.termux.app.TermuxActivity">
<extra android:name="com.termux.app.failsafe_session" android:value="true" />
</intent>
</shortcut>
</shortcuts>