One solution is to use Tasker. Set up your phone to use a fingerprint as the standard unlock mechanism, with a strong password as the backup unlock (required if the fingerprint fails, or every time the phone reboots).
Next, create a Task named Screen Unlocked (or similar). In the Task, make it run the Display
->Lock
action. Set the Code to whatever pin you want. Check the Remember Till Off
and Full Screen
options, and make sure Allow Cancel
is unchecked.
Next, create a Profile in Tasker for the Event of Display Off
. When that profile is triggered, have it run the new Task you created. Add a second trigger to the same Profile to prevent this lock from happening if a call is in progress (using Invert). Otherwise, putting the phone to your head will turn off the display and cause the PIN lock (even though android knows it isn't actually locked and doesn't require tour fingerprint),and removing it from your head will show the PIN and block the call end and other buttons.
Finally, add a second Profile for the event Display Unlocked, and have it run the same Task. That way, if you do manually lock the phone while in a call with the power button (tripping the standard android fingerprint lock), it will properly show the PIN request on the screen again, without interfering with the end call buttons. Don't worry, having the lock show for display off and display unlocked will not, in fact, require you to type the pin twice.
With this setup, you unlock your phone with a fingerprint. When that is accepted, Tasker will prompt you for a PIN as well.
The reason you run this task on Screen Off instead of Screen Unlocked is that the Screen Unlocked creates a delay between unlocking the phone and showing the PIN request. By running the task on Screen Off, the PIN request is shown the instant you unlock with your fingerprint.
Note that this setup requires the PIN even if you use your backup password (if your fingerprint can't be read). However, I'm willing to live with that, since I rarely need to enter the master password anyway, and typing in a PIN afterwords is fine.
Protect Tasker
Since the PIN is stored in plaintext in Tasker, you should probably setup a PIN to open Tasker. Tasker has this built-in to its preferences, so you can require a PIN to view and modify any Tasker profiles and settings. Otherwise, if you leave your phone unlocked, anyone could find your PIN by viewing the Tasker config. In any case, don't use the same PIN for your screen unlock as you do for any other service like ATM cards or voicemail.