Fixed
Status Update
Comments
yb...@google.com <yb...@google.com> #2
Thanks for filing the issue.
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
Description
Version used: 1.0.0-alpha9
Currently the Configuration object encapsulates constant details about the DB (the version and callbacks) as well as the Context and filename required to actually open it. This means that when creating the machinery for a database, both the Callback instance and latest-supported version of that Callback need exposed. Then you hope that the consumer hooks both of them up correctly.
These two pieces of information are inherently linked, so it seems logical that the latest supported version could be moved inside the Callback via a 'int version()' method. This allows the Callback instance to become a constant whereas the filename and Context can be runtime-determined.
I'm also wondering if this obviates the need for the 'newVersion' parameter on both 'onUpgrade()' and 'onDowngrade()' methods, since the value returned from 'latestVersion()' could be used (or the constant that likely backs it).
Alternatively, the version could be added to the `Callback` constructor and exposed as a 'public final int version' field or 'int version()' method automatically.