When the Image Library plays a slide, press the power key to disable the screen and then highlight the screen. The slides continue to play and no keyguard is displayed. How to display the unlock page after the screen is highlighted.
The modification method is to remove the FLAG_SHOW_WHEN_LOCKED flag. The modification positions on ICS2, JB, and JB2 are slightly different.
1. In ICS2 and JB versions, modify SCREEN_ON_FLAGS in the Gallery2 \ src \ com \ android \ gallery3d \ app \ ActivityState. java file as follows:Copy codeThe Code is 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. In JB2, modify the onCreate () method of alps \ packages \ apps \ gallery2 \ src \ com \ android \ gallery3d \ app \ SlideshowPage. java:Copy codeThe Code is 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 );
...
}