File tree Expand file tree Collapse file tree
java/io/nekohasekai/sfa/bg Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 <uses-permission android : name =" android.permission.FOREGROUND_SERVICE" />
1616 <uses-permission android : name =" android.permission.FOREGROUND_SERVICE_SYSTEM_EXEMPTED" />
1717 <uses-permission android : name =" android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
18- <uses-permission android : name =" android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE" />
1918 <uses-permission android : name =" android.permission.POST_NOTIFICATIONS" />
2019 <uses-permission android : name =" android.permission.RECEIVE_BOOT_COMPLETED" />
2120 <uses-permission android : name =" android.permission.CHANGE_NETWORK_STATE" />
150149 <service
151150 android : name =" .bg.USBIPService"
152151 android : exported =" false"
153- android : foregroundServiceType =" connectedDevice" />
152+ android : foregroundServiceType =" specialUse" >
153+ <property
154+ android : name =" android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
155+ android : value =" usbip" />
156+ </service >
154157
155158 <receiver
156159 android : name =" .bg.BootReceiver"
Original file line number Diff line number Diff line change @@ -141,6 +141,6 @@ class USBIPService : Service() {
141141
142142 private fun pendingIntentFlags () = if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .M ) PendingIntent .FLAG_IMMUTABLE else 0
143143
144- private fun foregroundServiceType () = if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .R ) ServiceInfo .FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE else 0
144+ private fun foregroundServiceType () = if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .R ) ServiceInfo .FOREGROUND_SERVICE_TYPE_SPECIAL_USE else 0
145145 }
146146}
You can’t perform that action at this time.
0 commit comments