Fix SettingsActivity shortcut not showing on android 7 and fixed shortcut actions and categories

This commit is contained in:
agnostic-apollo
2021-04-06 13:27:43 +05:00
parent cf5bb69fc8
commit 325a6f7d66
2 changed files with 10 additions and 5 deletions

View File

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

View File

@@ -9,6 +9,7 @@
need to be manually patched since dot (.) prefix does not work to automatically prefix the need to be manually patched since dot (.) prefix does not work to automatically prefix the
package name. package name.
--> -->
<shortcut <shortcut
android:shortcutId="new_session" android:shortcutId="new_session"
android:enabled="true" android:enabled="true"
@@ -18,7 +19,8 @@
<intent <intent
android:action="android.intent.action.RUN" android:action="android.intent.action.RUN"
android:targetPackage="com.termux" android:targetPackage="com.termux"
android:targetClass="com.termux.app.TermuxActivity"/> android:targetClass="com.termux.app.TermuxActivity"
android:name="android.shortcut.conversation"/>
</shortcut> </shortcut>
<shortcut <shortcut
@@ -30,8 +32,9 @@
<intent <intent
android:action="android.intent.action.RUN" android:action="android.intent.action.RUN"
android:targetPackage="com.termux" android:targetPackage="com.termux"
android:targetClass="com.termux.app.TermuxActivity"> android:targetClass="com.termux.app.TermuxActivity"
<extra android:name="com.termux.app.failsafe_session" android:value="true" /> android:name="android.shortcut.conversation">
<extra android:name="com.termux.app.failsafe_session" android:value="true"/>
</intent> </intent>
</shortcut> </shortcut>
@@ -42,9 +45,10 @@
android:shortcutShortLabel="@string/action_open_settings" android:shortcutShortLabel="@string/action_open_settings"
tools:targetApi="n_mr1"> tools:targetApi="n_mr1">
<intent <intent
android:action="android.intent.action.RUN" android:action="android.intent.action.VIEW"
android:targetPackage="com.termux" android:targetPackage="com.termux"
android:targetClass="com.termux.app.activities.SettingsActivity"/> android:targetClass="com.termux.app.activities.SettingsActivity"
android:name="android.shortcut.conversation"/>
</shortcut> </shortcut>
</shortcuts> </shortcuts>