mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
feat(android): fix case where actions have no data
This commit is contained in:
committed by
Calinteodor
parent
e9236fd9ff
commit
bc65d21ce4
@@ -32,7 +32,13 @@ public class BroadcastReceiver extends android.content.BroadcastReceiver {
|
||||
BroadcastAction action = new BroadcastAction(intent);
|
||||
String actionName = action.getType().getAction();
|
||||
Bundle data = action.getData();
|
||||
|
||||
ReactInstanceManagerHolder.emitEvent(actionName, Arguments.fromBundle(data));
|
||||
|
||||
// For actions without data bundle (like hangup), we create an empty map
|
||||
// instead of attempting to convert a null bundle to avoid crashes.
|
||||
if (data != null) {
|
||||
ReactInstanceManagerHolder.emitEvent(actionName, Arguments.fromBundle(data));
|
||||
} else {
|
||||
ReactInstanceManagerHolder.emitEvent(actionName, Arguments.createMap());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user