Skip to content

Commit c811964

Browse files
committed
Shade: Update API from 30 to 33
1 parent 01b2c65 commit c811964

File tree

5 files changed

+22
-8
lines changed

5 files changed

+22
-8
lines changed

AndroidManifest-common.xml

+13-5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
xmlns:android="http://schemas.android.com/apk/res/android"
2222
package="com.android.launcher3">
2323

24+
<permission-group android:name="${packageName}.permission-group.SYSTEM_TOOLS" />
25+
2426
<!--
2527
The manifest defines the common entries that should be present in any derivative of Launcher3.
2628
The components should generally not require any changes.
@@ -31,7 +33,7 @@
3133
-->
3234
<permission
3335
android:name="com.android.launcher.permission.INSTALL_SHORTCUT"
34-
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
36+
android:permissionGroup="${packageName}.permission-group.SYSTEM_TOOLS"
3537
android:protectionLevel="dangerous"
3638
android:label="@string/permlab_install_shortcut"
3739
android:description="@string/permdesc_install_shortcut" />
@@ -53,13 +55,13 @@
5355
-->
5456
<permission
5557
android:name="${packageName}.permission.READ_SETTINGS"
56-
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
58+
android:permissionGroup="${packageName}.permission-group.SYSTEM_TOOLS"
5759
android:protectionLevel="signatureOrSystem"
5860
android:label="@string/permlab_read_settings"
5961
android:description="@string/permdesc_read_settings"/>
6062
<permission
6163
android:name="${packageName}.permission.WRITE_SETTINGS"
62-
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
64+
android:permissionGroup="${packageName}.permission-group.SYSTEM_TOOLS"
6365
android:protectionLevel="signatureOrSystem"
6466
android:label="@string/permlab_write_settings"
6567
android:description="@string/permdesc_write_settings"/>
@@ -81,6 +83,7 @@
8183
<!-- Intent received used to install shortcuts from other applications -->
8284
<receiver
8385
android:name="com.android.launcher3.InstallShortcutReceiver"
86+
android:exported="true"
8487
android:permission="com.android.launcher.permission.INSTALL_SHORTCUT"
8588
android:enabled="@bool/enable_install_shortcut_api" >
8689
<intent-filter>
@@ -90,14 +93,16 @@
9093

9194
<!-- Intent received when a session is committed -->
9295
<receiver
93-
android:name="com.android.launcher3.SessionCommitReceiver" >
96+
android:name="com.android.launcher3.SessionCommitReceiver"
97+
android:exported="true" >
9498
<intent-filter>
9599
<action android:name="android.content.pm.action.SESSION_COMMITTED" />
96100
</intent-filter>
97101
</receiver>
98102

99103
<!-- Intent received used to initialize a restored widget -->
100-
<receiver android:name="com.android.launcher3.AppWidgetsRestoredReceiver" >
104+
<receiver android:name="com.android.launcher3.AppWidgetsRestoredReceiver"
105+
android:exported="true" >
101106
<intent-filter>
102107
<action android:name="android.appwidget.action.APPWIDGET_HOST_RESTORED"/>
103108
</intent-filter>
@@ -111,6 +116,7 @@
111116

112117
<service
113118
android:name="com.android.launcher3.notification.NotificationListener"
119+
android:exported="true"
114120
android:label="@string/notification_dots_service_title"
115121
android:enabled="@bool/notification_dots_enabled"
116122
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">
@@ -123,6 +129,7 @@
123129
android:value="true" />
124130

125131
<activity android:name="com.android.launcher3.dragndrop.AddItemActivity"
132+
android:exported="true"
126133
android:theme="@style/AppItemActivityTheme"
127134
android:excludeFromRecents="true"
128135
android:autoRemoveFromRecents="true"
@@ -168,6 +175,7 @@
168175
-->
169176
<activity
170177
android:name="com.android.launcher3.settings.SettingsActivity"
178+
android:exported="true"
171179
android:label="@string/settings_button_text"
172180
android:theme="@style/HomeSettingsTheme"
173181
android:autoRemoveFromRecents="true">

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ android {
2020

2121
defaultConfig {
2222
minSdkVersion 24
23-
targetSdkVersion 30
23+
targetSdkVersion 33
2424
versionCode 1
2525
versionName "1.0"
2626

shade/AndroidManifest.xml

+6
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
-->
7878
<activity
7979
android:name="amirz.shade.ShadeLauncher"
80+
android:exported="true"
8081
android:label="@string/shade_app_name_short"
8182
android:launchMode="singleTask"
8283
android:clearTaskOnLaunch="true"
@@ -110,6 +111,7 @@
110111
-->
111112
<activity
112113
android:name="amirz.shade.ShadeSettings"
114+
android:exported="true"
113115
android:label="@string/settings_button_text"
114116
android:theme="@style/Shade.SettingsTheme"
115117
android:autoRemoveFromRecents="true">
@@ -128,6 +130,7 @@
128130
The activity that shows the Add To Home screen popup in Chrome.
129131
-->
130132
<activity android:name="amirz.shade.dragndrop.ShadeAddItemActivity"
133+
android:exported="true"
131134
android:theme="@style/AppItemActivityTheme"
132135
android:excludeFromRecents="true"
133136
android:autoRemoveFromRecents="true"
@@ -141,6 +144,7 @@
141144
<!-- The service for the home button overlay -->
142145
<service
143146
android:name="amirz.gesture.GestureService"
147+
android:exported="true"
144148
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">
145149
<intent-filter>
146150
<action android:name="android.accessibilityservice.AccessibilityService" />
@@ -154,6 +158,7 @@
154158
<!-- The service for double tap to sleep and opening recents. -->
155159
<service
156160
android:name="amirz.shade.services.GlobalActionService"
161+
android:exported="true"
157162
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"
158163
android:enabled="@bool/atleast_p">
159164
<intent-filter>
@@ -167,6 +172,7 @@
167172

168173
<!-- Widget shortcut to any activity -->
169174
<activity android:name="amirz.shortcut.CreateShortcut"
175+
android:exported="true"
170176
android:icon="@drawable/ic_launcher_shortcut"
171177
android:label="@string/any_activity_shortcut"
172178
android:theme="@style/ShortcutTheme">

shade/src/amirz/shade/ShadeRestarter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ private static PendingIntent getRestartIntent(Context context) {
2828
.setPackage(context.getPackageName())
2929
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
3030
return PendingIntent.getActivity(context, RESTART_REQUEST_CODE,
31-
homeIntent, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_ONE_SHOT);
31+
homeIntent, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE);
3232
}
3333

3434
private static AlarmManager getAlarmManager(Context context) {

shade/src/amirz/shade/customization/IconShapeOverride.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ private static PendingIntent getRestartIntent(Context context) {
155155
.setPackage(context.getPackageName())
156156
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
157157
return PendingIntent.getActivity(context, RESTART_REQUEST_CODE,
158-
homeIntent, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_ONE_SHOT);
158+
homeIntent, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE);
159159
}
160160

161161
private static void cancelRestart(Context context) {

0 commit comments

Comments
 (0)