Skip to content

Commit

Permalink
Update IncomingCallModule.java
Browse files Browse the repository at this point in the history
fix crash bkdev98#24
  • Loading branch information
tnt9ft authored Dec 1, 2021
1 parent 9aa5f83 commit 0afc008
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion android/src/main/java/com/incomingcall/IncomingCallModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,21 @@ public void display(String uuid, String name, String avatar, String info, int ti
i.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED +
WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD +
WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);

i.putExtras(bundle);
reactContext.startActivity(i);

}
}

@ReactMethod
public void dismiss() {

if (UnlockScreenActivity.active) {
UnlockScreenActivity.getInstance().dismissIncoming();
}
return;
}

private Context getAppContext() {
return this.reactContext.getApplicationContext();
}
Expand Down

0 comments on commit 0afc008

Please sign in to comment.