When you play the slide show, press the power button to kill the screen and then the screen, and you will see that the slide continues to play without displaying the keyguard. How to display the Unlock interface after the screen is lit.
The modified method is to remove the flag_show_when_locked sign bit, the change location on the ICS2, JB and JB2 is slightly different.
1, in the ICS2 and JB version, modify the Gallery2\src\com\android\gallery3d\app\activitystate.java file Screen_on_flags, as follows:
Copy Code code as follows:
private static final int screen_on_flags = (
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
| WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON
// | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
);
2, on the JB2 version, modify the Alps\packages\apps\gallery2\src\com\android\gallery3d\app\slideshowpage.java OnCreate () method:
Copy Code code as follows:
public void OnCreate (Bundle data, Bundle restorestate) {
Super.oncreate ( data, restorestate);
//Mflags |= (Flag_hide_action_bar | Flag_hide_status_bar
//| flag_allow_lock_while_screen_on | flag_show_when_locked);
Mflags |= (Flag_hide_action_bar | Flag_hide_status_bar
| FLAG_ALLOW_LOCK_WHILE_SCREEN_ON);
...
}