Hello All, My requirement is the following,
1. Show bootloader logo, till android home screen comes up, 2. Disable bootnaimation in android, 3. Block displaying any frames to primary display till android home screen comes up. Bootanimation is commented out in init.rc Disabling keyguard is done in the frameworks/base/core/res/res/value <!-- Whether to enable KeyguardService or not --> <bool *name=*"config_enableKeyguardService">true</bool> To block the frames rendering to the primary display surfaceflinger is modified as below, 884 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#884>*void* SurfaceFlinger <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#SurfaceFlinger>::onMessageReceived <http://androidxref.com/6.0.1_r10/s?refs=onMessageReceived&project=frameworks>(int32_t <http://androidxref.com/6.0.1_r10/s?defs=int32_t&project=frameworks> what <http://androidxref.com/6.0.1_r10/s?refs=what&project=frameworks>) {885 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#885> ATRACE_CALL <http://androidxref.com/6.0.1_r10/s?defs=ATRACE_CALL&project=frameworks>();886 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#886> *switch* (what <http://androidxref.com/6.0.1_r10/s?defs=what&project=frameworks>) {887 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#887> *case* MessageQueue <http://androidxref.com/6.0.1_r10/s?defs=MessageQueue&project=frameworks>::TRANSACTION <http://androidxref.com/6.0.1_r10/s?defs=TRANSACTION&project=frameworks>: {888 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#888> handleMessageTransaction <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#handleMessageTransaction>();889 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#889> *break*;890 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#890> }891 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#891> *case* MessageQueue <http://androidxref.com/6.0.1_r10/s?defs=MessageQueue&project=frameworks>::INVALIDATE <http://androidxref.com/6.0.1_r10/s?defs=INVALIDATE&project=frameworks>: {892 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#892> *bool* refreshNeeded <http://androidxref.com/6.0.1_r10/s?refs=refreshNeeded&project=frameworks> = handleMessageTransaction <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#handleMessageTransaction>();893 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#893> refreshNeeded <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#refreshNeeded> |= handleMessageInvalidate <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#handleMessageInvalidate>();894 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#894> refreshNeeded <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#refreshNeeded> |= mRepaintEverything <http://androidxref.com/6.0.1_r10/s?defs=mRepaintEverything&project=frameworks>;895 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#895> *if* (refreshNeeded <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#refreshNeeded>) {896 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#896> // Signal a refresh if a transaction modified the window state,897 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#897> // a new buffer was latched, or if HWC has requested a full898 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#898> // repaint899 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#899> signalRefresh <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#signalRefresh>();900 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#900> }901 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#901> *break*;902 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#902> }903 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#903> *case* MessageQueue <http://androidxref.com/6.0.1_r10/s?defs=MessageQueue&project=frameworks>::REFRESH <http://androidxref.com/6.0.1_r10/s?defs=REFRESH&project=frameworks>: { if (isToBeDisplayEnabled) //Condition to check when to start rendering904 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#904> handleMessageRefresh <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#handleMessageRefresh>(); }905 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#905> *break*;906 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#906> }907 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#907> }908 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#908>} I am setting the flag isTobeDisplayEnabled, in the function 289 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#289>*void* SurfaceFlinger <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#SurfaceFlinger>::bootFinished <http://androidxref.com/6.0.1_r10/s?refs=bootFinished&project=frameworks>()290 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#290>{291 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#291> *const* nsecs_t <http://androidxref.com/6.0.1_r10/s?defs=nsecs_t&project=frameworks> now <http://androidxref.com/6.0.1_r10/s?refs=now&project=frameworks> = systemTime <http://androidxref.com/6.0.1_r10/s?defs=systemTime&project=frameworks>();292 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#292> *const* nsecs_t <http://androidxref.com/6.0.1_r10/s?defs=nsecs_t&project=frameworks> duration <http://androidxref.com/6.0.1_r10/s?refs=duration&project=frameworks> = now <http://androidxref.com/6.0.1_r10/s?defs=now&project=frameworks> - mBootTime <http://androidxref.com/6.0.1_r10/s?defs=mBootTime&project=frameworks>;293 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#293> ALOGI <http://androidxref.com/6.0.1_r10/s?defs=ALOGI&project=frameworks>("Boot is finished (%ld ms)", *long*(ns2ms <http://androidxref.com/6.0.1_r10/s?defs=ns2ms&project=frameworks>(duration <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#duration>)) );294 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#294> mBootFinished <http://androidxref.com/6.0.1_r10/s?defs=mBootFinished&project=frameworks> = *true*;295 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#295>296 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#296> // wait patiently for the window manager death297 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#297> *const* String16 <http://androidxref.com/6.0.1_r10/s?defs=String16&project=frameworks> name <http://androidxref.com/6.0.1_r10/s?defs=name&project=frameworks>("window");298 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#298> sp <http://androidxref.com/6.0.1_r10/s?defs=sp&project=frameworks><IBinder <http://androidxref.com/6.0.1_r10/s?path=IBinder>> window <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#window>(defaultServiceManager <http://androidxref.com/6.0.1_r10/s?defs=defaultServiceManager&project=frameworks>()->getService <http://androidxref.com/6.0.1_r10/s?defs=getService&project=frameworks>(name <http://androidxref.com/6.0.1_r10/s?defs=name&project=frameworks>));299 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#299> *if* (window <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#window> != 0) {300 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#300> window <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#window>->linkToDeath <http://androidxref.com/6.0.1_r10/s?defs=linkToDeath&project=frameworks>(*static_cast*<IBinder <http://androidxref.com/6.0.1_r10/s?defs=IBinder&project=frameworks>::DeathRecipient <http://androidxref.com/6.0.1_r10/s?defs=DeathRecipient&project=frameworks>*>(*this*));301 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#301> }302 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#302>303 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#303> // stop boot animation304 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#304> // formerly we would just kill the process, but we now ask it to exit so it305 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#305> // can choose where to stop the animation.306 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#306> property_set <http://androidxref.com/6.0.1_r10/s?defs=property_set&project=frameworks>("service.bootanim.exit", "1"); isToBeDisplayEnabled = true; 307 <http://androidxref.com/6.0.1_r10/xref/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp#307>} But what i am seeing is when transition happens from Bootloader to android homescreen, there is rotated screen or there is a blank screen displayed before the android homescreen is visible. What may be the problem here how to correct the problems, -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.