|
@@ -1,22 +1,20 @@
|
|
package de.tudarmstadt.informatik.hostage.ui2.fragment;
|
|
package de.tudarmstadt.informatik.hostage.ui2.fragment;
|
|
|
|
|
|
-import android.app.Fragment;
|
|
|
|
import android.app.FragmentManager;
|
|
import android.app.FragmentManager;
|
|
import android.os.Bundle;
|
|
import android.os.Bundle;
|
|
import android.view.LayoutInflater;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.view.ViewGroup;
|
|
import android.widget.TextView;
|
|
import android.widget.TextView;
|
|
-
|
|
|
|
import de.tudarmstadt.informatik.hostage.R;
|
|
import de.tudarmstadt.informatik.hostage.R;
|
|
-import de.tudarmstadt.informatik.hostage.ui2.activity.MainActivity;
|
|
|
|
|
|
+import de.tudarmstadt.informatik.hostage.system.Device;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @author Alexander Brakowski
|
|
* @author Alexander Brakowski
|
|
* @created 24.02.14 23:37
|
|
* @created 24.02.14 23:37
|
|
*/
|
|
*/
|
|
public class SettingsFragment extends UpNavigatibleFragment {
|
|
public class SettingsFragment extends UpNavigatibleFragment {
|
|
- public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
|
|
|
|
|
|
+ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
|
super.onCreateView(inflater, container, savedInstanceState);
|
|
super.onCreateView(inflater, container, savedInstanceState);
|
|
getActivity().setTitle(getResources().getString(R.string.drawer_settings));
|
|
getActivity().setTitle(getResources().getString(R.string.drawer_settings));
|
|
View v = inflater.inflate(R.layout.fragment_settings, container, false);
|
|
View v = inflater.inflate(R.layout.fragment_settings, container, false);
|
|
@@ -24,7 +22,7 @@ public class SettingsFragment extends UpNavigatibleFragment {
|
|
TextView rootedText = (TextView) v.findViewById(R.id.settings_device_rooted);
|
|
TextView rootedText = (TextView) v.findViewById(R.id.settings_device_rooted);
|
|
TextView porthackText = (TextView) v.findViewById(R.id.settings_porthack_installed);
|
|
TextView porthackText = (TextView) v.findViewById(R.id.settings_porthack_installed);
|
|
|
|
|
|
- if(MainActivity.isRooted){
|
|
|
|
|
|
+ if (Device.isRooted()) {
|
|
rootedText.setText(R.string.yes);
|
|
rootedText.setText(R.string.yes);
|
|
rootedText.setTextColor(getResources().getColor(R.color.holo_dark_green));
|
|
rootedText.setTextColor(getResources().getColor(R.color.holo_dark_green));
|
|
} else {
|
|
} else {
|
|
@@ -32,7 +30,7 @@ public class SettingsFragment extends UpNavigatibleFragment {
|
|
rootedText.setTextColor(getResources().getColor(R.color.holo_red));
|
|
rootedText.setTextColor(getResources().getColor(R.color.holo_red));
|
|
}
|
|
}
|
|
|
|
|
|
- if(MainActivity.porthackInstalled){
|
|
|
|
|
|
+ if (Device.isPorthackInstalled()) {
|
|
porthackText.setText(R.string.yes);
|
|
porthackText.setText(R.string.yes);
|
|
porthackText.setTextColor(getResources().getColor(R.color.holo_dark_green));
|
|
porthackText.setTextColor(getResources().getColor(R.color.holo_dark_green));
|
|
} else {
|
|
} else {
|