mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-26 18:37:39 +00:00
Remove useless mView field from fragments
This commit is contained in:
parent
2a70619577
commit
cffc157d98
@ -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) {
|
||||
|
@ -39,13 +39,12 @@ public class ModulesFragment extends Fragment implements CallbackHandler.EventLi
|
||||
@BindView(R.id.fab) FloatingActionButton fabio;
|
||||
|
||||
private List<Module> 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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user