Skip to content

Commit 84a014a

Browse files
author
Quoc Khanh
committed
fix dismiss func
1 parent c825647 commit 84a014a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public class UnlockScreenActivity extends AppCompatActivity implements UnlockScr
3939
private Vibrator v = (Vibrator) IncomingCallModule.reactContext.getSystemService(Context.VIBRATOR_SERVICE);
4040
private long[] pattern = {0, 1000, 800};
4141
private MediaPlayer player = MediaPlayer.create(IncomingCallModule.reactContext, Settings.System.DEFAULT_RINGTONE_URI);
42+
private Activity fa;
4243

4344
@Override
4445
public void onStart() {
@@ -56,6 +57,8 @@ public void onStop() {
5657
protected void onCreate(Bundle savedInstanceState) {
5758
super.onCreate(savedInstanceState);
5859

60+
fa = this;
61+
5962
setContentView(R.layout.activity_call_incoming);
6063

6164
tvName = findViewById(R.id.tvName);
@@ -126,7 +129,7 @@ public void onBackPressed() {
126129
public static void dismissIncoming() {
127130
v.cancel();
128131
player.stop();
129-
finish();
132+
fa.finish();
130133
}
131134

132135
private void acceptDialing() {

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.1"
5446-
resolved "git+https://github.com/bkdev98/react-native-incoming-call.git#bceeeaf6773b9ef70bc67824e166770a162cd297"
5446+
resolved "git+https://github.com/bkdev98/react-native-incoming-call.git#c825647ea6e10fd9e464c380fdda27e2496c8e7c"
54475447

54485448
54495449
version "0.62.2"

0 commit comments

Comments
 (0)