android: Replace deprecated getFragmentManager() in TNC-related Fragments
This commit is contained in:
+2
-2
@@ -88,7 +88,7 @@ public class ImcStateFragment extends Fragment implements VpnStateListener
|
|||||||
context.bindService(new Intent(context, VpnStateService.class),
|
context.bindService(new Intent(context, VpnStateService.class),
|
||||||
mServiceConnection, Service.BIND_AUTO_CREATE);
|
mServiceConnection, Service.BIND_AUTO_CREATE);
|
||||||
/* hide it initially */
|
/* hide it initially */
|
||||||
getFragmentManager().beginTransaction().hide(this).commit();
|
getParentFragmentManager().beginTransaction().hide(this).commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -192,7 +192,7 @@ public class ImcStateFragment extends Fragment implements VpnStateListener
|
|||||||
|
|
||||||
public void updateView()
|
public void updateView()
|
||||||
{
|
{
|
||||||
FragmentManager fm = getFragmentManager();
|
FragmentManager fm = getParentFragmentManager();
|
||||||
if (fm == null)
|
if (fm == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
+1
-1
@@ -81,7 +81,7 @@ public class RemediationInstructionsFragment extends ListFragment
|
|||||||
{
|
{
|
||||||
super.onStart();
|
super.onStart();
|
||||||
|
|
||||||
boolean two_pane = getFragmentManager().findFragmentById(R.id.remediation_instruction_fragment) != null;
|
boolean two_pane = getParentFragmentManager().findFragmentById(R.id.remediation_instruction_fragment) != null;
|
||||||
if (two_pane)
|
if (two_pane)
|
||||||
{ /* two-pane layout, make list items selectable */
|
{ /* two-pane layout, make list items selectable */
|
||||||
getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
|
getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
|
||||||
|
|||||||
Reference in New Issue
Block a user