mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-23 04:33:54 -04:00
Reformat ZimHostActivity
This commit is contained in:
parent
0edd296a97
commit
3b52ec876b
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user