Skip to content

Commit 97c25d0

Browse files
committed
Add back static shortcuts
1 parent c983f61 commit 97c25d0

File tree

3 files changed

+75
-1
lines changed

3 files changed

+75
-1
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252

5353
<category android:name="android.intent.category.LAUNCHER" />
5454
</intent-filter>
55+
<meta-data
56+
android:name="android.app.shortcuts"
57+
android:resource="@xml/shortcuts" />
5558
</activity>
5659

5760
<provider

app/src/main/res/drawable/ic_baseline_settings_24.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
android:viewportHeight="24"
2525
android:tint="?attr/colorControlNormal">
2626
<path
27-
android:fillColor="@android:color/white"
27+
android:fillColor="@color/ic_launcher_foreground"
2828
android:pathData="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z"/>
2929
</vector>

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

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<!--
2+
~ This file is part of LSPosed.
3+
~
4+
~ LSPosed is free software: you can redistribute it and/or modify
5+
~ it under the terms of the GNU General Public License as published by
6+
~ the Free Software Foundation, either version 3 of the License, or
7+
~ (at your option) any later version.
8+
~
9+
~ LSPosed is distributed in the hope that it will be useful,
10+
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
~ GNU General Public License for more details.
13+
~
14+
~ You should have received a copy of the GNU General Public License
15+
~ along with LSPosed. If not, see <https://www.gnu.org/licenses/>.
16+
~
17+
~ Copyright (C) 2020 EdXposed Contributors
18+
~ Copyright (C) 2021 LSPosed Contributors
19+
-->
20+
21+
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
22+
23+
<shortcut
24+
android:enabled="true"
25+
android:icon="@drawable/shortcut_ic_modules"
26+
android:shortcutId="modules"
27+
android:shortcutLongLabel="@string/Modules"
28+
android:shortcutShortLabel="@string/Modules">
29+
<intent
30+
android:action="android.intent.action.MAIN"
31+
android:data="modules"
32+
android:targetClass="org.lsposed.manager.ui.activity.MainActivity"
33+
android:targetPackage="org.lsposed.manager" />
34+
</shortcut>
35+
<shortcut
36+
android:enabled="true"
37+
android:icon="@drawable/shortcut_ic_logs"
38+
android:shortcutId="logs"
39+
android:shortcutLongLabel="@string/Logs"
40+
android:shortcutShortLabel="@string/Logs">
41+
<intent
42+
android:action="android.intent.action.MAIN"
43+
android:data="logs"
44+
android:targetClass="org.lsposed.manager.ui.activity.MainActivity"
45+
android:targetPackage="org.lsposed.manager" />
46+
</shortcut>
47+
<shortcut
48+
android:enabled="true"
49+
android:icon="@drawable/shortcut_ic_repo"
50+
android:shortcutId="repo"
51+
android:shortcutLongLabel="@string/module_repo"
52+
android:shortcutShortLabel="@string/module_repo">
53+
<intent
54+
android:action="android.intent.action.MAIN"
55+
android:data="repo"
56+
android:targetClass="org.lsposed.manager.ui.activity.MainActivity"
57+
android:targetPackage="org.lsposed.manager" />
58+
</shortcut>
59+
<shortcut
60+
android:enabled="true"
61+
android:icon="@drawable/shortcut_ic_settings"
62+
android:shortcutId="settings"
63+
android:shortcutLongLabel="@string/Settings"
64+
android:shortcutShortLabel="@string/Settings">
65+
<intent
66+
android:action="android.intent.action.MAIN"
67+
android:data="settings"
68+
android:targetClass="org.lsposed.manager.ui.activity.MainActivity"
69+
android:targetPackage="org.lsposed.manager" />
70+
</shortcut>
71+
</shortcuts>

0 commit comments

Comments
 (0)