Skip to content

Commit

Permalink
refactor(android): remove unused interaction listener on BridgeFragme…
Browse files Browse the repository at this point in the history
  • Loading branch information
fkirc authored Sep 24, 2020
1 parent 8782b78 commit 69fc490
Showing 1 changed file with 0 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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<Class<? extends Plugin>> initialPlugins = new ArrayList<>();
private JSONObject config = new JSONObject();
Expand Down Expand Up @@ -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();
Expand All @@ -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.
* <p>
* See the Android Training lesson <a href=
* "http://developer.android.com/training/basics/fragments/communicating.html"
* >Communicating with Other Fragments</a> for more information.
*/
public interface OnFragmentInteractionListener {
void onFragmentInteraction(Uri uri);
}
}

0 comments on commit 69fc490

Please sign in to comment.