Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51a6ae01 authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Safely handle the case of BroadcastOptions being null.

BroadcastOptions argument in Context#sendBroadcastMultiplePermissions
API is marked as @Nullable but would result in NPE if a null
BroadcastOptions is passed.

Bug: 264293164
Test: TH
Change-Id: I0847a189bf945d8aa051133c7cff277a8692272d
parent 09183fb1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2345,7 +2345,8 @@ public abstract class Context {
    @SystemApi
    public void sendBroadcastMultiplePermissions(@NonNull Intent intent,
            @NonNull String[] receiverPermissions, @Nullable BroadcastOptions options) {
       sendBroadcastMultiplePermissions(intent, receiverPermissions, options.toBundle());
        sendBroadcastMultiplePermissions(intent, receiverPermissions,
                (options == null ? null : options.toBundle()));
    }

    /**