Skip to content

Commit 3d09ab4

Browse files
committed
Deal with new requirements
1 parent 594cdca commit 3d09ab4

7 files changed

Lines changed: 21 additions & 7 deletions

File tree

core/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ tasks.clean.dependsOn("cargoClean")
6666
dependencies {
6767
val coroutinesVersion = "1.5.0"
6868
val roomVersion = "2.3.0"
69-
val workVersion = "2.5.0"
69+
val workVersion = "2.7.0-alpha04"
7070

7171
api(project(":plugin"))
7272
api("androidx.core:core-ktx:1.6.0-rc01")

core/src/main/AndroidManifest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
<activity
7878
android:name="com.github.shadowsocks.UrlImportActivity"
7979
android:theme="@style/Theme.AppCompat.Translucent"
80+
android:exported="true"
8081
android:excludeFromRecents="true">
8182
<intent-filter>
8283
<action android:name="android.intent.action.VIEW"/>
@@ -89,12 +90,14 @@
8990
<activity
9091
android:name="com.github.shadowsocks.VpnRequestActivity"
9192
android:theme="@style/Theme.AppCompat.Translucent"
93+
android:exported="false"
9294
android:excludeFromRecents="true"
9395
android:taskAffinity=""/>
9496

9597
<receiver android:name="com.github.shadowsocks.BootReceiver"
9698
android:process=":bg"
9799
android:directBootAware="true"
100+
android:exported="true"
98101
android:enabled="false">
99102
<intent-filter>
100103
<action android:name="android.intent.action.BOOT_COMPLETED"/>

core/src/main/java/com/github/shadowsocks/Core.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ object Core : Configuration.Provider {
9999
this.app = app
100100
this.configureIntent = {
101101
PendingIntent.getActivity(it, 0, Intent(it, configureClass.java)
102-
.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT), 0)
102+
.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT), PendingIntent.FLAG_IMMUTABLE)
103103
}
104104

105105
if (Build.VERSION.SDK_INT >= 24) { // migrate old files

core/src/main/java/com/github/shadowsocks/bg/ServiceNotification.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ class ServiceNotification(private val service: BaseService.Interface, profileNam
8585
val closeAction = NotificationCompat.Action.Builder(
8686
R.drawable.ic_navigation_close,
8787
service.getText(R.string.stop),
88-
PendingIntent.getBroadcast(service, 0, Intent(Action.CLOSE).setPackage(service.packageName), 0)).apply {
88+
PendingIntent.getBroadcast(service, 0, Intent(Action.CLOSE).setPackage(service.packageName),
89+
PendingIntent.FLAG_IMMUTABLE)).apply {
8990
setShowsUserInterface(false)
9091
}.build()
9192
if (Build.VERSION.SDK_INT < 24) builder.addAction(closeAction) else builder.addInvisibleAction(closeAction)

core/src/main/java/com/github/shadowsocks/subscription/SubscriptionService.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ import com.google.gson.JsonStreamParser
4343
import kotlinx.coroutines.*
4444
import timber.log.Timber
4545
import java.io.File
46-
import java.io.IOException
4746
import java.io.InputStream
4847
import java.net.HttpURLConnection
4948
import java.net.URL
@@ -83,7 +82,7 @@ class SubscriptionService : Service(), CoroutineScope {
8382
R.drawable.ic_navigation_close,
8483
getText(R.string.stop),
8584
PendingIntent.getBroadcast(this@SubscriptionService, 0,
86-
Intent(Action.ABORT).setPackage(packageName), 0)).apply {
85+
Intent(Action.ABORT).setPackage(packageName), PendingIntent.FLAG_IMMUTABLE)).apply {
8786
setShowsUserInterface(false)
8887
}.build())
8988
setCategory(NotificationCompat.CATEGORY_PROGRESS)

mobile/src/main/AndroidManifest.xml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<activity
2020
android:name=".MainActivity"
2121
android:label="@string/app_name"
22+
android:exported="true"
2223
android:theme="@style/Theme.Shadowsocks.Immersive.Navigation"
2324
android:launchMode="singleTask">
2425
<intent-filter>
@@ -35,13 +36,15 @@
3536

3637
<activity
3738
android:name=".ProfileConfigActivity"
39+
android:exported="false"
3840
android:theme="@style/Theme.Shadowsocks.Immersive"
3941
android:excludeFromRecents="true"
4042
android:label="@string/profile_config"
4143
android:launchMode="singleTask"/>
4244

4345
<activity
4446
android:name=".AppManager"
47+
android:exported="false"
4548
android:label="@string/proxied_apps"
4649
android:parentActivityName=".ProfileConfigActivity"
4750
android:theme="@style/Theme.Shadowsocks.Immersive"
@@ -50,22 +53,26 @@
5053

5154
<activity
5255
android:name=".UdpFallbackProfileActivity"
56+
android:exported="false"
5357
android:label="@string/udp_fallback"
5458
android:theme="@style/Theme.Shadowsocks.Immersive"
5559
android:launchMode="singleTask"
5660
android:excludeFromRecents="true"/>
5761

5862
<activity
5963
android:name=".ScannerActivity"
64+
android:exported="true"
6065
android:label="@string/add_profile_methods_scan_qr_code"
6166
android:parentActivityName=".MainActivity"
6267
android:theme="@style/Theme.Shadowsocks.Immersive"
6368
android:launchMode="singleTask"
6469
android:screenOrientation="locked"
6570
android:excludeFromRecents="true"/>
6671

67-
<activity android:name=".tasker.ConfigActivity"
68-
android:theme="@style/Theme.Shadowsocks.Immersive">
72+
<activity
73+
android:name=".tasker.ConfigActivity"
74+
android:exported="true"
75+
android:theme="@style/Theme.Shadowsocks.Immersive">
6976
<intent-filter>
7077
<action android:name="com.twofortyfouram.locale.intent.action.EDIT_SETTING" />
7178
</intent-filter>
@@ -75,6 +82,7 @@
7582
android:name=".QuickToggleShortcut"
7683
android:label="@string/quick_toggle"
7784
android:theme="@android:style/Theme.Translucent.NoTitleBar"
85+
android:exported="true"
7886
android:launchMode="singleTask"
7987
android:excludeFromRecents="true"
8088
android:taskAffinity=""
@@ -87,6 +95,7 @@
8795
<service android:name=".bg.TileService"
8896
android:label="@string/quick_toggle"
8997
android:process=":bg"
98+
android:exported="true"
9099
android:directBootAware="true"
91100
android:icon="@drawable/ic_service_active"
92101
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
@@ -102,6 +111,7 @@
102111
<receiver android:name=".tasker.ActionListener"
103112
android:process=":bg"
104113
android:directBootAware="true"
114+
android:exported="true"
105115
tools:ignore="ExportedReceiver">
106116
<intent-filter>
107117
<action android:name="com.twofortyfouram.locale.intent.action.FIRE_SETTING"/>

tv/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<activity
1919
android:name=".MainActivity"
2020
android:label="@string/app_name"
21+
android:exported="true"
2122
android:launchMode="singleTask">
2223
<intent-filter>
2324
<action android:name="android.intent.action.MAIN"/>

0 commit comments

Comments
 (0)