austgl / a2dpvolume

Automatically exported from code.google.com/p/a2dpvolume
0 stars 0 forks source link

a2dp leaves phone unlocked with "GO Locker" used as lockscreen-app #134

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Device (phone) brand: Samsung
Device (phone) model: Galaxy S II (i9100)
Android OS version: 4.0.3
App version: 2.8.9
What steps will reproduce the problem?
1. Have a2dp run default music app at connection to bluetooth device while 
device is locked with "GO Locker" lockscreen (without unlock-pattern or 
unlock-PIN set)
2. Have a2dp close music app at deconnection from bluetooth device

What is the expected output? What do you see instead?

Phone is supposed to be still locked after deconnection from bluetooth device, 
but is unlocked instead. It has to be locked manually by pressing the Power-Off 
button.

Original issue reported on code.google.com by markus.m...@gmail.com on 4 Aug 2012 at 9:48

GoogleCodeExporter commented 9 years ago
This sounds more like a "go locker" issue than an issue with A2DP Volume.  I 
know nothing about go locker.  Does it have screen timeout settings?  Also, is 
the complaint that the screen is unlocked or active or both?  When exactly is 
the screen unlocked?  Is it when the music app launches or when it is stopped 
by A2DP Volume?  It was never a consideration or requirement for A2DP Volume to 
keep the screen locked.  It may be possible to better facilitate this though.  
Stopping apps has become very challenging since Gingerbread.  There are several 
steps to pause, remove from foreground, then close.  That remove from 
foreground is currently dine by spawning the home screen.  That does likely 
leave the home screen active and not locked. If I don't spawn the home screen 
some apps like Pandora will not stop.  Many people wanted the feature of 
completely stopping the app.  This is the first time someone mentioned the 
screen lock issue.  I may be able to implement one more step after stopping the 
app that locks the screen.  I will look into that.  Thanks for the feedback.    

Original comment by JimR...@gmail.com on 4 Aug 2012 at 12:52

GoogleCodeExporter commented 9 years ago
Thanks for your quick reply to my issue. First of all - what I forgot to 
mention in my first post - thank you for developing this very good and usefull 
app!

Concerning your questions:

As far as i know, go locker doesn't have screen timeout settings - but I am not 
100% sure about that.

The only problem is, that the screen is unlocked. Without pressing any phone 
buttons, the screen is not active at any point.

The screen seems to be unlocked when the music app is started, regardless if 
a2dp is set to close the app at disconnect or not. When no app is started by 
a2dp, the screen remains locked.

Original comment by markus.m...@gmail.com on 4 Aug 2012 at 2:11

GoogleCodeExporter commented 9 years ago
OK, that helps.  If the screen is unlocked by opening the app there is nothing 
I can do to fix that.  If keeping the screen clocked is a requirement you will 
need to not start any apps with A2DP Volume.  You should submit an issue with 
go locker to fix that problem.  I presume they did not handle the case where 
apps are started by a background service like this.  A similar case can happen 
when you use a Bluetooth device to command music to start playing but in that 
case the app is started in the background.  Also in that case it is very 
specific to just the base music app.  

I may still look into relocking the screen after the app is opened.  This would 
likely fix your issue and probably not be a problem for other users.  I will 
leave this issue active until I can investigate that.  Hopefully it can be done 
easily and I can just implement it.  At first glance this looks promising:
http://developer.android.com/reference/android/os/PowerManager.html#goToSleep%28
long%29

Original comment by JimR...@gmail.com on 4 Aug 2012 at 2:44

GoogleCodeExporter commented 9 years ago
Upon further research it looks like turning the screen back off or locking the 
device back is not something a non-system app is supposed to do, or even can 
do.  

Original comment by JimR...@gmail.com on 4 Aug 2012 at 11:51