mtpd: Fix iOS 10.2 connectivity issue.

iOS 10.2 device asks a user to tap Allow/Disallow button on the screen
when connected to Chromebook through USB.
Until the button is tapped, Chromebook sees dummy storage on the iOS
device with different storage ID from the actual one.
To handle this properly, LIBMTP_mtpdevice_t should be reused instead
of opening the device every time the storage state changes.

BUG=chromium:676968
TEST=manually tested.

Change-Id: I01bd262b7dbf381b389cb64dedb546995d73e375
Reviewed-on: https://chromium-review.googlesource.com/474627
Commit-Ready: Kevin Bailey <krb@chromium.org>
Commit-Ready: Tetsui Ohkubo <tetsui@google.com>
Tested-by: Tetsui Ohkubo <tetsui@chromium.org>
Reviewed-by: Kevin Bailey <krb@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2 files changed