Only send storage intents after boot complete
It is not possible to send a broadcast before the system boot is completed. If you do it anyway you will get an IllegalStateException: Cannot broadcast before boot completed. If a memory card is inserted or removed while the phone is booting up, there is a risk that the MountService will try to broadcast a storage intent too early, and cause the device to crash. Use FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT to avoid problems with too early broadcasts. Change-Id: Ied36a13d235df37c9788e45a35de40d919ae0cd0
Loading
Please register or sign in to comment