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
Fix: 261957150
Test: TH
Merged-In: I0847a189bf945d8aa051133c7cff277a8692272d
Change-Id: I0847a189bf945d8aa051133c7cff277a8692272d
(cherry picked from commit 51a6ae01b8)
This commit is contained in:
committed by
William Escande
parent
ede4a8a9d4
commit
d1b836e3dd
@@ -2323,7 +2323,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()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user