Skip to content

Commit e550f7a

Browse files
author
Quoc Khanh
committed
fix dismiss func
1 parent f7273b5 commit e550f7a

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

android/src/main/java/com/incomingcall/IncomingCallModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public void dismiss() {
6262

6363
// assert activity != null;
6464

65-
UnlockScreenActivity.finish();
65+
UnlockScreenActivity.fa.finish();
6666

6767
return;
6868
}

android/src/main/java/com/incomingcall/UnlockScreenActivity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import android.media.MediaPlayer;
1414
import android.provider.Settings;
1515
import java.util.List;
16+
import android.app.Activity;
1617

1718
import androidx.appcompat.app.AppCompatActivity;
1819
import android.app.ActivityManager;
@@ -30,6 +31,7 @@
3031
public class UnlockScreenActivity extends AppCompatActivity implements UnlockScreenActivityInterface {
3132

3233
private static final String TAG = "MessagingService";
34+
public static Activity fa;
3335
private TextView tvName;
3436
private TextView tvInfo;
3537
private ImageView ivAvatar;
@@ -61,6 +63,8 @@ protected void onCreate(Bundle savedInstanceState) {
6163
tvInfo = findViewById(R.id.tvInfo);
6264
ivAvatar = findViewById(R.id.ivAvatar);
6365

66+
fa = this;
67+
6468
Bundle bundle = getIntent().getExtras();
6569
if (bundle != null) {
6670
if (bundle.containsKey("uuid")) {

example/yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5443,7 +5443,7 @@ react-native-bootsplash@^2.2.4:
54435443

54445444
"react-native-incoming-call@git+https://github.com/bkdev98/react-native-incoming-call.git":
54455445
version "2.0.0"
5446-
resolved "git+https://github.com/bkdev98/react-native-incoming-call.git#3c015d2506b5b0f4c5fe7151ababeb0b31512c5a"
5446+
resolved "git+https://github.com/bkdev98/react-native-incoming-call.git#f7273b5ff2113c4f9697abcb71ab52719cf9e317"
54475447

54485448
react-native@0.62.2:
54495449
version "0.62.2"

0 commit comments

Comments
 (0)