Fixed MainActivity crash on startup when not bound to server.
This commit is contained in:
@@ -291,7 +291,6 @@ public class MainActivity extends Activity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* updateServerStatus - called by the uiTimer timer periodically.
|
* updateServerStatus - called by the uiTimer timer periodically.
|
||||||
* requests the ui to be updated by calling serverStatusRunnable.
|
* requests the ui to be updated by calling serverStatusRunnable.
|
||||||
@@ -419,6 +418,7 @@ public class MainActivity extends Activity {
|
|||||||
// Deal with Cancel Audible button
|
// Deal with Cancel Audible button
|
||||||
Button cancelAudibleButton =
|
Button cancelAudibleButton =
|
||||||
(Button) findViewById(R.id.cancelAudibleButton);
|
(Button) findViewById(R.id.cancelAudibleButton);
|
||||||
|
if (mConnection.mBound)
|
||||||
if (mConnection.mSdServer.isAudibleCancelled()) {
|
if (mConnection.mSdServer.isAudibleCancelled()) {
|
||||||
cancelAudibleButton.setText("Audible Alarms Cancelled "
|
cancelAudibleButton.setText("Audible Alarms Cancelled "
|
||||||
+ "for "
|
+ "for "
|
||||||
@@ -479,7 +479,6 @@ public class MainActivity extends Activity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void showAbout() {
|
private void showAbout() {
|
||||||
View aboutView = getLayoutInflater().inflate(R.layout.about_layout, null, false);
|
View aboutView = getLayoutInflater().inflate(R.layout.about_layout, null, false);
|
||||||
String versionName = mUtil.getAppVersionName();
|
String versionName = mUtil.getAppVersionName();
|
||||||
|
|||||||
Reference in New Issue
Block a user