Themes / Apps / Mods [App] Fix of buggy proximity sensor - Locking screen from being pressed during phone call - Redmi Note 10 Pro

Note: app compatible with any phone with 1080x2400 screen or lower. Probably higher too, try it. Also it's impossible to make such block when talking in messengers (more precisely, it's difficult). App won't work without gapps, rare case.
Instead of classic reliable optical sensor we have sucky ultrasonic one.
Sometimes it does not turn off the screen while phone call and something is pressed with ear or cheek up to dropping call.
Popular workaround is app "Call Proximity Sensor Fix" which automatically turns off the screen. Or you can press the power button immediately after the answer.
But IMHO this is inconvenient because if you need to look at something on the screen it will not turn on by itself which is so familiar.
My simple application makes screen insensitive to taps. And unlike analogs soft buttons and status bar are blocked too (but not gestures).
On screen will be translucent button that disables lock if you need to use the phone:
– Long tap on button - unlock (button will turn green)
– Short tap when unlocked - lock again
– Long tap when unlocked - remove button at all so as not to interfere with e.g. for entering text
When second call comes in screen will automatically unlock so you can easily answer or hang up. Then it blocks again.
When manually launching the application there will be a question whether to enable 4 seconds delay for an outgoing call. So you able to choose SIM card.
Made by powerful Tasker, the project was exported as standalone application via App Factory. Implemented via scenes with new full-screen blocking type.
Location of button adapted for default AOSP / Google Dialer. It can be misplaced for third-party dialers and / or interface scale. It's impossible to cover all possible variants. So if it really bothers you, install Tasker and project below. Then change coordinates of the buttons.
Installation
Follow manual carefully, otherwise nothing will work.
Application is safe and doesn't have internet access.
1. Download APK below this post
2. Install it via file manager and launch
3. Answer the question about delay, decision can be changed later by launching app again
4. Open Settings > Apps & Notifications > In-Call Screen Lock
5. In "Notifications" turn off them all completely, otherwise they will be annoy you
6. In "Permissions" enable everything: Contacts, Call List and Phone
7. MIUI: right there in application settings enable "Autostart"
8. MIUI: and in "Background" select "No restrictions"
9. Custom: Settings > Apps & Notifications > Advanced > Special app access > Battery optimization > All apps > In-Call Screen Lock > Don't optimize
10. Custom: Settings > Apps & Notifications > Advanced > Special app access > Display over other apps > In-Call Screen Lock > Allow display over other apps
11. MIUI: Settings > Privacy > Management > Special app access > Display over other apps > In-Call Screen Lock > Allow display over other apps
12. Settings > [MIUI: Advanced settings] > Accessibility > In-Call Screen Lock > enable "Use In-Call Screen Lock"
If you using Tasker
1. Download ZIP archive below this post
2. Extract file from it to phone/Tasker/projects
3. Tap on "House" icon at the bottom > Import Project > In-Call_Screen_Lock
4. If you don't need a delay on an outgoing call: delete / disable action #3 ("Wait") from the "In-Call Lock Start" task
5. Custom: Settings > Apps & Notifications > Advanced > Special app access > Display over other apps > Tasker > Allow display over other apps
6. MIUI: Settings > Privacy > Management > Special app access > Display over other apps > Tasker > Allow display over other apps
7. Settings > [MIUI: Advanced settings] > Accessibility > Tasker > enable "Use Tasker"
UPD: files updated, fixed small bug.

does this affect battery life

shakeelbirmani said:
does this affect battery life
Click to expand...
Click to collapse
No.

Tested now on my RN10-pro... works just fine! Thank you!

Tested without gapps and it didn't work. I use the standard phone app from Arrow OS. I do all settings from your instruction.
There was no 4 seconds query of the sim card. The and no lock screen button.

Social_Work said:
Tested without gapps and it didn't work.
Click to expand...
Click to collapse
Unfortunately, APK's exported by Tasker always have dependencies from GMS no matter actions it should perform. Sorry, I can't fix that.

I reinstal Arrow with Gapps and Install tasker. IT works great! Thx a lot! Now ist this Phone uesable.

Great application. Tested it via Tasker and works. Thank you so much!
Small question, if you do use the power button while in call to lock the screen and you unlock it again and then use your unlock button, it unlocks but the button disappears so you can't lock it again. How do I get the button back then?

Note: sensors are automatically calibrated and sometimes this creates a problem.
To cleanup and recalibrate the sensors, all you need to do is this:
Bash:
# dd if=/dev/block/by-name/persistbak of=/dev/block/by-name/persist conv=notrunc
For me that solved everything on official MIUI V13.0.12.0 (and previously on V12.5.9.0).

