diff --git a/app/src/main/java/com/topjohnwu/magisk/MagiskHideFragment.java b/app/src/main/java/com/topjohnwu/magisk/MagiskHideFragment.java index 041c239b4..30e21e3e6 100644 --- a/app/src/main/java/com/topjohnwu/magisk/MagiskHideFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/MagiskHideFragment.java @@ -41,7 +41,6 @@ public class MagiskHideFragment extends Fragment implements CallbackHandler.Even public static CallbackHandler.Event packageLoadDone = new CallbackHandler.Event(); private PackageManager packageManager; - private View mView; private ApplicationAdapter appAdapter = new ApplicationAdapter(); private SearchView.OnQueryTextListener searchListener; @@ -49,8 +48,8 @@ public class MagiskHideFragment extends Fragment implements CallbackHandler.Even @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { - mView = inflater.inflate(R.layout.magisk_hide_fragment, container, false); - ButterKnife.bind(this, mView); + View view = inflater.inflate(R.layout.magisk_hide_fragment, container, false); + ButterKnife.bind(this, view); packageManager = getActivity().getPackageManager(); @@ -76,7 +75,7 @@ public class MagiskHideFragment extends Fragment implements CallbackHandler.Even } }; - return mView; + return view; } @Override @@ -90,7 +89,6 @@ public class MagiskHideFragment extends Fragment implements CallbackHandler.Even public void onResume() { super.onResume(); setHasOptionsMenu(true); - mView = this.getView(); getActivity().setTitle(R.string.magiskhide); CallbackHandler.register(packageLoadDone, this); if (packageLoadDone.isTriggered) { diff --git a/app/src/main/java/com/topjohnwu/magisk/ModulesFragment.java b/app/src/main/java/com/topjohnwu/magisk/ModulesFragment.java index ae20cb961..46eee6cb8 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ModulesFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/ModulesFragment.java @@ -39,13 +39,12 @@ public class ModulesFragment extends Fragment implements CallbackHandler.EventLi @BindView(R.id.fab) FloatingActionButton fabio; private List listModules = new ArrayList<>(); - private View mView; @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { - mView = inflater.inflate(R.layout.modules_fragment, container, false); - ButterKnife.bind(this, mView); + View view = inflater.inflate(R.layout.modules_fragment, container, false); + ButterKnife.bind(this, view); fabio.setOnClickListener(v -> { Intent intent = new Intent(Intent.ACTION_GET_CONTENT); @@ -74,7 +73,7 @@ public class ModulesFragment extends Fragment implements CallbackHandler.EventLi updateUI(); } - return mView; + return view; } @Override @@ -96,7 +95,6 @@ public class ModulesFragment extends Fragment implements CallbackHandler.EventLi @Override public void onResume() { super.onResume(); - mView = this.getView(); CallbackHandler.register(moduleLoadDone, this); getActivity().setTitle(R.string.modules); }