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

Use GetPartialObject() in classic mode when possible #124

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mcuelenaere
Copy link

Some Android devices do not seem to implement the Android MTP extensions, yet still support GetPartialObject. Use it when the file size is less than MaxUint32 and when there aren't any pending writes to file being read.

NOTE: this works for me, though I am still hitting the fatal error got type 0 (CONTAINER_UNDEFINED) in response, want CONTAINER_RESPONSE.; closing connection bug from time to time; which I'm taking is unrelated to this change (as this is a high-level change and that bug is more lower-level related)

@hanwen
Copy link
Owner

hanwen commented Jul 4, 2017

code looks roughly OK. Can you confirm that this case has test coverage?

Did you fill in the Google CLA? (https://cla.developers.google.com/about/google-individual)

@mcuelenaere
Copy link
Author

@hanwen what do you mean by test "coverage"? Whether it is handled by device_test.go?
Like I said, the patch works for me, except some of the times I get the null packet issue (which should be unrelated to this change).

I have signed the Google CLA for a different project already, so yes.

@hanwen
Copy link
Owner

hanwen commented Jul 11, 2017

yes, if you insert a panic into your changed code, does device_test generate a panic? If yes, then it's OK.

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

Successfully merging this pull request may close these issues.

2 participants