Skip to content

Commit 325a6f7

Browse files
Fix SettingsActivity shortcut not showing on android 7 and fixed shortcut actions and categories
1 parent cf5bb69 commit 325a6f7

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

app/src/main/AndroidManifest.xml

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898

9999
<activity
100100
android:name=".app.activities.SettingsActivity"
101+
android:exported="true"
101102
android:label="@string/title_activity_termux_settings"
102103
android:theme="@style/Theme.AppCompat.Light.DarkActionBar" />
103104

app/src/main/res/xml/shortcuts.xml

+9-5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
need to be manually patched since dot (.) prefix does not work to automatically prefix the
1010
package name.
1111
-->
12+
1213
<shortcut
1314
android:shortcutId="new_session"
1415
android:enabled="true"
@@ -18,7 +19,8 @@
1819
<intent
1920
android:action="android.intent.action.RUN"
2021
android:targetPackage="com.termux"
21-
android:targetClass="com.termux.app.TermuxActivity"/>
22+
android:targetClass="com.termux.app.TermuxActivity"
23+
android:name="android.shortcut.conversation"/>
2224
</shortcut>
2325

2426
<shortcut
@@ -30,8 +32,9 @@
3032
<intent
3133
android:action="android.intent.action.RUN"
3234
android:targetPackage="com.termux"
33-
android:targetClass="com.termux.app.TermuxActivity">
34-
<extra android:name="com.termux.app.failsafe_session" android:value="true" />
35+
android:targetClass="com.termux.app.TermuxActivity"
36+
android:name="android.shortcut.conversation">
37+
<extra android:name="com.termux.app.failsafe_session" android:value="true"/>
3538
</intent>
3639
</shortcut>
3740

@@ -42,9 +45,10 @@
4245
android:shortcutShortLabel="@string/action_open_settings"
4346
tools:targetApi="n_mr1">
4447
<intent
45-
android:action="android.intent.action.RUN"
48+
android:action="android.intent.action.VIEW"
4649
android:targetPackage="com.termux"
47-
android:targetClass="com.termux.app.activities.SettingsActivity"/>
50+
android:targetClass="com.termux.app.activities.SettingsActivity"
51+
android:name="android.shortcut.conversation"/>
4852
</shortcut>
4953

5054
</shortcuts>

0 commit comments

Comments
 (0)