Fixed MainActivity crash on startup when not bound to server.

This commit is contained in:
Graham Jones
2015-12-09 20:46:46 +00:00
parent fe7cd37896
commit a5af07b4cf

View File

@@ -291,7 +291,6 @@ public class MainActivity extends Activity {
}
/*
* updateServerStatus - called by the uiTimer timer periodically.
* requests the ui to be updated by calling serverStatusRunnable.
@@ -419,6 +418,7 @@ public class MainActivity extends Activity {
// Deal with Cancel Audible button
Button cancelAudibleButton =
(Button) findViewById(R.id.cancelAudibleButton);
if (mConnection.mBound)
if (mConnection.mSdServer.isAudibleCancelled()) {
cancelAudibleButton.setText("Audible Alarms Cancelled "
+ "for "
@@ -479,7 +479,6 @@ public class MainActivity extends Activity {
}
private void showAbout() {
View aboutView = getLayoutInflater().inflate(R.layout.about_layout, null, false);
String versionName = mUtil.getAppVersionName();