New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Master on/off not working #130
Comments
Quoting myself from #126:
|
Ah, I think I might have misread you. I thought this was about the switch functionality changing, but you are saying the new functionality is not working (ie, you cannot get the filter to turn on at all), correct? Can you turn on the filter via a home screen widget? |
Right, the master switch does not function as the floating button used to... |
Home screen widget works as expected! |
logcat while toggling master switch, are these entries interesting?
|
The relevant entries will be marked with one of |
While any logs from those 3 are probably helpful, the three most relevant are:
|
Update: behaviour works as expected with the icon widget version. |
The switch in the app does toggle using a slightly different method than all of the widgets, but it should end up triggering the same actions. Can you check if the timer works? It uses the same method as the switch. |
The timer seems to work without fail! |
I added a little more logging to help debug this in the next release (2.10.2 should be soon). |
Output of Toggling filter with widget (works):
Toggling the master switch just keeps giving the same kind of
|
It looks like the command to stop/stop is not getting received. I don't know if it's an issue with transmission to the service or if the switch is not registering your touch correctly; we'll need the new debug output for that. All the
comes from the |
@leoauri I believe v2.10.2 is out now |
on 2.10.2
In-app switch still no effect or log output
Although filter is now deactivated, dragging the dim level dragbar temporatily activates the filter and outputs:
...I guess this is design... |
@leoauri I have a suspicion about what is causing this. I added a couple more logs; could you try building from 4e24436 (the If my hunch is right, that version of the app will crash when you try to use the master switch. It'll produce useful debug logs even if it doesn't crash. I probably should have added these from the start; sorry for asking you to get logs multiple times. |
No problem, this is fun First I opened the debug version, toggled the switch, no crash. This was in the log when I opened it:
Switched master on again:
Switching off produced no log. |
That's really bizzare. The click listener is being set correctly, but the system is not calling it on click. Try http://smichel.me/files/red-moon/red-moon-debug-switch_fix_attempt_1.apk (built from 6d6566a), which reverts the only other change I can find since 2.9.2. According to the API reference, I shouldn't need SwitchCompat to set an onClickListener, but maybe something is broken and not documented (or is broken because putting a switch in the top bar is not a standard behavior). If that doesn't work, I'll just give up on fixing the switch and make it a floating button again. |
Actually, I'm considering doing this anyway, since we actually have menu options now. |
6d6566a kind of works...! |
Right now the switch intentionally only responds to taps, not changes in position, in order to fix a different bug (below). I didn't realize dragging the switch was not considered a tap. We need to toggle the position of the switch when Red Moon turns on (ie, because of the timer). The service that displays the filter can't currently distinguish the source of a signal telling it to turn on/off (widget vs switch vs timer), so if we made the switch respond to changes in position, it would cause an infinite loop. There's another way to do it -- temporarily ignore changes in position -- that we used to do; I switched to the current method because it made the code much easier to understand. But there's been a lot of overall cleanup since then and I can do it the old way with much simpler code. |
Also one where the filter would switch off instantly instead of animating if stopped while it was turning on.
@leoauri Should be fixed in master (built at http://smichel.me/files/red-moon/red-moon-debug-2017-04-25.apk). |
I'm going to close this because I think we're ready for a release, whenever @raatmarien finds a bit of spare time to do one. |
Hi there,
Maybe related to #128 (also began with 2.10.0 on Fairphone 1 (although Android 4.2.2), but not resolved with 2.10.1 update)
The timer is switching the filter on and off successfully but the master switch does not turn the filter on or deactivate it when the timer has activated it.
Peculiar is that adjustment of the filter settings temporarily adds the overlay until the slider is released, whether the master switch is on or off.
Reinstalling hasn't solved this.
Great app and thank you
The text was updated successfully, but these errors were encountered: