1) If the setting--"developer Options-" USB debugging disable off, indicating that the current user mode, the lock screen interface usb,ams will be called usbstorageactivity "Open USB storage Device" this interface.
2) The Usbstorageactivity interface has the following properties set in OnCreate ():
GetWindow (). Addflags (WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
if (environment.isexternalstorageremovable ()) {
GetWindow (). Addflags (WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
}
First property: If the non secure lock screen is present, usbstorageactivity will dismiss Keyguard.
Second property: When the lock screen, the usbstorageactivity can be displayed on the lock screen.
For specific explanations, see Windowmanager.java (Base\core\java\android\view)
Together, these two properties are:Non Secure lock screen mode, plug-in USB can bring up the Usbstorageactivity interface, and will Dimiss Keyguard, such as sliding lock screen, so press the home button directly back to Laucher, not Keyguard interface. Secure Lock Screen mode (in addition to sliding unlock other lock screen), plug-in USB AMS will call the Usbstorageactivity interface, but will not dismiss Keyguard, so users need to manually unlock first, After unlocking, you will see usbstorageactivity.
3) If the Enable USB debugging option is debug mode, the "Turn on USB storage device" is not recalled.
Android unlock interface, plug in USB pop-up to open the USB storage settings interface, press Home/back key directly back to launcher instead of sliding lock screen interface