Skip to content

Commit

Permalink
Removed original update functionality.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Wolsink committed Mar 20, 2011
1 parent f98d8ab commit 8da2546
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 101 deletions.
Binary file modified build/Nagroid.apk
Binary file not shown.
2 changes: 1 addition & 1 deletion res/layout/about.xml
Expand Up @@ -43,7 +43,7 @@

<Button android:id="@+id/aboutBtnOk" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="OK"
android:layout_marginBottom="25px" />
android:layout_marginBottom="35px" />

</LinearLayout>

2 changes: 0 additions & 2 deletions res/xml/configuration.xml
Expand Up @@ -52,8 +52,6 @@
<PreferenceCategory android:title="Misc">
<CheckBoxPreference android:key="configuration_misc_autostart"
android:title="Autostart" android:summary="Autostart Nagroid after reboot" />
<CheckBoxPreference android:key="configuration_misc_update"
android:title="Nagroid Updates" android:summary="Check for Nagroid updates" />
<TimePickerPreference android:key="configuration_misc_snoozetime"
android:title="Snooze time" android:summary="Snooze until this time in the morning"
android:defaultValue="9:00" />
Expand Down
10 changes: 0 additions & 10 deletions src/de/schoar/nagroid/ConfigurationAccess.java
Expand Up @@ -33,7 +33,6 @@ public class ConfigurationAccess {
public static final String POLLING_EXTSTATE = "configuration_polling_extstate";

public static final String MISC_AUTOSTART = "configuration_misc_autostart";
public static final String MISC_UPDATE = "configuration_misc_update";
public static final String MISC_SNOOZETIME = "configuration_misc_snoozetime";

private static final String INTERN_LAST_POLL_TIME = "intern_last_poll_time";
Expand Down Expand Up @@ -232,15 +231,6 @@ public synchronized void setMiscAutostart(boolean bool) {
.commit();
}

public synchronized boolean getMiscUpdate() {
return mSharedPreferencesPreference.getBoolean(MISC_UPDATE, true);
}

public synchronized void setMiscUpdate(boolean bool) {
mSharedPreferencesPreference.edit().putBoolean(MISC_UPDATE, bool)
.commit();
}

public synchronized long getInternLastPollTime() {
return mSharedPreferencesIntern.getLong(INTERN_LAST_POLL_TIME, 0);
}
Expand Down
7 changes: 0 additions & 7 deletions src/de/schoar/nagroid/DM.java
Expand Up @@ -10,7 +10,6 @@
import de.schoar.nagroid.log.NagroidLog;
import de.schoar.nagroid.nagios.NagiosState;
import de.schoar.nagroid.notification.HealthNotificationHelper;
import de.schoar.nagroid.notification.UpdateNotificationHelper;
import de.schoar.nagroid.polling.PollHandler;
import de.schoar.nagroid.service.PollReceiver;

Expand Down Expand Up @@ -45,7 +44,6 @@ public synchronized static void unregister(Context ctx) {
private ConfigurationAccess mConfigurationAccess;

private HealthNotificationHelper mHealthNotificationHelper;
private UpdateNotificationHelper mUpdateNotificationHelper;

private PollHandler mPollHandler;

Expand All @@ -59,7 +57,6 @@ private DM(Context ctx) {

mHealthNotificationHelper = new HealthNotificationHelper(ctx,
mConfigurationAccess);
mUpdateNotificationHelper = new UpdateNotificationHelper(ctx);

mPollHandler = new PollHandler(ctx);
}
Expand Down Expand Up @@ -96,10 +93,6 @@ public HealthNotificationHelper getHealthNotificationHelper() {
return mHealthNotificationHelper;
}

public UpdateNotificationHelper getUpdateNotificationHelper() {
return mUpdateNotificationHelper;
}

public NagroidLog getNagroidLog() {
return mNagroidLog;
}
Expand Down
16 changes: 0 additions & 16 deletions src/de/schoar/nagroid/activity/ConfigurationActivity.java
Expand Up @@ -395,22 +395,6 @@ public boolean onPreferenceChange(Preference pref,
return false;
}
});

final CheckBoxPreference cbpMiscUpdate = (CheckBoxPreference) findPreference(ConfigurationAccess.MISC_UPDATE);
boolean cbpMiscUpdateValue = DM.I.getConfiguration().getMiscUpdate();
cbpMiscUpdate.setChecked(cbpMiscUpdateValue);

cbpMiscUpdate
.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference pref,
Object obj) {
Boolean bool = (Boolean) obj;
DM.I.getConfiguration().setMiscUpdate(bool);
cbpMiscUpdate.setChecked(bool);
return false;
}
});
}

private String alarmText(String uristr, String def) {
Expand Down
19 changes: 0 additions & 19 deletions src/de/schoar/nagroid/notification/UpdateNotificationHelper.java

This file was deleted.

3 changes: 0 additions & 3 deletions src/de/schoar/nagroid/polling/PollHandler.java
Expand Up @@ -20,14 +20,12 @@ public class PollHandler {
private Boolean mPollRunning = false;

private NagiosPollHandler mNagiosPollHandler;
private UpdatePollHandler mUpdatePollHandler;

public PollHandler(Context ctx) {
mContext = ctx;
mConnectivityManager = (ConnectivityManager) mContext
.getSystemService(Context.CONNECTIVITY_SERVICE);
mNagiosPollHandler = new NagiosPollHandler(ctx);
mUpdatePollHandler = new UpdatePollHandler(ctx);
}

public void poll() {
Expand Down Expand Up @@ -80,7 +78,6 @@ private void runPoll() {
Log.d(LOGT, "Received poll request. Last poll was " + diff + "s ago");

mNagiosPollHandler.poll();
mUpdatePollHandler.poll();
}

private void postPoll() {
Expand Down
43 changes: 0 additions & 43 deletions src/de/schoar/nagroid/polling/UpdatePollHandler.java

This file was deleted.

0 comments on commit 8da2546

Please sign in to comment.