diff --git a/android/capacitor/src/main/java/com/getcapacitor/BridgeFragment.java b/android/capacitor/src/main/java/com/getcapacitor/BridgeFragment.java index 02b1936b8..e60e988cc 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/BridgeFragment.java +++ b/android/capacitor/src/main/java/com/getcapacitor/BridgeFragment.java @@ -3,7 +3,6 @@ import android.app.Activity; import android.content.Context; import android.content.res.TypedArray; -import android.net.Uri; import android.os.Bundle; import android.util.AttributeSet; import android.view.LayoutInflater; @@ -24,19 +23,12 @@ /** * A simple {@link Fragment} subclass. - * Activities that contain this fragment must implement the - * {@link BridgeFragment.OnFragmentInteractionListener} interface - * to handle interaction events. * Use the {@link BridgeFragment#newInstance} factory method to * create an instance of this fragment. */ public class BridgeFragment extends Fragment { private static final String ARG_START_DIR = "startDir"; - private String startDir; - - private OnFragmentInteractionListener mListener; - private WebView webView; protected Bridge bridge; protected MockCordovaInterfaceImpl cordovaInterface; @@ -45,10 +37,6 @@ public class BridgeFragment extends Fragment { private PluginManager pluginManager; private CordovaPreferences preferences; private MockCordovaWebViewImpl mockWebView; - private int activityDepth = 0; - private String bridgeStartDir; - - private String lastActivityPlugin; private List> initialPlugins = new ArrayList<>(); private JSONObject config = new JSONObject(); @@ -162,16 +150,6 @@ public void onActivityCreated(Bundle savedInstanceState) { this.load(savedInstanceState); } - @Override - public void onAttach(Context context) { - super.onAttach(context); - if (context instanceof OnFragmentInteractionListener) { - mListener = (OnFragmentInteractionListener) context; - } else { - throw new RuntimeException(context.toString() + " must implement OnFragmentInteractionListener"); - } - } - @Override public void onDestroy() { super.onDestroy(); @@ -180,24 +158,4 @@ public void onDestroy() { mockWebView.handleDestroy(); } } - - @Override - public void onDetach() { - super.onDetach(); - mListener = null; - } - - /** - * This interface must be implemented by activities that contain this - * fragment to allow an interaction in this fragment to be communicated - * to the activity and potentially other fragments contained in that - * activity. - *

- * See the Android Training lesson Communicating with Other Fragments for more information. - */ - public interface OnFragmentInteractionListener { - void onFragmentInteraction(Uri uri); - } }