android - NEXUS 5 lollipop 5.1 SurfaceFlinger error -


hello there? there 1 question. nexus5 lollipop5.1's issue. surfaceflinger there code comes in response device screen information in screenshotclient update using. code looks following.

unsigned int sw, sh, xsize, gsize, stride; ... ... screenshotclient sc;  sp<ibinder> display = surfacecomposerclient::getbuiltindisplay(isurfacecomposer::edisplayidmain);  if( sc.update(display,rect(), sw,sh, false) != no_error) {     ... ...      sc.release();      return 0; } stride = sc.getstride();  mapbase = sc.getpixels(); ... ... 

the above code, in other lollipop version operating normally. of course, nexus7 same version operate normally. however, change in nexus5. code reference, continue code loop is. , because try continue screen. first code in nexus5 operating normally. however, when count is, update not came under other screen return error. more ...! after complete finished code, re-run, after well, same phenomenon occurs when comes number. if ability know this?

i'm sorry not in english.

i had solve. screenshotclient sc , sp < ibinder > display should declared global variable. if class declared error occurs several times. (example. declared in function repeated.)