Amazfit User said:
if you do use the power button while in call to lock the screen and you unlock it again and then use your unlock button, it unlocks but the button disappears so you can't lock it again
Click to expand...
Click to collapse
That's strange. I tested as you wrote and button visible, nothing in profile logic should block its appearing. I used clean Android 11 and AOSP dialer.
As possible workaround please test this: Tasker > tab "Scenes" > Lock On > tap on lock icon > tab "Long tap" > action "Show Scene" > tick "Block Overlay+"
Zibri said:
sensors are automatically calibrated and sometimes this creates a problem
Click to expand...
Click to collapse
That's legit for classic sensor, but I'm doubt, that ultrasonic store its calibration data there (if even have it). "Sensor" unreliable just by design.

Bonoboo said:
That's strange. I tested as you wrote and button visible, nothing in profile logic should block its appearing. I used clean Android 11 and AOSP dialer.
As possible workaround please test this: Tasker > tab "Scenes" > Lock On > tap on lock icon > tab "Long tap" > action "Show Scene" > tick "Block Overlay+"
That's legit for classic sensor, but I'm doubt, that ultrasonic store its calibration data there (if even have it). "Sensor" unreliable just by design.
Click to expand...
Click to collapse
Thanks for the information. Tested it and ticking the block overlay + fixes the issue. I guess it's because even though I'm able to tap the icon and other call icons the phone is still locked. I guess the overlay + makes sure that the lock off scene is still visible on the "lock" screen. I'm on Samsung One UI 4.1 with the native Google dialer.
Thanks for the help.

Bonoboo said:
That's strange. I tested as you wrote and button visible, nothing in profile logic should block its appearing. I used clean Android 11 and AOSP dialer.
As possible workaround please test this: Tasker > tab "Scenes" > Lock On > tap on lock icon > tab "Long tap" > action "Show Scene" > tick "Block Overlay+"
That's legit for classic sensor, but I'm doubt, that ultrasonic store its calibration data there (if even have it). "Sensor" unreliable just by design.
Click to expand...
Click to collapse
ultrasonic sensor can be even manually calibrated and the calibration is indeed stored and used.
Also: the ultrasonic sensor works in software, relying also on the position and angle of the phone.
If that measurement fails or is inaccurate, everything is ruined.
Trust me: try to do a fastboot flash of V13.0.12.0 then reset that partition as I said.
Then you can tell me if it improves or not.
For me now it works perfect both in DUO both in the stock dialer and messenger.

You can find the latest stock firmwares here:
Codes and study of the Redmi Note 10 PRO (SWEET) and some findings
code name 76937 com.miui.powerkeeper.cloudcontrol.CloudUpdateReceiver 8437625 com.miui.powerkeeper.thermalconfig.ThermalConfigReceiver 37263 com.miui.powerkeeper.ui.framerate.FrameRateSecretCodeReceiver 2877...
forum.xda-developers.com

Related

[Guide] OnePlus 3 custom Tasker shell commands

