Skip to content

Commit

Permalink
Fix SettingsActivity shortcut not showing on android 7 and fixed shor…
Browse files Browse the repository at this point in the history
…tcut actions and categories
  • Loading branch information
agnostic-apollo committed Apr 6, 2021
1 parent cf5bb69 commit 325a6f7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@

<activity
android:name=".app.activities.SettingsActivity"
android:exported="true"
android:label="@string/title_activity_termux_settings"
android:theme="@style/Theme.AppCompat.Light.DarkActionBar" />

Expand Down
14 changes: 9 additions & 5 deletions app/src/main/res/xml/shortcuts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
need to be manually patched since dot (.) prefix does not work to automatically prefix the
package name.
-->

<shortcut
android:shortcutId="new_session"
android:enabled="true"
Expand All @@ -18,7 +19,8 @@
<intent
android:action="android.intent.action.RUN"
android:targetPackage="com.termux"
android:targetClass="com.termux.app.TermuxActivity"/>
android:targetClass="com.termux.app.TermuxActivity"
android:name="android.shortcut.conversation"/>
</shortcut>

<shortcut
Expand All @@ -30,8 +32,9 @@
<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" />
android:targetClass="com.termux.app.TermuxActivity"
android:name="android.shortcut.conversation">
<extra android:name="com.termux.app.failsafe_session" android:value="true"/>
</intent>
</shortcut>

Expand All @@ -42,9 +45,10 @@
android:shortcutShortLabel="@string/action_open_settings"
tools:targetApi="n_mr1">
<intent
android:action="android.intent.action.RUN"
android:action="android.intent.action.VIEW"
android:targetPackage="com.termux"
android:targetClass="com.termux.app.activities.SettingsActivity"/>
android:targetClass="com.termux.app.activities.SettingsActivity"
android:name="android.shortcut.conversation"/>
</shortcut>

</shortcuts>

0 comments on commit 325a6f7

Please sign in to comment.