TWEAK/TIP - Prevent accidental unlocks - G3 General

One of the big issues I have found, mainly with CM based ROMS, is that the option to prevent accidental unlocking seems to be missing/unavailable.
I've been testing various apps and utilities that monitor the proximity sensor, but there is one big issue - they monitor for screen on, but it seems in CM12.1 that the monitoring app doesn't work or get a screen on signal when you're using a lockscreen.
So the solution is not to check for screen on, but check for screen unlock.
I have a TASKER profile set up as follows:
If screen unlocked and proximity sensor on, then turn the screen off.
Works really simply. cover the proximity sensor with a bit of cloth or something and test it - if you double-tap the screen on, or it wakes due to a notification, the screen still goes on. But any subsequent action, eg slide to unlock or click on a notification, triggers the screen unlock flag, and this then checks to see if the proximity sensor is covered, and if it does, it turns the screen off again.
I CAN POST SCREENSHOTS IF ANYONE WANTS FURTHER INFO - BUT I'D SUGGEST GIVING TASKER A GO AND A PLAY ANYWAY, IT'S A BRILLIANT APP.

Related

Proximity sensor - doesn't seem to be working

I there any settings or something to adjust proximity sensor? I was trying to turn off screen covering sensor with thumb, but.. no effect.
Does it need any setting or my phone is faulty?
I noticed the same thing on my phone today.
The proximity sensor doesn't work if you've switched off the Automatically adjust backlight option in Settings>Sound & Display>Backlight. There doesn't seem to be any way around this as the proximity sensor doesn't have its own option.
Are you in a call? You need to be calling/receiving a call for it to work.
I agree, I think you need to be in a call for the proximity sensor to work properly.
For me it works fine. And i don´t hade automatic backlight on.
aldabal said:
For me it works fine. And i don´t hade automatic backlight on.
Click to expand...
Click to collapse
That's interesting because I can toggle my proximity sensor (whilst in a call) by toggling the automatic backlight. That option must be linked to something else as well.
Screen goes black
I do have the same behavior, when I make a call the phone's screen goes black automatically so if I need to press any key have to press send to get my screen back, then use the keypad, nonsense, is anyone having the same issue ?
for me, the proximity sensor doesn't work at all. I have the automatic backlight setting and yet it still doesn't work. any idea why?
SP300
I just found the solution, I have got the screen protector on "The Original HTC SP300" and is causing the screen to go blank when you do a phone call, If a remove it a little bit from the top left corner and make a call works as spec.

Idea to avoid hitting power button every time you put phone away

I use a one minute screen timeout, which is a bit long for the screen to stay on every time you put it back in your pocket. It also gets a little annoying hitting the power button every time after I'm done using it, for example if I'm frequently taking it out and putting it away during a text conversation. So, I used Tasker to tell it to lock the screen every time the proximity sensor fires, combined with WidgetLocker set to its own 10 sec screen timeout. I also told it to NOT do this while on a phone call so the proximity sensor would just turn the screen off but not lock it like normal in that case. So this way, you can keep a longer normal screen timeout, put the phone back in your pocket, and the proximity sensor will fire, lock the screen, and the screen will turn off in 10 seconds. The only issue here is the occasional accidental proximity sensor activation, but it's not too frequent. I'd be curious if anyone else finds this useful.
The Tasker profile:
Context: Proximity Sensor
Task:
1. If %WIN !~ Phone (if not in the phone app)
2. WidgetLocker Cmd Activate (lock screen)
Detecting if the Phone app is open does require enabling the Tasker accessibility service in Settings -> Accessibility -> Accessibility services (check Tasker).
I would shoot someone in the face every time i went to pull down the notification bar and the screen locked :/
mrono said:
I would shoot someone in the face every time i went to pull down the notification bar and the screen locked :/
Click to expand...
Click to collapse
You shouldn't have this issue really unless you frequently overshoot the top of the screen when going for the notification bar.
mrono said:
I would shoot someone in the face every time i went to pull down the notification bar and the screen locked :/
Click to expand...
Click to collapse
God i wish XDA had a "like" button
mrono said:
I would shoot someone in the face every time i went to pull down the notification bar and the screen locked :/
Click to expand...
Click to collapse
Yep, I had a profile like this set up before, but abandoned in very quickly due to this issue. Every time I went near the sensor my screen shut off, no bueno.
Hey... This thing makes phone calls too!
JTNiggle said:
Yep, I had a profile like this set up before, but abandoned in very quickly due to this issue. Every time I went near the sensor my screen shut off, no bueno.
Hey... This thing makes phone calls too!
Click to expand...
Click to collapse
Make a timeout so the proximity sensor has to be activated for at least 3 seconds
initial said:
Make a timeout so the proximity sensor has to be activated for at least 3 seconds
Click to expand...
Click to collapse
Good idea, works pretty nice, Thanks! Seems that 7 seconds is the minimum timeout allowed though, not that that's a problem, running it now. Unless there's is another way to do it that
I must recommend this setup for everyone now.
Context: Proximity Sensor
Task: Display Timeout = 7 Seconds
Handy for work/school too, I just lay my phone face down on my desk and the display takes care of itself.
JTNiggle said:
Good idea, works pretty nice, Thanks! Seems that 7 seconds is the minimum timeout allowed though, not that that's a problem, running it now. Unless there's is another way to do it that
I must recommend this setup for everyone now.
Context: Proximity Sensor
Task: Display Timeout = 7 Seconds
Handy for work/school too, I just lay my phone face down on my desk and the display takes care of itself.
Click to expand...
Click to collapse
Actually, wouldn't that profile change the display timeout to 7 seconds, effective immediately when the proximity sensor activates? So you could accidentally activate it, not be aware, and then have the display suddenly go off on you 7 seconds later. I think what initial was saying was to make it so the proximity sensor itself must be active for at least 3 seconds before anything happens, THEN do what you wish - in my case, I don't actually change the display timeout at all, I just lock the screen with WidgetLocker, at which point a 10 second timeout is in effect from that app.
xdp said:
Actually, wouldn't that profile change the display timeout to 7 seconds, effective immediately when the proximity sensor activates? So you could accidentally activate it, not be aware, and then have the display suddenly go off on you 7 seconds later. I think what initial was saying was to make it so the proximity sensor itself must be active for at least 3 seconds before anything happens, THEN do what you wish - in my case, I don't actually change the display timeout at all, I just lock the screen with WidgetLocker, at which point a 10 second timeout is in effect from that app.
Click to expand...
Click to collapse
That's true. The display timeout does change to 7 seconds. How would you set it so that the proximity sensor must be activated for a certain amount of time?
initial said:
Make a timeout so the proximity sensor has to be activated for at least 3 seconds
Click to expand...
Click to collapse
How do you do this in Tasker?
WillJitsu said:
How do you do this in Tasker?
Click to expand...
Click to collapse
I haven't been able to figure it out, anyone?
WillJitsu said:
That's true. The display timeout does change to 7 seconds. How would you set it so that the proximity sensor must be activated for a certain amount of time?
Click to expand...
Click to collapse
It does just change the display timeout, but only while the proximity sensor is covered. So if you uncover it before 7 seconds, the display stays on like normal, works well for now until I learn some more about Tasker.
Hey guys, I think I figured out how to do this. It requires using variables. Basically, you set a "proximity sensor active" variable that you create to true when it's activated (the context enter task), and set it to false when it's deactivated (the context exit task). Then in the enter task, after setting that variable, you wait 3 seconds, and then test if the variable is still true. If it is that means the exit task has not executed which means the sensor is still active and your task can proceed. If it isn't that means the exit task did execute which means you uncovered the sensor before the 3 second wait time elapsed and so you don't want to proceed. It looks like this:
Context: Proximity Sensor
Enter Task:
1. Variable Set, Name %PROXACTIVE to 1
2. Wait 3 seconds
3. If %PROXACTIVE ~ 1
4. If %WIN !~ Phone
5. If %WIN !~ Voicemail
6. WidgetLocker Cmd Activate
Exit Task:
1. Variable Set, Name %PROXACTIVE to 0
This works fine for me using WidgetLocker, since I only need the task to continue executing after the 3 second wait time, but if you are trying to actually change the display timeout, you'll still have the issue of the value reverting once you uncover the sensor. To get around this, create a separate task that changes the value (Tasks button at the bottom, then New Task), and call this task from the enter task (Tasker -> Perform Task). This puts the action behind a sort of wall that makes your main task oblivious to the fact that it's setting a revertible value, and the value will stick even after you uncover the sensor. Of course, this also means your display timeout will now remain at 7 seconds, so you'll have to create another task to restore that value on screen unlock or something like that.
Let me know if you have any questions, this seems to work okay for me!

proximity issue on stock rom gs4?

Recently, my phone has been having a problem with the proximity sensor during calls. When I finish a call, or want to look at my screen, the screen does not turn on by itself so I need to press the home button for the screen to light up. This is very annoying! I even turned off the option "Turn screen off during calls" (which is supposed to leave my screen lit up all the time) and the screen still goes black.
is it a software issue or hardware?
additional info : it works when i use my fone in a room {proximity ADC 43(43,43,43) } or building, but doesn't work while using outside {proximity ADC 51(51,51,51) }.

Proximity Sensor Issue

I've been getting a weird issue with my proximity sensor on my Note 4. It becomes... I suppose you could call it 'overzealous.' Even when not in a call, waving your finger over it will turn off the screen, no matter what screen it's on, home, lock, a game, Chrome, etc. And it's not just COVERING the sensor, it projects out to just over an inch away from the glass, so when I, say, go to pull down the notifications shade, the screen will turn off. It requires a restart to fix.
Anybody else had this particular issue?
You probably have some app what causing that because normally that sensor is only active during phone call. Possibly gesture control use that sensor too (when enabled). BTW proximity sensor in note 4 is set for 8 cm. It reads value above or below 8 cm but not exact distance.
Sent from my SM-N910T using XDA Free mobile app

Lockscreen anomalies

I'm not sure if i'm posting this in the right place but couldn't find any other more appropriate location. I'm running Oxygen 9.0 build A6013_34_181001 and I've already noticed a few bugs.
I have my phone set to use fingerprint unlock and pattern unlock. Pattern lock is configured such that the pattern line is NOT displayed when I enter it. This works fine, except after a reboot. Upon rebooting the phone I'm prompted for my pattern unlock, and the pattern is displayed when I enter it. After this one instance, the pattern display is correct and consistent with my setting. Subsequent pattern inputs don't display the line, it's just the first one after boot.
I also noticed a strange issue with the fingerprint unlock. When the screen is off and I double tap to turn on the ambient display, normally I put my finger on the fingerprint sensor and the display brightness increases. I'm assuming this is to provide illumination for the fingerprint sensor to function and get a good image of the fingerprint. Sometimes when I put my finger over the sensor the screen doesn't brighten, and the sensor can't read my fingerprint. I know it's detecting my fingerprint and trying to read it since I get the animation on the display around the sensor, the screen just doesn't brighten and the sensor can't read my fingerprint.
There have also been some instances where the double tap on the screen doesn't turn the ambient display on. I can use the power button to wake the phone, and that works fine, but periodically the double tap just won't turn the ambient display on. I like this feature so I can quickly check if there are any pending notifications without having to press any buttons, most often when my phone is lying on my desk.
I haven't been on any of the OnePlus forums yet. Do they have a forum for bug submittals?

Categories

Resources