Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asl 1.2 bug fix - black screen bug #14

Open
GoogleCodeExporter opened this issue Feb 28, 2016 · 3 comments
Open

asl 1.2 bug fix - black screen bug #14

GoogleCodeExporter opened this issue Feb 28, 2016 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

1.nativ code bug fix

  main.c/handle_client_input():

        /* content */
        int length = pict.xres * pict.yres * pict.bps / 8;
        int seek, len;

        for(seek=0; seek<length; seek+=len) {
            len = Send(cfd, &pict.buffer[seek], length-seek, 0);
            if (len < 0)
                return -1;
        }
        Log ("- Screenshot sent");

2. Service bug fix

  ScreenshotService.java/retreiveRawScreenshot():

                ByteBuffer bytes = ByteBuffer.allocate (ss.width * ss.height * ss.bpp / 8);
                is = new BufferedInputStream(is);   // buffering is very important apparently

                int size, length=0, len;

                size = ss.width * ss.height * ss.bpp / 8;
                while((len=is.read(bytes.array(), length, size-length)) > 0)
                    length += len;

//              is.read(bytes.array());             // reading all at once for speed
//              Log.d("SERVICE", "Size=" + (ss.width * ss.height * ss.bpp / 8) + ", 
Length=" + length);
                bytes.position(0);                  // reset position to the beginning of ByteBuffer
                ss.pixels = bytes;


3. native win32 build fix

native/make.bat

@ set ADB=D:\Android\sdk\platform-tools\adb.exe

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by net...@gmail.com on 17 Apr 2012 at 3:49

@GoogleCodeExporter
Copy link
Author

Where are we supposed to apply this patch? Which lines? Can't you make a proper 
patch file?

Original comment by ziritr...@gmail.com on 21 May 2012 at 5:23

@GoogleCodeExporter
Copy link
Author

Hi All,

The Link below will solve your Black Screen Bug!!!
http://code.google.com/p/android-screenshot-library/source/detail?r=a3aa9eea3133
1d6eaae1de6c99e2f6accef79f01

Try it!!! It solved mine!!!

Pravin Dodia
Rultech Solutions Private Limited.....

Original comment by pravindo...@gmail.com on 30 May 2012 at 11:44

@GoogleCodeExporter
Copy link
Author

in latest ver asl this bug is'nt fixed.
this code:
>>
1.nativ code bug fix
2. Service bug fix
>>
absent in the latest version
Can't you make commit this code in dev_branch?

Original comment by savex...@gmail.com on 20 Jul 2012 at 6:48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant