SD card after you set SD as internel phone storage This JE is happening due to null pointer access in makeEntryFor() in MediaScanner.Java. Before accessing the cursor, check if cursor is available and not null. It is a safe check. Bug: 119392250 Test: manual, ran test 20 times and it passed every times. Change-Id: I23039281b63a0a6a411860eb5989cf20a5663c8f