@@ -114,6 +114,15 @@ private static ValidationResult checkPermissions(Context context) {
114114 if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .P ) {
115115 permissionList .add (Manifest .permission .FOREGROUND_SERVICE );
116116 }
117+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .S ) {
118+ permissionList .add (Manifest .permission .BLUETOOTH_CONNECT );
119+ }
120+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .TIRAMISU ) {
121+ permissionList .add (Manifest .permission .POST_NOTIFICATIONS );
122+ }
123+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .UPSIDE_DOWN_CAKE ) {
124+ permissionList .add (Manifest .permission .FOREGROUND_SERVICE_CONNECTED_DEVICE );
125+ }
117126 try {
118127 PackageInfo packageInfo = context .getPackageManager ().getPackageInfo (context .getApplicationContext ().getPackageName (), PackageManager .GET_PERMISSIONS );
119128 String [] permissionInfos = packageInfo .requestedPermissions ;
@@ -161,6 +170,10 @@ public static ValidationResult checkBroadcastReceiver(Context context) {
161170 int j = 0 ;
162171 for (ResolveInfo sdlReceiver : sdlReceivers ) {
163172 if (receiver .name .equals (sdlReceiver .activityInfo .name )) {
173+ if (!receiver .exported ) {
174+ retVal .successful = false ;
175+ retVal .resultText = "This application has not marked its SdlBroadcastReceiver as exported" ;
176+ }
164177 return retVal ;
165178 }
166179 }
@@ -185,6 +198,11 @@ private static ValidationResult checkRoutServiceMetadata(Context context, Class
185198 retVal .successful = false ;
186199 retVal .resultText = "This application has not specified its metadata tags for the SdlRouterService." ;
187200 }
201+
202+ if (!info .serviceInfo .exported ) {
203+ retVal .successful = false ;
204+ retVal .resultText = "This application has not marked its SdlRouterService as exported." ;
205+ }
188206 } else {
189207 retVal .successful = false ;
190208 retVal .resultText = "This application has not specified its SdlRouterService correctly in the manifest." ;
0 commit comments