Skip to content

Commit 87783b7

Browse files
author
bob
committed
Removed garbage code
1 parent 0ff4096 commit 87783b7

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@
4949

5050
// @see https://github.com/kbagchiGWC/voice-quickstart-android/blob/9a2aff7fbe0d0a5ae9457b48e9ad408740dfb968/exampleConnectionService/src/main/java/com/twilio/voice/examples/connectionservice/VoiceConnectionServiceActivity.java
5151
public class RNCallKeepModule extends ReactContextBaseJavaModule {
52-
Activity mActivity = null;
53-
5452
public static final int REQUEST_READ_PHONE_STATE = 1337;
5553
public static final int REQUEST_REGISTER_CALL_PROVIDER = 394859;
5654

@@ -238,10 +236,8 @@ public void backToForeground() {
238236

239237
focusIntent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
240238

241-
final Activity activity = getActivity();
242-
if (activity != null) {
243-
activity.startActivity(focusIntent);
244-
}
239+
Activity activity = getCurrentActivity();
240+
activity.startActivity(focusIntent);
245241
}
246242

247243
private void registerPhoneAccount(Context appContext) {
@@ -312,13 +308,6 @@ private Context getAppContext() {
312308
return this.reactContext.getApplicationContext();
313309
}
314310

315-
private Activity getActivity() {
316-
Activity activity = getCurrentActivity();
317-
if (activity == null) activity = mActivity;
318-
319-
return activity;
320-
}
321-
322311
private class VoiceBroadcastReceiver extends BroadcastReceiver {
323312
@Override
324313
public void onReceive(Context context, Intent intent) {

0 commit comments

Comments
 (0)