*This requires root!*
So i was tweaking around with Tasker and I came across this tutorial online: http://www.notenoughtech.com/tasker/tasker-run-shell-commands
I decided to use the 3 commands he uses to make a list of shell commands that we can use. Basically this will allow you to change settings that are only found in Oxygen os and thus you can't normally change within Tasker. (I recommend you check out the page and try some things for yourself. There are more settings like these. The ones below are just the ones I thought would be most useful.)
Some examples of what you could use this for: A better power saving mode that disables all gestures and backlighting. Or automatically lock the hardware buttons when watching a show or movie, etc. This is not a guide for Tasker. If you don't know how Tasker works then I recommend you go watch some tutorials on YouTube. It definitely has a learning curve, but it is 100% worth it.
To add the shell script in Tasker:
create a task>'+' button>Code>Run Shell>enter the command line
Make sure you select the 'use root' checkbox, otherwise this will not work!
I've tested all of the commands below (on Oxygen os 4.0.3), however I'm not responsible for any damage that might occur to your phone.
Lock hw buttons
(You don't get the notification to re-enable the buttons. To do so you have to toggle the quick tile. Keep this in mind!)
On: settings put system oem_acc_key_lock_mode 4
Off: settings put system oem_acc_key_lock_mode 0
[Choose any percentage. If you go to battery settings and then tap 'Turn on automatically', it will set the value to 0. (So if you want to keep your settings, don't do this.)]
Auto enable battery saver at XX%: settings put global low_power_trigger_level XX
Capacitive button backlight
On: settings put system buttons_brightness 1
Off: settings put system buttons_brightness 0
Seconds in the clock
On: settings put secure clock_seconds 1
Off: settings put secure clock_seconds 0
Advanced reboot
On: settings put secure advanced_reboot 1
Off: settings put secure advanced_reboot 0
Double click power for camera
On: settings put secure
camera_double_tap_power_gesture_disabled 0
Off: settings put secure camera_double_tap_power_gesture_disabled 1
[For the button commands you can set it to multiple values (0-10). Below is a list of what the values mean. Replace the 'X' in the command line by the number of your choosing.]
0=No Action
1=Open/Close Menu
2=Recents
3=Search Assistant
4=Turn Off Screen
5=Open Camera
6=Voice Search
7=Open Last Used App
8=Open Shelf
9=Open/Close Notification Center
10=Open/Close Split Screen
Button Commands:
Long press home: settings put system key_home_long_press_action X
Double tap home: settings put system key_home_double_tap_action X
Long press Recents: settings put system key_app_switch_long_press_action X
Double tap Recents: settings put system key_app_switch_double_tap_action X
Long press back: settings put system key_back_long_press_action X
Double tap back: settings put system key_back_double_tap_action X
Screen on Gestures
Flip to mute
On: settings put system
oem_acc_sensor_rotate_silent 1
Off: settings put system
oem_acc_sensor_rotate_silent 0
3 Finger screenshot
On: settings put system
oem_acc_sensor_three_finger 1
Off: settings put system oem_acc_sensor_three_finger 0
[The screen off gestures work a little different. Every gesture has a certain number (written below). You have to add up the values of the gestures you want to have enabled. So everything enabled is 128+64+1+30=223 and nothing enabled is 0+0+0+0=0. Replace the 'XXX' in the command by the value you get.]
Double tap to wake=128
Open camera=64
Toggle flashlight=1
Music control=30
Screen off gesture: settings put system oem_acc_blackscreen_gestrue_enable XXX
I've tested these on Oxygen os 4.0.3. I'm not sure if they work on other versions/on the OnePlus 3t. I believe that the 'seconds in clock' and the 'lock hw buttons' weren't available before. So I doubt that those will work on marshmallow versions of Oxygen os (aside from maybe the marshmallow open beta). The others should be fine.

Greyscale display mode on Note 9 Pie variant

When I had a OnePlus I would use it's greyscale display feature quite often, very useful for power saving etc.
I am aware that within Google devices running Pie that a greyscale option is available along with Do Not Disturb.
This feature does not appear to be ported over the the Samsung Note 9, which is a shame.
Does anyone know of a third party app or Tasker feature that could enable greyscale mode on the Note 9 where required?
Thx
You can enable Monocromacy in the Simulate colour space option in Dev options and probably get a similar effect.
Go to settings -> accessibility -> visibility enhancements -> colour adjustment , turn it on and select greyscale.
baferdi said:
Go to settings -> accessibility -> visibility enhancements -> colour adjustment , turn it on and select greyscale.
Click to expand...
Click to collapse
Many thanks for the tip. This achieves the desired result but is a bit fiddly, do you know if this is accessible via Tasker, or does a shortcut exist?
KevQuoi said:
Many thanks for the tip. This achieves the desired result but is a bit fiddly, do you know if this is accessible via Tasker, or does a shortcut exist?
Click to expand...
Click to collapse
I made my own Tasker task shortcut on the main screen for this purpose.
The task only uses one action:
Add action -> Settings -> Custom setting
Type: Secure
Name: accessibility_display_daltonizer_enabled
Value: =:=toggle=:=
If it doesn't work for you, you can try finding the correct custom action with built-in Find function.
I see you got an answer regarding tasker. I can't help with tasker cause I've been too lazy to dig into it yet
KevQuoi said:
Many thanks for the tip. This achieves the desired result but is a bit fiddly, do you know if this is accessible via Tasker, or does a shortcut exist?
Click to expand...
Click to collapse
Under the accesibility settings go to advanced settings, from there you can set the power + vol up shortcut to control the monocromacy. I've gotten quite used to this function on a OnePlus 6 and have been using it this way on the Note 9.
I think the OP6's reading mode gave it a yellowish, e-reader like tint though, which made it better imo.

Accidental touches

Hi,
I'm starting to get really frustrated with my S10! When I have it in my pocket it's registering touches even though I'm not even touching my pocket I have my phone in.
I just got back home from my local gym and while I was exercising it has sent a photo from my gallery to different people on Facebook, even people from other places in the world who is not on my friend list.
I have enabled the option in settings to avoid accidental touches and the increased sensibility option is disabled as well and so is the raise to wake option.
Any ideas on how to solve this?
Heya,
I think that's an issue with all Samsung devices running on Android 9. Its actually the Fingerprint icon and/or double tap to wake up feature.
Try doing the following :-
1> Go to Settings > Advanced Features > Motion and Gestures and then turn off "Double Tap to Wake".
2> Go to Settings > Biometrics and Security > Fingerprints then Turn off "Show icon when screen is off".
If that still doesn't works, go to the same settings page in Step 1, and turn off "Lift to Wake Up" too.
Let me know if it works out for you.
Regards,
Ankit S.
Pr0Ankit said:
Heya,
I think that's an issue with all Samsung devices running on Android 9. Its actually the Fingerprint icon and/or double tap to wake up feature.
Try doing the following :-
1> Go to Settings > Advanced Features > Motion and Gestures and then turn off "Double Tap to Wake".
2> Go to Settings > Biometrics and Security > Fingerprints then Turn off "Show icon when screen is off".
If that still doesn't works, go to the same settings page in Step 1, and turn off "Lift to Wake Up" too.
Let me know if it works out for you.
Regards,
Ankit S.
Click to expand...
Click to collapse
Thanks for the great answer, I will give it a try

Is there a way to have flashlight shortcut on the lock screen? Ideally by button press.

Is there a way to have flashlight shortcut on the lock screen? Ideally by button press.
One of the most used function is missing on this phone
Draw a "V" on the screen whilst it's turned off and the flashlight will turn on/off
dnaswitcher said:
Draw a "V" on the screen whilst it's turned off and the flashlight will turn on/off
Click to expand...
Click to collapse
This doesn't work on X5 pro that I have
Did you activate the feature as described on the Oppo-site that appears after you click on my link?
It works on mine after doing so:
Go to [Settings] > [Gesture & Motion] > [Screen-off Gestures] > toggle to enable or disable [Screen-off Gestures].
You can also have more Screen-off Gestures by tapping [Add a Screen-off Gesture].
There are 7 more gestures to choose from.
dnaswitcher said:
Did you activate the feature as described on the Oppo-site that appears after you click on my link?
It works on mine after doing so:
Go to [Settings] > [Gesture & Motion] > [Screen-off Gestures] > toggle to enable or disable [Screen-off Gestures].
You can also have more Screen-off Gestures by tapping [Add a Screen-off Gesture].
There are 7 more gestures to choose from.
Click to expand...
Click to collapse
Working now. Many thanks

AOD off task when face down

Can somebody help me with a task to turn off aod when face down or in pocket on a samsung s21 FE?
Thanks!
Not bullet proof but you can give it a try...........
creat a new task > custom setting > system > aod_mode > value 0
create a new profile > find sensor or gesture > find face down
add the above task to the profile.
** you can reverse aod on I believe is using value 1
eeeemc said:
Not bullet proof but you can give it a try...........
creat a new task > custom setting > system > aod_mode > value 0
create a new profile > find sensor or gesture > find face down
add the above task to the profile.
** you can reverse aod on I believe is using value 1
Click to expand...
Click to collapse
Sadly it doesn't work.
But thanks
last resort ............
same as previous nmethod but change aod_mode to:
aod_tap_to_show_mode
use value 0
Actually I'm on Samsung A71 and using such methods
Mrawy said:
Sadly it doesn't work.
But thanks
Click to expand...
Click to collapse
eeeemc said:
last resort ............
same as previous nmethod but change aod_mode to:
aod_tap_to_show_mode
use value 0
Actually I'm on Samsung A71 and using such methods
Click to expand...
Click to collapse
It doen't work, maybe I need to give tasker some permissions trough adb?
Mrawy said:
It doen't work, maybe I need to give tasker some permissions trough adb?
Click to expand...
Click to collapse
I'm not sure if extra permission is required as not in my case.
May be try below experimental task if it works so that it proofs tasker custom settings is available on your device :
custom settings > system > blue_light_filter > value 1
This turn on Samsung's reading mode and if you manually hit play button from within tasker after you create this blue light test task , then you check from the dropdown tilt to see if the blue light icon is on or not.
if it is on , means custom setting is availble on your device without extra permission.
if this is the case , use custom setting to use the 'FIND' button step-by-step go to AOD on/off menu and set it. ( hope you know custom setting has 'FIND' function to manually choose the require action in your case is to find the AOD )
On Huawei P30 Pro, to disable AOD make task like a photos in attachment.
To use this task You Need use ADB DEBUGGING and Tasker Permissions app or adb command. Read more:
https://tasker.joaoapps.com/userguide/en/help/ah_secure_setting_grant.html
I toggle my AOD on my Samsung device. It's just as the first reply said.
custom setting > system > aod_mode > value 0 to turn it off, and 1 to turn it on.
To test the adb setting on your device, just create a simple task that toggles AOD. EG when you are connected to wifi, set it off, or somethign else you can use to easily test.
If that works (which it should), then it's the sensor part that has the issue.

Categories

Resources