Configure Mtp once on boot.
It is possible that UsbDeviceManager ends up
sending USB_STATE intents during a time when
MtpReceiver cannot start to process them.
In these cases, mtp will never be configured.
To fix, configure once on boot regardless. This
will be harmless if Mtp is already configured
since the additional configure will do nothing,
or if Mtp is not enabled.
Test: set require pass on boot -> reboot -> unlock -> plug in -> verify
Test: unset require pass on boot -> reboot -> unlock -> plug in ->
Test: above two tests with usb debugging on/off
(cherry picked from commit a21c1f467f3b5b535add6f7249fa0c28a7758e55)
1 file changed