Kaydet (Commit) 8f119986 authored tarafından Michael Meeks's avatar Michael Meeks

sdremote: unwind a couple of crasher / corner cases

üst 9ac86f48
......@@ -349,17 +349,12 @@ public class PresentationActivity extends SherlockFragmentActivity {
@Override
public void run() {
CharSequence aTimeString;
long aTime = mCommunicationService.getSlideShow().getTimer()
.getTimeMillis();
if (mTimerOn) {
aTimeString = DateFormat.format(aTimerFormat, aTime);
} else {
aTimeString = DateFormat.format(aTimeFormat,
System.currentTimeMillis());
}
long aTime = System.currentTimeMillis();
if (mTimerOn && mCommunicationService != null)
aTime = mCommunicationService.getSlideShow().getTimer().getTimeMillis();
aTimeString = DateFormat.format(aTimerFormat, aTime);
mTimeLabel.setText(aTimeString);
timerHandler.postDelayed(this, 50);
}
};
......
......@@ -130,7 +130,8 @@ public class SelectorActivity extends SherlockActivity {
@Override
public void onBackPressed() {
mCommunicationService.stopSearching();
if (mCommunicationService != null)
mCommunicationService.stopSearching();
Intent aIntent = new Intent(this, CommunicationService.class);
stopService(aIntent);
super.onBackPressed();
......@@ -325,4 +326,4 @@ public class SelectorActivity extends SherlockActivity {
return super.onContextItemSelected(item);
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment