Skip to content

Use GetPartialObject() in classic mode when possible - #124

Open
mcuelenaere wants to merge 2 commits into
hanwen:masterfrom
mcuelenaere:feature-classic-getpartialobject
Open

mcuelenaere wants to merge 2 commits into
hanwen:masterfrom
mcuelenaere:feature-classic-getpartialobject

Conversation

@mcuelenaere

Copy link
Copy Markdown

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

hanwen commented Jul 4, 2017

Copy link
Copy Markdown
Owner

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
Copy Markdown
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

hanwen commented Jul 11, 2017

Copy link
Copy Markdown
Owner

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