android - Unlock screen appears after some delay -


in application, @ end display congratulation screen 15 seconds new activity containing single image, screen becomes black , device gets locked.

now click unlock button unlock screen prompt password should come up. after unlock button clicked twice(i.e. @ least after 5 seconds), password prompt appears.

what can reason delay in password prompt screen?

after searching, came across links, state power saver mode activation or sd card mounting reason delay. if case, when i'm not using app, how come device doesn't face delay?

any appreciated.

note that if try pressing unlock button after around 10 seconds of black screen appearance, unlock screen shows immediately.

finalactivity.java

public class finalactivity extends activity {     windowmanager.layoutparams params1;      @override     protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         this.requestwindowfeature(window.feature_no_title);         this.getwindow().setflags(windowmanager.layoutparams.flag_fullscreen,                 windowmanager.layoutparams.flag_fullscreen);         setcontentview(r.layout.endenroll);         mycountdec c = new mycountdec(15000, 1000);         c.start();     }      @override     protected void onresume() {         super.onresume();         params1 = getwindow().getattributes();         params1.screenbrightness = -1;         getwindow().setattributes(params1);         super.onresume();     }       public class mycountdec extends countdowntimer {         public mycountdec(long millisinfuture, long countdowninterval) {             super(millisinfuture, countdowninterval);         }          @override         public void onfinish() {             params1 = getwindow().getattributes();             params1.screenbrightness = 0;             getwindow().setattributes(params1);         }          @override         public void ontick(long millisuntilfinished) {         }     } } 


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -