When passing my phone to someone, I pin the screen for safety reasons. Is there a way to disable those ugly toasts which keep popping up and giving them a gist of what's happening?
You'll need root access, a compatible Xposed framework1 installed and EnhancedToast (an Xposed module) installed and activated in Xposed Installer app.
Once the Xposed module is activated and device rebooted, launch EnhancedToast → Android System (package name: android) → select the toasts that you want not to show up. Selection of any entry would cause its background to turn red. I sometimes need to reboot, but often, the changes take place immediately.
(Click an image to enlarge it)
The command-line as well as take it or leave it approach is to do:
(Requires adb setup in PC; root access not required; works only in Android 5.1.x and above)
adb shell appops set android TOAST_WINDOW deny # this would deny all toasts from Android System
Using a terminal emulator app but with root access, do:
su appops set android TOAST_WINDOW deny
To allow the toasts again, replace deny with allow in the said commands, as appropriate.
1 Xposed Framework: Android 5.x and 6.x