Summary
In the options message handler, endQuietHour is saved to the wrong SharedPreferences key, causing it to never persist correctly.
Location
app/src/main/java/com/dan/eo1/MainActivity.java lines 703-704:
editor.putInt("startQuietHour", incomingStartQuietHour);
editor.putInt("startQuietHour", incomingEndQuietHour); // BUG: should be "endQuietHour"
Both lines write to "startQuietHour". The second line should be:
editor.putInt("endQuietHour", incomingEndQuietHour);
Impact
When the app restarts, endQuietHour loads as the default value (-1) from line 159:
endQuietHour = settings.getInt("endQuietHour", -1);
This causes the reload condition on line 707 to frequently evaluate true even when it shouldn't:
if (incominginterval != interval || incomingStartQuietHour != startQuietHour || incomingEndQuietHour != endQuietHour) {
// ...
loadImagesFromFlickr(); // Unwanted reload!
}
Result: Using the options command (e.g., for brightness changes) often triggers an unwanted image reload with spinner, even when quiet hours haven't actually changed.
Fix
Change line 704 from:
editor.putInt("startQuietHour", incomingEndQuietHour);
To:
editor.putInt("endQuietHour", incomingEndQuietHour);
Environment
- EO1 app version: 0.0.9
- Discovered while building a web-based partner app replacement
Thanks for keeping EO1 devices alive! 🎨
Summary
In the
optionsmessage handler,endQuietHouris saved to the wrong SharedPreferences key, causing it to never persist correctly.Location
app/src/main/java/com/dan/eo1/MainActivity.javalines 703-704:Both lines write to
"startQuietHour". The second line should be:Impact
When the app restarts,
endQuietHourloads as the default value (-1) from line 159:This causes the reload condition on line 707 to frequently evaluate true even when it shouldn't:
Result: Using the
optionscommand (e.g., for brightness changes) often triggers an unwanted image reload with spinner, even when quiet hours haven't actually changed.Fix
Change line 704 from:
To:
Environment
Thanks for keeping EO1 devices alive! 🎨