Skip to content
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

Sensorium starts at boot regardless of settings #15

Open
anarcat opened this issue Mar 30, 2016 · 6 comments
Open

Sensorium starts at boot regardless of settings #15

anarcat opened this issue Mar 30, 2016 · 6 comments

Comments

@anarcat
Copy link

anarcat commented Mar 30, 2016

I just rebooted my phone and sensorium is running even if i disabled that in the sensorium settings. I can't find a way to make it not start at boot.

@anarcat anarcat changed the title Sensorium starts at biot regardless of settings Sensorium starts at boot regardless of settings Mar 30, 2016
@aaaaalbert
Copy link
Collaborator

@anarcat: Sorry for that, it seems that we don't handle the settings checkbox value correctly.

Do you happen to have logcat output for when you toggle the checkbox, and/or for when the app starts at boot?

@anarcat
Copy link
Author

anarcat commented Mar 30, 2016

On 2016-03-30 09:49:31, aaaaalbert wrote:

@anarcat: Sorry for that, it seems that we don't handle the settings checkbox value correctly.

Do you happen to have logcat output for when you toggle the checkbox, and/or for when the app starts at boot?

I can give you that when i finally reboot the phone, but i'm in the
process of reinstalling everything (again again) so i may not be able to
provide this.

@aaaaalbert
Copy link
Collaborator

Oh, okay. No worries though, I can check on a device of my own later today.

@anarcat
Copy link
Author

anarcat commented Mar 30, 2016

this starts with the checkbox on, i disable it an re-enable it:

W/View    ( 4212): requestLayout() improperly called by android.widget.LinearLayout{3a05f513 V.E..... ......ID 23,74-477,122 #7f0a0006 app:id/seekBarPrefBarContainer} during layout: running second layout pass
W/View    ( 4212): requestLayout() improperly called by android.widget.LinearLayout{24e75350 V.E..... ......ID 23,74-477,122 #7f0a0006 app:id/seekBarPrefBarContainer} during layout: running second layout pass
W/View    ( 4212): requestLayout() improperly called by android.widget.LinearLayout{31c10949 V.E..... ......ID 23,74-477,122 #7f0a0006 app:id/seekBarPrefBarContainer} during layout: running second layout pass
D/Sensorium( 4212): Listening socket timeout
W/View    ( 4212): requestLayout() improperly called by android.widget.LinearLayout{3282b714 V.E..... ......ID 23,74-477,122 #7f0a0006 app:id/seekBarPrefBarContainer} during layout: running second layout pass
W/View    ( 4212): requestLayout() improperly called by android.widget.LinearLayout{2e83bbd V.E..... ......ID 23,74-477,122 #7f0a0006 app:id/seekBarPrefBarContainer} during layout: running second layout pass
W/View    ( 4212): requestLayout() improperly called by android.widget.LinearLayout{304335b2 V.E..... ......ID 23,74-477,122 #7f0a0006 app:id/seekBarPrefBarContainer} during layout: running second layout pass

i am not sure how to extract relevant parts of the boot process unfortunately.

@aaaaalbert
Copy link
Collaborator

Thanks! I tried with a debug build and see pretty much the same log output when I toggle the setting.

On boot, the boot completed broadcast receiver seems to read the new value OK:

D/Sensorium( 3535): boot completed receiver not starting service, preference disabled

...but then it is started anyway, I guess from the manifest. I'll try to remove the SensorService from there and see what happens.

@aaaaalbert
Copy link
Collaborator

Removing SensorService did not make sense, it caused the service to be unavailable from within the app.

After some debugging, I saw that SensoriumApplication always binds to SensorService, no matter what SensorBootCompletedReceiver reads from the app preferences (see log snippets below).

I tried to isolate the boot comleted receiver so that it doesn't import other parts of the app, but the Application still binds. Alternatively, removing the boot completed receiver from the manifest completely disables autostart. Looks like this requires larger changes to the app architecture to fix.


When set to do start on boot:

D/Sensorium( 3632): application starting, binding service
D/Sensorium( 3632): application starting, binding service
(....)
D/Sensorium( 3632): boot completed receiver starting service

When set to not start on boot:

D/Sensorium( 3282): application starting, binding service
D/Sensorium( 3282): application starting, binding service
D/Sensorium( 3282): boot completed receiver not starting service, preference disabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants