Reformat ZimHostActivity

This commit is contained in:
Adeel Zafar 2019-08-11 13:45:37 +05:00
parent 0edd296a97
commit 3b52ec876b

View File

@ -164,7 +164,6 @@ public class ZimHostActivity extends AppCompatActivity implements
== PackageManager.PERMISSION_GRANTED) { == PackageManager.PERMISSION_GRANTED) {
startService(ACTION_CHECK_HOTSPOT_STATE); //If hotspot is already enabled, turn it off startService(ACTION_CHECK_HOTSPOT_STATE); //If hotspot is already enabled, turn it off
} else { } else {
//Ask location permission if not granted //Ask location permission if not granted
ActivityCompat.requestPermissions(this, ActivityCompat.requestPermissions(this,
@ -183,7 +182,6 @@ public class ZimHostActivity extends AppCompatActivity implements
startServerButton.setText(getString(R.string.stop_server_label)); startServerButton.setText(getString(R.string.stop_server_label));
startServerButton.setBackgroundColor(getResources().getColor(R.color.stopServer)); startServerButton.setBackgroundColor(getResources().getColor(R.color.stopServer));
} }
} }
// This method checks if mobile data is enabled in user's device. // This method checks if mobile data is enabled in user's device.
@ -433,6 +431,7 @@ public class ZimHostActivity extends AppCompatActivity implements
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent); startActivity(intent);
} }
@Override public void hotspotFailed() { @Override public void hotspotFailed() {
//Show a dialog to turn off default hotspot //Show a dialog to turn off default hotspot
@ -459,7 +458,6 @@ public class ZimHostActivity extends AppCompatActivity implements
{ {
setupLocationServices(); setupLocationServices();
} }
} }
@Override protected void onSaveInstanceState(Bundle outState) { @Override protected void onSaveInstanceState(Bundle outState) {