File tree Expand file tree Collapse file tree
src/main/java/org/altbeacon/beacon Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030import android .content .Intent ;
3131import android .content .ServiceConnection ;
3232import android .content .pm .PackageManager ;
33+ import android .content .pm .ResolveInfo ;
3334import android .os .IBinder ;
3435import android .os .Message ;
3536import android .os .Messenger ;
@@ -1086,10 +1087,10 @@ private long getBetweenScanPeriod() {
10861087 private void verifyServiceDeclaration () {
10871088 final PackageManager packageManager = mContext .getPackageManager ();
10881089 final Intent intent = new Intent (mContext , BeaconService .class );
1089- List resolveInfo =
1090+ List < ResolveInfo > resolveInfo =
10901091 packageManager .queryIntentServices (intent ,
10911092 PackageManager .MATCH_DEFAULT_ONLY );
1092- if (resolveInfo .size () == 0 ) {
1093+ if (resolveInfo != null && resolveInfo .size () == 0 ) {
10931094 throw new ServiceNotDeclaredException ();
10941095 }
10951096 }
You can’t perform that action at this time.
0 commit comments